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 |
a0a461e5 | 629 | NM_H |
81ecdfbb | 630 | GDB_NM_FILE |
ccb1ba62 CB |
631 | LTLIBXXHASH |
632 | LIBXXHASH | |
633 | HAVE_LIBXXHASH | |
393fd4c3 YQ |
634 | LTLIBBABELTRACE |
635 | LIBBABELTRACE | |
636 | HAVE_LIBBABELTRACE | |
21ea5acd SDJ |
637 | HAVE_NATIVE_GCORE_HOST |
638 | NAT_GENERATED_FILES | |
639 | XM_CLIBS | |
640 | MH_CFLAGS | |
641 | LOADLIBES | |
642 | NAT_CDEPS | |
643 | NATDEPFILES | |
644 | NAT_FILE | |
81ecdfbb RW |
645 | target_subdir |
646 | CONFIG_UNINSTALL | |
647 | CONFIG_INSTALL | |
648 | CONFIG_CLEAN | |
649 | CONFIG_ALL | |
650 | CONFIG_SRCS | |
651 | CONFIG_DEPS | |
652 | CONFIG_OBS | |
653 | PROFILE_CFLAGS | |
654 | ENABLE_CFLAGS | |
655 | SIM_OBS | |
656 | SIM | |
657 | XMKMF | |
658 | GDBTK_SRC_DIR | |
659 | GDBTK_CFLAGS | |
660 | GDBTKLIBS | |
661 | X_LIBS | |
662 | X_LDFLAGS | |
663 | X_CFLAGS | |
664 | TK_XINCLUDES | |
665 | TK_DEPS | |
666 | TK_LIBRARY | |
667 | TK_INCLUDE | |
668 | TK_STUB_LIB_SPEC | |
669 | TK_STUB_LIB_FLAG | |
670 | TK_STUB_LIB_FILE | |
671 | TK_LIB_SPEC | |
672 | TK_LIB_FLAG | |
673 | TK_LIB_FILE | |
674 | TK_SRC_DIR | |
675 | TK_BIN_DIR | |
676 | TK_VERSION | |
677 | TCL_DEPS | |
678 | TCL_LIBRARY | |
679 | TCL_INCLUDE | |
680 | TCL_STUB_LIB_SPEC | |
681 | TCL_STUB_LIB_FLAG | |
682 | TCL_STUB_LIB_FILE | |
683 | TCL_LIB_SPEC | |
684 | TCL_LIB_FLAG | |
685 | TCL_LIB_FILE | |
686 | TCL_SRC_DIR | |
687 | TCL_BIN_DIR | |
688 | TCL_PATCH_LEVEL | |
689 | TCL_VERSION | |
690 | WIN32LDAPP | |
b2ceabe8 | 691 | WIN32LIBS |
81ecdfbb RW |
692 | GUI_CFLAGS_X |
693 | LIBGUI | |
608e2dbb TT |
694 | LTLIBLZMA |
695 | LIBLZMA | |
696 | HAVE_LIBLZMA | |
81ecdfbb RW |
697 | SER_HARDWIRE |
698 | WERROR_CFLAGS | |
699 | WARN_CFLAGS | |
ed2a2229 | 700 | SYSTEM_GDBINIT_DIR |
81ecdfbb | 701 | SYSTEM_GDBINIT |
81ecdfbb RW |
702 | TARGET_SYSTEM_ROOT |
703 | CONFIG_LDFLAGS | |
f6528abd | 704 | RDYNAMIC |
05ea2a05 TT |
705 | LTLIBIPT |
706 | LIBIPT | |
707 | HAVE_LIBIPT | |
5e030278 TT |
708 | PTHREAD_CFLAGS |
709 | PTHREAD_LIBS | |
710 | PTHREAD_CC | |
711 | ax_pthread_config | |
712 | SED | |
81ecdfbb | 713 | ALLOCA |
62f29fda TT |
714 | SRCHIGH_CFLAGS |
715 | SRCHIGH_LIBS | |
4df42755 DE |
716 | HAVE_GUILE_FALSE |
717 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
718 | GUILE_LIBS |
719 | GUILE_CPPFLAGS | |
e76c5d17 DE |
720 | GUILD_TARGET_FLAG |
721 | GUILD | |
ed3ef339 | 722 | pkg_config_prog_path |
4df42755 DE |
723 | HAVE_PYTHON_FALSE |
724 | HAVE_PYTHON_TRUE | |
ac534cba JB |
725 | PYTHON_LIBS |
726 | PYTHON_CPPFLAGS | |
81ecdfbb | 727 | PYTHON_CFLAGS |
ec685c5e | 728 | python_prog_path |
2400729e UW |
729 | LTLIBMPFR |
730 | LIBMPFR | |
731 | HAVE_LIBMPFR | |
81ecdfbb RW |
732 | LTLIBEXPAT |
733 | LIBEXPAT | |
734 | HAVE_LIBEXPAT | |
b8e0a31c | 735 | JIT_READER_DIR |
f997c383 | 736 | TARGET_PTR |
39037522 | 737 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
738 | READLINE_CFLAGS |
739 | READLINE_DEPS | |
740 | READLINE | |
016a3251 DD |
741 | LTLIBICONV |
742 | LIBICONV | |
711a72d3 L |
743 | zlibinc |
744 | zlibdir | |
81ecdfbb RW |
745 | MIG |
746 | WINDRES | |
747 | DLLTOOL | |
c971b7fa | 748 | AR |
81ecdfbb RW |
749 | YFLAGS |
750 | YACC | |
c971b7fa | 751 | RANLIB |
81ecdfbb | 752 | LN_S |
c971b7fa PA |
753 | INSTALL_DATA |
754 | INSTALL_SCRIPT | |
755 | INSTALL_PROGRAM | |
756 | AWK | |
81ecdfbb RW |
757 | REPORT_BUGS_TEXI |
758 | REPORT_BUGS_TO | |
759 | PKGVERSION | |
44cee4fd | 760 | CODESIGN_CERT |
b292c783 | 761 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
762 | TARGET_OBS |
763 | subdirs | |
764 | GDB_DATADIR | |
765 | DEBUGDIR | |
5048e516 JK |
766 | MAKEINFO_EXTRA_FLAGS |
767 | MAKEINFOFLAGS | |
768 | MAKEINFO | |
81ecdfbb | 769 | PACKAGE |
81ecdfbb RW |
770 | CATOBJEXT |
771 | GENCAT | |
772 | INSTOBJEXT | |
773 | DATADIRNAME | |
774 | CATALOGS | |
775 | POSUB | |
776 | GMSGFMT | |
777 | XGETTEXT | |
778 | INCINTL | |
779 | LIBINTL_DEP | |
780 | LIBINTL | |
781 | USE_NLS | |
81ecdfbb RW |
782 | CCDEPMODE |
783 | DEPDIR | |
784 | am__leading_dot | |
0bcda685 PA |
785 | CXX_DIALECT |
786 | HAVE_CXX11 | |
4869db5e RM |
787 | INSTALL_STRIP_PROGRAM |
788 | STRIP | |
789 | install_sh | |
81ecdfbb RW |
790 | target_os |
791 | target_vendor | |
792 | target_cpu | |
793 | target | |
794 | host_os | |
795 | host_vendor | |
796 | host_cpu | |
797 | host | |
798 | build_os | |
799 | build_vendor | |
800 | build_cpu | |
801 | build | |
c971b7fa PA |
802 | EGREP |
803 | GREP | |
804 | CPP | |
3bc3d82a PA |
805 | ac_ct_CXX |
806 | CXXFLAGS | |
807 | CXX | |
81ecdfbb RW |
808 | OBJEXT |
809 | EXEEXT | |
810 | ac_ct_CC | |
811 | CPPFLAGS | |
812 | LDFLAGS | |
813 | CFLAGS | |
814 | CC | |
815 | MAINT | |
816 | MAINTAINER_MODE_FALSE | |
817 | MAINTAINER_MODE_TRUE | |
818 | target_alias | |
819 | host_alias | |
820 | build_alias | |
821 | LIBS | |
822 | ECHO_T | |
823 | ECHO_N | |
824 | ECHO_C | |
825 | DEFS | |
826 | mandir | |
827 | localedir | |
828 | libdir | |
829 | psdir | |
830 | pdfdir | |
831 | dvidir | |
832 | htmldir | |
833 | infodir | |
834 | docdir | |
835 | oldincludedir | |
836 | includedir | |
837 | localstatedir | |
838 | sharedstatedir | |
839 | sysconfdir | |
840 | datadir | |
841 | datarootdir | |
842 | libexecdir | |
843 | sbindir | |
844 | bindir | |
845 | program_transform_name | |
846 | prefix | |
847 | exec_prefix | |
848 | PACKAGE_URL | |
849 | PACKAGE_BUGREPORT | |
850 | PACKAGE_STRING | |
851 | PACKAGE_VERSION | |
852 | PACKAGE_TARNAME | |
853 | PACKAGE_NAME | |
854 | PATH_SEPARATOR | |
855 | SHELL' | |
2b351b19 | 856 | ac_subst_files='nat_makefile_frag' |
81ecdfbb RW |
857 | ac_user_opts=' |
858 | enable_option_checking | |
859 | enable_maintainer_mode | |
da2f07f1 JK |
860 | enable_plugins |
861 | enable_largefile | |
81ecdfbb RW |
862 | with_separate_debug_dir |
863 | with_gdb_datadir | |
864 | with_relocated_sources | |
7349ff92 | 865 | with_auto_load_dir |
bccbefd2 | 866 | with_auto_load_safe_path |
81ecdfbb RW |
867 | enable_targets |
868 | enable_64_bit_bfd | |
81ecdfbb RW |
869 | enable_gdbmi |
870 | enable_tui | |
871 | enable_gdbtk | |
05e7c244 | 872 | with_libunwind_ia64 |
81ecdfbb RW |
873 | with_curses |
874 | enable_profiling | |
44cee4fd | 875 | enable_codesign |
81ecdfbb RW |
876 | with_pkgversion |
877 | with_bugurl | |
711a72d3 | 878 | with_system_zlib |
016a3251 DD |
879 | with_gnu_ld |
880 | enable_rpath | |
81ecdfbb | 881 | with_libiconv_prefix |
478aac75 | 882 | with_iconv_bin |
81ecdfbb | 883 | with_system_readline |
b8e0a31c | 884 | with_jit_reader_dir |
81ecdfbb | 885 | with_expat |
81ecdfbb | 886 | with_libexpat_prefix |
2400729e UW |
887 | with_mpfr |
888 | with_libmpfr_prefix | |
81ecdfbb | 889 | with_python |
ed3ef339 | 890 | with_guile |
189b8c2e | 891 | enable_source_highlight |
58bfce93 MM |
892 | with_intel_pt |
893 | with_libipt_prefix | |
81ecdfbb RW |
894 | with_included_regex |
895 | with_sysroot | |
896 | with_system_gdbinit | |
ed2a2229 | 897 | with_system_gdbinit_dir |
81ecdfbb RW |
898 | enable_werror |
899 | enable_build_warnings | |
900 | enable_gdb_build_warnings | |
f35d5ade | 901 | enable_ubsan |
608e2dbb TT |
902 | with_lzma |
903 | with_liblzma_prefix | |
81ecdfbb RW |
904 | with_tcl |
905 | with_tk | |
906 | with_x | |
907 | enable_sim | |
393fd4c3 YQ |
908 | with_babeltrace |
909 | with_libbabeltrace_prefix | |
ccb1ba62 CB |
910 | with_xxhash |
911 | with_libxxhash_prefix | |
8ecfd7bd | 912 | enable_unit_tests |
81ecdfbb RW |
913 | ' |
914 | ac_precious_vars='build_alias | |
915 | host_alias | |
916 | target_alias | |
917 | CC | |
918 | CFLAGS | |
919 | LDFLAGS | |
920 | LIBS | |
921 | CPPFLAGS | |
3bc3d82a PA |
922 | CXX |
923 | CXXFLAGS | |
924 | CCC | |
81ecdfbb | 925 | CPP |
f06e05e0 JK |
926 | MAKEINFO |
927 | MAKEINFOFLAGS | |
81ecdfbb RW |
928 | YACC |
929 | YFLAGS | |
930 | XMKMF' | |
5ae98d25 | 931 | ac_subdirs_all='testsuite |
919adfe8 | 932 | gdbtk' |
c906108c SS |
933 | |
934 | # Initialize some variables set by options. | |
bec39cab AC |
935 | ac_init_help= |
936 | ac_init_version=false | |
81ecdfbb RW |
937 | ac_unrecognized_opts= |
938 | ac_unrecognized_sep= | |
c906108c SS |
939 | # The variables have the same names as the options, with |
940 | # dashes changed to underlines. | |
bec39cab | 941 | cache_file=/dev/null |
c906108c | 942 | exec_prefix=NONE |
c906108c | 943 | no_create= |
c906108c SS |
944 | no_recursion= |
945 | prefix=NONE | |
946 | program_prefix=NONE | |
947 | program_suffix=NONE | |
948 | program_transform_name=s,x,x, | |
949 | silent= | |
950 | site= | |
951 | srcdir= | |
c906108c SS |
952 | verbose= |
953 | x_includes=NONE | |
954 | x_libraries=NONE | |
bec39cab AC |
955 | |
956 | # Installation directory options. | |
957 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
958 | # and all the variables that are supposed to be based on exec_prefix | |
959 | # by default will actually change. | |
960 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 961 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
962 | bindir='${exec_prefix}/bin' |
963 | sbindir='${exec_prefix}/sbin' | |
964 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
965 | datarootdir='${prefix}/share' |
966 | datadir='${datarootdir}' | |
c906108c SS |
967 | sysconfdir='${prefix}/etc' |
968 | sharedstatedir='${prefix}/com' | |
969 | localstatedir='${prefix}/var' | |
c906108c SS |
970 | includedir='${prefix}/include' |
971 | oldincludedir='/usr/include' | |
81ecdfbb RW |
972 | docdir='${datarootdir}/doc/${PACKAGE}' |
973 | infodir='${datarootdir}/info' | |
974 | htmldir='${docdir}' | |
975 | dvidir='${docdir}' | |
976 | pdfdir='${docdir}' | |
977 | psdir='${docdir}' | |
978 | libdir='${exec_prefix}/lib' | |
979 | localedir='${datarootdir}/locale' | |
980 | mandir='${datarootdir}/man' | |
c906108c | 981 | |
c906108c | 982 | ac_prev= |
81ecdfbb | 983 | ac_dashdash= |
c906108c SS |
984 | for ac_option |
985 | do | |
c906108c SS |
986 | # If the previous option needs an argument, assign it. |
987 | if test -n "$ac_prev"; then | |
81ecdfbb | 988 | eval $ac_prev=\$ac_option |
c906108c SS |
989 | ac_prev= |
990 | continue | |
991 | fi | |
992 | ||
81ecdfbb | 993 | case $ac_option in |
d0ac1c44 SM |
994 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
995 | *=) ac_optarg= ;; | |
996 | *) ac_optarg=yes ;; | |
81ecdfbb | 997 | esac |
c906108c SS |
998 | |
999 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1000 | ||
81ecdfbb RW |
1001 | case $ac_dashdash$ac_option in |
1002 | --) | |
1003 | ac_dashdash=yes ;; | |
c906108c SS |
1004 | |
1005 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1006 | ac_prev=bindir ;; | |
1007 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1008 | bindir=$ac_optarg ;; |
c906108c SS |
1009 | |
1010 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1011 | ac_prev=build_alias ;; |
c906108c | 1012 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1013 | build_alias=$ac_optarg ;; |
c906108c SS |
1014 | |
1015 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1016 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1017 | ac_prev=cache_file ;; | |
1018 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1019 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1020 | cache_file=$ac_optarg ;; |
1021 | ||
1022 | --config-cache | -C) | |
1023 | cache_file=config.cache ;; | |
c906108c | 1024 | |
81ecdfbb | 1025 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1026 | ac_prev=datadir ;; |
81ecdfbb | 1027 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1028 | datadir=$ac_optarg ;; |
c906108c | 1029 | |
81ecdfbb RW |
1030 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1031 | | --dataroo | --dataro | --datar) | |
1032 | ac_prev=datarootdir ;; | |
1033 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1034 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1035 | datarootdir=$ac_optarg ;; | |
1036 | ||
c906108c | 1037 | -disable-* | --disable-*) |
81ecdfbb | 1038 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1039 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1040 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1041 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1042 | ac_useropt_orig=$ac_useropt |
1043 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1044 | case $ac_user_opts in | |
1045 | *" | |
1046 | "enable_$ac_useropt" | |
1047 | "*) ;; | |
1048 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1049 | ac_unrecognized_sep=', ';; | |
1050 | esac | |
1051 | eval enable_$ac_useropt=no ;; | |
1052 | ||
1053 | -docdir | --docdir | --docdi | --doc | --do) | |
1054 | ac_prev=docdir ;; | |
1055 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1056 | docdir=$ac_optarg ;; | |
1057 | ||
1058 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1059 | ac_prev=dvidir ;; | |
1060 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1061 | dvidir=$ac_optarg ;; | |
c906108c SS |
1062 | |
1063 | -enable-* | --enable-*) | |
81ecdfbb | 1064 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1065 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1066 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1067 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1068 | ac_useropt_orig=$ac_useropt |
1069 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1070 | case $ac_user_opts in | |
1071 | *" | |
1072 | "enable_$ac_useropt" | |
1073 | "*) ;; | |
1074 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1075 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1076 | esac |
81ecdfbb | 1077 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1078 | |
1079 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1080 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1081 | | --exec | --exe | --ex) | |
1082 | ac_prev=exec_prefix ;; | |
1083 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1084 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1085 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1086 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1087 | |
1088 | -gas | --gas | --ga | --g) | |
1089 | # Obsolete; use --with-gas. | |
1090 | with_gas=yes ;; | |
1091 | ||
bec39cab AC |
1092 | -help | --help | --hel | --he | -h) |
1093 | ac_init_help=long ;; | |
1094 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1095 | ac_init_help=recursive ;; | |
1096 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1097 | ac_init_help=short ;; | |
c906108c SS |
1098 | |
1099 | -host | --host | --hos | --ho) | |
bec39cab | 1100 | ac_prev=host_alias ;; |
c906108c | 1101 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1102 | host_alias=$ac_optarg ;; |
c906108c | 1103 | |
81ecdfbb RW |
1104 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1105 | ac_prev=htmldir ;; | |
1106 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1107 | | --ht=*) | |
1108 | htmldir=$ac_optarg ;; | |
1109 | ||
c906108c SS |
1110 | -includedir | --includedir | --includedi | --included | --include \ |
1111 | | --includ | --inclu | --incl | --inc) | |
1112 | ac_prev=includedir ;; | |
1113 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1114 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1115 | includedir=$ac_optarg ;; |
c906108c SS |
1116 | |
1117 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1118 | ac_prev=infodir ;; | |
1119 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1120 | infodir=$ac_optarg ;; |
c906108c SS |
1121 | |
1122 | -libdir | --libdir | --libdi | --libd) | |
1123 | ac_prev=libdir ;; | |
1124 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1125 | libdir=$ac_optarg ;; |
c906108c SS |
1126 | |
1127 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1128 | | --libexe | --libex | --libe) | |
1129 | ac_prev=libexecdir ;; | |
1130 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1131 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1132 | libexecdir=$ac_optarg ;; |
c906108c | 1133 | |
81ecdfbb RW |
1134 | -localedir | --localedir | --localedi | --localed | --locale) |
1135 | ac_prev=localedir ;; | |
1136 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1137 | localedir=$ac_optarg ;; | |
1138 | ||
c906108c | 1139 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1140 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1141 | ac_prev=localstatedir ;; |
1142 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1143 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1144 | localstatedir=$ac_optarg ;; |
c906108c SS |
1145 | |
1146 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1147 | ac_prev=mandir ;; | |
1148 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1149 | mandir=$ac_optarg ;; |
c906108c SS |
1150 | |
1151 | -nfp | --nfp | --nf) | |
1152 | # Obsolete; use --without-fp. | |
1153 | with_fp=no ;; | |
1154 | ||
1155 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1156 | | --no-cr | --no-c | -n) |
c906108c SS |
1157 | no_create=yes ;; |
1158 | ||
1159 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1160 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1161 | no_recursion=yes ;; | |
1162 | ||
1163 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1164 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1165 | | --oldin | --oldi | --old | --ol | --o) | |
1166 | ac_prev=oldincludedir ;; | |
1167 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1168 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1169 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1170 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1171 | |
1172 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1173 | ac_prev=prefix ;; | |
1174 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1175 | prefix=$ac_optarg ;; |
c906108c SS |
1176 | |
1177 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1178 | | --program-pre | --program-pr | --program-p) | |
1179 | ac_prev=program_prefix ;; | |
1180 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1181 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1182 | program_prefix=$ac_optarg ;; |
c906108c SS |
1183 | |
1184 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1185 | | --program-suf | --program-su | --program-s) | |
1186 | ac_prev=program_suffix ;; | |
1187 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1188 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1189 | program_suffix=$ac_optarg ;; |
c906108c SS |
1190 | |
1191 | -program-transform-name | --program-transform-name \ | |
1192 | | --program-transform-nam | --program-transform-na \ | |
1193 | | --program-transform-n | --program-transform- \ | |
1194 | | --program-transform | --program-transfor \ | |
1195 | | --program-transfo | --program-transf \ | |
1196 | | --program-trans | --program-tran \ | |
1197 | | --progr-tra | --program-tr | --program-t) | |
1198 | ac_prev=program_transform_name ;; | |
1199 | -program-transform-name=* | --program-transform-name=* \ | |
1200 | | --program-transform-nam=* | --program-transform-na=* \ | |
1201 | | --program-transform-n=* | --program-transform-=* \ | |
1202 | | --program-transform=* | --program-transfor=* \ | |
1203 | | --program-transfo=* | --program-transf=* \ | |
1204 | | --program-trans=* | --program-tran=* \ | |
1205 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1206 | program_transform_name=$ac_optarg ;; |
c906108c | 1207 | |
81ecdfbb RW |
1208 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1209 | ac_prev=pdfdir ;; | |
1210 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1211 | pdfdir=$ac_optarg ;; | |
1212 | ||
1213 | -psdir | --psdir | --psdi | --psd | --ps) | |
1214 | ac_prev=psdir ;; | |
1215 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1216 | psdir=$ac_optarg ;; | |
1217 | ||
c906108c SS |
1218 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1219 | | -silent | --silent | --silen | --sile | --sil) | |
1220 | silent=yes ;; | |
1221 | ||
1222 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1223 | ac_prev=sbindir ;; | |
1224 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1225 | | --sbi=* | --sb=*) | |
bec39cab | 1226 | sbindir=$ac_optarg ;; |
c906108c SS |
1227 | |
1228 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1229 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1230 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1231 | | --sha | --sh) | |
1232 | ac_prev=sharedstatedir ;; | |
1233 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1234 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1235 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1236 | | --sha=* | --sh=*) | |
bec39cab | 1237 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1238 | |
1239 | -site | --site | --sit) | |
1240 | ac_prev=site ;; | |
1241 | -site=* | --site=* | --sit=*) | |
bec39cab | 1242 | site=$ac_optarg ;; |
3ace7edb | 1243 | |
c906108c SS |
1244 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1245 | ac_prev=srcdir ;; | |
1246 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1247 | srcdir=$ac_optarg ;; |
c906108c SS |
1248 | |
1249 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1250 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1251 | ac_prev=sysconfdir ;; | |
1252 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1253 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1254 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1255 | |
1256 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1257 | ac_prev=target_alias ;; |
c906108c | 1258 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1259 | target_alias=$ac_optarg ;; |
c906108c SS |
1260 | |
1261 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1262 | verbose=yes ;; | |
1263 | ||
bec39cab AC |
1264 | -version | --version | --versio | --versi | --vers | -V) |
1265 | ac_init_version=: ;; | |
c906108c SS |
1266 | |
1267 | -with-* | --with-*) | |
81ecdfbb | 1268 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1269 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1270 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1271 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1272 | ac_useropt_orig=$ac_useropt |
1273 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1274 | case $ac_user_opts in | |
1275 | *" | |
1276 | "with_$ac_useropt" | |
1277 | "*) ;; | |
1278 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1279 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1280 | esac |
81ecdfbb | 1281 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1282 | |
1283 | -without-* | --without-*) | |
81ecdfbb | 1284 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1285 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1286 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1287 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1288 | ac_useropt_orig=$ac_useropt |
1289 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1290 | case $ac_user_opts in | |
1291 | *" | |
1292 | "with_$ac_useropt" | |
1293 | "*) ;; | |
1294 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1295 | ac_unrecognized_sep=', ';; | |
1296 | esac | |
1297 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1298 | |
1299 | --x) | |
1300 | # Obsolete; use --with-x. | |
1301 | with_x=yes ;; | |
1302 | ||
1303 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1304 | | --x-incl | --x-inc | --x-in | --x-i) | |
1305 | ac_prev=x_includes ;; | |
1306 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1307 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1308 | x_includes=$ac_optarg ;; |
c906108c SS |
1309 | |
1310 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1311 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1312 | ac_prev=x_libraries ;; | |
1313 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1314 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1315 | x_libraries=$ac_optarg ;; |
c906108c | 1316 | |
d0ac1c44 SM |
1317 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1318 | Try \`$0 --help' for more information" | |
c906108c SS |
1319 | ;; |
1320 | ||
bec39cab AC |
1321 | *=*) |
1322 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1323 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1324 | case $ac_envvar in #( |
1325 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1326 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1327 | esac |
1328 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1329 | export $ac_envvar ;; |
1330 | ||
c906108c | 1331 | *) |
bec39cab | 1332 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1333 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1334 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1335 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1336 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
c906108c SS |
1337 | ;; |
1338 | ||
1339 | esac | |
1340 | done | |
1341 | ||
1342 | if test -n "$ac_prev"; then | |
bec39cab | 1343 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1344 | as_fn_error $? "missing argument to $ac_option" |
c906108c | 1345 | fi |
c906108c | 1346 | |
81ecdfbb RW |
1347 | if test -n "$ac_unrecognized_opts"; then |
1348 | case $enable_option_checking in | |
1349 | no) ;; | |
d0ac1c44 | 1350 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1351 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
b4e70030 | 1352 | esac |
81ecdfbb | 1353 | fi |
b4e70030 | 1354 | |
81ecdfbb RW |
1355 | # Check all directory arguments for consistency. |
1356 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1357 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1358 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1359 | libdir localedir mandir | |
b4e70030 | 1360 | do |
81ecdfbb RW |
1361 | eval ac_val=\$$ac_var |
1362 | # Remove trailing slashes. | |
1363 | case $ac_val in | |
1364 | */ ) | |
1365 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1366 | eval $ac_var=\$ac_val;; | |
1367 | esac | |
1368 | # Be sure to have absolute directory names. | |
b4e70030 | 1369 | case $ac_val in |
81ecdfbb RW |
1370 | [\\/$]* | ?:[\\/]* ) continue;; |
1371 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1372 | esac |
d0ac1c44 | 1373 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1374 | done |
1375 | ||
bec39cab AC |
1376 | # There might be people who depend on the old broken behavior: `$host' |
1377 | # used to hold the argument of --host etc. | |
1378 | # FIXME: To remove some day. | |
1379 | build=$build_alias | |
1380 | host=$host_alias | |
1381 | target=$target_alias | |
1382 | ||
1383 | # FIXME: To remove some day. | |
1384 | if test "x$host_alias" != x; then | |
1385 | if test "x$build_alias" = x; then | |
1386 | cross_compiling=maybe | |
bec39cab AC |
1387 | elif test "x$build_alias" != "x$host_alias"; then |
1388 | cross_compiling=yes | |
1389 | fi | |
1390 | fi | |
c906108c | 1391 | |
bec39cab AC |
1392 | ac_tool_prefix= |
1393 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1394 | ||
1395 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1396 | |
c906108c | 1397 | |
81ecdfbb RW |
1398 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1399 | ac_ls_di=`ls -di .` && | |
1400 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1401 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1402 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1403 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1404 | |
1405 | ||
c906108c SS |
1406 | # Find the source files, if location was not specified. |
1407 | if test -z "$srcdir"; then | |
1408 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1409 | # Try the directory containing this script, then the parent directory. |
1410 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1411 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1412 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1413 | X"$as_myself" : 'X\(//\)$' \| \ | |
1414 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1415 | $as_echo X"$as_myself" | | |
1416 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1417 | s//\1/ | |
1418 | q | |
1419 | } | |
1420 | /^X\(\/\/\)[^/].*/{ | |
1421 | s//\1/ | |
1422 | q | |
1423 | } | |
1424 | /^X\(\/\/\)$/{ | |
1425 | s//\1/ | |
1426 | q | |
1427 | } | |
1428 | /^X\(\/\).*/{ | |
1429 | s//\1/ | |
1430 | q | |
1431 | } | |
1432 | s/.*/./; q'` | |
c906108c | 1433 | srcdir=$ac_confdir |
81ecdfbb | 1434 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1435 | srcdir=.. |
1436 | fi | |
1437 | else | |
1438 | ac_srcdir_defaulted=no | |
1439 | fi | |
81ecdfbb RW |
1440 | if test ! -r "$srcdir/$ac_unique_file"; then |
1441 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1442 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1443 | fi |
1444 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1445 | ac_abs_confdir=`( | |
d0ac1c44 | 1446 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1447 | pwd)` |
1448 | # When building in place, set srcdir=. | |
1449 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1450 | srcdir=. | |
1451 | fi | |
1452 | # Remove unnecessary trailing slashes from srcdir. | |
1453 | # Double slashes in file names in object file debugging info | |
1454 | # mess up M-x gdb in Emacs. | |
1455 | case $srcdir in | |
1456 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1457 | esac | |
1458 | for ac_var in $ac_precious_vars; do | |
1459 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1460 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1461 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1462 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1463 | done | |
c906108c | 1464 | |
bec39cab AC |
1465 | # |
1466 | # Report the --help message. | |
1467 | # | |
1468 | if test "$ac_init_help" = "long"; then | |
1469 | # Omit some internal or obsolete options to make the list less imposing. | |
1470 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1471 | cat <<_ACEOF | |
1472 | \`configure' configures this package to adapt to many kinds of systems. | |
1473 | ||
1474 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1475 | ||
1476 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1477 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1478 | ||
1479 | Defaults for the options are specified in brackets. | |
1480 | ||
1481 | Configuration: | |
1482 | -h, --help display this help and exit | |
1483 | --help=short display options specific to this package | |
1484 | --help=recursive display the short help of all the included packages | |
1485 | -V, --version display version information and exit | |
d0ac1c44 | 1486 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1487 | --cache-file=FILE cache test results in FILE [disabled] |
1488 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1489 | -n, --no-create do not create output files | |
1490 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1491 | ||
bec39cab AC |
1492 | Installation directories: |
1493 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1494 | [$ac_default_prefix] |
bec39cab | 1495 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1496 | [PREFIX] |
bec39cab AC |
1497 | |
1498 | By default, \`make install' will install all the files in | |
1499 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1500 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1501 | for instance \`--prefix=\$HOME'. | |
1502 | ||
1503 | For better control, use the options below. | |
1504 | ||
1505 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1506 | --bindir=DIR user executables [EPREFIX/bin] |
1507 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1508 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1509 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1510 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1511 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1512 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1513 | --includedir=DIR C header files [PREFIX/include] | |
1514 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1515 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1516 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1517 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1518 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1519 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1520 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1521 | --htmldir=DIR html documentation [DOCDIR] | |
1522 | --dvidir=DIR dvi documentation [DOCDIR] | |
1523 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1524 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1525 | _ACEOF |
1526 | ||
1527 | cat <<\_ACEOF | |
1528 | ||
9009e1ae MR |
1529 | Program names: |
1530 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1531 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1532 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1533 | ||
bec39cab AC |
1534 | X features: |
1535 | --x-includes=DIR X include files are in DIR | |
1536 | --x-libraries=DIR X library files are in DIR | |
1537 | ||
1538 | System types: | |
1539 | --build=BUILD configure for building on BUILD [guessed] | |
1540 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1541 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1542 | _ACEOF | |
1543 | fi | |
1544 | ||
1545 | if test -n "$ac_init_help"; then | |
1546 | ||
1547 | cat <<\_ACEOF | |
1548 | ||
1549 | Optional Features: | |
81ecdfbb | 1550 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1551 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1552 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1553 | --enable-maintainer-mode |
1554 | enable make rules and dependencies not useful (and | |
1555 | sometimes confusing) to the casual installer | |
2974be62 | 1556 | --enable-plugins Enable support for plugins |
da2f07f1 | 1557 | --disable-largefile omit support for large files |
a1220294 TT |
1558 | --enable-targets=TARGETS |
1559 | alternative target configurations | |
c0993dbe | 1560 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1561 | --disable-gdbmi disable machine-interface (MI) |
1562 | --enable-tui enable full-screen terminal user interface (TUI) | |
1563 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1564 | --enable-profiling enable profiling of GDB | |
44cee4fd | 1565 | --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
3841debe | 1566 | --disable-rpath do not hardcode runtime library paths |
189b8c2e ST |
1567 | --enable-source-highlight |
1568 | enable source-highlight for source listings | |
a1220294 | 1569 | --enable-werror treat compile warnings as errors |
32c1c914 | 1570 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1571 | --enable-gdb-build-warnings |
32c1c914 | 1572 | enable GDB specific build-time compiler warnings if |
a1220294 | 1573 | gcc is used |
f35d5ade | 1574 | --enable-ubsan enable undefined behavior sanitizer (auto/yes/no) |
32c1c914 | 1575 | --enable-sim link gdb with simulator |
8ecfd7bd SDJ |
1576 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1577 | GDB | |
bec39cab AC |
1578 | |
1579 | Optional Packages: | |
1580 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1581 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1582 | --with-separate-debug-dir=PATH |
32c1c914 | 1583 | look for global separate debug info in this path |
62e4f60c | 1584 | [LIBDIR/debug] |
b14b1491 TT |
1585 | --with-gdb-datadir=PATH look for global separate data files in this path |
1586 | [DATADIR/gdb] | |
29b0e8a2 | 1587 | --with-relocated-sources=PATH |
32c1c914 | 1588 | automatically relocate this path for source files |
7349ff92 | 1589 | --with-auto-load-dir=PATH |
aff139ff | 1590 | directories from which to load auto-loaded scripts |
1564a261 | 1591 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1592 | --with-auto-load-safe-path=PATH |
aff139ff | 1593 | directories safe to hold auto-loaded files |
7349ff92 | 1594 | [--with-auto-load-dir] |
bccbefd2 JK |
1595 | --without-auto-load-safe-path |
1596 | do not restrict auto-loaded files locations | |
05e7c244 | 1597 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1598 | --with-curses use the curses library instead of the termcap |
1599 | library | |
c16158bc JM |
1600 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1601 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1602 | --with-system-zlib use installed libz |
016a3251 DD |
1603 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1604 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1605 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
478aac75 | 1606 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1607 | --with-system-readline use installed readline library |
b8e0a31c SD |
1608 | --with-jit-reader-dir=PATH |
1609 | directory to load the JIT readers from | |
5c39566f | 1610 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1611 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1612 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
2400729e UW |
1613 | --with-mpfr include MPFR support (auto/yes/no) |
1614 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib | |
1615 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir | |
0c4a4063 DE |
1616 | --with-python[=PYTHON] include python support |
1617 | (auto/yes/no/<python-program>) | |
ed3ef339 DE |
1618 | --with-guile[=GUILE] include guile support |
1619 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1620 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1621 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1622 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
a1220294 TT |
1623 | --without-included-regex |
1624 | don't use included regex; this is the default on | |
1625 | systems with version 2 of the GNU C library (use | |
1626 | with caution on other system) | |
81ecdfbb | 1627 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1628 | --with-system-gdbinit=PATH |
32c1c914 | 1629 | automatically load a system-wide gdbinit file |
ed2a2229 CB |
1630 | --with-system-gdbinit-dir=PATH |
1631 | automatically load system-wide gdbinit files from | |
1632 | this directory | |
608e2dbb TT |
1633 | --with-lzma support lzma compression (auto/yes/no) |
1634 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1635 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1636 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1637 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1638 | --with-x use the X Window System |
393fd4c3 YQ |
1639 | --with-babeltrace include babeltrace support (auto/yes/no) |
1640 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1641 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
ccb1ba62 CB |
1642 | --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) |
1643 | --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib | |
1644 | --without-libxxhash-prefix don't search for libxxhash in includedir and libdir | |
bec39cab AC |
1645 | |
1646 | Some influential environment variables: | |
1647 | CC C compiler command | |
1648 | CFLAGS C compiler flags | |
1649 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1650 | nonstandard directory <lib dir> | |
81ecdfbb | 1651 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1652 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1653 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1654 | CXX C++ compiler command |
1655 | CXXFLAGS C++ compiler flags | |
bec39cab | 1656 | CPP C preprocessor |
f06e05e0 JK |
1657 | MAKEINFO Parent configure detects if it is of sufficient version. |
1658 | MAKEINFOFLAGS | |
1659 | Parameters for MAKEINFO. | |
d0ac1c44 SM |
1660 | YACC The `Yet Another Compiler Compiler' implementation to use. |
1661 | Defaults to the first program found out of: `bison -y', `byacc', | |
1662 | `yacc'. | |
81ecdfbb RW |
1663 | YFLAGS The list of arguments that will be passed by default to $YACC. |
1664 | This script will default YFLAGS to the empty string to avoid a | |
1665 | default value of `-d' given by some make applications. | |
1666 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1667 | |
1668 | Use these variables to override the choices made by `configure' or to help | |
1669 | it to find libraries and programs with nonstandard names/locations. | |
1670 | ||
81ecdfbb | 1671 | Report bugs to the package provider. |
bec39cab | 1672 | _ACEOF |
81ecdfbb | 1673 | ac_status=$? |
bec39cab AC |
1674 | fi |
1675 | ||
1676 | if test "$ac_init_help" = "recursive"; then | |
1677 | # If there are subdirs, report their specific --help. | |
bec39cab | 1678 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1679 | test -d "$ac_dir" || |
1680 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1681 | continue | |
bec39cab AC |
1682 | ac_builddir=. |
1683 | ||
81ecdfbb RW |
1684 | case "$ac_dir" in |
1685 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1686 | *) | |
1687 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1688 | # A ".." for each directory in $ac_dir_suffix. | |
1689 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1690 | case $ac_top_builddir_sub in | |
1691 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1692 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1693 | esac ;; | |
1694 | esac | |
1695 | ac_abs_top_builddir=$ac_pwd | |
1696 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1697 | # for backward compatibility: | |
1698 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1699 | |
1700 | case $srcdir in | |
81ecdfbb | 1701 | .) # We are building in place. |
bec39cab | 1702 | ac_srcdir=. |
81ecdfbb RW |
1703 | ac_top_srcdir=$ac_top_builddir_sub |
1704 | ac_abs_top_srcdir=$ac_pwd ;; | |
1705 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1706 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1707 | ac_top_srcdir=$srcdir |
1708 | ac_abs_top_srcdir=$srcdir ;; | |
1709 | *) # Relative name. | |
1710 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1711 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1712 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1713 | esac |
81ecdfbb | 1714 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1715 | |
81ecdfbb RW |
1716 | cd "$ac_dir" || { ac_status=$?; continue; } |
1717 | # Check for guested configure. | |
1718 | if test -f "$ac_srcdir/configure.gnu"; then | |
1719 | echo && | |
1720 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1721 | elif test -f "$ac_srcdir/configure"; then | |
1722 | echo && | |
1723 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1724 | else |
81ecdfbb RW |
1725 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1726 | fi || ac_status=$? | |
1727 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1728 | done |
1729 | fi | |
1730 | ||
81ecdfbb | 1731 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1732 | if $ac_init_version; then |
1733 | cat <<\_ACEOF | |
81ecdfbb | 1734 | configure |
d0ac1c44 | 1735 | generated by GNU Autoconf 2.69 |
bec39cab | 1736 | |
d0ac1c44 | 1737 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1738 | This configure script is free software; the Free Software Foundation |
1739 | gives unlimited permission to copy, distribute and modify it. | |
1740 | _ACEOF | |
81ecdfbb | 1741 | exit |
bec39cab | 1742 | fi |
bec39cab | 1743 | |
81ecdfbb RW |
1744 | ## ------------------------ ## |
1745 | ## Autoconf initialization. ## | |
1746 | ## ------------------------ ## | |
bec39cab | 1747 | |
81ecdfbb RW |
1748 | # ac_fn_c_try_compile LINENO |
1749 | # -------------------------- | |
1750 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1751 | ac_fn_c_try_compile () | |
1752 | { | |
1753 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1754 | rm -f conftest.$ac_objext | |
1755 | if { { ac_try="$ac_compile" | |
1756 | case "(($ac_try" in | |
1757 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1758 | *) ac_try_echo=$ac_try;; | |
1759 | esac | |
1760 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1761 | $as_echo "$ac_try_echo"; } >&5 | |
1762 | (eval "$ac_compile") 2>conftest.err | |
1763 | ac_status=$? | |
1764 | if test -s conftest.err; then | |
1765 | grep -v '^ *+' conftest.err >conftest.er1 | |
1766 | cat conftest.er1 >&5 | |
1767 | mv -f conftest.er1 conftest.err | |
1768 | fi | |
1769 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1770 | test $ac_status = 0; } && { | |
1771 | test -z "$ac_c_werror_flag" || | |
1772 | test ! -s conftest.err | |
1773 | } && test -s conftest.$ac_objext; then : | |
1774 | ac_retval=0 | |
1775 | else | |
1776 | $as_echo "$as_me: failed program was:" >&5 | |
1777 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1778 | |
81ecdfbb RW |
1779 | ac_retval=1 |
1780 | fi | |
d0ac1c44 SM |
1781 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1782 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1783 | |
1784 | } # ac_fn_c_try_compile | |
1785 | ||
3bc3d82a PA |
1786 | # ac_fn_cxx_try_compile LINENO |
1787 | # ---------------------------- | |
1788 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1789 | ac_fn_cxx_try_compile () | |
1790 | { | |
1791 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1792 | rm -f conftest.$ac_objext | |
1793 | if { { ac_try="$ac_compile" | |
1794 | case "(($ac_try" in | |
1795 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1796 | *) ac_try_echo=$ac_try;; | |
1797 | esac | |
1798 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1799 | $as_echo "$ac_try_echo"; } >&5 | |
1800 | (eval "$ac_compile") 2>conftest.err | |
1801 | ac_status=$? | |
1802 | if test -s conftest.err; then | |
1803 | grep -v '^ *+' conftest.err >conftest.er1 | |
1804 | cat conftest.er1 >&5 | |
1805 | mv -f conftest.er1 conftest.err | |
1806 | fi | |
1807 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1808 | test $ac_status = 0; } && { | |
1809 | test -z "$ac_cxx_werror_flag" || | |
1810 | test ! -s conftest.err | |
1811 | } && test -s conftest.$ac_objext; then : | |
1812 | ac_retval=0 | |
1813 | else | |
1814 | $as_echo "$as_me: failed program was:" >&5 | |
1815 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1816 | ||
1817 | ac_retval=1 | |
1818 | fi | |
d0ac1c44 SM |
1819 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1820 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1821 | |
1822 | } # ac_fn_cxx_try_compile | |
1823 | ||
81ecdfbb RW |
1824 | # ac_fn_c_try_cpp LINENO |
1825 | # ---------------------- | |
1826 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1827 | ac_fn_c_try_cpp () | |
bec39cab | 1828 | { |
81ecdfbb RW |
1829 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1830 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1831 | case "(($ac_try" in | |
1832 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1833 | *) ac_try_echo=$ac_try;; | |
1834 | esac | |
1835 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1836 | $as_echo "$ac_try_echo"; } >&5 | |
1837 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1838 | ac_status=$? | |
1839 | if test -s conftest.err; then | |
1840 | grep -v '^ *+' conftest.err >conftest.er1 | |
1841 | cat conftest.er1 >&5 | |
1842 | mv -f conftest.er1 conftest.err | |
1843 | fi | |
1844 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1845 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1846 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1847 | test ! -s conftest.err | |
1848 | }; then : | |
1849 | ac_retval=0 | |
1850 | else | |
1851 | $as_echo "$as_me: failed program was:" >&5 | |
1852 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1853 | |
81ecdfbb RW |
1854 | ac_retval=1 |
1855 | fi | |
d0ac1c44 SM |
1856 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1857 | as_fn_set_status $ac_retval | |
bec39cab | 1858 | |
81ecdfbb | 1859 | } # ac_fn_c_try_cpp |
bec39cab | 1860 | |
81ecdfbb RW |
1861 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1862 | # ------------------------------------------------------- | |
1863 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1864 | # the include files in INCLUDES and setting the cache variable VAR | |
1865 | # accordingly. | |
1866 | ac_fn_c_check_header_mongrel () | |
1867 | { | |
1868 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1869 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1871 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1872 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1873 | $as_echo_n "(cached) " >&6 |
1874 | fi | |
1875 | eval ac_res=\$$3 | |
1876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1877 | $as_echo "$ac_res" >&6; } | |
1878 | else | |
1879 | # Is the header compilable? | |
1880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1881 | $as_echo_n "checking $2 usability... " >&6; } | |
1882 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1883 | /* end confdefs.h. */ | |
1884 | $4 | |
1885 | #include <$2> | |
1886 | _ACEOF | |
1887 | if ac_fn_c_try_compile "$LINENO"; then : | |
1888 | ac_header_compiler=yes | |
1889 | else | |
1890 | ac_header_compiler=no | |
1891 | fi | |
1892 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1894 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1895 | |
81ecdfbb RW |
1896 | # Is the header present? |
1897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1898 | $as_echo_n "checking $2 presence... " >&6; } | |
1899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1900 | /* end confdefs.h. */ | |
1901 | #include <$2> | |
1902 | _ACEOF | |
1903 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1904 | ac_header_preproc=yes | |
1905 | else | |
1906 | ac_header_preproc=no | |
1907 | fi | |
d0ac1c44 | 1908 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1910 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1911 | |
81ecdfbb RW |
1912 | # So? What about this header? |
1913 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1914 | yes:no: ) | |
1915 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1916 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1917 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1918 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1919 | ;; | |
1920 | no:yes:* ) | |
1921 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1922 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1923 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1924 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1925 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1926 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1927 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1928 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1929 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1930 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1931 | ;; | |
1932 | esac | |
1933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1934 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1935 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1936 | $as_echo_n "(cached) " >&6 |
1937 | else | |
1938 | eval "$3=\$ac_header_compiler" | |
1939 | fi | |
1940 | eval ac_res=\$$3 | |
1941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1942 | $as_echo "$ac_res" >&6; } | |
1943 | fi | |
d0ac1c44 | 1944 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 1945 | |
81ecdfbb | 1946 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1947 | |
81ecdfbb RW |
1948 | # ac_fn_c_try_run LINENO |
1949 | # ---------------------- | |
1950 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1951 | # that executables *can* be run. | |
1952 | ac_fn_c_try_run () | |
1953 | { | |
1954 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1955 | if { { ac_try="$ac_link" | |
1956 | case "(($ac_try" in | |
1957 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1958 | *) ac_try_echo=$ac_try;; | |
1959 | esac | |
1960 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1961 | $as_echo "$ac_try_echo"; } >&5 | |
1962 | (eval "$ac_link") 2>&5 | |
1963 | ac_status=$? | |
1964 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1965 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1966 | { { case "(($ac_try" in | |
1967 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1968 | *) ac_try_echo=$ac_try;; | |
1969 | esac | |
1970 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1971 | $as_echo "$ac_try_echo"; } >&5 | |
1972 | (eval "$ac_try") 2>&5 | |
1973 | ac_status=$? | |
1974 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1975 | test $ac_status = 0; }; }; then : | |
1976 | ac_retval=0 | |
1977 | else | |
1978 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1979 | $as_echo "$as_me: failed program was:" >&5 | |
1980 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1981 | |
81ecdfbb RW |
1982 | ac_retval=$ac_status |
1983 | fi | |
1984 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
1985 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1986 | as_fn_set_status $ac_retval | |
bec39cab | 1987 | |
81ecdfbb | 1988 | } # ac_fn_c_try_run |
bec39cab | 1989 | |
81ecdfbb RW |
1990 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1991 | # ------------------------------------------------------- | |
1992 | # Tests whether HEADER exists and can be compiled using the include files in | |
1993 | # INCLUDES, setting the cache variable VAR accordingly. | |
1994 | ac_fn_c_check_header_compile () | |
1995 | { | |
1996 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1998 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1999 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2000 | $as_echo_n "(cached) " >&6 |
2001 | else | |
2002 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2003 | /* end confdefs.h. */ | |
2004 | $4 | |
2005 | #include <$2> | |
bec39cab | 2006 | _ACEOF |
81ecdfbb RW |
2007 | if ac_fn_c_try_compile "$LINENO"; then : |
2008 | eval "$3=yes" | |
2009 | else | |
2010 | eval "$3=no" | |
2011 | fi | |
2012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2013 | fi | |
2014 | eval ac_res=\$$3 | |
2015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2016 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2017 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 2018 | |
81ecdfbb | 2019 | } # ac_fn_c_check_header_compile |
bec39cab | 2020 | |
2974be62 AM |
2021 | # ac_fn_c_try_link LINENO |
2022 | # ----------------------- | |
2023 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2024 | ac_fn_c_try_link () | |
2025 | { | |
2026 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2027 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2028 | if { { ac_try="$ac_link" | |
2029 | case "(($ac_try" in | |
2030 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2031 | *) ac_try_echo=$ac_try;; | |
2032 | esac | |
2033 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2034 | $as_echo "$ac_try_echo"; } >&5 | |
2035 | (eval "$ac_link") 2>conftest.err | |
2036 | ac_status=$? | |
2037 | if test -s conftest.err; then | |
2038 | grep -v '^ *+' conftest.err >conftest.er1 | |
2039 | cat conftest.er1 >&5 | |
2040 | mv -f conftest.er1 conftest.err | |
2041 | fi | |
2042 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2043 | test $ac_status = 0; } && { | |
2044 | test -z "$ac_c_werror_flag" || | |
2045 | test ! -s conftest.err | |
2046 | } && test -s conftest$ac_exeext && { | |
2047 | test "$cross_compiling" = yes || | |
d0ac1c44 | 2048 | test -x conftest$ac_exeext |
2974be62 AM |
2049 | }; then : |
2050 | ac_retval=0 | |
2051 | else | |
2052 | $as_echo "$as_me: failed program was:" >&5 | |
2053 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2054 | ||
2055 | ac_retval=1 | |
2056 | fi | |
2057 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2058 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2059 | # interfere with the next link command; also delete a directory that is | |
2060 | # left behind by Apple's compiler. We do this before executing the actions. | |
2061 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2062 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2063 | as_fn_set_status $ac_retval | |
2974be62 AM |
2064 | |
2065 | } # ac_fn_c_try_link | |
2066 | ||
81ecdfbb RW |
2067 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2068 | # -------------------------------------------- | |
2069 | # Tries to find the compile-time value of EXPR in a program that includes | |
2070 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2071 | # computed | |
2072 | ac_fn_c_compute_int () | |
2073 | { | |
2074 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2075 | if test "$cross_compiling" = yes; then | |
2076 | # Depending upon the size, compute the lo and hi bounds. | |
2077 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2078 | /* end confdefs.h. */ | |
2079 | $4 | |
2080 | int | |
2081 | main () | |
2082 | { | |
2083 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2084 | test_array [0] = 0; |
2085 | return test_array [0]; | |
bec39cab | 2086 | |
81ecdfbb RW |
2087 | ; |
2088 | return 0; | |
2089 | } | |
2090 | _ACEOF | |
2091 | if ac_fn_c_try_compile "$LINENO"; then : | |
2092 | ac_lo=0 ac_mid=0 | |
2093 | while :; do | |
2094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2095 | /* end confdefs.h. */ | |
2096 | $4 | |
2097 | int | |
2098 | main () | |
2099 | { | |
2100 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2101 | test_array [0] = 0; |
2102 | return test_array [0]; | |
bec39cab | 2103 | |
81ecdfbb RW |
2104 | ; |
2105 | return 0; | |
2106 | } | |
2107 | _ACEOF | |
2108 | if ac_fn_c_try_compile "$LINENO"; then : | |
2109 | ac_hi=$ac_mid; break | |
2110 | else | |
2111 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2112 | if test $ac_lo -le $ac_mid; then | |
2113 | ac_lo= ac_hi= | |
2114 | break | |
2115 | fi | |
2116 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2117 | fi |
81ecdfbb RW |
2118 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2119 | done | |
c906108c | 2120 | else |
81ecdfbb RW |
2121 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2122 | /* end confdefs.h. */ | |
2123 | $4 | |
2124 | int | |
2125 | main () | |
2126 | { | |
2127 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2128 | test_array [0] = 0; |
2129 | return test_array [0]; | |
bec39cab | 2130 | |
81ecdfbb RW |
2131 | ; |
2132 | return 0; | |
2133 | } | |
2134 | _ACEOF | |
2135 | if ac_fn_c_try_compile "$LINENO"; then : | |
2136 | ac_hi=-1 ac_mid=-1 | |
2137 | while :; do | |
2138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2139 | /* end confdefs.h. */ | |
2140 | $4 | |
2141 | int | |
2142 | main () | |
2143 | { | |
2144 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2145 | test_array [0] = 0; |
2146 | return test_array [0]; | |
bec39cab | 2147 | |
81ecdfbb RW |
2148 | ; |
2149 | return 0; | |
2150 | } | |
2151 | _ACEOF | |
2152 | if ac_fn_c_try_compile "$LINENO"; then : | |
2153 | ac_lo=$ac_mid; break | |
2154 | else | |
2155 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2156 | if test $ac_mid -le $ac_hi; then | |
2157 | ac_lo= ac_hi= | |
2158 | break | |
2159 | fi | |
2160 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2161 | fi | |
2162 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2163 | done | |
2164 | else | |
2165 | ac_lo= ac_hi= | |
2166 | fi | |
2167 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2168 | fi | |
2169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2170 | # Binary search between lo and hi bounds. | |
2171 | while test "x$ac_lo" != "x$ac_hi"; do | |
2172 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2174 | /* end confdefs.h. */ | |
2175 | $4 | |
2176 | int | |
2177 | main () | |
2178 | { | |
2179 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2180 | test_array [0] = 0; |
2181 | return test_array [0]; | |
bec39cab | 2182 | |
81ecdfbb RW |
2183 | ; |
2184 | return 0; | |
2185 | } | |
2186 | _ACEOF | |
2187 | if ac_fn_c_try_compile "$LINENO"; then : | |
2188 | ac_hi=$ac_mid | |
2189 | else | |
2190 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2191 | fi | |
2192 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2193 | done | |
2194 | case $ac_lo in #(( | |
2195 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2196 | '') ac_retval=1 ;; | |
2197 | esac | |
2198 | else | |
2199 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2200 | /* end confdefs.h. */ | |
2201 | $4 | |
2202 | static long int longval () { return $2; } | |
2203 | static unsigned long int ulongval () { return $2; } | |
2204 | #include <stdio.h> | |
2205 | #include <stdlib.h> | |
2206 | int | |
2207 | main () | |
2208 | { | |
bec39cab | 2209 | |
81ecdfbb RW |
2210 | FILE *f = fopen ("conftest.val", "w"); |
2211 | if (! f) | |
2212 | return 1; | |
2213 | if (($2) < 0) | |
2214 | { | |
2215 | long int i = longval (); | |
2216 | if (i != ($2)) | |
2217 | return 1; | |
2218 | fprintf (f, "%ld", i); | |
2219 | } | |
2220 | else | |
2221 | { | |
2222 | unsigned long int i = ulongval (); | |
2223 | if (i != ($2)) | |
2224 | return 1; | |
2225 | fprintf (f, "%lu", i); | |
2226 | } | |
2227 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2228 | on some platforms. */ | |
2229 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2230 | |
81ecdfbb RW |
2231 | ; |
2232 | return 0; | |
2233 | } | |
2234 | _ACEOF | |
2235 | if ac_fn_c_try_run "$LINENO"; then : | |
2236 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2237 | else | |
2238 | ac_retval=1 | |
2239 | fi | |
2240 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2241 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2242 | rm -f conftest.val | |
bec39cab | 2243 | |
81ecdfbb | 2244 | fi |
d0ac1c44 SM |
2245 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2246 | as_fn_set_status $ac_retval | |
bec39cab | 2247 | |
81ecdfbb | 2248 | } # ac_fn_c_compute_int |
bec39cab | 2249 | |
55a8c076 YQ |
2250 | # ac_fn_c_check_func LINENO FUNC VAR |
2251 | # ---------------------------------- | |
2252 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2253 | ac_fn_c_check_func () | |
81ecdfbb RW |
2254 | { |
2255 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2257 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2258 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2259 | $as_echo_n "(cached) " >&6 |
2260 | else | |
81ecdfbb RW |
2261 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2262 | /* end confdefs.h. */ | |
55a8c076 YQ |
2263 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2264 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2265 | #define $2 innocuous_$2 | |
2266 | ||
2267 | /* System header to define __stub macros and hopefully few prototypes, | |
2268 | which can conflict with char $2 (); below. | |
2269 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2270 | <limits.h> exists even on freestanding compilers. */ | |
2271 | ||
2272 | #ifdef __STDC__ | |
2273 | # include <limits.h> | |
2274 | #else | |
2275 | # include <assert.h> | |
2276 | #endif | |
2277 | ||
2278 | #undef $2 | |
2279 | ||
2280 | /* Override any GCC internal prototype to avoid an error. | |
2281 | Use char because int might match the return type of a GCC | |
2282 | builtin and then its argument prototype would still apply. */ | |
2283 | #ifdef __cplusplus | |
2284 | extern "C" | |
2285 | #endif | |
2286 | char $2 (); | |
2287 | /* The GNU C library defines this for functions which it implements | |
2288 | to always fail with ENOSYS. Some functions are actually named | |
2289 | something starting with __ and the normal name is an alias. */ | |
2290 | #if defined __stub_$2 || defined __stub___$2 | |
2291 | choke me | |
2292 | #endif | |
2293 | ||
2294 | int | |
2295 | main () | |
2296 | { | |
2297 | return $2 (); | |
2298 | ; | |
2299 | return 0; | |
2300 | } | |
2301 | _ACEOF | |
2302 | if ac_fn_c_try_link "$LINENO"; then : | |
2303 | eval "$3=yes" | |
2304 | else | |
2305 | eval "$3=no" | |
2306 | fi | |
2307 | rm -f core conftest.err conftest.$ac_objext \ | |
2308 | conftest$ac_exeext conftest.$ac_ext | |
2309 | fi | |
2310 | eval ac_res=\$$3 | |
2311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2312 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2313 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
55a8c076 YQ |
2314 | |
2315 | } # ac_fn_c_check_func | |
2316 | ||
07697489 PA |
2317 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2318 | # ------------------------------------------- | |
2319 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2320 | # variable VAR accordingly. | |
2321 | ac_fn_c_check_type () | |
2322 | { | |
2323 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2325 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2326 | if eval \${$3+:} false; then : |
07697489 PA |
2327 | $as_echo_n "(cached) " >&6 |
2328 | else | |
2329 | eval "$3=no" | |
2330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2331 | /* end confdefs.h. */ | |
2332 | $4 | |
2333 | int | |
2334 | main () | |
2335 | { | |
2336 | if (sizeof ($2)) | |
2337 | return 0; | |
2338 | ; | |
2339 | return 0; | |
2340 | } | |
2341 | _ACEOF | |
2342 | if ac_fn_c_try_compile "$LINENO"; then : | |
2343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2344 | /* end confdefs.h. */ | |
2345 | $4 | |
2346 | int | |
2347 | main () | |
2348 | { | |
2349 | if (sizeof (($2))) | |
2350 | return 0; | |
2351 | ; | |
2352 | return 0; | |
2353 | } | |
2354 | _ACEOF | |
2355 | if ac_fn_c_try_compile "$LINENO"; then : | |
2356 | ||
2357 | else | |
2358 | eval "$3=yes" | |
2359 | fi | |
2360 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2361 | fi | |
2362 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2363 | fi | |
2364 | eval ac_res=\$$3 | |
2365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2366 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2367 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
07697489 PA |
2368 | |
2369 | } # ac_fn_c_check_type | |
2370 | ||
d0ac1c44 SM |
2371 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2372 | # --------------------------------------------- | |
2373 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2374 | # accordingly. | |
770d76d7 PA |
2375 | ac_fn_c_check_decl () |
2376 | { | |
2377 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2378 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2379 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2381 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
d0ac1c44 | 2382 | if eval \${$3+:} false; then : |
770d76d7 PA |
2383 | $as_echo_n "(cached) " >&6 |
2384 | else | |
2385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2386 | /* end confdefs.h. */ | |
2387 | $4 | |
2388 | int | |
2389 | main () | |
2390 | { | |
2391 | #ifndef $as_decl_name | |
2392 | #ifdef __cplusplus | |
2393 | (void) $as_decl_use; | |
2394 | #else | |
2395 | (void) $as_decl_name; | |
2396 | #endif | |
2397 | #endif | |
2398 | ||
2399 | ; | |
2400 | return 0; | |
2401 | } | |
2402 | _ACEOF | |
2403 | if ac_fn_c_try_compile "$LINENO"; then : | |
2404 | eval "$3=yes" | |
2405 | else | |
2406 | eval "$3=no" | |
2407 | fi | |
2408 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2409 | fi | |
2410 | eval ac_res=\$$3 | |
2411 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2412 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2413 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
770d76d7 PA |
2414 | |
2415 | } # ac_fn_c_check_decl | |
f35d5ade | 2416 | |
05ea2a05 TT |
2417 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2418 | # ---------------------------------------------------- | |
2419 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2420 | # INCLUDES, setting cache variable VAR accordingly. | |
2421 | ac_fn_c_check_member () | |
2422 | { | |
2423 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2425 | $as_echo_n "checking for $2.$3... " >&6; } | |
2426 | if eval \${$4+:} false; then : | |
2427 | $as_echo_n "(cached) " >&6 | |
2428 | else | |
2429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2430 | /* end confdefs.h. */ | |
2431 | $5 | |
2432 | int | |
2433 | main () | |
2434 | { | |
2435 | static $2 ac_aggr; | |
2436 | if (ac_aggr.$3) | |
2437 | return 0; | |
2438 | ; | |
2439 | return 0; | |
2440 | } | |
2441 | _ACEOF | |
2442 | if ac_fn_c_try_compile "$LINENO"; then : | |
2443 | eval "$4=yes" | |
2444 | else | |
2445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2446 | /* end confdefs.h. */ | |
2447 | $5 | |
2448 | int | |
2449 | main () | |
2450 | { | |
2451 | static $2 ac_aggr; | |
2452 | if (sizeof ac_aggr.$3) | |
2453 | return 0; | |
2454 | ; | |
2455 | return 0; | |
2456 | } | |
2457 | _ACEOF | |
2458 | if ac_fn_c_try_compile "$LINENO"; then : | |
2459 | eval "$4=yes" | |
2460 | else | |
2461 | eval "$4=no" | |
2462 | fi | |
2463 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2464 | fi | |
2465 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2466 | fi | |
2467 | eval ac_res=\$$4 | |
2468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2469 | $as_echo "$ac_res" >&6; } | |
2470 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2471 | ||
2472 | } # ac_fn_c_check_member | |
2473 | ||
f35d5ade TT |
2474 | # ac_fn_cxx_try_link LINENO |
2475 | # ------------------------- | |
2476 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2477 | ac_fn_cxx_try_link () | |
2478 | { | |
2479 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2480 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2481 | if { { ac_try="$ac_link" | |
2482 | case "(($ac_try" in | |
2483 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2484 | *) ac_try_echo=$ac_try;; | |
2485 | esac | |
2486 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2487 | $as_echo "$ac_try_echo"; } >&5 | |
2488 | (eval "$ac_link") 2>conftest.err | |
2489 | ac_status=$? | |
2490 | if test -s conftest.err; then | |
2491 | grep -v '^ *+' conftest.err >conftest.er1 | |
2492 | cat conftest.er1 >&5 | |
2493 | mv -f conftest.er1 conftest.err | |
2494 | fi | |
2495 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2496 | test $ac_status = 0; } && { | |
2497 | test -z "$ac_cxx_werror_flag" || | |
2498 | test ! -s conftest.err | |
2499 | } && test -s conftest$ac_exeext && { | |
2500 | test "$cross_compiling" = yes || | |
2501 | test -x conftest$ac_exeext | |
2502 | }; then : | |
2503 | ac_retval=0 | |
2504 | else | |
2505 | $as_echo "$as_me: failed program was:" >&5 | |
2506 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2507 | ||
2508 | ac_retval=1 | |
2509 | fi | |
2510 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2511 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2512 | # interfere with the next link command; also delete a directory that is | |
2513 | # left behind by Apple's compiler. We do this before executing the actions. | |
2514 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2515 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2516 | as_fn_set_status $ac_retval | |
2517 | ||
2518 | } # ac_fn_cxx_try_link | |
21987b9c TT |
2519 | |
2520 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2521 | # ------------------------------------ | |
2522 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2523 | ac_fn_cxx_check_func () | |
2524 | { | |
2525 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2527 | $as_echo_n "checking for $2... " >&6; } | |
2528 | if eval \${$3+:} false; then : | |
2529 | $as_echo_n "(cached) " >&6 | |
2530 | else | |
2531 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2532 | /* end confdefs.h. */ | |
2533 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2534 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2535 | #define $2 innocuous_$2 | |
2536 | ||
2537 | /* System header to define __stub macros and hopefully few prototypes, | |
2538 | which can conflict with char $2 (); below. | |
2539 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2540 | <limits.h> exists even on freestanding compilers. */ | |
2541 | ||
2542 | #ifdef __STDC__ | |
2543 | # include <limits.h> | |
2544 | #else | |
2545 | # include <assert.h> | |
2546 | #endif | |
2547 | ||
2548 | #undef $2 | |
2549 | ||
2550 | /* Override any GCC internal prototype to avoid an error. | |
2551 | Use char because int might match the return type of a GCC | |
2552 | builtin and then its argument prototype would still apply. */ | |
2553 | #ifdef __cplusplus | |
2554 | extern "C" | |
2555 | #endif | |
2556 | char $2 (); | |
2557 | /* The GNU C library defines this for functions which it implements | |
2558 | to always fail with ENOSYS. Some functions are actually named | |
2559 | something starting with __ and the normal name is an alias. */ | |
2560 | #if defined __stub_$2 || defined __stub___$2 | |
2561 | choke me | |
2562 | #endif | |
2563 | ||
2564 | int | |
2565 | main () | |
2566 | { | |
2567 | return $2 (); | |
2568 | ; | |
2569 | return 0; | |
2570 | } | |
2571 | _ACEOF | |
2572 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2573 | eval "$3=yes" | |
2574 | else | |
2575 | eval "$3=no" | |
2576 | fi | |
2577 | rm -f core conftest.err conftest.$ac_objext \ | |
2578 | conftest$ac_exeext conftest.$ac_ext | |
2579 | fi | |
2580 | eval ac_res=\$$3 | |
2581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2582 | $as_echo "$ac_res" >&6; } | |
2583 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2584 | ||
2585 | } # ac_fn_cxx_check_func | |
81ecdfbb RW |
2586 | cat >config.log <<_ACEOF |
2587 | This file contains any messages produced by compilers while | |
2588 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2589 | |
81ecdfbb | 2590 | It was created by $as_me, which was |
d0ac1c44 | 2591 | generated by GNU Autoconf 2.69. Invocation command line was |
b4e70030 | 2592 | |
81ecdfbb | 2593 | $ $0 $@ |
413ccac7 | 2594 | |
81ecdfbb RW |
2595 | _ACEOF |
2596 | exec 5>>config.log | |
2597 | { | |
2598 | cat <<_ASUNAME | |
2599 | ## --------- ## | |
2600 | ## Platform. ## | |
2601 | ## --------- ## | |
413ccac7 | 2602 | |
81ecdfbb RW |
2603 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2604 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2605 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2606 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2607 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2608 | |
81ecdfbb RW |
2609 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2610 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2611 | |
81ecdfbb RW |
2612 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2613 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2614 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2615 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2616 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2617 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2618 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2619 | |
81ecdfbb | 2620 | _ASUNAME |
bec39cab | 2621 | |
bec39cab AC |
2622 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2623 | for as_dir in $PATH | |
2624 | do | |
2625 | IFS=$as_save_IFS | |
2626 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2627 | $as_echo "PATH: $as_dir" |
2628 | done | |
2629 | IFS=$as_save_IFS | |
bec39cab | 2630 | |
81ecdfbb | 2631 | } >&5 |
bec39cab | 2632 | |
81ecdfbb | 2633 | cat >&5 <<_ACEOF |
bec39cab | 2634 | |
bec39cab | 2635 | |
81ecdfbb RW |
2636 | ## ----------- ## |
2637 | ## Core tests. ## | |
2638 | ## ----------- ## | |
2639 | ||
2640 | _ACEOF | |
2641 | ||
2642 | ||
2643 | # Keep a trace of the command line. | |
2644 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2645 | # Strip out --silent because we don't want to record it for future runs. | |
2646 | # Also quote any args containing shell meta-characters. | |
2647 | # Make two passes to allow for proper duplicate-argument suppression. | |
2648 | ac_configure_args= | |
2649 | ac_configure_args0= | |
2650 | ac_configure_args1= | |
2651 | ac_must_keep_next=false | |
2652 | for ac_pass in 1 2 | |
2653 | do | |
2654 | for ac_arg | |
2655 | do | |
2656 | case $ac_arg in | |
2657 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2658 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2659 | | -silent | --silent | --silen | --sile | --sil) | |
2660 | continue ;; | |
2661 | *\'*) | |
2662 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2663 | esac | |
2664 | case $ac_pass in | |
2665 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2666 | 2) | |
2667 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2668 | if test $ac_must_keep_next = true; then | |
2669 | ac_must_keep_next=false # Got value, back to normal. | |
2670 | else | |
2671 | case $ac_arg in | |
2672 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2673 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2674 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2675 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2676 | case "$ac_configure_args0 " in | |
2677 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2678 | esac | |
2679 | ;; | |
2680 | -* ) ac_must_keep_next=true ;; | |
2681 | esac | |
2682 | fi | |
2683 | as_fn_append ac_configure_args " '$ac_arg'" | |
2684 | ;; | |
2685 | esac | |
2686 | done | |
2687 | done | |
2688 | { ac_configure_args0=; unset ac_configure_args0;} | |
2689 | { ac_configure_args1=; unset ac_configure_args1;} | |
2690 | ||
2691 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2692 | # config.log. We remove comments because anyway the quotes in there | |
2693 | # would cause problems or look ugly. | |
2694 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2695 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2696 | trap 'exit_status=$? | |
2697 | # Save into config.log some information that might help in debugging. | |
2698 | { | |
2699 | echo | |
2700 | ||
d0ac1c44 | 2701 | $as_echo "## ---------------- ## |
81ecdfbb | 2702 | ## Cache variables. ## |
d0ac1c44 | 2703 | ## ---------------- ##" |
81ecdfbb RW |
2704 | echo |
2705 | # The following way of writing the cache mishandles newlines in values, | |
2706 | ( | |
2707 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2708 | eval ac_val=\$$ac_var | |
2709 | case $ac_val in #( | |
2710 | *${as_nl}*) | |
2711 | case $ac_var in #( | |
2712 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2713 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2714 | esac | |
2715 | case $ac_var in #( | |
2716 | _ | IFS | as_nl) ;; #( | |
2717 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2718 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2719 | esac ;; | |
2720 | esac | |
2721 | done | |
2722 | (set) 2>&1 | | |
2723 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2724 | *${as_nl}ac_space=\ *) | |
2725 | sed -n \ | |
2726 | "s/'\''/'\''\\\\'\'''\''/g; | |
2727 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2728 | ;; #( | |
2729 | *) | |
2730 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2731 | ;; | |
2732 | esac | | |
2733 | sort | |
2734 | ) | |
2735 | echo | |
2736 | ||
d0ac1c44 | 2737 | $as_echo "## ----------------- ## |
81ecdfbb | 2738 | ## Output variables. ## |
d0ac1c44 | 2739 | ## ----------------- ##" |
81ecdfbb RW |
2740 | echo |
2741 | for ac_var in $ac_subst_vars | |
2742 | do | |
2743 | eval ac_val=\$$ac_var | |
2744 | case $ac_val in | |
2745 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2746 | esac | |
2747 | $as_echo "$ac_var='\''$ac_val'\''" | |
2748 | done | sort | |
2749 | echo | |
2750 | ||
2751 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2752 | $as_echo "## ------------------- ## |
81ecdfbb | 2753 | ## File substitutions. ## |
d0ac1c44 | 2754 | ## ------------------- ##" |
81ecdfbb RW |
2755 | echo |
2756 | for ac_var in $ac_subst_files | |
2757 | do | |
2758 | eval ac_val=\$$ac_var | |
2759 | case $ac_val in | |
2760 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2761 | esac | |
2762 | $as_echo "$ac_var='\''$ac_val'\''" | |
2763 | done | sort | |
2764 | echo | |
2765 | fi | |
2766 | ||
2767 | if test -s confdefs.h; then | |
d0ac1c44 | 2768 | $as_echo "## ----------- ## |
81ecdfbb | 2769 | ## confdefs.h. ## |
d0ac1c44 | 2770 | ## ----------- ##" |
81ecdfbb RW |
2771 | echo |
2772 | cat confdefs.h | |
2773 | echo | |
2774 | fi | |
2775 | test "$ac_signal" != 0 && | |
2776 | $as_echo "$as_me: caught signal $ac_signal" | |
2777 | $as_echo "$as_me: exit $exit_status" | |
2778 | } >&5 | |
2779 | rm -f core *.core core.conftest.* && | |
2780 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2781 | exit $exit_status | |
2782 | ' 0 | |
2783 | for ac_signal in 1 2 13 15; do | |
2784 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2785 | done | |
2786 | ac_signal=0 | |
2787 | ||
2788 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2789 | rm -f -r conftest* confdefs.h | |
2790 | ||
2791 | $as_echo "/* confdefs.h */" > confdefs.h | |
2792 | ||
2793 | # Predefined preprocessor variables. | |
2794 | ||
2795 | cat >>confdefs.h <<_ACEOF | |
2796 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2797 | _ACEOF | |
2798 | ||
2799 | cat >>confdefs.h <<_ACEOF | |
2800 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2801 | _ACEOF | |
2802 | ||
2803 | cat >>confdefs.h <<_ACEOF | |
2804 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2805 | _ACEOF | |
2806 | ||
2807 | cat >>confdefs.h <<_ACEOF | |
2808 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2809 | _ACEOF | |
2810 | ||
2811 | cat >>confdefs.h <<_ACEOF | |
2812 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2813 | _ACEOF | |
2814 | ||
2815 | cat >>confdefs.h <<_ACEOF | |
2816 | #define PACKAGE_URL "$PACKAGE_URL" | |
2817 | _ACEOF | |
2818 | ||
2819 | ||
2820 | # Let the site file select an alternate cache file if it wants to. | |
2821 | # Prefer an explicitly selected file to automatically selected ones. | |
2822 | ac_site_file1=NONE | |
2823 | ac_site_file2=NONE | |
2824 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2825 | # We do not want a PATH search for config.site. |
2826 | case $CONFIG_SITE in #(( | |
2827 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2828 | */*) ac_site_file1=$CONFIG_SITE;; | |
2829 | *) ac_site_file1=./$CONFIG_SITE;; | |
2830 | esac | |
81ecdfbb RW |
2831 | elif test "x$prefix" != xNONE; then |
2832 | ac_site_file1=$prefix/share/config.site | |
2833 | ac_site_file2=$prefix/etc/config.site | |
2834 | else | |
2835 | ac_site_file1=$ac_default_prefix/share/config.site | |
2836 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2837 | fi | |
2838 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2839 | do | |
2840 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2841 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2842 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2843 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2844 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
2845 | . "$ac_site_file" \ |
2846 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2847 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2848 | as_fn_error $? "failed to load site script $ac_site_file | |
2849 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
2850 | fi |
2851 | done | |
2852 | ||
2853 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2854 | # Some versions of bash will fail to source /dev/null (special files |
2855 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2856 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2857 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2858 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2859 | case $cache_file in | |
2860 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2861 | *) . "./$cache_file";; | |
2862 | esac | |
2863 | fi | |
2864 | else | |
2865 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2866 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2867 | >$cache_file | |
bec39cab AC |
2868 | fi |
2869 | ||
d0ac1c44 SM |
2870 | as_fn_append ac_header_list " stdlib.h" |
2871 | as_fn_append ac_header_list " unistd.h" | |
2872 | as_fn_append ac_header_list " sys/param.h" | |
81ecdfbb RW |
2873 | # Check that the precious variables saved in the cache have kept the same |
2874 | # value. | |
2875 | ac_cache_corrupted=false | |
2876 | for ac_var in $ac_precious_vars; do | |
2877 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2878 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2879 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2880 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2881 | case $ac_old_set,$ac_new_set in | |
2882 | set,) | |
2883 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2884 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2885 | ac_cache_corrupted=: ;; | |
2886 | ,set) | |
2887 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2888 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2889 | ac_cache_corrupted=: ;; | |
2890 | ,);; | |
2891 | *) | |
2892 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2893 | # differences in whitespace do not lead to failure. | |
2894 | ac_old_val_w=`echo x $ac_old_val` | |
2895 | ac_new_val_w=`echo x $ac_new_val` | |
2896 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2897 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2898 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2899 | ac_cache_corrupted=: | |
2900 | else | |
2901 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2902 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2903 | eval $ac_var=\$ac_old_val | |
2904 | fi | |
2905 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2906 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2907 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2908 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2909 | fi;; | |
2910 | esac | |
2911 | # Pass precious variables to config.status. | |
2912 | if test "$ac_new_set" = set; then | |
2913 | case $ac_new_val in | |
2914 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2915 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2916 | esac | |
2917 | case " $ac_configure_args " in | |
2918 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2919 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2920 | esac | |
2921 | fi | |
2922 | done | |
2923 | if $ac_cache_corrupted; then | |
2924 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2925 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2926 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2927 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2928 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
81ecdfbb RW |
2929 | fi |
2930 | ## -------------------- ## | |
2931 | ## Main body of script. ## | |
2932 | ## -------------------- ## | |
2933 | ||
2934 | ac_ext=c | |
2935 | ac_cpp='$CPP $CPPFLAGS' | |
2936 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2937 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2938 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2939 | ||
2940 | ||
2941 | ||
2942 | ||
2943 | ||
2944 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2945 | ||
2946 | ||
2947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2948 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2949 | # Check whether --enable-maintainer-mode was given. | |
2950 | if test "${enable_maintainer_mode+set}" = set; then : | |
2951 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2952 | else | |
2953 | USE_MAINTAINER_MODE=no | |
2954 | fi | |
2955 | ||
2956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2957 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2958 | if test $USE_MAINTAINER_MODE = yes; then | |
2959 | MAINTAINER_MODE_TRUE= | |
2960 | MAINTAINER_MODE_FALSE='#' | |
2961 | else | |
2962 | MAINTAINER_MODE_TRUE='#' | |
2963 | MAINTAINER_MODE_FALSE= | |
2964 | fi | |
2965 | ||
2966 | MAINT=$MAINTAINER_MODE_TRUE | |
2967 | ||
2968 | ||
2969 | ||
17ef446e | 2970 | # Set the 'development' global. |
270c9937 | 2971 | . $srcdir/../bfd/development.sh |
f5f1cdb6 | 2972 | |
81ecdfbb RW |
2973 | ac_ext=c |
2974 | ac_cpp='$CPP $CPPFLAGS' | |
2975 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2976 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2977 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2978 | if test -n "$ac_tool_prefix"; then | |
2979 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2980 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2982 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 2983 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 2984 | $as_echo_n "(cached) " >&6 |
c906108c SS |
2985 | else |
2986 | if test -n "$CC"; then | |
2987 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2988 | else | |
bec39cab AC |
2989 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2990 | for as_dir in $PATH | |
2991 | do | |
2992 | IFS=$as_save_IFS | |
2993 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 2994 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 2995 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
2996 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
2997 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2998 | break 2 |
2999 | fi | |
3000 | done | |
81ecdfbb RW |
3001 | done |
3002 | IFS=$as_save_IFS | |
bec39cab | 3003 | |
c906108c SS |
3004 | fi |
3005 | fi | |
bec39cab | 3006 | CC=$ac_cv_prog_CC |
c906108c | 3007 | if test -n "$CC"; then |
81ecdfbb RW |
3008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3009 | $as_echo "$CC" >&6; } | |
c906108c | 3010 | else |
81ecdfbb RW |
3011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3012 | $as_echo "no" >&6; } | |
c906108c SS |
3013 | fi |
3014 | ||
81ecdfbb | 3015 | |
b4e70030 JB |
3016 | fi |
3017 | if test -z "$ac_cv_prog_CC"; then | |
3018 | ac_ct_CC=$CC | |
81ecdfbb RW |
3019 | # Extract the first word of "gcc", so it can be a program name with args. |
3020 | set dummy gcc; ac_word=$2 | |
3021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3022 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3023 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3024 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
3025 | else |
3026 | if test -n "$ac_ct_CC"; then | |
3027 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3028 | else | |
3029 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3030 | for as_dir in $PATH | |
3031 | do | |
3032 | IFS=$as_save_IFS | |
3033 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3034 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3035 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3036 | ac_cv_prog_ac_ct_CC="gcc" |
3037 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 3038 | break 2 |
4e8d927d | 3039 | fi |
b4e70030 | 3040 | done |
81ecdfbb RW |
3041 | done |
3042 | IFS=$as_save_IFS | |
b4e70030 JB |
3043 | |
3044 | fi | |
3045 | fi | |
3046 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3047 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3049 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 3050 | else |
81ecdfbb RW |
3051 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3052 | $as_echo "no" >&6; } | |
b4e70030 JB |
3053 | fi |
3054 | ||
81ecdfbb RW |
3055 | if test "x$ac_ct_CC" = x; then |
3056 | CC="" | |
3057 | else | |
3058 | case $cross_compiling:$ac_tool_warned in | |
3059 | yes:) | |
3060 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3061 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3062 | ac_tool_warned=yes ;; | |
3063 | esac | |
3064 | CC=$ac_ct_CC | |
3065 | fi | |
b4e70030 JB |
3066 | else |
3067 | CC="$ac_cv_prog_CC" | |
3068 | fi | |
3069 | ||
c906108c | 3070 | if test -z "$CC"; then |
81ecdfbb RW |
3071 | if test -n "$ac_tool_prefix"; then |
3072 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3073 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3075 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3076 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3077 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3078 | else |
3079 | if test -n "$CC"; then | |
3080 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3081 | else | |
bec39cab AC |
3082 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3083 | for as_dir in $PATH | |
3084 | do | |
3085 | IFS=$as_save_IFS | |
3086 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3087 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3088 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3089 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
3090 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3091 | break 2 |
3092 | fi | |
3093 | done | |
81ecdfbb RW |
3094 | done |
3095 | IFS=$as_save_IFS | |
3096 | ||
3097 | fi | |
3098 | fi | |
3099 | CC=$ac_cv_prog_CC | |
3100 | if test -n "$CC"; then | |
3101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3102 | $as_echo "$CC" >&6; } | |
3103 | else | |
3104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3105 | $as_echo "no" >&6; } | |
3106 | fi | |
3107 | ||
3108 | ||
3109 | fi | |
3110 | fi | |
3111 | if test -z "$CC"; then | |
3112 | # Extract the first word of "cc", so it can be a program name with args. | |
3113 | set dummy cc; ac_word=$2 | |
3114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3115 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3116 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb RW |
3117 | $as_echo_n "(cached) " >&6 |
3118 | else | |
3119 | if test -n "$CC"; then | |
3120 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3121 | else | |
3122 | ac_prog_rejected=no | |
3123 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3124 | for as_dir in $PATH | |
3125 | do | |
3126 | IFS=$as_save_IFS | |
3127 | test -z "$as_dir" && as_dir=. | |
3128 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3129 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3130 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3131 | ac_prog_rejected=yes | |
3132 | continue | |
3133 | fi | |
3134 | ac_cv_prog_CC="cc" | |
3135 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3136 | break 2 | |
3137 | fi | |
3138 | done | |
3139 | done | |
3140 | IFS=$as_save_IFS | |
bec39cab | 3141 | |
c906108c SS |
3142 | if test $ac_prog_rejected = yes; then |
3143 | # We found a bogon in the path, so make sure we never use it. | |
3144 | set dummy $ac_cv_prog_CC | |
3145 | shift | |
bec39cab | 3146 | if test $# != 0; then |
c906108c SS |
3147 | # We chose a different compiler from the bogus one. |
3148 | # However, it has the same basename, so the bogon will be chosen | |
3149 | # first if we set CC to just the basename; use the full file name. | |
3150 | shift | |
bec39cab | 3151 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3152 | fi |
3153 | fi | |
3154 | fi | |
3155 | fi | |
bec39cab | 3156 | CC=$ac_cv_prog_CC |
c906108c | 3157 | if test -n "$CC"; then |
81ecdfbb RW |
3158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3159 | $as_echo "$CC" >&6; } | |
c906108c | 3160 | else |
81ecdfbb RW |
3161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3162 | $as_echo "no" >&6; } | |
c906108c SS |
3163 | fi |
3164 | ||
81ecdfbb | 3165 | |
bec39cab AC |
3166 | fi |
3167 | if test -z "$CC"; then | |
3168 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3169 | for ac_prog in cl.exe |
bec39cab AC |
3170 | do |
3171 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3172 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3174 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3175 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3176 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3177 | else |
3178 | if test -n "$CC"; then | |
3179 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3180 | else | |
bec39cab AC |
3181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3182 | for as_dir in $PATH | |
3183 | do | |
3184 | IFS=$as_save_IFS | |
3185 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3186 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3187 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3188 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3189 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3190 | break 2 |
3191 | fi | |
3192 | done | |
81ecdfbb RW |
3193 | done |
3194 | IFS=$as_save_IFS | |
bec39cab | 3195 | |
c906108c SS |
3196 | fi |
3197 | fi | |
bec39cab | 3198 | CC=$ac_cv_prog_CC |
c906108c | 3199 | if test -n "$CC"; then |
81ecdfbb RW |
3200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3201 | $as_echo "$CC" >&6; } | |
c906108c | 3202 | else |
81ecdfbb RW |
3203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3204 | $as_echo "no" >&6; } | |
c906108c | 3205 | fi |
bec39cab | 3206 | |
81ecdfbb | 3207 | |
bec39cab AC |
3208 | test -n "$CC" && break |
3209 | done | |
3210 | fi | |
3211 | if test -z "$CC"; then | |
3212 | ac_ct_CC=$CC | |
81ecdfbb | 3213 | for ac_prog in cl.exe |
bec39cab AC |
3214 | do |
3215 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3216 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3217 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3218 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3219 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3220 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3221 | else |
3222 | if test -n "$ac_ct_CC"; then | |
3223 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3224 | else | |
3225 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3226 | for as_dir in $PATH | |
3227 | do | |
3228 | IFS=$as_save_IFS | |
3229 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3230 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3231 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3232 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3233 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3234 | break 2 |
c906108c | 3235 | fi |
bec39cab | 3236 | done |
81ecdfbb RW |
3237 | done |
3238 | IFS=$as_save_IFS | |
bec39cab AC |
3239 | |
3240 | fi | |
3241 | fi | |
3242 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3243 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3245 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3246 | else |
81ecdfbb RW |
3247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3248 | $as_echo "no" >&6; } | |
c906108c SS |
3249 | fi |
3250 | ||
81ecdfbb | 3251 | |
bec39cab AC |
3252 | test -n "$ac_ct_CC" && break |
3253 | done | |
c906108c | 3254 | |
81ecdfbb RW |
3255 | if test "x$ac_ct_CC" = x; then |
3256 | CC="" | |
3257 | else | |
3258 | case $cross_compiling:$ac_tool_warned in | |
3259 | yes:) | |
3260 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3261 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3262 | ac_tool_warned=yes ;; | |
3263 | esac | |
3264 | CC=$ac_ct_CC | |
3265 | fi | |
bec39cab AC |
3266 | fi |
3267 | ||
3268 | fi | |
3269 | ||
3270 | ||
81ecdfbb RW |
3271 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3272 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3273 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3274 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3275 | |
3276 | # Provide some information about the compiler. | |
81ecdfbb RW |
3277 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3278 | set X $ac_compile | |
3279 | ac_compiler=$2 | |
3280 | for ac_option in --version -v -V -qversion; do | |
3281 | { { ac_try="$ac_compiler $ac_option >&5" | |
3282 | case "(($ac_try" in | |
3283 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3284 | *) ac_try_echo=$ac_try;; | |
3285 | esac | |
3286 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3287 | $as_echo "$ac_try_echo"; } >&5 | |
3288 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3289 | ac_status=$? |
81ecdfbb RW |
3290 | if test -s conftest.err; then |
3291 | sed '10a\ | |
3292 | ... rest of stderr output deleted ... | |
3293 | 10q' conftest.err >conftest.er1 | |
3294 | cat conftest.er1 >&5 | |
81ecdfbb | 3295 | fi |
d0ac1c44 | 3296 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3297 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3298 | test $ac_status = 0; } | |
3299 | done | |
bec39cab | 3300 | |
81ecdfbb | 3301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3302 | /* end confdefs.h. */ |
3303 | ||
3304 | int | |
3305 | main () | |
3306 | { | |
3307 | ||
3308 | ; | |
3309 | return 0; | |
3310 | } | |
3311 | _ACEOF | |
3312 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3313 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3314 | # Try to create an executable without -o first, disregard a.out. |
3315 | # It will help us diagnose broken compilers, and finding out an intuition | |
3316 | # of exeext. | |
d0ac1c44 SM |
3317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3318 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3319 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3320 | ||
3321 | # The possible output files: | |
3322 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3323 | ||
3324 | ac_rmfiles= | |
3325 | for ac_file in $ac_files | |
3326 | do | |
3327 | case $ac_file in | |
3328 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3329 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3330 | esac | |
3331 | done | |
3332 | rm -f $ac_rmfiles | |
3333 | ||
3334 | if { { ac_try="$ac_link_default" | |
3335 | case "(($ac_try" in | |
3336 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3337 | *) ac_try_echo=$ac_try;; | |
3338 | esac | |
3339 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3340 | $as_echo "$ac_try_echo"; } >&5 | |
3341 | (eval "$ac_link_default") 2>&5 | |
3342 | ac_status=$? | |
3343 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3344 | test $ac_status = 0; }; then : | |
3345 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3346 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3347 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3348 | # so that the user can short-circuit this test for compilers unknown to | |
3349 | # Autoconf. | |
3350 | for ac_file in $ac_files '' | |
bec39cab AC |
3351 | do |
3352 | test -f "$ac_file" || continue | |
3353 | case $ac_file in | |
81ecdfbb | 3354 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3355 | ;; |
3356 | [ab].out ) | |
3357 | # We found the default executable, but exeext='' is most | |
3358 | # certainly right. | |
3359 | break;; | |
3360 | *.* ) | |
81ecdfbb RW |
3361 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3362 | then :; else | |
3363 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3364 | fi | |
3365 | # We set ac_cv_exeext here because the later test for it is not | |
3366 | # safe: cross compilers may not add the suffix if given an `-o' | |
3367 | # argument, so we may need to know it at that point already. | |
3368 | # Even if this section looks crufty: it has the advantage of | |
3369 | # actually working. | |
b4e70030 JB |
3370 | break;; |
3371 | * ) | |
3372 | break;; | |
bec39cab AC |
3373 | esac |
3374 | done | |
81ecdfbb RW |
3375 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3376 | ||
bec39cab | 3377 | else |
81ecdfbb RW |
3378 | ac_file='' |
3379 | fi | |
81ecdfbb | 3380 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3382 | $as_echo "no" >&6; } | |
3383 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3384 | sed 's/^/| /' conftest.$ac_ext >&5 |
3385 | ||
81ecdfbb RW |
3386 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3387 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3388 | as_fn_error 77 "C compiler cannot create executables |
3389 | See \`config.log' for more details" "$LINENO" 5; } | |
3390 | else | |
3391 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3392 | $as_echo "yes" >&6; } | |
bec39cab | 3393 | fi |
d0ac1c44 SM |
3394 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3395 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3397 | $as_echo "$ac_file" >&6; } | |
b4e70030 | 3398 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3399 | |
d0ac1c44 | 3400 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
b4e70030 | 3401 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3403 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3404 | if { { ac_try="$ac_link" | |
3405 | case "(($ac_try" in | |
3406 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3407 | *) ac_try_echo=$ac_try;; | |
3408 | esac | |
3409 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3410 | $as_echo "$ac_try_echo"; } >&5 | |
3411 | (eval "$ac_link") 2>&5 | |
bec39cab | 3412 | ac_status=$? |
81ecdfbb RW |
3413 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3414 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3415 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3416 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3417 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3418 | # `rm'. | |
3419 | for ac_file in conftest.exe conftest conftest.*; do | |
3420 | test -f "$ac_file" || continue | |
3421 | case $ac_file in | |
81ecdfbb | 3422 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3423 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3424 | break;; |
3425 | * ) break;; | |
3426 | esac | |
3427 | done | |
c906108c | 3428 | else |
81ecdfbb RW |
3429 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3430 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3431 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3432 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3433 | fi |
d0ac1c44 | 3434 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3436 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3437 | |
b4e70030 | 3438 | rm -f conftest.$ac_ext |
bec39cab AC |
3439 | EXEEXT=$ac_cv_exeext |
3440 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3441 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3442 | /* end confdefs.h. */ | |
3443 | #include <stdio.h> | |
3444 | int | |
3445 | main () | |
3446 | { | |
3447 | FILE *f = fopen ("conftest.out", "w"); | |
3448 | return ferror (f) || fclose (f) != 0; | |
3449 | ||
3450 | ; | |
3451 | return 0; | |
3452 | } | |
3453 | _ACEOF | |
3454 | ac_clean_files="$ac_clean_files conftest.out" | |
3455 | # Check that the compiler produces executables we can run. If not, either | |
3456 | # the compiler is broken, or we cross compile. | |
3457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3458 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3459 | if test "$cross_compiling" != yes; then | |
3460 | { { ac_try="$ac_link" | |
3461 | case "(($ac_try" in | |
3462 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3463 | *) ac_try_echo=$ac_try;; | |
3464 | esac | |
3465 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3466 | $as_echo "$ac_try_echo"; } >&5 | |
3467 | (eval "$ac_link") 2>&5 | |
3468 | ac_status=$? | |
3469 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3470 | test $ac_status = 0; } | |
3471 | if { ac_try='./conftest$ac_cv_exeext' | |
3472 | { { case "(($ac_try" in | |
3473 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3474 | *) ac_try_echo=$ac_try;; | |
3475 | esac | |
3476 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3477 | $as_echo "$ac_try_echo"; } >&5 | |
3478 | (eval "$ac_try") 2>&5 | |
3479 | ac_status=$? | |
3480 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3481 | test $ac_status = 0; }; }; then | |
3482 | cross_compiling=no | |
3483 | else | |
3484 | if test "$cross_compiling" = maybe; then | |
3485 | cross_compiling=yes | |
3486 | else | |
3487 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3488 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3489 | as_fn_error $? "cannot run C compiled programs. | |
3490 | If you meant to cross compile, use \`--host'. | |
3491 | See \`config.log' for more details" "$LINENO" 5; } | |
3492 | fi | |
3493 | fi | |
3494 | fi | |
3495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3496 | $as_echo "$cross_compiling" >&6; } | |
3497 | ||
3498 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3499 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3501 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3502 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3503 | $as_echo_n "(cached) " >&6 |
bec39cab | 3504 | else |
81ecdfbb | 3505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3506 | /* end confdefs.h. */ |
3507 | ||
3508 | int | |
3509 | main () | |
3510 | { | |
3511 | ||
3512 | ; | |
3513 | return 0; | |
3514 | } | |
3515 | _ACEOF | |
3516 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3517 | if { { ac_try="$ac_compile" |
3518 | case "(($ac_try" in | |
3519 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3520 | *) ac_try_echo=$ac_try;; | |
3521 | esac | |
3522 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3523 | $as_echo "$ac_try_echo"; } >&5 | |
3524 | (eval "$ac_compile") 2>&5 | |
3525 | ac_status=$? | |
3526 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3527 | test $ac_status = 0; }; then : | |
3528 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3529 | test -f "$ac_file" || continue; | |
bec39cab | 3530 | case $ac_file in |
81ecdfbb | 3531 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3532 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3533 | break;; | |
3534 | esac | |
3535 | done | |
c906108c | 3536 | else |
81ecdfbb | 3537 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3538 | sed 's/^/| /' conftest.$ac_ext >&5 |
3539 | ||
81ecdfbb RW |
3540 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3541 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3542 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3543 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3544 | fi |
b4e70030 | 3545 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3546 | fi |
81ecdfbb RW |
3547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3548 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3549 | OBJEXT=$ac_cv_objext |
3550 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3552 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3553 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3554 | $as_echo_n "(cached) " >&6 |
c906108c | 3555 | else |
81ecdfbb | 3556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3557 | /* end confdefs.h. */ |
3558 | ||
3559 | int | |
3560 | main () | |
3561 | { | |
3562 | #ifndef __GNUC__ | |
3563 | choke me | |
3564 | #endif | |
3565 | ||
3566 | ; | |
3567 | return 0; | |
3568 | } | |
3569 | _ACEOF | |
81ecdfbb | 3570 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3571 | ac_compiler_gnu=yes |
3572 | else | |
81ecdfbb | 3573 | ac_compiler_gnu=no |
bec39cab | 3574 | fi |
81ecdfbb | 3575 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3576 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3577 | ||
3578 | fi | |
81ecdfbb RW |
3579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3580 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3581 | if test $ac_compiler_gnu = yes; then | |
3582 | GCC=yes | |
3583 | else | |
3584 | GCC= | |
3585 | fi | |
bec39cab AC |
3586 | ac_test_CFLAGS=${CFLAGS+set} |
3587 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3588 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3589 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3590 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb | 3591 | $as_echo_n "(cached) " >&6 |
bec39cab | 3592 | else |
81ecdfbb RW |
3593 | ac_save_c_werror_flag=$ac_c_werror_flag |
3594 | ac_c_werror_flag=yes | |
3595 | ac_cv_prog_cc_g=no | |
3596 | CFLAGS="-g" | |
3597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3598 | /* end confdefs.h. */ |
3599 | ||
3600 | int | |
3601 | main () | |
3602 | { | |
3603 | ||
3604 | ; | |
3605 | return 0; | |
3606 | } | |
3607 | _ACEOF | |
81ecdfbb | 3608 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3609 | ac_cv_prog_cc_g=yes |
3610 | else | |
81ecdfbb RW |
3611 | CFLAGS="" |
3612 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3613 | /* end confdefs.h. */ | |
3614 | ||
3615 | int | |
3616 | main () | |
3617 | { | |
3618 | ||
3619 | ; | |
3620 | return 0; | |
3621 | } | |
3622 | _ACEOF | |
3623 | if ac_fn_c_try_compile "$LINENO"; then : | |
3624 | ||
3625 | else | |
3626 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3627 | CFLAGS="-g" | |
3628 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3629 | /* end confdefs.h. */ | |
3630 | ||
3631 | int | |
3632 | main () | |
3633 | { | |
c906108c | 3634 | |
81ecdfbb RW |
3635 | ; |
3636 | return 0; | |
3637 | } | |
3638 | _ACEOF | |
3639 | if ac_fn_c_try_compile "$LINENO"; then : | |
3640 | ac_cv_prog_cc_g=yes | |
3641 | fi | |
3642 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3643 | fi | |
3644 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3645 | fi |
81ecdfbb RW |
3646 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3647 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3648 | fi |
81ecdfbb RW |
3649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3650 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3651 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3652 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3653 | elif test $ac_cv_prog_cc_g = yes; then |
3654 | if test "$GCC" = yes; then | |
3655 | CFLAGS="-g -O2" | |
3656 | else | |
3657 | CFLAGS="-g" | |
3658 | fi | |
3659 | else | |
3660 | if test "$GCC" = yes; then | |
3661 | CFLAGS="-O2" | |
3662 | else | |
3663 | CFLAGS= | |
3664 | fi | |
3665 | fi | |
81ecdfbb RW |
3666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3667 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3668 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3669 | $as_echo_n "(cached) " >&6 |
bec39cab | 3670 | else |
81ecdfbb | 3671 | ac_cv_prog_cc_c89=no |
bec39cab | 3672 | ac_save_CC=$CC |
81ecdfbb | 3673 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3674 | /* end confdefs.h. */ |
c906108c SS |
3675 | #include <stdarg.h> |
3676 | #include <stdio.h> | |
d0ac1c44 | 3677 | struct stat; |
c906108c SS |
3678 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3679 | struct buf { int x; }; | |
3680 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3681 | static char *e (p, i) | |
3682 | char **p; | |
3683 | int i; | |
3684 | { | |
3685 | return p[i]; | |
3686 | } | |
3687 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3688 | { | |
3689 | char *s; | |
3690 | va_list v; | |
3691 | va_start (v,p); | |
3692 | s = g (p, va_arg (v,int)); | |
3693 | va_end (v); | |
3694 | return s; | |
3695 | } | |
bec39cab AC |
3696 | |
3697 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3698 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3699 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3700 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3701 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3702 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3703 | that's true only with -std. */ |
bec39cab AC |
3704 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3705 | ||
81ecdfbb RW |
3706 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3707 | inside strings and character constants. */ | |
3708 | #define FOO(x) 'x' | |
3709 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3710 | ||
c906108c SS |
3711 | int test (int i, double x); |
3712 | struct s1 {int (*f) (int a);}; | |
3713 | struct s2 {int (*f) (double a);}; | |
3714 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3715 | int argc; | |
3716 | char **argv; | |
bec39cab AC |
3717 | int |
3718 | main () | |
3719 | { | |
c906108c | 3720 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3721 | ; |
3722 | return 0; | |
3723 | } | |
3724 | _ACEOF | |
81ecdfbb RW |
3725 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3726 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3727 | do |
3728 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3729 | if ac_fn_c_try_compile "$LINENO"; then : |
3730 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3731 | fi |
81ecdfbb RW |
3732 | rm -f core conftest.err conftest.$ac_objext |
3733 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3734 | done |
81ecdfbb | 3735 | rm -f conftest.$ac_ext |
bec39cab | 3736 | CC=$ac_save_CC |
c906108c SS |
3737 | |
3738 | fi | |
81ecdfbb RW |
3739 | # AC_CACHE_VAL |
3740 | case "x$ac_cv_prog_cc_c89" in | |
3741 | x) | |
3742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3743 | $as_echo "none needed" >&6; } ;; | |
3744 | xno) | |
3745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3746 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3747 | *) |
81ecdfbb RW |
3748 | CC="$CC $ac_cv_prog_cc_c89" |
3749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3750 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3751 | esac |
81ecdfbb | 3752 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3753 | |
b4e70030 JB |
3754 | fi |
3755 | ||
bec39cab AC |
3756 | ac_ext=c |
3757 | ac_cpp='$CPP $CPPFLAGS' | |
3758 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3759 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3760 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3761 | |
3bc3d82a PA |
3762 | ac_ext=cpp |
3763 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3764 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3765 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3766 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3767 | if test -z "$CXX"; then | |
3768 | if test -n "$CCC"; then | |
3769 | CXX=$CCC | |
3770 | else | |
3771 | if test -n "$ac_tool_prefix"; then | |
3772 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3773 | do | |
3774 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3775 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3777 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3778 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3779 | $as_echo_n "(cached) " >&6 |
3780 | else | |
3781 | if test -n "$CXX"; then | |
3782 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3783 | else | |
3784 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3785 | for as_dir in $PATH | |
3786 | do | |
3787 | IFS=$as_save_IFS | |
3788 | test -z "$as_dir" && as_dir=. | |
3789 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3790 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3791 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3792 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3793 | break 2 | |
3794 | fi | |
3795 | done | |
3796 | done | |
3797 | IFS=$as_save_IFS | |
3798 | ||
3799 | fi | |
3800 | fi | |
3801 | CXX=$ac_cv_prog_CXX | |
3802 | if test -n "$CXX"; then | |
3803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3804 | $as_echo "$CXX" >&6; } | |
3805 | else | |
3806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3807 | $as_echo "no" >&6; } | |
3808 | fi | |
3809 | ||
3810 | ||
3811 | test -n "$CXX" && break | |
3812 | done | |
3813 | fi | |
3814 | if test -z "$CXX"; then | |
3815 | ac_ct_CXX=$CXX | |
3816 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3817 | do | |
3818 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3819 | set dummy $ac_prog; ac_word=$2 | |
3820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3821 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3822 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3823 | $as_echo_n "(cached) " >&6 |
3824 | else | |
3825 | if test -n "$ac_ct_CXX"; then | |
3826 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3827 | else | |
3828 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3829 | for as_dir in $PATH | |
3830 | do | |
3831 | IFS=$as_save_IFS | |
3832 | test -z "$as_dir" && as_dir=. | |
3833 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3834 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3835 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3836 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3837 | break 2 | |
3838 | fi | |
3839 | done | |
3840 | done | |
3841 | IFS=$as_save_IFS | |
3842 | ||
3843 | fi | |
3844 | fi | |
3845 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3846 | if test -n "$ac_ct_CXX"; then | |
3847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3848 | $as_echo "$ac_ct_CXX" >&6; } | |
3849 | else | |
3850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3851 | $as_echo "no" >&6; } | |
3852 | fi | |
3853 | ||
3854 | ||
3855 | test -n "$ac_ct_CXX" && break | |
3856 | done | |
3857 | ||
3858 | if test "x$ac_ct_CXX" = x; then | |
3859 | CXX="g++" | |
3860 | else | |
3861 | case $cross_compiling:$ac_tool_warned in | |
3862 | yes:) | |
3863 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3864 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3865 | ac_tool_warned=yes ;; | |
3866 | esac | |
3867 | CXX=$ac_ct_CXX | |
3868 | fi | |
3869 | fi | |
3870 | ||
3871 | fi | |
3872 | fi | |
3873 | # Provide some information about the compiler. | |
3874 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3875 | set X $ac_compile | |
3876 | ac_compiler=$2 | |
3877 | for ac_option in --version -v -V -qversion; do | |
3878 | { { ac_try="$ac_compiler $ac_option >&5" | |
3879 | case "(($ac_try" in | |
3880 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3881 | *) ac_try_echo=$ac_try;; | |
3882 | esac | |
3883 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3884 | $as_echo "$ac_try_echo"; } >&5 | |
3885 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3886 | ac_status=$? | |
3887 | if test -s conftest.err; then | |
3888 | sed '10a\ | |
3889 | ... rest of stderr output deleted ... | |
3890 | 10q' conftest.err >conftest.er1 | |
3891 | cat conftest.er1 >&5 | |
3bc3d82a | 3892 | fi |
d0ac1c44 | 3893 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3894 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3895 | test $ac_status = 0; } | |
3896 | done | |
3897 | ||
3898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3899 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3900 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3901 | $as_echo_n "(cached) " >&6 |
3902 | else | |
3903 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3904 | /* end confdefs.h. */ | |
3905 | ||
3906 | int | |
3907 | main () | |
3908 | { | |
3909 | #ifndef __GNUC__ | |
3910 | choke me | |
3911 | #endif | |
3912 | ||
3913 | ; | |
3914 | return 0; | |
3915 | } | |
3916 | _ACEOF | |
3917 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3918 | ac_compiler_gnu=yes | |
3919 | else | |
3920 | ac_compiler_gnu=no | |
3921 | fi | |
3922 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3923 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3924 | ||
3925 | fi | |
3926 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3927 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3928 | if test $ac_compiler_gnu = yes; then | |
3929 | GXX=yes | |
3930 | else | |
3931 | GXX= | |
3932 | fi | |
3933 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3934 | ac_save_CXXFLAGS=$CXXFLAGS | |
3935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3936 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3937 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3938 | $as_echo_n "(cached) " >&6 |
3939 | else | |
3940 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3941 | ac_cxx_werror_flag=yes | |
3942 | ac_cv_prog_cxx_g=no | |
3943 | CXXFLAGS="-g" | |
3944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3945 | /* end confdefs.h. */ | |
3946 | ||
3947 | int | |
3948 | main () | |
3949 | { | |
3950 | ||
3951 | ; | |
3952 | return 0; | |
3953 | } | |
3954 | _ACEOF | |
3955 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3956 | ac_cv_prog_cxx_g=yes | |
3957 | else | |
3958 | CXXFLAGS="" | |
3959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3960 | /* end confdefs.h. */ | |
3961 | ||
3962 | int | |
3963 | main () | |
3964 | { | |
3965 | ||
3966 | ; | |
3967 | return 0; | |
3968 | } | |
3969 | _ACEOF | |
3970 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3971 | ||
3972 | else | |
3973 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3974 | CXXFLAGS="-g" | |
3975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3976 | /* end confdefs.h. */ | |
3977 | ||
3978 | int | |
3979 | main () | |
3980 | { | |
3981 | ||
3982 | ; | |
3983 | return 0; | |
3984 | } | |
3985 | _ACEOF | |
3986 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3987 | ac_cv_prog_cxx_g=yes | |
3988 | fi | |
3989 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3990 | fi | |
3991 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3992 | fi | |
3993 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3994 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3995 | fi | |
3996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3997 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3998 | if test "$ac_test_CXXFLAGS" = set; then | |
3999 | CXXFLAGS=$ac_save_CXXFLAGS | |
4000 | elif test $ac_cv_prog_cxx_g = yes; then | |
4001 | if test "$GXX" = yes; then | |
4002 | CXXFLAGS="-g -O2" | |
4003 | else | |
4004 | CXXFLAGS="-g" | |
4005 | fi | |
4006 | else | |
4007 | if test "$GXX" = yes; then | |
4008 | CXXFLAGS="-O2" | |
4009 | else | |
4010 | CXXFLAGS= | |
4011 | fi | |
4012 | fi | |
4013 | ac_ext=c | |
4014 | ac_cpp='$CPP $CPPFLAGS' | |
4015 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4016 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4017 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4018 | ||
4019 | ||
60ca704f | 4020 | |
bec39cab AC |
4021 | ac_ext=c |
4022 | ac_cpp='$CPP $CPPFLAGS' | |
4023 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4024 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4025 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
4026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
4027 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
4028 | # On Suns, sometimes $CPP names a directory. |
4029 | if test -n "$CPP" && test -d "$CPP"; then | |
4030 | CPP= | |
8bb2c122 | 4031 | fi |
bec39cab | 4032 | if test -z "$CPP"; then |
d0ac1c44 | 4033 | if ${ac_cv_prog_CPP+:} false; then : |
81ecdfbb | 4034 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
4035 | else |
4036 | # Double quotes because CPP needs to be expanded | |
4037 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4038 | do | |
4039 | ac_preproc_ok=false | |
4040 | for ac_c_preproc_warn_flag in '' yes | |
4041 | do | |
4042 | # Use a header file that comes with gcc, so configuring glibc | |
4043 | # with a fresh cross-compiler works. | |
4044 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4045 | # <limits.h> exists even on freestanding compilers. | |
4046 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4047 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4049 | /* end confdefs.h. */ |
4050 | #ifdef __STDC__ | |
4051 | # include <limits.h> | |
4052 | #else | |
4053 | # include <assert.h> | |
4054 | #endif | |
4055 | Syntax error | |
4056 | _ACEOF | |
81ecdfbb | 4057 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4058 | |
81ecdfbb | 4059 | else |
bec39cab AC |
4060 | # Broken: fails on valid input. |
4061 | continue | |
4062 | fi | |
d0ac1c44 | 4063 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4064 | |
81ecdfbb | 4065 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4066 | # can be detected and how. |
81ecdfbb | 4067 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4068 | /* end confdefs.h. */ |
4069 | #include <ac_nonexistent.h> | |
4070 | _ACEOF | |
81ecdfbb | 4071 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4072 | # Broken: success on invalid input. |
4073 | continue | |
8bb2c122 | 4074 | else |
bec39cab AC |
4075 | # Passes both tests. |
4076 | ac_preproc_ok=: | |
4077 | break | |
8bb2c122 | 4078 | fi |
d0ac1c44 | 4079 | rm -f conftest.err conftest.i conftest.$ac_ext |
8bb2c122 | 4080 | |
bec39cab AC |
4081 | done |
4082 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4083 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb | 4084 | if $ac_preproc_ok; then : |
bec39cab AC |
4085 | break |
4086 | fi | |
8bb2c122 | 4087 | |
bec39cab AC |
4088 | done |
4089 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 4090 | |
c906108c | 4091 | fi |
bec39cab AC |
4092 | CPP=$ac_cv_prog_CPP |
4093 | else | |
4094 | ac_cv_prog_CPP=$CPP | |
c906108c | 4095 | fi |
81ecdfbb RW |
4096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
4097 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
4098 | ac_preproc_ok=false |
4099 | for ac_c_preproc_warn_flag in '' yes | |
4100 | do | |
4101 | # Use a header file that comes with gcc, so configuring glibc | |
4102 | # with a fresh cross-compiler works. | |
4103 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4104 | # <limits.h> exists even on freestanding compilers. | |
4105 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4106 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4108 | /* end confdefs.h. */ |
4109 | #ifdef __STDC__ | |
4110 | # include <limits.h> | |
4111 | #else | |
4112 | # include <assert.h> | |
4113 | #endif | |
4114 | Syntax error | |
4115 | _ACEOF | |
81ecdfbb | 4116 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4117 | |
81ecdfbb | 4118 | else |
bec39cab AC |
4119 | # Broken: fails on valid input. |
4120 | continue | |
4121 | fi | |
d0ac1c44 | 4122 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4123 | |
81ecdfbb | 4124 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4125 | # can be detected and how. |
81ecdfbb | 4126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4127 | /* end confdefs.h. */ |
4128 | #include <ac_nonexistent.h> | |
4129 | _ACEOF | |
81ecdfbb | 4130 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4131 | # Broken: success on invalid input. |
4132 | continue | |
c906108c | 4133 | else |
bec39cab AC |
4134 | # Passes both tests. |
4135 | ac_preproc_ok=: | |
4136 | break | |
c906108c | 4137 | fi |
d0ac1c44 | 4138 | rm -f conftest.err conftest.i conftest.$ac_ext |
c906108c | 4139 | |
bec39cab AC |
4140 | done |
4141 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4142 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
4143 | if $ac_preproc_ok; then : |
4144 | ||
c906108c | 4145 | else |
81ecdfbb RW |
4146 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4147 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4148 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4149 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 4150 | fi |
c906108c | 4151 | |
bec39cab AC |
4152 | ac_ext=c |
4153 | ac_cpp='$CPP $CPPFLAGS' | |
4154 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4155 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4156 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4157 | ||
4158 | ||
81ecdfbb RW |
4159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4160 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 4161 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 4162 | $as_echo_n "(cached) " >&6 |
4e8d927d | 4163 | else |
81ecdfbb RW |
4164 | if test -z "$GREP"; then |
4165 | ac_path_GREP_found=false | |
4166 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4167 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4168 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4169 | do | |
4170 | IFS=$as_save_IFS | |
4171 | test -z "$as_dir" && as_dir=. | |
4172 | for ac_prog in grep ggrep; do | |
4173 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4174 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4175 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
4176 | # Check for GNU ac_path_GREP and select it if it is found. |
4177 | # Check for GNU $ac_path_GREP | |
4178 | case `"$ac_path_GREP" --version 2>&1` in | |
4179 | *GNU*) | |
4180 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4181 | *) | |
4182 | ac_count=0 | |
4183 | $as_echo_n 0123456789 >"conftest.in" | |
4184 | while : | |
4185 | do | |
4186 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4187 | mv "conftest.tmp" "conftest.in" | |
4188 | cp "conftest.in" "conftest.nl" | |
4189 | $as_echo 'GREP' >> "conftest.nl" | |
4190 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4191 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4192 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4193 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4194 | # Best one so far, save it but keep looking for a better one | |
4195 | ac_cv_path_GREP="$ac_path_GREP" | |
4196 | ac_path_GREP_max=$ac_count | |
bec39cab | 4197 | fi |
81ecdfbb RW |
4198 | # 10*(2^10) chars as input seems more than enough |
4199 | test $ac_count -gt 10 && break | |
4200 | done | |
4201 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4202 | esac | |
bec39cab | 4203 | |
81ecdfbb RW |
4204 | $ac_path_GREP_found && break 3 |
4205 | done | |
4206 | done | |
4207 | done | |
4208 | IFS=$as_save_IFS | |
4209 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 4210 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4211 | fi |
c906108c | 4212 | else |
81ecdfbb | 4213 | ac_cv_path_GREP=$GREP |
c906108c | 4214 | fi |
c906108c | 4215 | |
81ecdfbb RW |
4216 | fi |
4217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4218 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4219 | GREP="$ac_cv_path_GREP" | |
c906108c | 4220 | |
c906108c | 4221 | |
81ecdfbb RW |
4222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4223 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 4224 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb | 4225 | $as_echo_n "(cached) " >&6 |
783e057b | 4226 | else |
81ecdfbb RW |
4227 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4228 | then ac_cv_path_EGREP="$GREP -E" | |
4229 | else | |
4230 | if test -z "$EGREP"; then | |
4231 | ac_path_EGREP_found=false | |
4232 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4233 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4234 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4235 | do |
4236 | IFS=$as_save_IFS | |
4237 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4238 | for ac_prog in egrep; do |
4239 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4240 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4241 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4242 | # Check for GNU ac_path_EGREP and select it if it is found. |
4243 | # Check for GNU $ac_path_EGREP | |
4244 | case `"$ac_path_EGREP" --version 2>&1` in | |
4245 | *GNU*) | |
4246 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4247 | *) | |
4248 | ac_count=0 | |
4249 | $as_echo_n 0123456789 >"conftest.in" | |
4250 | while : | |
4251 | do | |
4252 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4253 | mv "conftest.tmp" "conftest.in" | |
4254 | cp "conftest.in" "conftest.nl" | |
4255 | $as_echo 'EGREP' >> "conftest.nl" | |
4256 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4257 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4258 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4259 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4260 | # Best one so far, save it but keep looking for a better one | |
4261 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4262 | ac_path_EGREP_max=$ac_count | |
4263 | fi | |
4264 | # 10*(2^10) chars as input seems more than enough | |
4265 | test $ac_count -gt 10 && break | |
4266 | done | |
4267 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4268 | esac | |
bec39cab | 4269 | |
81ecdfbb RW |
4270 | $ac_path_EGREP_found && break 3 |
4271 | done | |
4272 | done | |
4273 | done | |
4274 | IFS=$as_save_IFS | |
4275 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4276 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
783e057b | 4277 | fi |
783e057b | 4278 | else |
81ecdfbb | 4279 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4280 | fi |
4281 | ||
81ecdfbb | 4282 | fi |
783e057b | 4283 | fi |
81ecdfbb RW |
4284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4285 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4286 | EGREP="$ac_cv_path_EGREP" | |
4287 | ||
783e057b | 4288 | |
81ecdfbb RW |
4289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4290 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4291 | if ${ac_cv_header_stdc+:} false; then : |
81ecdfbb | 4292 | $as_echo_n "(cached) " >&6 |
783e057b | 4293 | else |
81ecdfbb | 4294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4295 | /* end confdefs.h. */ |
783e057b | 4296 | #include <stdlib.h> |
bec39cab | 4297 | #include <stdarg.h> |
783e057b DJ |
4298 | #include <string.h> |
4299 | #include <float.h> | |
c906108c | 4300 | |
bec39cab AC |
4301 | int |
4302 | main () | |
4303 | { | |
c906108c | 4304 | |
bec39cab AC |
4305 | ; |
4306 | return 0; | |
4307 | } | |
4308 | _ACEOF | |
81ecdfbb | 4309 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4310 | ac_cv_header_stdc=yes |
c906108c | 4311 | else |
81ecdfbb | 4312 | ac_cv_header_stdc=no |
c906108c | 4313 | fi |
81ecdfbb | 4314 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4315 | |
783e057b DJ |
4316 | if test $ac_cv_header_stdc = yes; then |
4317 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4319 | /* end confdefs.h. */ |
4320 | #include <string.h> | |
c906108c | 4321 | |
783e057b DJ |
4322 | _ACEOF |
4323 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4324 | $EGREP "memchr" >/dev/null 2>&1; then : |
4325 | ||
c906108c | 4326 | else |
783e057b | 4327 | ac_cv_header_stdc=no |
c906108c | 4328 | fi |
783e057b | 4329 | rm -f conftest* |
c906108c SS |
4330 | |
4331 | fi | |
4332 | ||
783e057b DJ |
4333 | if test $ac_cv_header_stdc = yes; then |
4334 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4335 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4336 | /* end confdefs.h. */ |
4337 | #include <stdlib.h> | |
bec39cab | 4338 | |
783e057b DJ |
4339 | _ACEOF |
4340 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4341 | $EGREP "free" >/dev/null 2>&1; then : |
4342 | ||
bec39cab | 4343 | else |
783e057b | 4344 | ac_cv_header_stdc=no |
bec39cab | 4345 | fi |
783e057b | 4346 | rm -f conftest* |
bec39cab AC |
4347 | |
4348 | fi | |
bec39cab | 4349 | |
783e057b DJ |
4350 | if test $ac_cv_header_stdc = yes; then |
4351 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4352 | if test "$cross_compiling" = yes; then : |
783e057b | 4353 | : |
bec39cab | 4354 | else |
81ecdfbb | 4355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4356 | /* end confdefs.h. */ |
4357 | #include <ctype.h> | |
81ecdfbb | 4358 | #include <stdlib.h> |
783e057b DJ |
4359 | #if ((' ' & 0x0FF) == 0x020) |
4360 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4361 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4362 | #else | |
4363 | # define ISLOWER(c) \ | |
4364 | (('a' <= (c) && (c) <= 'i') \ | |
4365 | || ('j' <= (c) && (c) <= 'r') \ | |
4366 | || ('s' <= (c) && (c) <= 'z')) | |
4367 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4368 | #endif | |
4369 | ||
4370 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4371 | int | |
4372 | main () | |
4373 | { | |
4374 | int i; | |
4375 | for (i = 0; i < 256; i++) | |
4376 | if (XOR (islower (i), ISLOWER (i)) | |
4377 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4378 | return 2; |
4379 | return 0; | |
783e057b DJ |
4380 | } |
4381 | _ACEOF | |
81ecdfbb | 4382 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4383 | |
81ecdfbb RW |
4384 | else |
4385 | ac_cv_header_stdc=no | |
783e057b | 4386 | fi |
81ecdfbb RW |
4387 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4388 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4389 | fi |
81ecdfbb | 4390 | |
783e057b DJ |
4391 | fi |
4392 | fi | |
81ecdfbb RW |
4393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4394 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4395 | if test $ac_cv_header_stdc = yes; then |
4396 | ||
81ecdfbb | 4397 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4398 | |
4399 | fi | |
4400 | ||
4401 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4402 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4403 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4404 | do : |
4405 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4406 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4407 | " | |
d0ac1c44 | 4408 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
783e057b | 4409 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4410 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4411 | _ACEOF |
4412 | ||
4413 | fi | |
4414 | ||
4415 | done | |
4416 | ||
4417 | ||
4418 | ||
81ecdfbb | 4419 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4420 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
783e057b DJ |
4421 | MINIX=yes |
4422 | else | |
4423 | MINIX= | |
4424 | fi | |
4425 | ||
4426 | ||
4427 | if test "$MINIX" = yes; then | |
4428 | ||
81ecdfbb | 4429 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4430 | |
4431 | ||
81ecdfbb | 4432 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4433 | |
4434 | ||
81ecdfbb | 4435 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4436 | |
4437 | fi | |
4438 | ||
4439 | ||
81ecdfbb RW |
4440 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4441 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4442 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
81ecdfbb | 4443 | $as_echo_n "(cached) " >&6 |
783e057b | 4444 | else |
81ecdfbb | 4445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4446 | /* end confdefs.h. */ |
4447 | ||
d0ac1c44 SM |
4448 | # define __EXTENSIONS__ 1 |
4449 | $ac_includes_default | |
783e057b DJ |
4450 | int |
4451 | main () | |
4452 | { | |
4453 | ||
4454 | ; | |
4455 | return 0; | |
4456 | } | |
4457 | _ACEOF | |
81ecdfbb | 4458 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4459 | ac_cv_safe_to_define___extensions__=yes |
4460 | else | |
81ecdfbb | 4461 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4462 | fi |
81ecdfbb | 4463 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4464 | fi |
81ecdfbb RW |
4465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4466 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4467 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4468 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4469 | |
81ecdfbb | 4470 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4471 | |
81ecdfbb | 4472 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4473 | |
81ecdfbb | 4474 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4475 | |
81ecdfbb | 4476 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4477 | |
4478 | ||
c971b7fa PA |
4479 | ac_aux_dir= |
4480 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4481 | if test -f "$ac_dir/install-sh"; then |
4482 | ac_aux_dir=$ac_dir | |
4483 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4484 | break | |
4485 | elif test -f "$ac_dir/install.sh"; then | |
4486 | ac_aux_dir=$ac_dir | |
4487 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4488 | break | |
4489 | elif test -f "$ac_dir/shtool"; then | |
4490 | ac_aux_dir=$ac_dir | |
4491 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4492 | break | |
4493 | fi | |
c971b7fa PA |
4494 | done |
4495 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4496 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
c971b7fa | 4497 | fi |
770d76d7 | 4498 | |
c971b7fa PA |
4499 | # These three variables are undocumented and unsupported, |
4500 | # and are intended to be withdrawn in a future Autoconf release. | |
4501 | # They can cause serious problems if a builder's source tree is in a directory | |
4502 | # whose full name contains unusual characters. | |
4503 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4504 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4505 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4506 | |
770d76d7 | 4507 | |
c971b7fa PA |
4508 | # Make sure we can run config.sub. |
4509 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4510 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 | 4511 | |
c971b7fa PA |
4512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4513 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4514 | if ${ac_cv_build+:} false; then : |
c971b7fa | 4515 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4516 | else |
c971b7fa PA |
4517 | ac_build_alias=$build_alias |
4518 | test "x$ac_build_alias" = x && | |
4519 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4520 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4521 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
c971b7fa | 4522 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4523 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
c971b7fa | 4524 | |
770d76d7 | 4525 | fi |
c971b7fa PA |
4526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4527 | $as_echo "$ac_cv_build" >&6; } | |
4528 | case $ac_cv_build in | |
4529 | *-*-*) ;; | |
d0ac1c44 | 4530 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 | 4531 | esac |
c971b7fa PA |
4532 | build=$ac_cv_build |
4533 | ac_save_IFS=$IFS; IFS='-' | |
4534 | set x $ac_cv_build | |
4535 | shift | |
4536 | build_cpu=$1 | |
4537 | build_vendor=$2 | |
4538 | shift; shift | |
4539 | # Remember, the first character of IFS is used to create $*, | |
4540 | # except with old shells: | |
4541 | build_os=$* | |
4542 | IFS=$ac_save_IFS | |
4543 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4544 | |
4545 | ||
c971b7fa PA |
4546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4547 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4548 | if ${ac_cv_host+:} false; then : |
81ecdfbb RW |
4549 | $as_echo_n "(cached) " >&6 |
4550 | else | |
c971b7fa PA |
4551 | if test "x$host_alias" = x; then |
4552 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4553 | else |
c971b7fa | 4554 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
d0ac1c44 | 4555 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
81ecdfbb | 4556 | fi |
81ecdfbb RW |
4557 | |
4558 | fi | |
c971b7fa PA |
4559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4560 | $as_echo "$ac_cv_host" >&6; } | |
4561 | case $ac_cv_host in | |
4562 | *-*-*) ;; | |
d0ac1c44 | 4563 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
81ecdfbb | 4564 | esac |
c971b7fa PA |
4565 | host=$ac_cv_host |
4566 | ac_save_IFS=$IFS; IFS='-' | |
4567 | set x $ac_cv_host | |
4568 | shift | |
4569 | host_cpu=$1 | |
4570 | host_vendor=$2 | |
4571 | shift; shift | |
4572 | # Remember, the first character of IFS is used to create $*, | |
4573 | # except with old shells: | |
4574 | host_os=$* | |
4575 | IFS=$ac_save_IFS | |
4576 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4577 | |
4578 | ||
4579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4580 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4581 | if ${ac_cv_target+:} false; then : |
3388710e JM |
4582 | $as_echo_n "(cached) " >&6 |
4583 | else | |
4584 | if test "x$target_alias" = x; then | |
4585 | ac_cv_target=$ac_cv_host | |
4586 | else | |
4587 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
d0ac1c44 | 4588 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
3388710e JM |
4589 | fi |
4590 | ||
4591 | fi | |
4592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4593 | $as_echo "$ac_cv_target" >&6; } | |
4594 | case $ac_cv_target in | |
4595 | *-*-*) ;; | |
d0ac1c44 | 4596 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
3388710e JM |
4597 | esac |
4598 | target=$ac_cv_target | |
4599 | ac_save_IFS=$IFS; IFS='-' | |
4600 | set x $ac_cv_target | |
4601 | shift | |
4602 | target_cpu=$1 | |
4603 | target_vendor=$2 | |
4604 | shift; shift | |
4605 | # Remember, the first character of IFS is used to create $*, | |
4606 | # except with old shells: | |
4607 | target_os=$* | |
4608 | IFS=$ac_save_IFS | |
4609 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4610 | ||
4611 | ||
4612 | # The aliases save the names the user supplied, while $host etc. | |
4613 | # will get canonicalized. | |
4614 | test -n "$target_alias" && | |
4615 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4616 | NONENONEs,x,x, && | |
4617 | program_prefix=${target_alias}- | |
4618 | ||
4619 | # The tests for host and target for $enable_largefile require | |
4620 | # canonical names. | |
4621 | ||
4622 | ||
81ecdfbb | 4623 | |
da2f07f1 JK |
4624 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4625 | # even in directories otherwise not depending on the $plugins option. | |
4626 | ||
4627 | ||
2974be62 AM |
4628 | maybe_plugins=no |
4629 | for ac_header in dlfcn.h | |
4630 | do : | |
4631 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4632 | " | |
d0ac1c44 | 4633 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : |
2974be62 AM |
4634 | cat >>confdefs.h <<_ACEOF |
4635 | #define HAVE_DLFCN_H 1 | |
4636 | _ACEOF | |
4637 | maybe_plugins=yes | |
4638 | fi | |
4639 | ||
4640 | done | |
4641 | ||
4642 | for ac_header in windows.h | |
4643 | do : | |
4644 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4645 | " | |
d0ac1c44 | 4646 | if test "x$ac_cv_header_windows_h" = xyes; then : |
2974be62 AM |
4647 | cat >>confdefs.h <<_ACEOF |
4648 | #define HAVE_WINDOWS_H 1 | |
4649 | _ACEOF | |
4650 | maybe_plugins=yes | |
4651 | fi | |
4652 | ||
4653 | done | |
4654 | ||
4655 | ||
4656 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4657 | if test "${enable_plugins+set}" = set; then : |
4658 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4659 | no) plugins=no ;; |
4660 | *) plugins=yes | |
4661 | if test "$maybe_plugins" != "yes" ; then | |
d0ac1c44 | 4662 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 |
2974be62 AM |
4663 | fi ;; |
4664 | esac | |
da2f07f1 | 4665 | else |
2974be62 AM |
4666 | plugins=$maybe_plugins |
4667 | ||
da2f07f1 JK |
4668 | fi |
4669 | ||
2974be62 | 4670 | if test "$plugins" = "yes"; then |
458412c3 TT |
4671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
4672 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
d0ac1c44 | 4673 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4674 | $as_echo_n "(cached) " >&6 |
4675 | else | |
4676 | ac_func_search_save_LIBS=$LIBS | |
4677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4678 | /* end confdefs.h. */ | |
4679 | ||
4680 | /* Override any GCC internal prototype to avoid an error. | |
4681 | Use char because int might match the return type of a GCC | |
4682 | builtin and then its argument prototype would still apply. */ | |
4683 | #ifdef __cplusplus | |
4684 | extern "C" | |
4685 | #endif | |
458412c3 | 4686 | char dlsym (); |
2974be62 AM |
4687 | int |
4688 | main () | |
4689 | { | |
458412c3 | 4690 | return dlsym (); |
2974be62 AM |
4691 | ; |
4692 | return 0; | |
4693 | } | |
4694 | _ACEOF | |
4695 | for ac_lib in '' dl; do | |
4696 | if test -z "$ac_lib"; then | |
4697 | ac_res="none required" | |
4698 | else | |
4699 | ac_res=-l$ac_lib | |
4700 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4701 | fi | |
4702 | if ac_fn_c_try_link "$LINENO"; then : | |
458412c3 | 4703 | ac_cv_search_dlsym=$ac_res |
2974be62 AM |
4704 | fi |
4705 | rm -f core conftest.err conftest.$ac_objext \ | |
4706 | conftest$ac_exeext | |
d0ac1c44 | 4707 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4708 | break |
4709 | fi | |
4710 | done | |
d0ac1c44 | 4711 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4712 | |
4713 | else | |
458412c3 | 4714 | ac_cv_search_dlsym=no |
2974be62 AM |
4715 | fi |
4716 | rm conftest.$ac_ext | |
4717 | LIBS=$ac_func_search_save_LIBS | |
4718 | fi | |
458412c3 TT |
4719 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
4720 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
4721 | ac_res=$ac_cv_search_dlsym | |
2974be62 AM |
4722 | if test "$ac_res" != no; then : |
4723 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4724 | ||
4725 | fi | |
4726 | ||
4727 | fi | |
da2f07f1 JK |
4728 | |
4729 | ||
4730 | case "${host}" in | |
4731 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4732 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4733 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4734 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4735 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4736 | # large-file support through the --enable-largefile switch, disable | |
4737 | # large-file support in favor of procfs support. | |
4738 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4739 | && : ${enable_largefile="no"} | |
4740 | ;; | |
4741 | esac | |
4742 | ||
4743 | # Check whether --enable-largefile was given. | |
4744 | if test "${enable_largefile+set}" = set; then : | |
4745 | enableval=$enable_largefile; | |
4746 | fi | |
4747 | ||
4748 | if test "$enable_largefile" != no; then | |
4749 | ||
4750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4751 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4752 | if ${ac_cv_sys_largefile_CC+:} false; then : |
da2f07f1 JK |
4753 | $as_echo_n "(cached) " >&6 |
4754 | else | |
4755 | ac_cv_sys_largefile_CC=no | |
4756 | if test "$GCC" != yes; then | |
4757 | ac_save_CC=$CC | |
4758 | while :; do | |
4759 | # IRIX 6.2 and later do not support large files by default, | |
4760 | # so use the C compiler's -n32 option if that helps. | |
4761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4762 | /* end confdefs.h. */ | |
4763 | #include <sys/types.h> | |
4764 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4765 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4766 | since some C++ compilers masquerading as C compilers | |
4767 | incorrectly reject 9223372036854775807. */ | |
4768 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4769 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4770 | && LARGE_OFF_T % 2147483647 == 1) | |
4771 | ? 1 : -1]; | |
4772 | int | |
4773 | main () | |
4774 | { | |
4775 | ||
4776 | ; | |
4777 | return 0; | |
4778 | } | |
4779 | _ACEOF | |
4780 | if ac_fn_c_try_compile "$LINENO"; then : | |
4781 | break | |
4782 | fi | |
4783 | rm -f core conftest.err conftest.$ac_objext | |
4784 | CC="$CC -n32" | |
4785 | if ac_fn_c_try_compile "$LINENO"; then : | |
4786 | ac_cv_sys_largefile_CC=' -n32'; break | |
4787 | fi | |
4788 | rm -f core conftest.err conftest.$ac_objext | |
4789 | break | |
4790 | done | |
4791 | CC=$ac_save_CC | |
4792 | rm -f conftest.$ac_ext | |
4793 | fi | |
4794 | fi | |
4795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4796 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4797 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4798 | CC=$CC$ac_cv_sys_largefile_CC | |
4799 | fi | |
4800 | ||
4801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4802 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4803 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
da2f07f1 JK |
4804 | $as_echo_n "(cached) " >&6 |
4805 | else | |
4806 | while :; do | |
4807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4808 | /* end confdefs.h. */ | |
4809 | #include <sys/types.h> | |
4810 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4811 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4812 | since some C++ compilers masquerading as C compilers | |
4813 | incorrectly reject 9223372036854775807. */ | |
4814 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4815 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4816 | && LARGE_OFF_T % 2147483647 == 1) | |
4817 | ? 1 : -1]; | |
4818 | int | |
4819 | main () | |
4820 | { | |
4821 | ||
4822 | ; | |
4823 | return 0; | |
4824 | } | |
4825 | _ACEOF | |
4826 | if ac_fn_c_try_compile "$LINENO"; then : | |
4827 | ac_cv_sys_file_offset_bits=no; break | |
4828 | fi | |
4829 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4830 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4831 | /* end confdefs.h. */ | |
4832 | #define _FILE_OFFSET_BITS 64 | |
4833 | #include <sys/types.h> | |
4834 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4835 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4836 | since some C++ compilers masquerading as C compilers | |
4837 | incorrectly reject 9223372036854775807. */ | |
4838 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4839 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4840 | && LARGE_OFF_T % 2147483647 == 1) | |
4841 | ? 1 : -1]; | |
4842 | int | |
4843 | main () | |
4844 | { | |
4845 | ||
4846 | ; | |
4847 | return 0; | |
4848 | } | |
4849 | _ACEOF | |
4850 | if ac_fn_c_try_compile "$LINENO"; then : | |
4851 | ac_cv_sys_file_offset_bits=64; break | |
4852 | fi | |
4853 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4854 | ac_cv_sys_file_offset_bits=unknown | |
4855 | break | |
4856 | done | |
4857 | fi | |
4858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4859 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4860 | case $ac_cv_sys_file_offset_bits in #( | |
4861 | no | unknown) ;; | |
4862 | *) | |
4863 | cat >>confdefs.h <<_ACEOF | |
4864 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4865 | _ACEOF | |
4866 | ;; | |
4867 | esac | |
4868 | rm -rf conftest* | |
4869 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4871 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4872 | if ${ac_cv_sys_large_files+:} false; then : |
da2f07f1 JK |
4873 | $as_echo_n "(cached) " >&6 |
4874 | else | |
4875 | while :; do | |
4876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4877 | /* end confdefs.h. */ | |
4878 | #include <sys/types.h> | |
4879 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4880 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4881 | since some C++ compilers masquerading as C compilers | |
4882 | incorrectly reject 9223372036854775807. */ | |
4883 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4884 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4885 | && LARGE_OFF_T % 2147483647 == 1) | |
4886 | ? 1 : -1]; | |
4887 | int | |
4888 | main () | |
4889 | { | |
4890 | ||
4891 | ; | |
4892 | return 0; | |
4893 | } | |
4894 | _ACEOF | |
4895 | if ac_fn_c_try_compile "$LINENO"; then : | |
4896 | ac_cv_sys_large_files=no; break | |
4897 | fi | |
4898 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4900 | /* end confdefs.h. */ | |
4901 | #define _LARGE_FILES 1 | |
4902 | #include <sys/types.h> | |
4903 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4904 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4905 | since some C++ compilers masquerading as C compilers | |
4906 | incorrectly reject 9223372036854775807. */ | |
4907 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4908 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4909 | && LARGE_OFF_T % 2147483647 == 1) | |
4910 | ? 1 : -1]; | |
4911 | int | |
4912 | main () | |
4913 | { | |
4914 | ||
4915 | ; | |
4916 | return 0; | |
4917 | } | |
4918 | _ACEOF | |
4919 | if ac_fn_c_try_compile "$LINENO"; then : | |
4920 | ac_cv_sys_large_files=1; break | |
4921 | fi | |
4922 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4923 | ac_cv_sys_large_files=unknown | |
4924 | break | |
4925 | done | |
4926 | fi | |
4927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4928 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4929 | case $ac_cv_sys_large_files in #( | |
4930 | no | unknown) ;; | |
4931 | *) | |
4932 | cat >>confdefs.h <<_ACEOF | |
4933 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4934 | _ACEOF | |
4935 | ;; | |
4936 | esac | |
4937 | rm -rf conftest* | |
4938 | fi | |
d0ac1c44 SM |
4939 | |
4940 | ||
da2f07f1 JK |
4941 | fi |
4942 | ||
4943 | ||
4944 | ||
81ecdfbb RW |
4945 | |
4946 | ||
4947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4948 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
d0ac1c44 | 4949 | if ${am_cv_prog_cc_stdc+:} false; then : |
81ecdfbb RW |
4950 | $as_echo_n "(cached) " >&6 |
4951 | else | |
4952 | am_cv_prog_cc_stdc=no | |
4953 | ac_save_CC="$CC" | |
4954 | # Don't try gcc -ansi; that turns off useful extensions and | |
4955 | # breaks some systems' header files. | |
4956 | # AIX -qlanglvl=ansi | |
4957 | # Ultrix and OSF/1 -std1 | |
4958 | # HP-UX 10.20 and later -Ae | |
4959 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4960 | # SVR4 -Xc -D__EXTENSIONS__ | |
4961 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4962 | do | |
783e057b | 4963 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4965 | /* end confdefs.h. */ |
4966 | #include <stdarg.h> | |
4967 | #include <stdio.h> | |
4968 | #include <sys/types.h> | |
4969 | #include <sys/stat.h> | |
4970 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4971 | struct buf { int x; }; | |
4972 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4973 | static char *e (p, i) | |
4974 | char **p; | |
4975 | int i; | |
4976 | { | |
4977 | return p[i]; | |
4978 | } | |
4979 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4980 | { | |
4981 | char *s; | |
4982 | va_list v; | |
4983 | va_start (v,p); | |
4984 | s = g (p, va_arg (v,int)); | |
4985 | va_end (v); | |
4986 | return s; | |
4987 | } | |
4988 | int test (int i, double x); | |
4989 | struct s1 {int (*f) (int a);}; | |
4990 | struct s2 {int (*f) (double a);}; | |
4991 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4992 | int argc; | |
4993 | char **argv; | |
4994 | ||
4995 | int | |
4996 | main () | |
4997 | { | |
4998 | ||
4999 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
5000 | ||
5001 | ; | |
5002 | return 0; | |
5003 | } | |
5004 | _ACEOF | |
81ecdfbb | 5005 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 5006 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 5007 | fi |
81ecdfbb | 5008 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
5009 | done |
5010 | CC="$ac_save_CC" | |
5011 | ||
5012 | fi | |
5013 | ||
5014 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
5015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
5016 | $as_echo "none needed" >&6; } | |
783e057b | 5017 | else |
81ecdfbb RW |
5018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
5019 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
5020 | fi |
5021 | case "x$am_cv_prog_cc_stdc" in | |
5022 | x|xno) ;; | |
5023 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
5024 | esac | |
5025 | ||
d0ac1c44 SM |
5026 | # Expand $ac_aux_dir to an absolute path. |
5027 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4869db5e | 5028 | |
d0ac1c44 | 5029 | if test x"${install_sh+set}" != xset; then |
4869db5e RM |
5030 | case $am_aux_dir in |
5031 | *\ * | *\ *) | |
5032 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
5033 | *) | |
5034 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
5035 | esac | |
5036 | fi | |
5037 | ||
d0ac1c44 SM |
5038 | # Installed binaries are usually stripped using 'strip' when the user |
5039 | # run "make install-strip". However 'strip' might not be the right | |
4869db5e | 5040 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 5041 | # will honor the 'STRIP' environment variable to overrule this program. |
4869db5e RM |
5042 | if test "$cross_compiling" != no; then |
5043 | if test -n "$ac_tool_prefix"; then | |
5044 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
5045 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
5046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5047 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5048 | if ${ac_cv_prog_STRIP+:} false; then : |
4869db5e RM |
5049 | $as_echo_n "(cached) " >&6 |
5050 | else | |
5051 | if test -n "$STRIP"; then | |
5052 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
5053 | else | |
5054 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5055 | for as_dir in $PATH | |
5056 | do | |
5057 | IFS=$as_save_IFS | |
5058 | test -z "$as_dir" && as_dir=. | |
5059 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5060 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5061 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
5062 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5063 | break 2 | |
5064 | fi | |
5065 | done | |
5066 | done | |
5067 | IFS=$as_save_IFS | |
5068 | ||
5069 | fi | |
5070 | fi | |
5071 | STRIP=$ac_cv_prog_STRIP | |
5072 | if test -n "$STRIP"; then | |
5073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
5074 | $as_echo "$STRIP" >&6; } | |
5075 | else | |
5076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5077 | $as_echo "no" >&6; } | |
5078 | fi | |
5079 | ||
5080 | ||
5081 | fi | |
5082 | if test -z "$ac_cv_prog_STRIP"; then | |
5083 | ac_ct_STRIP=$STRIP | |
5084 | # Extract the first word of "strip", so it can be a program name with args. | |
5085 | set dummy strip; ac_word=$2 | |
5086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5087 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5088 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
4869db5e RM |
5089 | $as_echo_n "(cached) " >&6 |
5090 | else | |
5091 | if test -n "$ac_ct_STRIP"; then | |
5092 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
5093 | else | |
5094 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5095 | for as_dir in $PATH | |
5096 | do | |
5097 | IFS=$as_save_IFS | |
5098 | test -z "$as_dir" && as_dir=. | |
5099 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5100 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5101 | ac_cv_prog_ac_ct_STRIP="strip" |
5102 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5103 | break 2 | |
5104 | fi | |
5105 | done | |
5106 | done | |
5107 | IFS=$as_save_IFS | |
5108 | ||
5109 | fi | |
5110 | fi | |
5111 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
5112 | if test -n "$ac_ct_STRIP"; then | |
5113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
5114 | $as_echo "$ac_ct_STRIP" >&6; } | |
5115 | else | |
5116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5117 | $as_echo "no" >&6; } | |
5118 | fi | |
5119 | ||
5120 | if test "x$ac_ct_STRIP" = x; then | |
5121 | STRIP=":" | |
5122 | else | |
5123 | case $cross_compiling:$ac_tool_warned in | |
5124 | yes:) | |
5125 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5126 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5127 | ac_tool_warned=yes ;; | |
5128 | esac | |
5129 | STRIP=$ac_ct_STRIP | |
5130 | fi | |
5131 | else | |
5132 | STRIP="$ac_cv_prog_STRIP" | |
5133 | fi | |
5134 | ||
5135 | fi | |
5136 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
5137 | ||
783e057b DJ |
5138 | |
5139 | ac_aux_dir= | |
81ecdfbb | 5140 | for ac_dir in .. "$srcdir"/..; do |
d0ac1c44 SM |
5141 | if test -f "$ac_dir/install-sh"; then |
5142 | ac_aux_dir=$ac_dir | |
5143 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5144 | break | |
5145 | elif test -f "$ac_dir/install.sh"; then | |
5146 | ac_aux_dir=$ac_dir | |
5147 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
5148 | break | |
5149 | elif test -f "$ac_dir/shtool"; then | |
5150 | ac_aux_dir=$ac_dir | |
5151 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5152 | break | |
5153 | fi | |
783e057b DJ |
5154 | done |
5155 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 5156 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 5157 | fi |
81ecdfbb RW |
5158 | |
5159 | # These three variables are undocumented and unsupported, | |
5160 | # and are intended to be withdrawn in a future Autoconf release. | |
5161 | # They can cause serious problems if a builder's source tree is in a directory | |
5162 | # whose full name contains unusual characters. | |
5163 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5164 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5165 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5166 | ||
783e057b | 5167 | |
783e057b | 5168 | |
9009e1ae MR |
5169 | test "$program_prefix" != NONE && |
5170 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
5171 | # Use a double $ so make ignores it. | |
5172 | test "$program_suffix" != NONE && | |
5173 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
5174 | # Double any \ or $. | |
5175 | # By default was `s,x,x', remove it if useless. | |
5176 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
5177 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
5178 | ||
81ecdfbb | 5179 | |
0bcda685 PA |
5180 | # We require a C++11 compiler. Check if one is available, and if |
5181 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5182 | ||
41260ac2 | 5183 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
5184 | ac_ext=cpp |
5185 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5186 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5187 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5188 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5189 | CXX_DIALECT="" | |
5190 | ac_success=no | |
5191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5192 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5193 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5194 | $as_echo_n "(cached) " >&6 |
5195 | else | |
5196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5197 | /* end confdefs.h. */ | |
5198 | ||
5199 | ||
5200 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5201 | // Hopefully, this will speed up the test. | |
5202 | ||
5203 | #ifndef __cplusplus | |
5204 | ||
5205 | #error "This is not a C++ compiler" | |
5206 | ||
5207 | #elif __cplusplus < 201103L | |
5208 | ||
5209 | #error "This is not a C++11 compiler" | |
5210 | ||
5211 | #else | |
5212 | ||
5213 | namespace cxx11 | |
5214 | { | |
5215 | ||
5216 | namespace test_static_assert | |
5217 | { | |
5218 | ||
5219 | template <typename T> | |
5220 | struct check | |
5221 | { | |
5222 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5223 | }; | |
5224 | ||
5225 | } | |
5226 | ||
5227 | namespace test_final_override | |
5228 | { | |
5229 | ||
5230 | struct Base | |
5231 | { | |
5232 | virtual void f() {} | |
5233 | }; | |
5234 | ||
5235 | struct Derived : public Base | |
5236 | { | |
5237 | virtual void f() override {} | |
5238 | }; | |
5239 | ||
5240 | } | |
5241 | ||
5242 | namespace test_double_right_angle_brackets | |
5243 | { | |
5244 | ||
5245 | template < typename T > | |
5246 | struct check {}; | |
5247 | ||
5248 | typedef check<void> single_type; | |
5249 | typedef check<check<void>> double_type; | |
5250 | typedef check<check<check<void>>> triple_type; | |
5251 | typedef check<check<check<check<void>>>> quadruple_type; | |
5252 | ||
5253 | } | |
5254 | ||
5255 | namespace test_decltype | |
5256 | { | |
5257 | ||
5258 | int | |
5259 | f() | |
5260 | { | |
5261 | int a = 1; | |
5262 | decltype(a) b = 2; | |
5263 | return a + b; | |
5264 | } | |
5265 | ||
5266 | } | |
5267 | ||
5268 | namespace test_type_deduction | |
5269 | { | |
5270 | ||
5271 | template < typename T1, typename T2 > | |
5272 | struct is_same | |
5273 | { | |
5274 | static const bool value = false; | |
5275 | }; | |
5276 | ||
5277 | template < typename T > | |
5278 | struct is_same<T, T> | |
5279 | { | |
5280 | static const bool value = true; | |
5281 | }; | |
5282 | ||
5283 | template < typename T1, typename T2 > | |
5284 | auto | |
5285 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5286 | { | |
5287 | return a1 + a2; | |
5288 | } | |
5289 | ||
5290 | int | |
5291 | test(const int c, volatile int v) | |
5292 | { | |
5293 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5294 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5295 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5296 | auto ac = c; | |
5297 | auto av = v; | |
5298 | auto sumi = ac + av + 'x'; | |
5299 | auto sumf = ac + av + 1.0; | |
5300 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5301 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5302 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5303 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5304 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5305 | return (sumf > 0.0) ? sumi : add(c, v); | |
5306 | } | |
5307 | ||
5308 | } | |
5309 | ||
5310 | namespace test_noexcept | |
5311 | { | |
5312 | ||
5313 | int f() { return 0; } | |
5314 | int g() noexcept { return 0; } | |
5315 | ||
5316 | static_assert(noexcept(f()) == false, ""); | |
5317 | static_assert(noexcept(g()) == true, ""); | |
5318 | ||
5319 | } | |
5320 | ||
5321 | namespace test_constexpr | |
5322 | { | |
5323 | ||
5324 | template < typename CharT > | |
5325 | unsigned long constexpr | |
5326 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5327 | { | |
5328 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5329 | } | |
5330 | ||
5331 | template < typename CharT > | |
5332 | unsigned long constexpr | |
5333 | strlen_c(const CharT *const s) noexcept | |
5334 | { | |
5335 | return strlen_c_r(s, 0UL); | |
5336 | } | |
5337 | ||
5338 | static_assert(strlen_c("") == 0UL, ""); | |
5339 | static_assert(strlen_c("1") == 1UL, ""); | |
5340 | static_assert(strlen_c("example") == 7UL, ""); | |
5341 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5342 | ||
5343 | } | |
5344 | ||
5345 | namespace test_rvalue_references | |
5346 | { | |
5347 | ||
5348 | template < int N > | |
5349 | struct answer | |
5350 | { | |
5351 | static constexpr int value = N; | |
5352 | }; | |
5353 | ||
5354 | answer<1> f(int&) { return answer<1>(); } | |
5355 | answer<2> f(const int&) { return answer<2>(); } | |
5356 | answer<3> f(int&&) { return answer<3>(); } | |
5357 | ||
5358 | void | |
5359 | test() | |
5360 | { | |
5361 | int i = 0; | |
5362 | const int c = 0; | |
5363 | static_assert(decltype(f(i))::value == 1, ""); | |
5364 | static_assert(decltype(f(c))::value == 2, ""); | |
5365 | static_assert(decltype(f(0))::value == 3, ""); | |
5366 | } | |
5367 | ||
5368 | } | |
5369 | ||
5370 | namespace test_uniform_initialization | |
5371 | { | |
5372 | ||
5373 | struct test | |
5374 | { | |
5375 | static const int zero {}; | |
5376 | static const int one {1}; | |
5377 | }; | |
5378 | ||
5379 | static_assert(test::zero == 0, ""); | |
5380 | static_assert(test::one == 1, ""); | |
5381 | ||
5382 | } | |
5383 | ||
5384 | namespace test_lambdas | |
5385 | { | |
5386 | ||
5387 | void | |
5388 | test1() | |
5389 | { | |
5390 | auto lambda1 = [](){}; | |
5391 | auto lambda2 = lambda1; | |
5392 | lambda1(); | |
5393 | lambda2(); | |
5394 | } | |
5395 | ||
5396 | int | |
5397 | test2() | |
5398 | { | |
5399 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5400 | auto b = []() -> int { return '0'; }(); | |
5401 | auto c = [=](){ return a + b; }(); | |
5402 | auto d = [&](){ return c; }(); | |
5403 | auto e = [a, &b](int x) mutable { | |
5404 | const auto identity = [](int y){ return y; }; | |
5405 | for (auto i = 0; i < a; ++i) | |
5406 | a += b--; | |
5407 | return x + identity(a + b); | |
5408 | }(0); | |
5409 | return a + b + c + d + e; | |
5410 | } | |
5411 | ||
5412 | int | |
5413 | test3() | |
5414 | { | |
5415 | const auto nullary = [](){ return 0; }; | |
5416 | const auto unary = [](int x){ return x; }; | |
5417 | using nullary_t = decltype(nullary); | |
5418 | using unary_t = decltype(unary); | |
5419 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5420 | const auto higher2nd = [unary](nullary_t f1){ | |
5421 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5422 | }; | |
5423 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5424 | } | |
5425 | ||
5426 | } | |
5427 | ||
5428 | namespace test_variadic_templates | |
5429 | { | |
5430 | ||
5431 | template <int...> | |
5432 | struct sum; | |
5433 | ||
5434 | template <int N0, int... N1toN> | |
5435 | struct sum<N0, N1toN...> | |
5436 | { | |
5437 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5438 | }; | |
5439 | ||
5440 | template <> | |
5441 | struct sum<> | |
5442 | { | |
5443 | static constexpr auto value = 0; | |
5444 | }; | |
5445 | ||
5446 | static_assert(sum<>::value == 0, ""); | |
5447 | static_assert(sum<1>::value == 1, ""); | |
5448 | static_assert(sum<23>::value == 23, ""); | |
5449 | static_assert(sum<1, 2>::value == 3, ""); | |
5450 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5451 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5452 | ||
5453 | } | |
5454 | ||
5455 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5456 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5457 | // because of this. | |
5458 | namespace test_template_alias_sfinae | |
5459 | { | |
5460 | ||
5461 | struct foo {}; | |
5462 | ||
5463 | template<typename T> | |
5464 | using member = typename T::member_type; | |
5465 | ||
5466 | template<typename T> | |
5467 | void func(...) {} | |
5468 | ||
5469 | template<typename T> | |
5470 | void func(member<T>*) {} | |
5471 | ||
5472 | void test(); | |
5473 | ||
5474 | void test() { func<foo>(0); } | |
5475 | ||
5476 | } | |
5477 | ||
5478 | } // namespace cxx11 | |
5479 | ||
5480 | #endif // __cplusplus >= 201103L | |
5481 | ||
5482 | ||
5483 | ||
5484 | _ACEOF | |
5485 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5486 | ax_cv_cxx_compile_cxx11=yes | |
5487 | else | |
5488 | ax_cv_cxx_compile_cxx11=no | |
5489 | fi | |
5490 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5491 | fi | |
5492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5493 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5494 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5495 | ac_success=yes | |
5496 | fi | |
5497 | ||
5498 | if test x$ac_success = xno; then | |
41260ac2 SM |
5499 | for alternative in ${ax_cxx_compile_alternatives}; do |
5500 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5501 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5503 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5504 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5505 | $as_echo_n "(cached) " >&6 |
5506 | else | |
5507 | ac_save_CXX="$CXX" | |
5508 | CXX="$CXX $switch" | |
5509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5510 | /* end confdefs.h. */ | |
5511 | ||
5512 | ||
5513 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5514 | // Hopefully, this will speed up the test. | |
5515 | ||
5516 | #ifndef __cplusplus | |
5517 | ||
5518 | #error "This is not a C++ compiler" | |
5519 | ||
5520 | #elif __cplusplus < 201103L | |
5521 | ||
5522 | #error "This is not a C++11 compiler" | |
5523 | ||
5524 | #else | |
5525 | ||
5526 | namespace cxx11 | |
5527 | { | |
5528 | ||
5529 | namespace test_static_assert | |
5530 | { | |
5531 | ||
5532 | template <typename T> | |
5533 | struct check | |
5534 | { | |
5535 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5536 | }; | |
5537 | ||
5538 | } | |
5539 | ||
5540 | namespace test_final_override | |
5541 | { | |
5542 | ||
5543 | struct Base | |
5544 | { | |
5545 | virtual void f() {} | |
5546 | }; | |
5547 | ||
5548 | struct Derived : public Base | |
5549 | { | |
5550 | virtual void f() override {} | |
5551 | }; | |
5552 | ||
5553 | } | |
5554 | ||
5555 | namespace test_double_right_angle_brackets | |
5556 | { | |
5557 | ||
5558 | template < typename T > | |
5559 | struct check {}; | |
5560 | ||
5561 | typedef check<void> single_type; | |
5562 | typedef check<check<void>> double_type; | |
5563 | typedef check<check<check<void>>> triple_type; | |
5564 | typedef check<check<check<check<void>>>> quadruple_type; | |
5565 | ||
5566 | } | |
5567 | ||
5568 | namespace test_decltype | |
5569 | { | |
5570 | ||
5571 | int | |
5572 | f() | |
5573 | { | |
5574 | int a = 1; | |
5575 | decltype(a) b = 2; | |
5576 | return a + b; | |
5577 | } | |
5578 | ||
5579 | } | |
5580 | ||
5581 | namespace test_type_deduction | |
5582 | { | |
5583 | ||
5584 | template < typename T1, typename T2 > | |
5585 | struct is_same | |
5586 | { | |
5587 | static const bool value = false; | |
5588 | }; | |
5589 | ||
5590 | template < typename T > | |
5591 | struct is_same<T, T> | |
5592 | { | |
5593 | static const bool value = true; | |
5594 | }; | |
5595 | ||
5596 | template < typename T1, typename T2 > | |
5597 | auto | |
5598 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5599 | { | |
5600 | return a1 + a2; | |
5601 | } | |
5602 | ||
5603 | int | |
5604 | test(const int c, volatile int v) | |
5605 | { | |
5606 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5607 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5608 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5609 | auto ac = c; | |
5610 | auto av = v; | |
5611 | auto sumi = ac + av + 'x'; | |
5612 | auto sumf = ac + av + 1.0; | |
5613 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5614 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5615 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5616 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5617 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5618 | return (sumf > 0.0) ? sumi : add(c, v); | |
5619 | } | |
5620 | ||
5621 | } | |
5622 | ||
5623 | namespace test_noexcept | |
5624 | { | |
5625 | ||
5626 | int f() { return 0; } | |
5627 | int g() noexcept { return 0; } | |
5628 | ||
5629 | static_assert(noexcept(f()) == false, ""); | |
5630 | static_assert(noexcept(g()) == true, ""); | |
5631 | ||
5632 | } | |
5633 | ||
5634 | namespace test_constexpr | |
5635 | { | |
5636 | ||
5637 | template < typename CharT > | |
5638 | unsigned long constexpr | |
5639 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5640 | { | |
5641 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5642 | } | |
5643 | ||
5644 | template < typename CharT > | |
5645 | unsigned long constexpr | |
5646 | strlen_c(const CharT *const s) noexcept | |
5647 | { | |
5648 | return strlen_c_r(s, 0UL); | |
5649 | } | |
5650 | ||
5651 | static_assert(strlen_c("") == 0UL, ""); | |
5652 | static_assert(strlen_c("1") == 1UL, ""); | |
5653 | static_assert(strlen_c("example") == 7UL, ""); | |
5654 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5655 | ||
5656 | } | |
5657 | ||
5658 | namespace test_rvalue_references | |
5659 | { | |
5660 | ||
5661 | template < int N > | |
5662 | struct answer | |
5663 | { | |
5664 | static constexpr int value = N; | |
5665 | }; | |
5666 | ||
5667 | answer<1> f(int&) { return answer<1>(); } | |
5668 | answer<2> f(const int&) { return answer<2>(); } | |
5669 | answer<3> f(int&&) { return answer<3>(); } | |
5670 | ||
5671 | void | |
5672 | test() | |
5673 | { | |
5674 | int i = 0; | |
5675 | const int c = 0; | |
5676 | static_assert(decltype(f(i))::value == 1, ""); | |
5677 | static_assert(decltype(f(c))::value == 2, ""); | |
5678 | static_assert(decltype(f(0))::value == 3, ""); | |
5679 | } | |
5680 | ||
5681 | } | |
5682 | ||
5683 | namespace test_uniform_initialization | |
5684 | { | |
5685 | ||
5686 | struct test | |
5687 | { | |
5688 | static const int zero {}; | |
5689 | static const int one {1}; | |
5690 | }; | |
5691 | ||
5692 | static_assert(test::zero == 0, ""); | |
5693 | static_assert(test::one == 1, ""); | |
5694 | ||
5695 | } | |
5696 | ||
5697 | namespace test_lambdas | |
5698 | { | |
5699 | ||
5700 | void | |
5701 | test1() | |
5702 | { | |
5703 | auto lambda1 = [](){}; | |
5704 | auto lambda2 = lambda1; | |
5705 | lambda1(); | |
5706 | lambda2(); | |
5707 | } | |
5708 | ||
5709 | int | |
5710 | test2() | |
5711 | { | |
5712 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5713 | auto b = []() -> int { return '0'; }(); | |
5714 | auto c = [=](){ return a + b; }(); | |
5715 | auto d = [&](){ return c; }(); | |
5716 | auto e = [a, &b](int x) mutable { | |
5717 | const auto identity = [](int y){ return y; }; | |
5718 | for (auto i = 0; i < a; ++i) | |
5719 | a += b--; | |
5720 | return x + identity(a + b); | |
5721 | }(0); | |
5722 | return a + b + c + d + e; | |
5723 | } | |
5724 | ||
5725 | int | |
5726 | test3() | |
5727 | { | |
5728 | const auto nullary = [](){ return 0; }; | |
5729 | const auto unary = [](int x){ return x; }; | |
5730 | using nullary_t = decltype(nullary); | |
5731 | using unary_t = decltype(unary); | |
5732 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5733 | const auto higher2nd = [unary](nullary_t f1){ | |
5734 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5735 | }; | |
5736 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5737 | } | |
5738 | ||
5739 | } | |
5740 | ||
5741 | namespace test_variadic_templates | |
5742 | { | |
5743 | ||
5744 | template <int...> | |
5745 | struct sum; | |
5746 | ||
5747 | template <int N0, int... N1toN> | |
5748 | struct sum<N0, N1toN...> | |
5749 | { | |
5750 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5751 | }; | |
5752 | ||
5753 | template <> | |
5754 | struct sum<> | |
5755 | { | |
5756 | static constexpr auto value = 0; | |
5757 | }; | |
5758 | ||
5759 | static_assert(sum<>::value == 0, ""); | |
5760 | static_assert(sum<1>::value == 1, ""); | |
5761 | static_assert(sum<23>::value == 23, ""); | |
5762 | static_assert(sum<1, 2>::value == 3, ""); | |
5763 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5764 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5765 | ||
5766 | } | |
5767 | ||
5768 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5769 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5770 | // because of this. | |
5771 | namespace test_template_alias_sfinae | |
5772 | { | |
5773 | ||
5774 | struct foo {}; | |
5775 | ||
5776 | template<typename T> | |
5777 | using member = typename T::member_type; | |
5778 | ||
5779 | template<typename T> | |
5780 | void func(...) {} | |
5781 | ||
5782 | template<typename T> | |
5783 | void func(member<T>*) {} | |
5784 | ||
5785 | void test(); | |
5786 | ||
5787 | void test() { func<foo>(0); } | |
5788 | ||
5789 | } | |
5790 | ||
5791 | } // namespace cxx11 | |
5792 | ||
5793 | #endif // __cplusplus >= 201103L | |
5794 | ||
5795 | ||
5796 | ||
5797 | _ACEOF | |
5798 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5799 | eval $cachevar=yes | |
5800 | else | |
5801 | eval $cachevar=no | |
5802 | fi | |
5803 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5804 | CXX="$ac_save_CXX" | |
5805 | fi | |
5806 | eval ac_res=\$$cachevar | |
5807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5808 | $as_echo "$ac_res" >&6; } | |
5809 | if eval test x\$$cachevar = xyes; then | |
5810 | CXX_DIALECT="$switch" | |
5811 | ac_success=yes | |
5812 | break | |
5813 | fi | |
5814 | done | |
5815 | fi | |
5816 | ||
5817 | if test x$ac_success = xno; then | |
41260ac2 SM |
5818 | for alternative in ${ax_cxx_compile_alternatives}; do |
5819 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5820 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5821 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5822 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5823 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5824 | $as_echo_n "(cached) " >&6 |
5825 | else | |
5826 | ac_save_CXX="$CXX" | |
41260ac2 SM |
5827 | CXX="$CXX $switch" |
5828 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5829 | /* end confdefs.h. */ |
5830 | ||
5831 | ||
5832 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5833 | // Hopefully, this will speed up the test. | |
5834 | ||
5835 | #ifndef __cplusplus | |
5836 | ||
5837 | #error "This is not a C++ compiler" | |
5838 | ||
5839 | #elif __cplusplus < 201103L | |
5840 | ||
5841 | #error "This is not a C++11 compiler" | |
5842 | ||
5843 | #else | |
5844 | ||
5845 | namespace cxx11 | |
5846 | { | |
5847 | ||
5848 | namespace test_static_assert | |
5849 | { | |
5850 | ||
5851 | template <typename T> | |
5852 | struct check | |
5853 | { | |
5854 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5855 | }; | |
5856 | ||
5857 | } | |
5858 | ||
5859 | namespace test_final_override | |
5860 | { | |
5861 | ||
5862 | struct Base | |
5863 | { | |
5864 | virtual void f() {} | |
5865 | }; | |
5866 | ||
5867 | struct Derived : public Base | |
5868 | { | |
5869 | virtual void f() override {} | |
5870 | }; | |
5871 | ||
5872 | } | |
5873 | ||
5874 | namespace test_double_right_angle_brackets | |
5875 | { | |
5876 | ||
5877 | template < typename T > | |
5878 | struct check {}; | |
5879 | ||
5880 | typedef check<void> single_type; | |
5881 | typedef check<check<void>> double_type; | |
5882 | typedef check<check<check<void>>> triple_type; | |
5883 | typedef check<check<check<check<void>>>> quadruple_type; | |
5884 | ||
5885 | } | |
5886 | ||
5887 | namespace test_decltype | |
5888 | { | |
5889 | ||
5890 | int | |
5891 | f() | |
5892 | { | |
5893 | int a = 1; | |
5894 | decltype(a) b = 2; | |
5895 | return a + b; | |
5896 | } | |
5897 | ||
5898 | } | |
5899 | ||
5900 | namespace test_type_deduction | |
5901 | { | |
5902 | ||
5903 | template < typename T1, typename T2 > | |
5904 | struct is_same | |
5905 | { | |
5906 | static const bool value = false; | |
5907 | }; | |
5908 | ||
5909 | template < typename T > | |
5910 | struct is_same<T, T> | |
5911 | { | |
5912 | static const bool value = true; | |
5913 | }; | |
5914 | ||
5915 | template < typename T1, typename T2 > | |
5916 | auto | |
5917 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5918 | { | |
5919 | return a1 + a2; | |
5920 | } | |
5921 | ||
5922 | int | |
5923 | test(const int c, volatile int v) | |
5924 | { | |
5925 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5926 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5927 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5928 | auto ac = c; | |
5929 | auto av = v; | |
5930 | auto sumi = ac + av + 'x'; | |
5931 | auto sumf = ac + av + 1.0; | |
5932 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5933 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5934 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5935 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5936 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5937 | return (sumf > 0.0) ? sumi : add(c, v); | |
5938 | } | |
5939 | ||
5940 | } | |
5941 | ||
5942 | namespace test_noexcept | |
5943 | { | |
5944 | ||
5945 | int f() { return 0; } | |
5946 | int g() noexcept { return 0; } | |
5947 | ||
5948 | static_assert(noexcept(f()) == false, ""); | |
5949 | static_assert(noexcept(g()) == true, ""); | |
5950 | ||
5951 | } | |
5952 | ||
5953 | namespace test_constexpr | |
5954 | { | |
5955 | ||
5956 | template < typename CharT > | |
5957 | unsigned long constexpr | |
5958 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5959 | { | |
5960 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5961 | } | |
5962 | ||
5963 | template < typename CharT > | |
5964 | unsigned long constexpr | |
5965 | strlen_c(const CharT *const s) noexcept | |
5966 | { | |
5967 | return strlen_c_r(s, 0UL); | |
5968 | } | |
5969 | ||
5970 | static_assert(strlen_c("") == 0UL, ""); | |
5971 | static_assert(strlen_c("1") == 1UL, ""); | |
5972 | static_assert(strlen_c("example") == 7UL, ""); | |
5973 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5974 | ||
5975 | } | |
5976 | ||
5977 | namespace test_rvalue_references | |
5978 | { | |
5979 | ||
5980 | template < int N > | |
5981 | struct answer | |
5982 | { | |
5983 | static constexpr int value = N; | |
5984 | }; | |
5985 | ||
5986 | answer<1> f(int&) { return answer<1>(); } | |
5987 | answer<2> f(const int&) { return answer<2>(); } | |
5988 | answer<3> f(int&&) { return answer<3>(); } | |
5989 | ||
5990 | void | |
5991 | test() | |
5992 | { | |
5993 | int i = 0; | |
5994 | const int c = 0; | |
5995 | static_assert(decltype(f(i))::value == 1, ""); | |
5996 | static_assert(decltype(f(c))::value == 2, ""); | |
5997 | static_assert(decltype(f(0))::value == 3, ""); | |
5998 | } | |
5999 | ||
6000 | } | |
6001 | ||
6002 | namespace test_uniform_initialization | |
6003 | { | |
6004 | ||
6005 | struct test | |
6006 | { | |
6007 | static const int zero {}; | |
6008 | static const int one {1}; | |
6009 | }; | |
6010 | ||
6011 | static_assert(test::zero == 0, ""); | |
6012 | static_assert(test::one == 1, ""); | |
6013 | ||
6014 | } | |
6015 | ||
6016 | namespace test_lambdas | |
6017 | { | |
6018 | ||
6019 | void | |
6020 | test1() | |
6021 | { | |
6022 | auto lambda1 = [](){}; | |
6023 | auto lambda2 = lambda1; | |
6024 | lambda1(); | |
6025 | lambda2(); | |
6026 | } | |
6027 | ||
6028 | int | |
6029 | test2() | |
6030 | { | |
6031 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6032 | auto b = []() -> int { return '0'; }(); | |
6033 | auto c = [=](){ return a + b; }(); | |
6034 | auto d = [&](){ return c; }(); | |
6035 | auto e = [a, &b](int x) mutable { | |
6036 | const auto identity = [](int y){ return y; }; | |
6037 | for (auto i = 0; i < a; ++i) | |
6038 | a += b--; | |
6039 | return x + identity(a + b); | |
6040 | }(0); | |
6041 | return a + b + c + d + e; | |
6042 | } | |
6043 | ||
6044 | int | |
6045 | test3() | |
6046 | { | |
6047 | const auto nullary = [](){ return 0; }; | |
6048 | const auto unary = [](int x){ return x; }; | |
6049 | using nullary_t = decltype(nullary); | |
6050 | using unary_t = decltype(unary); | |
6051 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6052 | const auto higher2nd = [unary](nullary_t f1){ | |
6053 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6054 | }; | |
6055 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6056 | } | |
6057 | ||
6058 | } | |
6059 | ||
6060 | namespace test_variadic_templates | |
6061 | { | |
6062 | ||
6063 | template <int...> | |
6064 | struct sum; | |
6065 | ||
6066 | template <int N0, int... N1toN> | |
6067 | struct sum<N0, N1toN...> | |
6068 | { | |
6069 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6070 | }; | |
6071 | ||
6072 | template <> | |
6073 | struct sum<> | |
6074 | { | |
6075 | static constexpr auto value = 0; | |
6076 | }; | |
6077 | ||
6078 | static_assert(sum<>::value == 0, ""); | |
6079 | static_assert(sum<1>::value == 1, ""); | |
6080 | static_assert(sum<23>::value == 23, ""); | |
6081 | static_assert(sum<1, 2>::value == 3, ""); | |
6082 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6083 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6084 | ||
6085 | } | |
6086 | ||
6087 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6088 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6089 | // because of this. | |
6090 | namespace test_template_alias_sfinae | |
6091 | { | |
6092 | ||
6093 | struct foo {}; | |
6094 | ||
6095 | template<typename T> | |
6096 | using member = typename T::member_type; | |
6097 | ||
6098 | template<typename T> | |
6099 | void func(...) {} | |
6100 | ||
6101 | template<typename T> | |
6102 | void func(member<T>*) {} | |
6103 | ||
6104 | void test(); | |
6105 | ||
6106 | void test() { func<foo>(0); } | |
6107 | ||
6108 | } | |
6109 | ||
6110 | } // namespace cxx11 | |
6111 | ||
6112 | #endif // __cplusplus >= 201103L | |
6113 | ||
6114 | ||
6115 | ||
6116 | _ACEOF | |
6117 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6118 | eval $cachevar=yes | |
6119 | else | |
6120 | eval $cachevar=no | |
6121 | fi | |
6122 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
41260ac2 | 6123 | CXX="$ac_save_CXX" |
0bcda685 PA |
6124 | fi |
6125 | eval ac_res=\$$cachevar | |
6126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6127 | $as_echo "$ac_res" >&6; } | |
41260ac2 SM |
6128 | if eval test x\$$cachevar = xyes; then |
6129 | CXX_DIALECT="$switch" | |
6130 | ac_success=yes | |
6131 | break | |
6132 | fi | |
6133 | done | |
6134 | if test x$ac_success = xyes; then | |
0bcda685 PA |
6135 | break |
6136 | fi | |
6137 | done | |
6138 | fi | |
6139 | ac_ext=c | |
6140 | ac_cpp='$CPP $CPPFLAGS' | |
6141 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6142 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6143 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6144 | ||
6145 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
6146 | if test x$ac_success = xno; then | |
d0ac1c44 | 6147 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
6148 | fi |
6149 | fi | |
6150 | if test x$ac_success = xno; then | |
6151 | HAVE_CXX11=0 | |
6152 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
6153 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
6154 | else | |
6155 | HAVE_CXX11=1 | |
6156 | ||
6157 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
6158 | ||
6159 | fi | |
6160 | ||
6161 | ||
6162 | ||
6163 | ||
a417dc56 RW |
6164 | # Dependency checking. |
6165 | rm -rf .tst 2>/dev/null | |
6166 | mkdir .tst 2>/dev/null | |
6167 | if test -d .tst; then | |
6168 | am__leading_dot=. | |
6169 | else | |
6170 | am__leading_dot=_ | |
6171 | fi | |
6172 | rmdir .tst 2>/dev/null | |
6173 | ||
6174 | DEPDIR="${am__leading_dot}deps" | |
6175 | ||
81ecdfbb | 6176 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
6177 | |
6178 | ||
6179 | depcc="$CC" am_compiler_list= | |
6180 | ||
6181 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
6182 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
6183 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 6184 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
81ecdfbb | 6185 | $as_echo_n "(cached) " >&6 |
a417dc56 RW |
6186 | else |
6187 | if test -f "$am_depcomp"; then | |
6188 | # We make a subdir and do the tests there. Otherwise we can end up | |
6189 | # making bogus files that we don't know about and never remove. For | |
6190 | # instance it was reported that on HP-UX the gcc test will end up | |
6191 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6192 | # in D'. | |
6193 | mkdir conftest.dir | |
6194 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6195 | # using a relative directory. | |
6196 | cp "$am_depcomp" conftest.dir | |
6197 | cd conftest.dir | |
6198 | # We will build objects and dependencies in a subdirectory because | |
6199 | # it helps to detect inapplicable dependency modes. For instance | |
6200 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6201 | # side effect of compilation, but ICC will put the dependencies in | |
6202 | # the current directory while Tru64 will put them in the object | |
6203 | # directory. | |
6204 | mkdir sub | |
6205 | ||
6206 | am_cv_CC_dependencies_compiler_type=none | |
6207 | if test "$am_compiler_list" = ""; then | |
6208 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6209 | fi | |
6210 | for depmode in $am_compiler_list; do | |
6211 | if test $depmode = none; then break; fi | |
6212 | ||
81ecdfbb | 6213 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
6214 | # Setup a source with many dependencies, because some compilers |
6215 | # like to wrap large dependency lists on column 80 (with \), and | |
6216 | # we should not choose a depcomp mode which is confused by this. | |
6217 | # | |
6218 | # We need to recreate these files for each test, as the compiler may | |
6219 | # overwrite some of them when testing with obscure command lines. | |
6220 | # This happens at least with the AIX C compiler. | |
6221 | : > sub/conftest.c | |
6222 | for i in 1 2 3 4 5 6; do | |
6223 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6224 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6225 | # Solaris 8's {/usr,}/bin/sh. | |
6226 | touch sub/conftst$i.h | |
6227 | done | |
6228 | echo "include sub/conftest.Po" > confmf | |
6229 | ||
6230 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6231 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6232 | # handle `-M -o', and we need to detect this. | |
6233 | depcmd="depmode=$depmode \ | |
6234 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6235 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6236 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6237 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6238 | if env $depcmd > conftest.err 2>&1 && | |
6239 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6240 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6241 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6242 | # icc doesn't choke on unknown options, it will just issue warnings | |
6243 | # or remarks (even with -Werror). So we grep stderr for any message | |
6244 | # that says an option was ignored or not supported. | |
6245 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6246 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6247 | # The diagnosis changed in icc 8.0: | |
6248 | # icc: Command line remark: option '-MP' not supported | |
6249 | if (grep 'ignoring option' conftest.err || | |
6250 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6251 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6252 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6253 | break |
6254 | fi | |
6255 | fi | |
81ecdfbb | 6256 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6257 | sed -e 's/^/| /' < conftest.err >&5 |
6258 | done | |
6259 | ||
6260 | cd .. | |
6261 | rm -rf conftest.dir | |
6262 | else | |
6263 | am_cv_CC_dependencies_compiler_type=none | |
6264 | fi | |
6265 | ||
6266 | fi | |
81ecdfbb RW |
6267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6268 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6269 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
d0ac1c44 | 6270 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6271 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6272 | ||
6273 | fi | |
6274 | ||
6275 | ||
c971b7fa PA |
6276 | |
6277 | CONFIG_OBS= | |
6278 | CONFIG_DEPS= | |
6279 | CONFIG_SRCS= | |
6280 | ENABLE_CFLAGS= | |
6281 | ||
6282 | CONFIG_ALL= | |
6283 | CONFIG_CLEAN= | |
6284 | CONFIG_INSTALL= | |
6285 | CONFIG_UNINSTALL= | |
6286 | ||
6287 | # If we haven't got the data from the intl directory, | |
6288 | # assume NLS is disabled. | |
6289 | USE_NLS=no | |
6290 | LIBINTL= | |
6291 | LIBINTL_DEP= | |
6292 | INCINTL= | |
6293 | XGETTEXT= | |
6294 | GMSGFMT= | |
6295 | POSUB= | |
783e057b DJ |
6296 | |
6297 | if test -f ../intl/config.intl; then | |
6298 | . ../intl/config.intl | |
6299 | fi | |
81ecdfbb RW |
6300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6301 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6302 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6304 | $as_echo "no" >&6; } | |
783e057b | 6305 | else |
81ecdfbb RW |
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6307 | $as_echo "yes" >&6; } | |
783e057b | 6308 | |
81ecdfbb | 6309 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6310 | |
6311 | ||
81ecdfbb RW |
6312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6313 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6314 | # Look for .po and .gmo files in the source directory. |
6315 | CATALOGS= | |
6316 | XLINGUAS= | |
6317 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6318 | # If there aren't any .gmo files the shell will give us the | |
6319 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6320 | # weeded out. | |
6321 | case "$cat" in *\**) | |
6322 | continue;; | |
6323 | esac | |
6324 | # The quadruple backslash is collapsed to a double backslash | |
6325 | # by the backticks, then collapsed again by the double quotes, | |
6326 | # leaving us with one backslash in the sed expression (right | |
6327 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6328 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6329 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6330 | # The user is allowed to set LINGUAS to a list of languages to | |
6331 | # install catalogs for. If it's empty that means "all of them." | |
6332 | if test "x$LINGUAS" = x; then | |
6333 | CATALOGS="$CATALOGS $cat" | |
6334 | XLINGUAS="$XLINGUAS $lang" | |
6335 | else | |
6336 | case "$LINGUAS" in *$lang*) | |
6337 | CATALOGS="$CATALOGS $cat" | |
6338 | XLINGUAS="$XLINGUAS $lang" | |
6339 | ;; | |
6340 | esac | |
e28b3332 DJ |
6341 | fi |
6342 | done | |
c971b7fa PA |
6343 | LINGUAS="$XLINGUAS" |
6344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6345 | $as_echo "$LINGUAS" >&6; } | |
6346 | ||
6347 | ||
6348 | DATADIRNAME=share | |
6349 | ||
6350 | INSTOBJEXT=.mo | |
6351 | ||
6352 | GENCAT=gencat | |
6353 | ||
6354 | CATOBJEXT=.gmo | |
e28b3332 | 6355 | |
e28b3332 DJ |
6356 | fi |
6357 | ||
c971b7fa PA |
6358 | localedir='${datadir}/locale' |
6359 | ||
6360 | ||
6361 | if test x"$USE_NLS" = xyes; then | |
6362 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6363 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6364 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6365 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6366 | fi |
e28b3332 | 6367 | |
c971b7fa PA |
6368 | PACKAGE=gdb |
6369 | ||
6370 | cat >>confdefs.h <<_ACEOF | |
6371 | #define PACKAGE "$PACKAGE" | |
6372 | _ACEOF | |
6373 | ||
6374 | ||
6375 | ||
6376 | # We never need to detect it in this sub-configure. | |
6377 | # But preserve it for config.status --recheck. | |
6378 | ||
6379 | ||
6380 | ||
6381 | MAKEINFO_EXTRA_FLAGS="" | |
6382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6383 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
d0ac1c44 | 6384 | if ${gdb_cv_have_makeinfo_click+:} false; then : |
c971b7fa PA |
6385 | $as_echo_n "(cached) " >&6 |
6386 | else | |
6387 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6388 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6389 | gdb_cv_have_makeinfo_click=yes | |
6390 | else | |
6391 | gdb_cv_have_makeinfo_click=no | |
6392 | fi | |
6393 | fi | |
6394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6395 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6396 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6397 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6398 | fi | |
e28b3332 DJ |
6399 | |
6400 | ||
bec39cab AC |
6401 | |
6402 | ||
81ecdfbb RW |
6403 | # Check whether --with-separate-debug-dir was given. |
6404 | if test "${with_separate_debug_dir+set}" = set; then : | |
6405 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6406 | DEBUGDIR=$withval |
6407 | else | |
6408 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6409 | fi |
6410 | ||
20e95c23 | 6411 | |
783e057b DJ |
6412 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6413 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6414 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6415 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6416 | |
783e057b DJ |
6417 | cat >>confdefs.h <<_ACEOF |
6418 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6419 | _ACEOF |
20e95c23 | 6420 | |
20e95c23 | 6421 | |
20e95c23 | 6422 | |
0c4a4063 | 6423 | |
b14b1491 TT |
6424 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6425 | if test "x$prefix" = xNONE; then | |
6426 | test_prefix=/usr/local | |
6427 | else | |
6428 | test_prefix=$prefix | |
6429 | fi | |
783e057b | 6430 | else |
b14b1491 | 6431 | test_prefix=$exec_prefix |
783e057b | 6432 | fi |
b14b1491 TT |
6433 | value=0 |
6434 | case ${ac_define_dir} in | |
6435 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6436 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6437 | value=1 | |
6438 | ;; | |
6439 | esac | |
6440 | ||
6441 | cat >>confdefs.h <<_ACEOF | |
6442 | #define DEBUGDIR_RELOCATABLE $value | |
6443 | _ACEOF | |
6444 | ||
6445 | ||
6446 | ||
0c4a4063 | 6447 | |
f83d8a90 DE |
6448 | # We can't pass paths as command line arguments. |
6449 | # Mingw32 tries to be clever and will convert the paths for us. | |
6450 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6451 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6452 | # This breaks GDB's relocatable path conversions since paths passed in | |
6453 | # config.h would not get so translated, the path prefixes no longer match. | |
6454 | ||
6455 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6456 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6457 | ac_define_dir=`eval echo $bindir` | |
6458 | ac_define_dir=`eval echo $ac_define_dir` | |
6459 | ||
6460 | cat >>confdefs.h <<_ACEOF | |
6461 | #define BINDIR "$ac_define_dir" | |
6462 | _ACEOF | |
6463 | ||
6464 | ||
6465 | ||
b14b1491 TT |
6466 | # GDB's datadir relocation |
6467 | ||
6468 | ||
6469 | ||
81ecdfbb RW |
6470 | # Check whether --with-gdb-datadir was given. |
6471 | if test "${with_gdb_datadir+set}" = set; then : | |
6472 | withval=$with_gdb_datadir; | |
b14b1491 | 6473 | GDB_DATADIR=$withval |
20e95c23 | 6474 | else |
b14b1491 | 6475 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6476 | fi |
6477 | ||
20e95c23 | 6478 | |
b14b1491 TT |
6479 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6480 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6481 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6482 | ac_define_dir=`eval echo $ac_define_dir` | |
6483 | ||
6484 | cat >>confdefs.h <<_ACEOF | |
6485 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6486 | _ACEOF |
6487 | ||
b14b1491 TT |
6488 | |
6489 | ||
0c4a4063 | 6490 | |
b14b1491 TT |
6491 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6492 | if test "x$prefix" = xNONE; then | |
6493 | test_prefix=/usr/local | |
6494 | else | |
6495 | test_prefix=$prefix | |
6496 | fi | |
6497 | else | |
6498 | test_prefix=$exec_prefix | |
6499 | fi | |
6500 | value=0 | |
6501 | case ${ac_define_dir} in | |
6502 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6503 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6504 | value=1 | |
6505 | ;; | |
6506 | esac | |
6507 | ||
6508 | cat >>confdefs.h <<_ACEOF | |
6509 | #define GDB_DATADIR_RELOCATABLE $value | |
6510 | _ACEOF | |
6511 | ||
6512 | ||
783e057b | 6513 | |
20e95c23 | 6514 | |
0c4a4063 | 6515 | |
81ecdfbb RW |
6516 | # Check whether --with-relocated-sources was given. |
6517 | if test "${with_relocated_sources+set}" = set; then : | |
6518 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6519 | |
6520 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6521 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6522 | ac_define_dir=`eval echo $reloc_srcdir` | |
6523 | ac_define_dir=`eval echo $ac_define_dir` | |
6524 | ||
6525 | cat >>confdefs.h <<_ACEOF | |
6526 | #define RELOC_SRCDIR "$ac_define_dir" | |
6527 | _ACEOF | |
6528 | ||
6529 | ||
6530 | ||
81ecdfbb RW |
6531 | fi |
6532 | ||
29b0e8a2 | 6533 | |
7349ff92 JK |
6534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6535 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6536 | ||
6537 | # Check whether --with-auto-load-dir was given. | |
6538 | if test "${with_auto_load_dir+set}" = set; then : | |
6539 | withval=$with_auto_load_dir; | |
6540 | else | |
1564a261 | 6541 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6542 | fi |
6543 | ||
2861ee4f | 6544 | escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6545 | |
6546 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6547 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6548 | ac_define_dir=`eval echo $escape_dir` | |
6549 | ac_define_dir=`eval echo $ac_define_dir` | |
6550 | ||
6551 | cat >>confdefs.h <<_ACEOF | |
6552 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6553 | _ACEOF | |
6554 | ||
6555 | ||
6556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6557 | $as_echo "$with_auto_load_dir" >&6; } | |
6558 | ||
bccbefd2 JK |
6559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6560 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6561 | ||
6562 | # Check whether --with-auto-load-safe-path was given. | |
6563 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6564 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6565 | with_auto_load_safe_path="/" |
6566 | fi | |
bccbefd2 | 6567 | else |
7349ff92 | 6568 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6569 | fi |
6570 | ||
2861ee4f | 6571 | escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6572 | |
6573 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6574 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6575 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6576 | ac_define_dir=`eval echo $ac_define_dir` |
6577 | ||
6578 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6579 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6580 | _ACEOF |
6581 | ||
6582 | ||
6583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6584 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6585 | ||
29b0e8a2 | 6586 | |
20e95c23 | 6587 | |
5ae98d25 | 6588 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
6589 | |
6590 | ||
783e057b | 6591 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6592 | # Check whether --enable-targets was given. |
6593 | if test "${enable_targets+set}" = set; then : | |
6594 | enableval=$enable_targets; case "${enableval}" in | |
d0ac1c44 | 6595 | yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 |
783e057b DJ |
6596 | ;; |
6597 | no) enable_targets= ;; | |
6598 | *) enable_targets=$enableval ;; | |
6599 | esac | |
81ecdfbb RW |
6600 | fi |
6601 | ||
20e95c23 | 6602 | |
783e057b | 6603 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6604 | # Check whether --enable-64-bit-bfd was given. |
6605 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6606 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6607 | yes) want64=true ;; |
6608 | no) want64=false ;; | |
d0ac1c44 | 6609 | *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6610 | esac |
6611 | else | |
6612 | want64=false | |
81ecdfbb RW |
6613 | fi |
6614 | ||
783e057b DJ |
6615 | # Provide defaults for some variables set by the per-host and per-target |
6616 | # configuration. | |
6617 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6618 | |
783e057b DJ |
6619 | if test "${target}" = "${host}"; then |
6620 | gdb_native=yes | |
6621 | else | |
6622 | gdb_native=no | |
6623 | fi | |
20e95c23 | 6624 | |
783e057b | 6625 | . $srcdir/configure.host |
20e95c23 | 6626 | |
783e057b | 6627 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6628 | |
783e057b DJ |
6629 | TARGET_OBS= |
6630 | all_targets= | |
b292c783 | 6631 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6632 | |
783e057b | 6633 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6634 | do |
783e057b DJ |
6635 | if test "$targ_alias" = "all"; then |
6636 | all_targets=true | |
6637 | else | |
6638 | # Canonicalize the secondary target names. | |
6639 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6640 | if test -n "$result"; then | |
6641 | targ=$result | |
6642 | else | |
6643 | targ=$targ_alias | |
6644 | fi | |
20e95c23 | 6645 | |
783e057b | 6646 | . ${srcdir}/configure.tgt |
20e95c23 | 6647 | |
bf307134 | 6648 | if test -z "${gdb_target_obs}"; then : |
d0ac1c44 | 6649 | as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 |
bf307134 JB |
6650 | fi |
6651 | ||
783e057b DJ |
6652 | # Target-specific object files |
6653 | for i in ${gdb_target_obs}; do | |
6654 | case " $TARGET_OBS " in | |
6655 | *" ${i} "*) ;; | |
6656 | *) | |
6657 | TARGET_OBS="$TARGET_OBS ${i}" | |
6658 | ;; | |
6659 | esac | |
6660 | done | |
20e95c23 | 6661 | |
783e057b DJ |
6662 | # Check whether this target needs 64-bit CORE_ADDR |
6663 | if test x${want64} = xfalse; then | |
6664 | . ${srcdir}/../bfd/config.bfd | |
6665 | fi | |
b292c783 JK |
6666 | |
6667 | # Check whether this target is native and supports gcore. | |
6668 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6669 | && $gdb_have_gcore; then | |
6670 | HAVE_NATIVE_GCORE_TARGET=1 | |
6671 | fi | |
783e057b | 6672 | fi |
20e95c23 DJ |
6673 | done |
6674 | ||
783e057b DJ |
6675 | if test x${all_targets} = xtrue; then |
6676 | ||
6677 | # We want all 64-bit targets if we either: | |
6678 | # - run on a 64-bit host or | |
6679 | # - already require 64-bit support for some other target or | |
6680 | # - the --enable-64-bit-bfd option was supplied | |
6681 | # Otherwise we only support all 32-bit targets. | |
6682 | # | |
6683 | # NOTE: This test must be in sync with the corresponding | |
6684 | # tests in BFD! | |
20e95c23 | 6685 | |
783e057b | 6686 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6687 | # The cast to long int works around a bug in the HP C Compiler |
6688 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6689 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6690 | # This bug is HP SR number 8606223364. | |
6691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6692 | $as_echo_n "checking size of long... " >&6; } | |
d0ac1c44 | 6693 | if ${ac_cv_sizeof_long+:} false; then : |
81ecdfbb | 6694 | $as_echo_n "(cached) " >&6 |
c0993dbe | 6695 | else |
81ecdfbb | 6696 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6697 | |
81ecdfbb RW |
6698 | else |
6699 | if test "$ac_cv_type_long" = yes; then | |
6700 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6701 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
6702 | as_fn_error 77 "cannot compute sizeof (long) |
6703 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
6704 | else |
6705 | ac_cv_sizeof_long=0 | |
6706 | fi | |
c0993dbe | 6707 | fi |
81ecdfbb | 6708 | |
c0993dbe | 6709 | fi |
81ecdfbb RW |
6710 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6711 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6712 | |
c0993dbe | 6713 | |
c0993dbe | 6714 | |
c0993dbe UW |
6715 | cat >>confdefs.h <<_ACEOF |
6716 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6717 | _ACEOF | |
6718 | ||
6719 | ||
6720 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6721 | want64=true | |
6722 | fi | |
6723 | fi | |
6724 | if test x${want64} = xtrue; then | |
6725 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6726 | else | |
6727 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6728 | fi | |
6729 | fi | |
6730 | ||
6731 | ||
6732 | ||
b292c783 | 6733 | |
c0993dbe UW |
6734 | # For other settings, only the main target counts. |
6735 | gdb_sim= | |
6736 | gdb_osabi= | |
c0993dbe UW |
6737 | targ=$target; . ${srcdir}/configure.tgt |
6738 | ||
6739 | # Fetch the default architecture and default target vector from BFD. | |
6740 | targ=$target; . $srcdir/../bfd/config.bfd | |
6741 | ||
6742 | # We only want the first architecture, so strip off the others if | |
6743 | # there is more than one. | |
6744 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6745 | ||
6746 | if test "x$targ_archs" != x; then | |
6747 | ||
6748 | cat >>confdefs.h <<_ACEOF | |
6749 | #define DEFAULT_BFD_ARCH $targ_archs | |
6750 | _ACEOF | |
6751 | ||
6752 | fi | |
6753 | if test "x$targ_defvec" != x; then | |
6754 | ||
6755 | cat >>confdefs.h <<_ACEOF | |
6756 | #define DEFAULT_BFD_VEC $targ_defvec | |
6757 | _ACEOF | |
6758 | ||
6759 | fi | |
6760 | ||
c0993dbe | 6761 | # Enable MI. |
81ecdfbb RW |
6762 | # Check whether --enable-gdbmi was given. |
6763 | if test "${enable_gdbmi+set}" = set; then : | |
6764 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6765 | yes | no) |
6766 | ;; | |
6767 | *) | |
d0ac1c44 | 6768 | as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6769 | esac |
6770 | else | |
6771 | enable_gdbmi=yes | |
81ecdfbb RW |
6772 | fi |
6773 | ||
c0993dbe | 6774 | if test x"$enable_gdbmi" = xyes; then |
0ad6b8ee | 6775 | if test -d "$srcdir/mi"; then |
c0993dbe UW |
6776 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" |
6777 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6778 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6779 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6780 | fi | |
6781 | fi | |
6782 | ||
6783 | # Enable TUI. | |
81ecdfbb RW |
6784 | # Check whether --enable-tui was given. |
6785 | if test "${enable_tui+set}" = set; then : | |
6786 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6787 | yes | no | auto) |
c0993dbe UW |
6788 | ;; |
6789 | *) | |
d0ac1c44 | 6790 | as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6791 | esac |
6792 | else | |
3ca64bd3 | 6793 | enable_tui=auto |
81ecdfbb RW |
6794 | fi |
6795 | ||
c0993dbe UW |
6796 | |
6797 | # Enable gdbtk. | |
81ecdfbb RW |
6798 | # Check whether --enable-gdbtk was given. |
6799 | if test "${enable_gdbtk+set}" = set; then : | |
6800 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6801 | yes | no) |
6802 | ;; | |
6803 | *) | |
d0ac1c44 | 6804 | as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6805 | esac |
6806 | else | |
0ad6b8ee | 6807 | if test -d "$srcdir/gdbtk"; then |
c0993dbe UW |
6808 | enable_gdbtk=yes |
6809 | else | |
6810 | enable_gdbtk=no | |
6811 | fi | |
81ecdfbb RW |
6812 | fi |
6813 | ||
c0993dbe UW |
6814 | # We unconditionally disable gdbtk tests on selected platforms. |
6815 | case $host_os in | |
6816 | go32* | windows*) | |
81ecdfbb RW |
6817 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6818 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6819 | enable_gdbtk=no ;; |
6820 | esac | |
6821 | ||
05e7c244 | 6822 | # Libunwind support for ia64. |
bec39cab | 6823 | |
05e7c244 JK |
6824 | |
6825 | # Check whether --with-libunwind-ia64 was given. | |
6826 | if test "${with_libunwind_ia64+set}" = set; then : | |
6827 | withval=$with_libunwind_ia64; | |
bec39cab | 6828 | else |
05e7c244 JK |
6829 | with_libunwind_ia64=auto |
6830 | fi | |
bec39cab | 6831 | |
05e7c244 JK |
6832 | |
6833 | # Backward compatibility option. | |
6834 | if test "${with_libunwind+set}" = set; then | |
6835 | if test x"$with_libunwind_ia64" != xauto; then | |
d0ac1c44 | 6836 | as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 |
05e7c244 JK |
6837 | fi |
6838 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
6839 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
6840 | with_libunwind_ia64="$with_libunwind" | |
6841 | fi | |
6842 | ||
6843 | case "$with_libunwind_ia64" in | |
6844 | yes | no) | |
6845 | ;; | |
6846 | auto) | |
6847 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 6848 | do : |
b54a8fd7 | 6849 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 6850 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 6851 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6852 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6853 | _ACEOF |
6854 | ||
6855 | fi | |
6856 | ||
6857 | done | |
6858 | ||
05e7c244 JK |
6859 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
6860 | ;; | |
6861 | *) | |
d0ac1c44 | 6862 | as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 |
05e7c244 JK |
6863 | ;; |
6864 | esac | |
bec39cab | 6865 | |
05e7c244 | 6866 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 6867 | for ac_header in libunwind-ia64.h |
81ecdfbb | 6868 | do : |
b54a8fd7 | 6869 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 6870 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 6871 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 6872 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
6873 | _ACEOF |
6874 | ||
6875 | fi | |
6876 | ||
6877 | done | |
6878 | ||
05e7c244 | 6879 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
d0ac1c44 | 6880 | as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 |
05e7c244 JK |
6881 | fi |
6882 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
6883 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
6884 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
6885 | fi |
6886 | ||
cb01cfba JB |
6887 | opt_curses=no |
6888 | ||
81ecdfbb RW |
6889 | # Check whether --with-curses was given. |
6890 | if test "${with_curses+set}" = set; then : | |
6891 | withval=$with_curses; opt_curses=$withval | |
6892 | fi | |
6893 | ||
cb01cfba | 6894 | |
76a39ba7 | 6895 | prefer_curses=no |
cb01cfba | 6896 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 6897 | prefer_curses=yes |
cb01cfba JB |
6898 | fi |
6899 | ||
a9322a30 | 6900 | # Profiling support. |
81ecdfbb RW |
6901 | # Check whether --enable-profiling was given. |
6902 | if test "${enable_profiling+set}" = set; then : | |
6903 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
6904 | yes | no) |
6905 | ;; | |
6906 | *) | |
d0ac1c44 | 6907 | as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
6908 | esac |
6909 | else | |
6910 | enable_profiling=no | |
81ecdfbb | 6911 | fi |
bec39cab | 6912 | |
a9322a30 TT |
6913 | |
6914 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
6915 | do : |
6916 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6917 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 6918 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
6919 | cat >>confdefs.h <<_ACEOF |
6920 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 6921 | _ACEOF |
a9322a30 | 6922 | |
81ecdfbb RW |
6923 | fi |
6924 | done | |
a9322a30 | 6925 | |
81ecdfbb RW |
6926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
6927 | $as_echo_n "checking for _etext... " >&6; } | |
d0ac1c44 | 6928 | if ${ac_cv_var__etext+:} false; then : |
81ecdfbb RW |
6929 | $as_echo_n "(cached) " >&6 |
6930 | else | |
6931 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6932 | /* end confdefs.h. */ | |
6933 | #include <stdlib.h> | |
6934 | extern char _etext; | |
a9322a30 TT |
6935 | |
6936 | int | |
6937 | main () | |
6938 | { | |
6939 | free (&_etext); | |
6940 | ; | |
6941 | return 0; | |
6942 | } | |
bec39cab | 6943 | _ACEOF |
81ecdfbb | 6944 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6945 | ac_cv_var__etext=yes |
bec39cab | 6946 | else |
81ecdfbb | 6947 | ac_cv_var__etext=no |
bec39cab | 6948 | fi |
81ecdfbb RW |
6949 | rm -f core conftest.err conftest.$ac_objext \ |
6950 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6951 | fi |
81ecdfbb RW |
6952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
6953 | $as_echo "$ac_cv_var__etext" >&6; } | |
0ad6b8ee | 6954 | if test "$ac_cv_var__etext" = yes; then |
60ca704f | 6955 | |
81ecdfbb | 6956 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 6957 | |
bec39cab | 6958 | fi |
81ecdfbb RW |
6959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
6960 | $as_echo_n "checking for etext... " >&6; } | |
d0ac1c44 | 6961 | if ${ac_cv_var_etext+:} false; then : |
81ecdfbb | 6962 | $as_echo_n "(cached) " >&6 |
bec39cab | 6963 | else |
81ecdfbb | 6964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6965 | /* end confdefs.h. */ |
a9322a30 TT |
6966 | #include <stdlib.h> |
6967 | extern char etext; | |
bec39cab AC |
6968 | |
6969 | int | |
6970 | main () | |
6971 | { | |
a9322a30 | 6972 | free (&etext); |
bec39cab AC |
6973 | ; |
6974 | return 0; | |
6975 | } | |
6976 | _ACEOF | |
81ecdfbb | 6977 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 6978 | ac_cv_var_etext=yes |
bec39cab | 6979 | else |
81ecdfbb | 6980 | ac_cv_var_etext=no |
bec39cab | 6981 | fi |
81ecdfbb RW |
6982 | rm -f core conftest.err conftest.$ac_objext \ |
6983 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 6984 | fi |
81ecdfbb RW |
6985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
6986 | $as_echo "$ac_cv_var_etext" >&6; } | |
0ad6b8ee | 6987 | if test "$ac_cv_var_etext" = yes; then |
a9322a30 | 6988 | |
81ecdfbb | 6989 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
6990 | |
6991 | fi | |
a9322a30 | 6992 | if test "$enable_profiling" = yes ; then |
0ad6b8ee | 6993 | if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then |
d0ac1c44 | 6994 | as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
6995 | fi |
6996 | PROFILE_CFLAGS=-pg | |
6997 | OLD_CFLAGS="$CFLAGS" | |
6998 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 6999 | |
81ecdfbb RW |
7000 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
7001 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
d0ac1c44 | 7002 | if ${ac_cv_cc_supports_pg+:} false; then : |
81ecdfbb | 7003 | $as_echo_n "(cached) " >&6 |
bec39cab | 7004 | else |
81ecdfbb | 7005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7006 | /* end confdefs.h. */ |
bec39cab AC |
7007 | |
7008 | int | |
7009 | main () | |
7010 | { | |
a9322a30 | 7011 | int x; |
bec39cab AC |
7012 | ; |
7013 | return 0; | |
7014 | } | |
7015 | _ACEOF | |
81ecdfbb | 7016 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7017 | ac_cv_cc_supports_pg=yes |
bec39cab | 7018 | else |
81ecdfbb | 7019 | ac_cv_cc_supports_pg=no |
bec39cab | 7020 | fi |
81ecdfbb | 7021 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 7022 | fi |
81ecdfbb RW |
7023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7024 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7025 | |
0ad6b8ee | 7026 | if test "$ac_cv_cc_supports_pg" = no; then |
d0ac1c44 | 7027 | as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7028 | fi |
bec39cab | 7029 | |
a9322a30 | 7030 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7031 | fi |
7032 | ||
44cee4fd TT |
7033 | CODESIGN_CERT= |
7034 | # Check whether --enable-codesign was given. | |
7035 | if test "${enable_codesign+set}" = set; then : | |
7036 | enableval=$enable_codesign; CODESIGN_CERT=$enableval | |
7037 | fi | |
7038 | ||
7039 | ||
7040 | ||
c16158bc JM |
7041 | |
7042 | ||
81ecdfbb RW |
7043 | # Check whether --with-pkgversion was given. |
7044 | if test "${with_pkgversion+set}" = set; then : | |
7045 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 7046 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
7047 | no) PKGVERSION= ;; |
7048 | *) PKGVERSION="($withval) " ;; | |
7049 | esac | |
7050 | else | |
7051 | PKGVERSION="(GDB) " | |
7052 | ||
81ecdfbb | 7053 | fi |
c16158bc JM |
7054 | |
7055 | ||
7056 | ||
7057 | ||
81ecdfbb RW |
7058 | |
7059 | # Check whether --with-bugurl was given. | |
7060 | if test "${with_bugurl+set}" = set; then : | |
7061 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 7062 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
7063 | no) BUGURL= |
7064 | ;; | |
7065 | *) BUGURL="$withval" | |
7066 | ;; | |
7067 | esac | |
7068 | else | |
7069 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
7070 | ||
81ecdfbb RW |
7071 | fi |
7072 | ||
c16158bc JM |
7073 | case ${BUGURL} in |
7074 | "") | |
7075 | REPORT_BUGS_TO= | |
7076 | REPORT_BUGS_TEXI= | |
7077 | ;; | |
7078 | *) | |
7079 | REPORT_BUGS_TO="<$BUGURL>" | |
7080 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7081 | ;; | |
7082 | esac; | |
7083 | ||
7084 | ||
7085 | ||
7086 | ||
7087 | cat >>confdefs.h <<_ACEOF | |
7088 | #define PKGVERSION "$PKGVERSION" | |
7089 | _ACEOF | |
7090 | ||
7091 | ||
7092 | cat >>confdefs.h <<_ACEOF | |
7093 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7094 | _ACEOF | |
7095 | ||
7096 | ||
bec39cab AC |
7097 | # --------------------- # |
7098 | # Checks for programs. # | |
7099 | # --------------------- # | |
7100 | ||
7101 | for ac_prog in gawk mawk nawk awk | |
7102 | do | |
7103 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7104 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7105 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7106 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7107 | if ${ac_cv_prog_AWK+:} false; then : |
81ecdfbb | 7108 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7109 | else |
7110 | if test -n "$AWK"; then | |
7111 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7112 | else | |
7113 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7114 | for as_dir in $PATH | |
7115 | do | |
7116 | IFS=$as_save_IFS | |
7117 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7118 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7119 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7120 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7121 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7122 | break 2 |
7123 | fi | |
7124 | done | |
81ecdfbb RW |
7125 | done |
7126 | IFS=$as_save_IFS | |
bec39cab AC |
7127 | |
7128 | fi | |
7129 | fi | |
7130 | AWK=$ac_cv_prog_AWK | |
7131 | if test -n "$AWK"; then | |
81ecdfbb RW |
7132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7133 | $as_echo "$AWK" >&6; } | |
bec39cab | 7134 | else |
81ecdfbb RW |
7135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7136 | $as_echo "no" >&6; } | |
bec39cab AC |
7137 | fi |
7138 | ||
bec39cab | 7139 | |
81ecdfbb | 7140 | test -n "$AWK" && break |
bec39cab AC |
7141 | done |
7142 | ||
c971b7fa PA |
7143 | # Find a good install program. We prefer a C program (faster), |
7144 | # so one script is as good as another. But avoid the broken or | |
7145 | # incompatible versions: | |
7146 | # SysV /etc/install, /usr/sbin/install | |
7147 | # SunOS /usr/etc/install | |
7148 | # IRIX /sbin/install | |
7149 | # AIX /bin/install | |
7150 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7151 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7152 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7153 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7154 | # OS/2's system install, which has a completely different semantic | |
7155 | # ./install, which can be erroneously created by make from ./install.sh. | |
7156 | # Reject install programs that cannot install multiple files. | |
7157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7158 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7159 | if test -z "$INSTALL"; then | |
d0ac1c44 | 7160 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
7161 | $as_echo_n "(cached) " >&6 |
7162 | else | |
7163 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7164 | for as_dir in $PATH | |
7165 | do | |
7166 | IFS=$as_save_IFS | |
7167 | test -z "$as_dir" && as_dir=. | |
7168 | # Account for people who put trailing slashes in PATH elements. | |
7169 | case $as_dir/ in #(( | |
7170 | ./ | .// | /[cC]/* | \ | |
7171 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7172 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7173 | /usr/ucb/* ) ;; | |
7174 | *) | |
7175 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7176 | # Don't use installbsd from OSF since it installs stuff as root | |
7177 | # by default. | |
7178 | for ac_prog in ginstall scoinst install; do | |
7179 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 7180 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
7181 | if test $ac_prog = install && |
7182 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7183 | # AIX install. It has an incompatible calling convention. | |
7184 | : | |
7185 | elif test $ac_prog = install && | |
7186 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7187 | # program-specific install script used by HP pwplus--don't use. | |
7188 | : | |
7189 | else | |
7190 | rm -rf conftest.one conftest.two conftest.dir | |
7191 | echo one > conftest.one | |
7192 | echo two > conftest.two | |
7193 | mkdir conftest.dir | |
7194 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7195 | test -s conftest.one && test -s conftest.two && | |
7196 | test -s conftest.dir/conftest.one && | |
7197 | test -s conftest.dir/conftest.two | |
7198 | then | |
7199 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7200 | break 3 | |
7201 | fi | |
7202 | fi | |
7203 | fi | |
7204 | done | |
7205 | done | |
7206 | ;; | |
7207 | esac | |
7208 | ||
7209 | done | |
7210 | IFS=$as_save_IFS | |
7211 | ||
7212 | rm -rf conftest.one conftest.two conftest.dir | |
7213 | ||
7214 | fi | |
7215 | if test "${ac_cv_path_install+set}" = set; then | |
7216 | INSTALL=$ac_cv_path_install | |
7217 | else | |
7218 | # As a last resort, use the slow shell script. Don't cache a | |
7219 | # value for INSTALL within a source directory, because that will | |
7220 | # break other packages using the cache if that directory is | |
7221 | # removed, or if the value is a relative name. | |
7222 | INSTALL=$ac_install_sh | |
7223 | fi | |
7224 | fi | |
7225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7226 | $as_echo "$INSTALL" >&6; } | |
7227 | ||
7228 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7229 | # It thinks the first close brace ends the variable substitution. | |
7230 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7231 | ||
7232 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7233 | ||
7234 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7235 | |
81ecdfbb RW |
7236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7237 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7238 | LN_S=$as_ln_s |
7239 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7241 | $as_echo "yes" >&6; } | |
bec39cab | 7242 | else |
81ecdfbb RW |
7243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7244 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7245 | fi |
7246 | ||
7247 | if test -n "$ac_tool_prefix"; then | |
7248 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7249 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7251 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7252 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb | 7253 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7254 | else |
7255 | if test -n "$RANLIB"; then | |
7256 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7257 | else | |
7258 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7259 | for as_dir in $PATH | |
7260 | do | |
7261 | IFS=$as_save_IFS | |
7262 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7263 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7264 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7265 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7266 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7267 | break 2 |
7268 | fi | |
7269 | done | |
81ecdfbb RW |
7270 | done |
7271 | IFS=$as_save_IFS | |
bec39cab AC |
7272 | |
7273 | fi | |
7274 | fi | |
7275 | RANLIB=$ac_cv_prog_RANLIB | |
7276 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7278 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7279 | else |
81ecdfbb RW |
7280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7281 | $as_echo "no" >&6; } | |
bec39cab AC |
7282 | fi |
7283 | ||
81ecdfbb | 7284 | |
bec39cab AC |
7285 | fi |
7286 | if test -z "$ac_cv_prog_RANLIB"; then | |
7287 | ac_ct_RANLIB=$RANLIB | |
7288 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7289 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7290 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7291 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7292 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
81ecdfbb | 7293 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7294 | else |
7295 | if test -n "$ac_ct_RANLIB"; then | |
7296 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7297 | else | |
7298 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7299 | for as_dir in $PATH | |
7300 | do | |
7301 | IFS=$as_save_IFS | |
7302 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7303 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7304 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7305 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7306 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7307 | break 2 |
7308 | fi | |
7309 | done | |
81ecdfbb RW |
7310 | done |
7311 | IFS=$as_save_IFS | |
bec39cab | 7312 | |
bec39cab AC |
7313 | fi |
7314 | fi | |
7315 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7316 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7318 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7319 | else |
81ecdfbb RW |
7320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7321 | $as_echo "no" >&6; } | |
bec39cab AC |
7322 | fi |
7323 | ||
81ecdfbb RW |
7324 | if test "x$ac_ct_RANLIB" = x; then |
7325 | RANLIB=":" | |
7326 | else | |
7327 | case $cross_compiling:$ac_tool_warned in | |
7328 | yes:) | |
7329 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7330 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7331 | ac_tool_warned=yes ;; | |
7332 | esac | |
7333 | RANLIB=$ac_ct_RANLIB | |
7334 | fi | |
bec39cab AC |
7335 | else |
7336 | RANLIB="$ac_cv_prog_RANLIB" | |
7337 | fi | |
7338 | ||
7339 | for ac_prog in 'bison -y' byacc | |
7340 | do | |
7341 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7342 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7344 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7345 | if ${ac_cv_prog_YACC+:} false; then : |
81ecdfbb | 7346 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7347 | else |
7348 | if test -n "$YACC"; then | |
7349 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7350 | else | |
7351 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7352 | for as_dir in $PATH | |
7353 | do | |
7354 | IFS=$as_save_IFS | |
7355 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7356 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7357 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7358 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7359 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7360 | break 2 |
7361 | fi | |
7362 | done | |
81ecdfbb RW |
7363 | done |
7364 | IFS=$as_save_IFS | |
bec39cab AC |
7365 | |
7366 | fi | |
7367 | fi | |
7368 | YACC=$ac_cv_prog_YACC | |
7369 | if test -n "$YACC"; then | |
81ecdfbb RW |
7370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7371 | $as_echo "$YACC" >&6; } | |
bec39cab | 7372 | else |
81ecdfbb RW |
7373 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7374 | $as_echo "no" >&6; } | |
bec39cab AC |
7375 | fi |
7376 | ||
81ecdfbb | 7377 | |
bec39cab AC |
7378 | test -n "$YACC" && break |
7379 | done | |
7380 | test -n "$YACC" || YACC="yacc" | |
7381 | ||
7382 | ||
7383 | if test -n "$ac_tool_prefix"; then | |
7384 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7385 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7387 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7388 | if ${ac_cv_prog_AR+:} false; then : |
81ecdfbb | 7389 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7390 | else |
7391 | if test -n "$AR"; then | |
7392 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7393 | else | |
7394 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7395 | for as_dir in $PATH | |
7396 | do | |
7397 | IFS=$as_save_IFS | |
7398 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7399 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7400 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7401 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7402 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7403 | break 2 |
7404 | fi | |
7405 | done | |
81ecdfbb RW |
7406 | done |
7407 | IFS=$as_save_IFS | |
bec39cab AC |
7408 | |
7409 | fi | |
7410 | fi | |
7411 | AR=$ac_cv_prog_AR | |
7412 | if test -n "$AR"; then | |
81ecdfbb RW |
7413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7414 | $as_echo "$AR" >&6; } | |
bec39cab | 7415 | else |
81ecdfbb RW |
7416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7417 | $as_echo "no" >&6; } | |
bec39cab AC |
7418 | fi |
7419 | ||
81ecdfbb | 7420 | |
bec39cab AC |
7421 | fi |
7422 | if test -z "$ac_cv_prog_AR"; then | |
7423 | ac_ct_AR=$AR | |
7424 | # Extract the first word of "ar", so it can be a program name with args. | |
7425 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7427 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7428 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
81ecdfbb | 7429 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7430 | else |
7431 | if test -n "$ac_ct_AR"; then | |
7432 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7433 | else | |
7434 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7435 | for as_dir in $PATH | |
7436 | do | |
7437 | IFS=$as_save_IFS | |
7438 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7439 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7440 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7441 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7442 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7443 | break 2 |
7444 | fi | |
7445 | done | |
81ecdfbb RW |
7446 | done |
7447 | IFS=$as_save_IFS | |
bec39cab AC |
7448 | |
7449 | fi | |
7450 | fi | |
7451 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7452 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7454 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7455 | else |
81ecdfbb RW |
7456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7457 | $as_echo "no" >&6; } | |
bec39cab AC |
7458 | fi |
7459 | ||
81ecdfbb RW |
7460 | if test "x$ac_ct_AR" = x; then |
7461 | AR="" | |
7462 | else | |
7463 | case $cross_compiling:$ac_tool_warned in | |
7464 | yes:) | |
7465 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7466 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7467 | ac_tool_warned=yes ;; | |
7468 | esac | |
7469 | AR=$ac_ct_AR | |
7470 | fi | |
bec39cab AC |
7471 | else |
7472 | AR="$ac_cv_prog_AR" | |
7473 | fi | |
7474 | ||
7475 | if test -n "$ac_tool_prefix"; then | |
7476 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7477 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7479 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7480 | if ${ac_cv_prog_DLLTOOL+:} false; then : |
81ecdfbb | 7481 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7482 | else |
7483 | if test -n "$DLLTOOL"; then | |
7484 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7485 | else | |
7486 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7487 | for as_dir in $PATH | |
7488 | do | |
7489 | IFS=$as_save_IFS | |
7490 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7491 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7492 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7493 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7494 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7495 | break 2 |
7496 | fi | |
7497 | done | |
81ecdfbb RW |
7498 | done |
7499 | IFS=$as_save_IFS | |
bec39cab AC |
7500 | |
7501 | fi | |
7502 | fi | |
7503 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7504 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7506 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7507 | else |
81ecdfbb RW |
7508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7509 | $as_echo "no" >&6; } | |
bec39cab AC |
7510 | fi |
7511 | ||
81ecdfbb | 7512 | |
bec39cab AC |
7513 | fi |
7514 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7515 | ac_ct_DLLTOOL=$DLLTOOL | |
7516 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7517 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7519 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7520 | if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : |
81ecdfbb | 7521 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7522 | else |
7523 | if test -n "$ac_ct_DLLTOOL"; then | |
7524 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7525 | else | |
7526 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7527 | for as_dir in $PATH | |
7528 | do | |
7529 | IFS=$as_save_IFS | |
7530 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7531 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7532 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7533 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7534 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7535 | break 2 |
7536 | fi | |
7537 | done | |
81ecdfbb RW |
7538 | done |
7539 | IFS=$as_save_IFS | |
bec39cab AC |
7540 | |
7541 | fi | |
7542 | fi | |
7543 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7544 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7546 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7547 | else |
81ecdfbb RW |
7548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7549 | $as_echo "no" >&6; } | |
bec39cab AC |
7550 | fi |
7551 | ||
81ecdfbb RW |
7552 | if test "x$ac_ct_DLLTOOL" = x; then |
7553 | DLLTOOL="" | |
7554 | else | |
7555 | case $cross_compiling:$ac_tool_warned in | |
7556 | yes:) | |
7557 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7558 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7559 | ac_tool_warned=yes ;; | |
7560 | esac | |
7561 | DLLTOOL=$ac_ct_DLLTOOL | |
7562 | fi | |
bec39cab AC |
7563 | else |
7564 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7565 | fi | |
7566 | ||
7567 | if test -n "$ac_tool_prefix"; then | |
7568 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7569 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7571 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7572 | if ${ac_cv_prog_WINDRES+:} false; then : |
81ecdfbb | 7573 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7574 | else |
7575 | if test -n "$WINDRES"; then | |
7576 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7577 | else | |
7578 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7579 | for as_dir in $PATH | |
7580 | do | |
7581 | IFS=$as_save_IFS | |
7582 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7583 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7584 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7585 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7586 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7587 | break 2 |
7588 | fi | |
7589 | done | |
81ecdfbb RW |
7590 | done |
7591 | IFS=$as_save_IFS | |
bec39cab AC |
7592 | |
7593 | fi | |
7594 | fi | |
7595 | WINDRES=$ac_cv_prog_WINDRES | |
7596 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7598 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7599 | else |
81ecdfbb RW |
7600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7601 | $as_echo "no" >&6; } | |
bec39cab AC |
7602 | fi |
7603 | ||
81ecdfbb | 7604 | |
bec39cab AC |
7605 | fi |
7606 | if test -z "$ac_cv_prog_WINDRES"; then | |
7607 | ac_ct_WINDRES=$WINDRES | |
7608 | # Extract the first word of "windres", so it can be a program name with args. | |
7609 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7611 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7612 | if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : |
81ecdfbb | 7613 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7614 | else |
7615 | if test -n "$ac_ct_WINDRES"; then | |
7616 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7617 | else | |
7618 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7619 | for as_dir in $PATH | |
7620 | do | |
7621 | IFS=$as_save_IFS | |
7622 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7623 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7624 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7625 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7626 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7627 | break 2 |
7628 | fi | |
7629 | done | |
81ecdfbb RW |
7630 | done |
7631 | IFS=$as_save_IFS | |
bec39cab AC |
7632 | |
7633 | fi | |
7634 | fi | |
7635 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7636 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7637 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7638 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7639 | else |
81ecdfbb RW |
7640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7641 | $as_echo "no" >&6; } | |
c906108c | 7642 | fi |
bec39cab | 7643 | |
81ecdfbb RW |
7644 | if test "x$ac_ct_WINDRES" = x; then |
7645 | WINDRES="" | |
7646 | else | |
7647 | case $cross_compiling:$ac_tool_warned in | |
7648 | yes:) | |
7649 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7650 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7651 | ac_tool_warned=yes ;; | |
7652 | esac | |
7653 | WINDRES=$ac_ct_WINDRES | |
7654 | fi | |
c906108c | 7655 | else |
bec39cab | 7656 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7657 | fi |
7658 | ||
bec39cab | 7659 | |
036c3acb TS |
7660 | case $host_os in |
7661 | gnu*) | |
7662 | # Needed for GNU Hurd hosts. | |
7663 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7664 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7665 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7667 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7668 | if ${ac_cv_prog_MIG+:} false; then : |
81ecdfbb | 7669 | $as_echo_n "(cached) " >&6 |
c906108c | 7670 | else |
bec39cab AC |
7671 | if test -n "$MIG"; then |
7672 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7673 | else | |
7674 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7675 | for as_dir in $PATH | |
7676 | do | |
7677 | IFS=$as_save_IFS | |
7678 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7679 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7680 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7681 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7682 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7683 | break 2 |
7684 | fi | |
7685 | done | |
81ecdfbb RW |
7686 | done |
7687 | IFS=$as_save_IFS | |
bec39cab | 7688 | |
c906108c | 7689 | fi |
bec39cab AC |
7690 | fi |
7691 | MIG=$ac_cv_prog_MIG | |
7692 | if test -n "$MIG"; then | |
81ecdfbb RW |
7693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7694 | $as_echo "$MIG" >&6; } | |
c906108c | 7695 | else |
81ecdfbb RW |
7696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7697 | $as_echo "no" >&6; } | |
c906108c SS |
7698 | fi |
7699 | ||
81ecdfbb | 7700 | |
bec39cab AC |
7701 | fi |
7702 | if test -z "$ac_cv_prog_MIG"; then | |
7703 | ac_ct_MIG=$MIG | |
7704 | # Extract the first word of "mig", so it can be a program name with args. | |
7705 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
7706 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7707 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7708 | if ${ac_cv_prog_ac_ct_MIG+:} false; then : |
81ecdfbb | 7709 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7710 | else |
7711 | if test -n "$ac_ct_MIG"; then | |
7712 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
7713 | else | |
7714 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7715 | for as_dir in $PATH | |
7716 | do | |
7717 | IFS=$as_save_IFS | |
7718 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7719 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7720 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7721 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 7722 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7723 | break 2 |
7724 | fi | |
7725 | done | |
81ecdfbb RW |
7726 | done |
7727 | IFS=$as_save_IFS | |
c906108c | 7728 | |
bec39cab AC |
7729 | fi |
7730 | fi | |
7731 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
7732 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
7733 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
7734 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 7735 | else |
81ecdfbb RW |
7736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7737 | $as_echo "no" >&6; } | |
bec39cab | 7738 | fi |
c906108c | 7739 | |
81ecdfbb RW |
7740 | if test "x$ac_ct_MIG" = x; then |
7741 | MIG="" | |
7742 | else | |
7743 | case $cross_compiling:$ac_tool_warned in | |
7744 | yes:) | |
7745 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7746 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7747 | ac_tool_warned=yes ;; | |
7748 | esac | |
7749 | MIG=$ac_ct_MIG | |
7750 | fi | |
bec39cab AC |
7751 | else |
7752 | MIG="$ac_cv_prog_MIG" | |
7753 | fi | |
c906108c | 7754 | |
036c3acb | 7755 | if test x"$MIG" = x; then |
d0ac1c44 | 7756 | as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 |
036c3acb TS |
7757 | fi |
7758 | ;; | |
7759 | esac | |
c906108c | 7760 | |
bec39cab AC |
7761 | # ---------------------- # |
7762 | # Checks for libraries. # | |
7763 | # ---------------------- # | |
c906108c | 7764 | |
bec39cab | 7765 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
7766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
7767 | $as_echo_n "checking for main in -lm... " >&6; } | |
d0ac1c44 | 7768 | if ${ac_cv_lib_m_main+:} false; then : |
81ecdfbb | 7769 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7770 | else |
7771 | ac_check_lib_save_LIBS=$LIBS | |
7772 | LIBS="-lm $LIBS" | |
81ecdfbb | 7773 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7774 | /* end confdefs.h. */ |
c906108c | 7775 | |
c906108c | 7776 | |
bec39cab AC |
7777 | int |
7778 | main () | |
7779 | { | |
81ecdfbb | 7780 | return main (); |
bec39cab AC |
7781 | ; |
7782 | return 0; | |
7783 | } | |
7784 | _ACEOF | |
81ecdfbb | 7785 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
7786 | ac_cv_lib_m_main=yes |
7787 | else | |
81ecdfbb | 7788 | ac_cv_lib_m_main=no |
bec39cab | 7789 | fi |
81ecdfbb RW |
7790 | rm -f core conftest.err conftest.$ac_objext \ |
7791 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
7792 | LIBS=$ac_check_lib_save_LIBS |
7793 | fi | |
81ecdfbb RW |
7794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
7795 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
d0ac1c44 | 7796 | if test "x$ac_cv_lib_m_main" = xyes; then : |
bec39cab AC |
7797 | cat >>confdefs.h <<_ACEOF |
7798 | #define HAVE_LIBM 1 | |
7799 | _ACEOF | |
7800 | ||
7801 | LIBS="-lm $LIBS" | |
c906108c | 7802 | |
c906108c | 7803 | fi |
bec39cab AC |
7804 | |
7805 | ||
bec39cab | 7806 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
7807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
7808 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
d0ac1c44 | 7809 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb | 7810 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7811 | else |
7812 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7814 | /* end confdefs.h. */ |
ddc9cd0f | 7815 | |
81ecdfbb RW |
7816 | /* Override any GCC internal prototype to avoid an error. |
7817 | Use char because int might match the return type of a GCC | |
7818 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
7819 | #ifdef __cplusplus |
7820 | extern "C" | |
7821 | #endif | |
bec39cab AC |
7822 | char gethostbyname (); |
7823 | int | |
7824 | main () | |
7825 | { | |
81ecdfbb | 7826 | return gethostbyname (); |
bec39cab AC |
7827 | ; |
7828 | return 0; | |
7829 | } | |
7830 | _ACEOF | |
81ecdfbb RW |
7831 | for ac_lib in '' nsl; do |
7832 | if test -z "$ac_lib"; then | |
7833 | ac_res="none required" | |
7834 | else | |
7835 | ac_res=-l$ac_lib | |
b4e70030 | 7836 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7837 | fi |
7838 | if ac_fn_c_try_link "$LINENO"; then : | |
7839 | ac_cv_search_gethostbyname=$ac_res | |
7840 | fi | |
7841 | rm -f core conftest.err conftest.$ac_objext \ | |
7842 | conftest$ac_exeext | |
d0ac1c44 | 7843 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb RW |
7844 | break |
7845 | fi | |
7846 | done | |
d0ac1c44 | 7847 | if ${ac_cv_search_gethostbyname+:} false; then : |
ddc9cd0f | 7848 | |
bec39cab | 7849 | else |
81ecdfbb | 7850 | ac_cv_search_gethostbyname=no |
bec39cab | 7851 | fi |
81ecdfbb | 7852 | rm conftest.$ac_ext |
bec39cab AC |
7853 | LIBS=$ac_func_search_save_LIBS |
7854 | fi | |
81ecdfbb RW |
7855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
7856 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
7857 | ac_res=$ac_cv_search_gethostbyname | |
7858 | if test "$ac_res" != no; then : | |
7859 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 7860 | |
bec39cab | 7861 | fi |
96baa820 | 7862 | |
c906108c | 7863 | |
b4e70030 | 7864 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
7865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
7866 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
d0ac1c44 | 7867 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb | 7868 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
7869 | else |
7870 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 7871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
7872 | /* end confdefs.h. */ |
7873 | ||
81ecdfbb RW |
7874 | /* Override any GCC internal prototype to avoid an error. |
7875 | Use char because int might match the return type of a GCC | |
7876 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
7877 | #ifdef __cplusplus |
7878 | extern "C" | |
7879 | #endif | |
b4e70030 JB |
7880 | char socketpair (); |
7881 | int | |
7882 | main () | |
7883 | { | |
81ecdfbb | 7884 | return socketpair (); |
b4e70030 JB |
7885 | ; |
7886 | return 0; | |
7887 | } | |
7888 | _ACEOF | |
81ecdfbb RW |
7889 | for ac_lib in '' socket; do |
7890 | if test -z "$ac_lib"; then | |
7891 | ac_res="none required" | |
7892 | else | |
7893 | ac_res=-l$ac_lib | |
b4e70030 | 7894 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7895 | fi |
7896 | if ac_fn_c_try_link "$LINENO"; then : | |
7897 | ac_cv_search_socketpair=$ac_res | |
7898 | fi | |
7899 | rm -f core conftest.err conftest.$ac_objext \ | |
7900 | conftest$ac_exeext | |
d0ac1c44 | 7901 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb RW |
7902 | break |
7903 | fi | |
7904 | done | |
d0ac1c44 | 7905 | if ${ac_cv_search_socketpair+:} false; then : |
b4e70030 | 7906 | |
b4e70030 | 7907 | else |
81ecdfbb | 7908 | ac_cv_search_socketpair=no |
b4e70030 | 7909 | fi |
81ecdfbb | 7910 | rm conftest.$ac_ext |
b4e70030 JB |
7911 | LIBS=$ac_func_search_save_LIBS |
7912 | fi | |
81ecdfbb RW |
7913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
7914 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
7915 | ac_res=$ac_cv_search_socketpair | |
7916 | if test "$ac_res" != no; then : | |
7917 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
7918 | |
7919 | fi | |
7920 | ||
7921 | ||
233a11ab | 7922 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 7923 | |
711a72d3 | 7924 | # Use the system's zlib library. |
39f3de7c L |
7925 | zlibdir="-L\$(top_builddir)/../zlib" |
7926 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 7927 | |
711a72d3 L |
7928 | # Check whether --with-system-zlib was given. |
7929 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
7930 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
7931 | zlibdir= | |
7932 | zlibinc= | |
7933 | fi | |
b040ad30 | 7934 | |
233a11ab | 7935 | fi |
233a11ab | 7936 | |
233a11ab | 7937 | |
233a11ab | 7938 | |
b040ad30 | 7939 | |
233a11ab | 7940 | |
25268153 | 7941 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
37773e78 | 7942 | # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. |
25268153 JB |
7943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 |
7944 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } | |
d0ac1c44 | 7945 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
7946 | $as_echo_n "(cached) " >&6 |
7947 | else | |
7948 | ac_func_search_save_LIBS=$LIBS | |
7949 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7950 | /* end confdefs.h. */ | |
7951 | ||
7952 | /* Override any GCC internal prototype to avoid an error. | |
7953 | Use char because int might match the return type of a GCC | |
7954 | builtin and then its argument prototype would still apply. */ | |
7955 | #ifdef __cplusplus | |
7956 | extern "C" | |
7957 | #endif | |
7958 | char kinfo_getvmmap (); | |
7959 | int | |
7960 | main () | |
7961 | { | |
7962 | return kinfo_getvmmap (); | |
7963 | ; | |
7964 | return 0; | |
7965 | } | |
7966 | _ACEOF | |
37773e78 | 7967 | for ac_lib in '' util util-freebsd; do |
25268153 JB |
7968 | if test -z "$ac_lib"; then |
7969 | ac_res="none required" | |
7970 | else | |
7971 | ac_res=-l$ac_lib | |
7972 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7973 | fi | |
7974 | if ac_fn_c_try_link "$LINENO"; then : | |
7975 | ac_cv_search_kinfo_getvmmap=$ac_res | |
7976 | fi | |
7977 | rm -f core conftest.err conftest.$ac_objext \ | |
7978 | conftest$ac_exeext | |
d0ac1c44 | 7979 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
7980 | break |
7981 | fi | |
7982 | done | |
d0ac1c44 | 7983 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
7984 | |
7985 | else | |
7986 | ac_cv_search_kinfo_getvmmap=no | |
7987 | fi | |
7988 | rm conftest.$ac_ext | |
7989 | LIBS=$ac_func_search_save_LIBS | |
7990 | fi | |
7991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 | |
7992 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } | |
7993 | ac_res=$ac_cv_search_kinfo_getvmmap | |
7994 | if test "$ac_res" != no; then : | |
7995 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7996 | ||
7997 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | |
7998 | ||
7999 | fi | |
8000 | ||
8001 | ||
77f120bf | 8002 | |
016a3251 DD |
8003 | if test "X$prefix" = "XNONE"; then |
8004 | acl_final_prefix="$ac_default_prefix" | |
8005 | else | |
8006 | acl_final_prefix="$prefix" | |
8007 | fi | |
8008 | if test "X$exec_prefix" = "XNONE"; then | |
8009 | acl_final_exec_prefix='${prefix}' | |
8010 | else | |
8011 | acl_final_exec_prefix="$exec_prefix" | |
8012 | fi | |
8013 | acl_save_prefix="$prefix" | |
8014 | prefix="$acl_final_prefix" | |
8015 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8016 | prefix="$acl_save_prefix" | |
8017 | ||
8018 | ||
8019 | # Check whether --with-gnu-ld was given. | |
8020 | if test "${with_gnu_ld+set}" = set; then : | |
8021 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8022 | else | |
8023 | with_gnu_ld=no | |
8024 | fi | |
8025 | ||
8026 | # Prepare PATH_SEPARATOR. | |
8027 | # The user is always right. | |
8028 | if test "${PATH_SEPARATOR+set}" != set; then | |
8029 | echo "#! /bin/sh" >conf$$.sh | |
8030 | echo "exit 0" >>conf$$.sh | |
8031 | chmod +x conf$$.sh | |
8032 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8033 | PATH_SEPARATOR=';' | |
8034 | else | |
8035 | PATH_SEPARATOR=: | |
8036 | fi | |
8037 | rm -f conf$$.sh | |
8038 | fi | |
8039 | ac_prog=ld | |
8040 | if test "$GCC" = yes; then | |
8041 | # Check if gcc -print-prog-name=ld gives a path. | |
8042 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8043 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8044 | case $host in | |
8045 | *-*-mingw*) | |
8046 | # gcc leaves a trailing carriage return which upsets mingw | |
8047 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8048 | *) | |
8049 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8050 | esac | |
8051 | case $ac_prog in | |
8052 | # Accept absolute paths. | |
8053 | [\\/]* | [A-Za-z]:[\\/]*) | |
8054 | re_direlt='/[^/][^/]*/\.\./' | |
8055 | # Canonicalize the path of ld | |
8056 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8057 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8058 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8059 | done | |
8060 | test -z "$LD" && LD="$ac_prog" | |
8061 | ;; | |
8062 | "") | |
8063 | # If it fails, then pretend we aren't using GCC. | |
8064 | ac_prog=ld | |
8065 | ;; | |
8066 | *) | |
8067 | # If it is relative, then search for the first ld in PATH. | |
8068 | with_gnu_ld=unknown | |
8069 | ;; | |
8070 | esac | |
8071 | elif test "$with_gnu_ld" = yes; then | |
8072 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8073 | $as_echo_n "checking for GNU ld... " >&6; } | |
8074 | else | |
8075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8076 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8077 | fi | |
d0ac1c44 | 8078 | if ${acl_cv_path_LD+:} false; then : |
016a3251 DD |
8079 | $as_echo_n "(cached) " >&6 |
8080 | else | |
8081 | if test -z "$LD"; then | |
8082 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8083 | for ac_dir in $PATH; do | |
8084 | test -z "$ac_dir" && ac_dir=. | |
8085 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8086 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8087 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8088 | # but apparently some GNU ld's only accept -v. | |
8089 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8090 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8091 | test "$with_gnu_ld" != no && break | |
8092 | else | |
8093 | test "$with_gnu_ld" != yes && break | |
8094 | fi | |
8095 | fi | |
8096 | done | |
8097 | IFS="$ac_save_ifs" | |
8098 | else | |
8099 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8100 | fi | |
8101 | fi | |
8102 | ||
8103 | LD="$acl_cv_path_LD" | |
8104 | if test -n "$LD"; then | |
8105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8106 | $as_echo "$LD" >&6; } | |
8107 | else | |
8108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8109 | $as_echo "no" >&6; } | |
8110 | fi | |
d0ac1c44 | 8111 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
016a3251 DD |
8112 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
8113 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
d0ac1c44 | 8114 | if ${acl_cv_prog_gnu_ld+:} false; then : |
016a3251 DD |
8115 | $as_echo_n "(cached) " >&6 |
8116 | else | |
8117 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8118 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8119 | acl_cv_prog_gnu_ld=yes | |
8120 | else | |
8121 | acl_cv_prog_gnu_ld=no | |
8122 | fi | |
8123 | fi | |
8124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8125 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8126 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8127 | ||
8128 | ||
8129 | ||
8130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8131 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
d0ac1c44 | 8132 | if ${acl_cv_rpath+:} false; then : |
016a3251 DD |
8133 | $as_echo_n "(cached) " >&6 |
8134 | else | |
8135 | ||
8136 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8137 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8138 | . ./conftest.sh | |
8139 | rm -f ./conftest.sh | |
8140 | acl_cv_rpath=done | |
8141 | ||
8142 | fi | |
8143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8144 | $as_echo "$acl_cv_rpath" >&6; } | |
8145 | wl="$acl_cv_wl" | |
8146 | libext="$acl_cv_libext" | |
8147 | shlibext="$acl_cv_shlibext" | |
8148 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8149 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8150 | hardcode_direct="$acl_cv_hardcode_direct" | |
8151 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8152 | # Check whether --enable-rpath was given. | |
8153 | if test "${enable_rpath+set}" = set; then : | |
8154 | enableval=$enable_rpath; : | |
8155 | else | |
8156 | enable_rpath=yes | |
8157 | fi | |
8158 | ||
8159 | ||
8160 | ||
8161 | ||
8162 | ||
8163 | ||
8164 | ||
8165 | ||
8166 | use_additional=yes | |
8167 | ||
8168 | acl_save_prefix="$prefix" | |
8169 | prefix="$acl_final_prefix" | |
8170 | acl_save_exec_prefix="$exec_prefix" | |
8171 | exec_prefix="$acl_final_exec_prefix" | |
8172 | ||
8173 | eval additional_includedir=\"$includedir\" | |
8174 | eval additional_libdir=\"$libdir\" | |
8175 | ||
8176 | exec_prefix="$acl_save_exec_prefix" | |
8177 | prefix="$acl_save_prefix" | |
77f120bf | 8178 | |
6c7a06a3 | 8179 | |
81ecdfbb RW |
8180 | # Check whether --with-libiconv-prefix was given. |
8181 | if test "${with_libiconv_prefix+set}" = set; then : | |
8182 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8183 | if test "X$withval" = "Xno"; then |
8184 | use_additional=no | |
8185 | else | |
8186 | if test "X$withval" = "X"; then | |
8187 | ||
8188 | acl_save_prefix="$prefix" | |
8189 | prefix="$acl_final_prefix" | |
8190 | acl_save_exec_prefix="$exec_prefix" | |
8191 | exec_prefix="$acl_final_exec_prefix" | |
8192 | ||
8193 | eval additional_includedir=\"$includedir\" | |
8194 | eval additional_libdir=\"$libdir\" | |
8195 | ||
8196 | exec_prefix="$acl_save_exec_prefix" | |
8197 | prefix="$acl_save_prefix" | |
8198 | ||
8199 | else | |
8200 | additional_includedir="$withval/include" | |
8201 | additional_libdir="$withval/lib" | |
8202 | fi | |
8203 | fi | |
6c7a06a3 | 8204 | |
81ecdfbb RW |
8205 | fi |
8206 | ||
016a3251 DD |
8207 | LIBICONV= |
8208 | LTLIBICONV= | |
8209 | INCICONV= | |
8210 | rpathdirs= | |
8211 | ltrpathdirs= | |
8212 | names_already_handled= | |
8213 | names_next_round='iconv ' | |
8214 | while test -n "$names_next_round"; do | |
8215 | names_this_round="$names_next_round" | |
8216 | names_next_round= | |
8217 | for name in $names_this_round; do | |
8218 | already_handled= | |
8219 | for n in $names_already_handled; do | |
8220 | if test "$n" = "$name"; then | |
8221 | already_handled=yes | |
8222 | break | |
8223 | fi | |
8224 | done | |
8225 | if test -z "$already_handled"; then | |
8226 | names_already_handled="$names_already_handled $name" | |
8227 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8228 | eval value=\"\$HAVE_LIB$uppername\" | |
8229 | if test -n "$value"; then | |
8230 | if test "$value" = yes; then | |
8231 | eval value=\"\$LIB$uppername\" | |
8232 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8233 | eval value=\"\$LTLIB$uppername\" | |
8234 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8235 | else | |
8236 | : | |
8237 | fi | |
8238 | else | |
8239 | found_dir= | |
8240 | found_la= | |
8241 | found_so= | |
8242 | found_a= | |
8243 | if test $use_additional = yes; then | |
8244 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
8245 | found_dir="$additional_libdir" | |
8246 | found_so="$additional_libdir/lib$name.$shlibext" | |
8247 | if test -f "$additional_libdir/lib$name.la"; then | |
8248 | found_la="$additional_libdir/lib$name.la" | |
8249 | fi | |
8250 | else | |
8251 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8252 | found_dir="$additional_libdir" | |
8253 | found_a="$additional_libdir/lib$name.$libext" | |
8254 | if test -f "$additional_libdir/lib$name.la"; then | |
8255 | found_la="$additional_libdir/lib$name.la" | |
8256 | fi | |
8257 | fi | |
8258 | fi | |
8259 | fi | |
8260 | if test "X$found_dir" = "X"; then | |
8261 | for x in $LDFLAGS $LTLIBICONV; do | |
8262 | ||
8263 | acl_save_prefix="$prefix" | |
8264 | prefix="$acl_final_prefix" | |
8265 | acl_save_exec_prefix="$exec_prefix" | |
8266 | exec_prefix="$acl_final_exec_prefix" | |
8267 | eval x=\"$x\" | |
8268 | exec_prefix="$acl_save_exec_prefix" | |
8269 | prefix="$acl_save_prefix" | |
8270 | ||
8271 | case "$x" in | |
8272 | -L*) | |
8273 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
8274 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
8275 | found_dir="$dir" | |
8276 | found_so="$dir/lib$name.$shlibext" | |
8277 | if test -f "$dir/lib$name.la"; then | |
8278 | found_la="$dir/lib$name.la" | |
8279 | fi | |
8280 | else | |
8281 | if test -f "$dir/lib$name.$libext"; then | |
8282 | found_dir="$dir" | |
8283 | found_a="$dir/lib$name.$libext" | |
8284 | if test -f "$dir/lib$name.la"; then | |
8285 | found_la="$dir/lib$name.la" | |
8286 | fi | |
8287 | fi | |
8288 | fi | |
8289 | ;; | |
8290 | esac | |
8291 | if test "X$found_dir" != "X"; then | |
8292 | break | |
8293 | fi | |
8294 | done | |
8295 | fi | |
8296 | if test "X$found_dir" != "X"; then | |
8297 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8298 | if test "X$found_so" != "X"; then | |
8299 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8300 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8301 | else | |
8302 | haveit= | |
8303 | for x in $ltrpathdirs; do | |
8304 | if test "X$x" = "X$found_dir"; then | |
8305 | haveit=yes | |
8306 | break | |
8307 | fi | |
8308 | done | |
8309 | if test -z "$haveit"; then | |
8310 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8311 | fi | |
8312 | if test "$hardcode_direct" = yes; then | |
8313 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8314 | else | |
8315 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8316 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8317 | haveit= | |
8318 | for x in $rpathdirs; do | |
8319 | if test "X$x" = "X$found_dir"; then | |
8320 | haveit=yes | |
8321 | break | |
8322 | fi | |
8323 | done | |
8324 | if test -z "$haveit"; then | |
8325 | rpathdirs="$rpathdirs $found_dir" | |
8326 | fi | |
8327 | else | |
8328 | haveit= | |
8329 | for x in $LDFLAGS $LIBICONV; do | |
8330 | ||
8331 | acl_save_prefix="$prefix" | |
8332 | prefix="$acl_final_prefix" | |
8333 | acl_save_exec_prefix="$exec_prefix" | |
8334 | exec_prefix="$acl_final_exec_prefix" | |
8335 | eval x=\"$x\" | |
8336 | exec_prefix="$acl_save_exec_prefix" | |
8337 | prefix="$acl_save_prefix" | |
8338 | ||
8339 | if test "X$x" = "X-L$found_dir"; then | |
8340 | haveit=yes | |
8341 | break | |
8342 | fi | |
8343 | done | |
8344 | if test -z "$haveit"; then | |
8345 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8346 | fi | |
8347 | if test "$hardcode_minus_L" != no; then | |
8348 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8349 | else | |
8350 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8351 | fi | |
8352 | fi | |
8353 | fi | |
8354 | fi | |
8355 | else | |
8356 | if test "X$found_a" != "X"; then | |
8357 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8358 | else | |
8359 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8360 | fi | |
8361 | fi | |
8362 | additional_includedir= | |
8363 | case "$found_dir" in | |
8364 | */lib | */lib/) | |
8365 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8366 | additional_includedir="$basedir/include" | |
8367 | ;; | |
8368 | esac | |
8369 | if test "X$additional_includedir" != "X"; then | |
8370 | if test "X$additional_includedir" != "X/usr/include"; then | |
8371 | haveit= | |
8372 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8373 | if test -n "$GCC"; then | |
8374 | case $host_os in | |
8375 | linux*) haveit=yes;; | |
8376 | esac | |
8377 | fi | |
8378 | fi | |
8379 | if test -z "$haveit"; then | |
8380 | for x in $CPPFLAGS $INCICONV; do | |
8381 | ||
8382 | acl_save_prefix="$prefix" | |
8383 | prefix="$acl_final_prefix" | |
8384 | acl_save_exec_prefix="$exec_prefix" | |
8385 | exec_prefix="$acl_final_exec_prefix" | |
8386 | eval x=\"$x\" | |
8387 | exec_prefix="$acl_save_exec_prefix" | |
8388 | prefix="$acl_save_prefix" | |
8389 | ||
8390 | if test "X$x" = "X-I$additional_includedir"; then | |
8391 | haveit=yes | |
8392 | break | |
8393 | fi | |
8394 | done | |
8395 | if test -z "$haveit"; then | |
8396 | if test -d "$additional_includedir"; then | |
8397 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8398 | fi | |
8399 | fi | |
8400 | fi | |
8401 | fi | |
8402 | fi | |
8403 | if test -n "$found_la"; then | |
8404 | save_libdir="$libdir" | |
8405 | case "$found_la" in | |
8406 | */* | *\\*) . "$found_la" ;; | |
8407 | *) . "./$found_la" ;; | |
8408 | esac | |
8409 | libdir="$save_libdir" | |
8410 | for dep in $dependency_libs; do | |
8411 | case "$dep" in | |
8412 | -L*) | |
8413 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8414 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8415 | haveit= | |
8416 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8417 | if test -n "$GCC"; then | |
8418 | case $host_os in | |
8419 | linux*) haveit=yes;; | |
8420 | esac | |
8421 | fi | |
8422 | fi | |
8423 | if test -z "$haveit"; then | |
8424 | haveit= | |
8425 | for x in $LDFLAGS $LIBICONV; do | |
8426 | ||
8427 | acl_save_prefix="$prefix" | |
8428 | prefix="$acl_final_prefix" | |
8429 | acl_save_exec_prefix="$exec_prefix" | |
8430 | exec_prefix="$acl_final_exec_prefix" | |
8431 | eval x=\"$x\" | |
8432 | exec_prefix="$acl_save_exec_prefix" | |
8433 | prefix="$acl_save_prefix" | |
8434 | ||
8435 | if test "X$x" = "X-L$additional_libdir"; then | |
8436 | haveit=yes | |
8437 | break | |
8438 | fi | |
8439 | done | |
8440 | if test -z "$haveit"; then | |
8441 | if test -d "$additional_libdir"; then | |
8442 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8443 | fi | |
8444 | fi | |
8445 | haveit= | |
8446 | for x in $LDFLAGS $LTLIBICONV; do | |
8447 | ||
8448 | acl_save_prefix="$prefix" | |
8449 | prefix="$acl_final_prefix" | |
8450 | acl_save_exec_prefix="$exec_prefix" | |
8451 | exec_prefix="$acl_final_exec_prefix" | |
8452 | eval x=\"$x\" | |
8453 | exec_prefix="$acl_save_exec_prefix" | |
8454 | prefix="$acl_save_prefix" | |
8455 | ||
8456 | if test "X$x" = "X-L$additional_libdir"; then | |
8457 | haveit=yes | |
8458 | break | |
8459 | fi | |
8460 | done | |
8461 | if test -z "$haveit"; then | |
8462 | if test -d "$additional_libdir"; then | |
8463 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8464 | fi | |
8465 | fi | |
8466 | fi | |
8467 | fi | |
8468 | ;; | |
8469 | -R*) | |
8470 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8471 | if test "$enable_rpath" != no; then | |
8472 | haveit= | |
8473 | for x in $rpathdirs; do | |
8474 | if test "X$x" = "X$dir"; then | |
8475 | haveit=yes | |
8476 | break | |
8477 | fi | |
8478 | done | |
8479 | if test -z "$haveit"; then | |
8480 | rpathdirs="$rpathdirs $dir" | |
8481 | fi | |
8482 | haveit= | |
8483 | for x in $ltrpathdirs; do | |
8484 | if test "X$x" = "X$dir"; then | |
8485 | haveit=yes | |
8486 | break | |
8487 | fi | |
8488 | done | |
8489 | if test -z "$haveit"; then | |
8490 | ltrpathdirs="$ltrpathdirs $dir" | |
8491 | fi | |
8492 | fi | |
8493 | ;; | |
8494 | -l*) | |
8495 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8496 | ;; | |
8497 | *.la) | |
8498 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8499 | ;; | |
8500 | *) | |
8501 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8502 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8503 | ;; | |
8504 | esac | |
8505 | done | |
8506 | fi | |
8507 | else | |
8508 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8509 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8510 | fi | |
8511 | fi | |
8512 | fi | |
8513 | done | |
8514 | done | |
8515 | if test "X$rpathdirs" != "X"; then | |
8516 | if test -n "$hardcode_libdir_separator"; then | |
8517 | alldirs= | |
8518 | for found_dir in $rpathdirs; do | |
8519 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8520 | done | |
8521 | acl_save_libdir="$libdir" | |
8522 | libdir="$alldirs" | |
8523 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8524 | libdir="$acl_save_libdir" | |
8525 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8526 | else | |
8527 | for found_dir in $rpathdirs; do | |
8528 | acl_save_libdir="$libdir" | |
8529 | libdir="$found_dir" | |
8530 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8531 | libdir="$acl_save_libdir" | |
8532 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8533 | done | |
8534 | fi | |
8535 | fi | |
8536 | if test "X$ltrpathdirs" != "X"; then | |
8537 | for found_dir in $ltrpathdirs; do | |
8538 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8539 | done | |
8540 | fi | |
8541 | ||
8542 | ||
8543 | ||
8544 | ||
8545 | ||
6c7a06a3 | 8546 | |
6c7a06a3 | 8547 | |
81ecdfbb RW |
8548 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8549 | $as_echo_n "checking for iconv... " >&6; } | |
d0ac1c44 | 8550 | if ${am_cv_func_iconv+:} false; then : |
81ecdfbb | 8551 | $as_echo_n "(cached) " >&6 |
d542061a | 8552 | else |
6c7a06a3 TT |
8553 | |
8554 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8555 | am_cv_lib_iconv=no | |
016a3251 DD |
8556 | am_save_CPPFLAGS="$CPPFLAGS" |
8557 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8559 | /* end confdefs.h. */ |
6c7a06a3 TT |
8560 | #include <stdlib.h> |
8561 | #include <iconv.h> | |
d542061a UW |
8562 | int |
8563 | main () | |
8564 | { | |
6c7a06a3 | 8565 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8566 | iconv(cd,NULL,NULL,NULL,NULL); |
8567 | iconv_close(cd); | |
d542061a UW |
8568 | ; |
8569 | return 0; | |
8570 | } | |
8571 | _ACEOF | |
81ecdfbb | 8572 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8573 | am_cv_func_iconv=yes |
d542061a | 8574 | fi |
81ecdfbb RW |
8575 | rm -f core conftest.err conftest.$ac_objext \ |
8576 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8577 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8578 | |
016a3251 DD |
8579 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8580 | for _libs in .libs _libs; do | |
8581 | am_save_CPPFLAGS="$CPPFLAGS" | |
8582 | am_save_LIBS="$LIBS" | |
8583 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8584 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8586 | /* end confdefs.h. */ |
6c7a06a3 TT |
8587 | #include <stdlib.h> |
8588 | #include <iconv.h> | |
d542061a UW |
8589 | int |
8590 | main () | |
8591 | { | |
6c7a06a3 | 8592 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8593 | iconv(cd,NULL,NULL,NULL,NULL); |
8594 | iconv_close(cd); | |
d542061a UW |
8595 | ; |
8596 | return 0; | |
8597 | } | |
8598 | _ACEOF | |
81ecdfbb | 8599 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8600 | INCICONV="-I../libiconv/include" |
8601 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8602 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8603 | am_cv_lib_iconv=yes | |
8604 | am_cv_func_iconv=yes | |
d542061a | 8605 | fi |
81ecdfbb RW |
8606 | rm -f core conftest.err conftest.$ac_objext \ |
8607 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8608 | CPPFLAGS="$am_save_CPPFLAGS" |
8609 | LIBS="$am_save_LIBS" | |
8610 | if test "$am_cv_func_iconv" = "yes"; then | |
8611 | break | |
8612 | fi | |
8613 | done | |
77f120bf | 8614 | fi |
94ae1714 | 8615 | |
4edb1e84 | 8616 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8617 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8618 | am_save_LIBS="$LIBS" |
5d762de0 | 8619 | CPPFLAGS="$CPPFLAGS $INCICONV" |
016a3251 | 8620 | LIBS="$LIBS $LIBICONV" |
81ecdfbb | 8621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8622 | /* end confdefs.h. */ |
6c7a06a3 TT |
8623 | #include <stdlib.h> |
8624 | #include <iconv.h> | |
bec39cab AC |
8625 | int |
8626 | main () | |
8627 | { | |
6c7a06a3 TT |
8628 | iconv_t cd = iconv_open("",""); |
8629 | iconv(cd,NULL,NULL,NULL,NULL); | |
8630 | iconv_close(cd); | |
bec39cab AC |
8631 | ; |
8632 | return 0; | |
8633 | } | |
8634 | _ACEOF | |
81ecdfbb | 8635 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8636 | am_cv_lib_iconv=yes |
6c7a06a3 | 8637 | am_cv_func_iconv=yes |
627af7ea | 8638 | fi |
81ecdfbb RW |
8639 | rm -f core conftest.err conftest.$ac_objext \ |
8640 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8641 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8642 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8643 | fi |
8644 | ||
8645 | fi | |
81ecdfbb RW |
8646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8647 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8648 | if test "$am_cv_func_iconv" = yes; then |
8649 | ||
8650 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8651 | |
016a3251 | 8652 | fi |
fc3b640d | 8653 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8654 | |
8655 | for element in $INCICONV; do | |
8656 | haveit= | |
8657 | for x in $CPPFLAGS; do | |
8658 | ||
8659 | acl_save_prefix="$prefix" | |
8660 | prefix="$acl_final_prefix" | |
8661 | acl_save_exec_prefix="$exec_prefix" | |
8662 | exec_prefix="$acl_final_exec_prefix" | |
8663 | eval x=\"$x\" | |
8664 | exec_prefix="$acl_save_exec_prefix" | |
8665 | prefix="$acl_save_prefix" | |
8666 | ||
8667 | if test "X$x" = "X$element"; then | |
8668 | haveit=yes | |
8669 | break | |
8670 | fi | |
8671 | done | |
8672 | if test -z "$haveit"; then | |
8673 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8674 | fi | |
8675 | done | |
8676 | ||
8677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8678 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8680 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8681 | else |
016a3251 DD |
8682 | LIBICONV= |
8683 | LTLIBICONV= | |
fc3b640d | 8684 | fi |
94ae1714 | 8685 | |
6c7a06a3 | 8686 | |
6c7a06a3 | 8687 | |
016a3251 | 8688 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8690 | $as_echo_n "checking for iconv declaration... " >&6; } | |
d0ac1c44 | 8691 | if ${am_cv_proto_iconv+:} false; then : |
81ecdfbb | 8692 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8693 | else |
8694 | ||
81ecdfbb | 8695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8696 | /* end confdefs.h. */ |
8697 | ||
6c7a06a3 TT |
8698 | #include <stdlib.h> |
8699 | #include <iconv.h> | |
8700 | extern | |
b4e70030 | 8701 | #ifdef __cplusplus |
6c7a06a3 | 8702 | "C" |
b4e70030 | 8703 | #endif |
6c7a06a3 TT |
8704 | #if defined(__STDC__) || defined(__cplusplus) |
8705 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8706 | #else | |
8707 | size_t iconv(); | |
8708 | #endif | |
8709 | ||
b4e70030 JB |
8710 | int |
8711 | main () | |
8712 | { | |
6c7a06a3 | 8713 | |
b4e70030 JB |
8714 | ; |
8715 | return 0; | |
8716 | } | |
8717 | _ACEOF | |
81ecdfbb | 8718 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8719 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8720 | else |
81ecdfbb | 8721 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8722 | fi |
81ecdfbb | 8723 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8724 | 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);" |
8725 | fi | |
8726 | ||
8727 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8728 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8729 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8730 | $as_echo "${ac_t:- |
8731 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8732 | |
8733 | cat >>confdefs.h <<_ACEOF | |
8734 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
8735 | _ACEOF | |
8736 | ||
8737 | fi | |
6c7a06a3 TT |
8738 | |
8739 | ||
478aac75 DE |
8740 | # GDB may fork/exec the iconv program to get the list of supported character |
8741 | # sets. Allow the user to specify where to find it. | |
8742 | # There are several factors affecting the choice of option name: | |
8743 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
8744 | # the build-time location of libiconv files. | |
8745 | # - The program we need to find is iconv, which comes with glibc. The user | |
8746 | # doesn't necessarily have libiconv installed. Therefore naming this | |
8747 | # --with-libiconv-foo feels wrong. | |
8748 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
8749 | # defined to work on directories not files (though it really doesn't know | |
8750 | # the difference). | |
8751 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
8752 | # with --with-libiconv-prefix. | |
8753 | # Putting these together is why the option name is --with-iconv-bin. | |
8754 | ||
8755 | ||
8756 | # Check whether --with-iconv-bin was given. | |
8757 | if test "${with_iconv_bin+set}" = set; then : | |
8758 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
8759 | ||
8760 | cat >>confdefs.h <<_ACEOF | |
8761 | #define ICONV_BIN "${iconv_bin}" | |
8762 | _ACEOF | |
8763 | ||
8764 | ||
8765 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8766 | if test "x$prefix" = xNONE; then | |
8767 | test_prefix=/usr/local | |
8768 | else | |
8769 | test_prefix=$prefix | |
8770 | fi | |
8771 | else | |
8772 | test_prefix=$exec_prefix | |
8773 | fi | |
8774 | value=0 | |
8775 | case ${iconv_bin} in | |
8776 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8777 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8778 | value=1 | |
8779 | ;; | |
8780 | esac | |
8781 | ||
8782 | cat >>confdefs.h <<_ACEOF | |
8783 | #define ICONV_BIN_RELOCATABLE $value | |
8784 | _ACEOF | |
8785 | ||
8786 | ||
8787 | ||
8788 | fi | |
8789 | ||
8790 | ||
cb01cfba | 8791 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 8792 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
8793 | prefer_curses=yes |
8794 | fi | |
8795 | ||
8796 | curses_found=no | |
8797 | if test x"$prefer_curses" = xyes; then | |
8798 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
8799 | # curses library because the latter might not provide all the | |
8800 | # functionality we need. However, this leads to problems on systems | |
8801 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
8802 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
8803 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
8804 | # a situation. | |
81ecdfbb RW |
8805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
8806 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
d0ac1c44 | 8807 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 8808 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8809 | else |
8810 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8812 | /* end confdefs.h. */ |
8813 | ||
81ecdfbb RW |
8814 | /* Override any GCC internal prototype to avoid an error. |
8815 | Use char because int might match the return type of a GCC | |
8816 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8817 | #ifdef __cplusplus |
8818 | extern "C" | |
8819 | #endif | |
6c7a06a3 TT |
8820 | char waddstr (); |
8821 | int | |
8822 | main () | |
8823 | { | |
81ecdfbb | 8824 | return waddstr (); |
6c7a06a3 TT |
8825 | ; |
8826 | return 0; | |
8827 | } | |
8828 | _ACEOF | |
5007d765 | 8829 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
8830 | if test -z "$ac_lib"; then |
8831 | ac_res="none required" | |
8832 | else | |
8833 | ac_res=-l$ac_lib | |
8834 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8835 | fi | |
8836 | if ac_fn_c_try_link "$LINENO"; then : | |
8837 | ac_cv_search_waddstr=$ac_res | |
8838 | fi | |
8839 | rm -f core conftest.err conftest.$ac_objext \ | |
8840 | conftest$ac_exeext | |
d0ac1c44 | 8841 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb RW |
8842 | break |
8843 | fi | |
8844 | done | |
d0ac1c44 | 8845 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 8846 | |
6c7a06a3 | 8847 | else |
81ecdfbb RW |
8848 | ac_cv_search_waddstr=no |
8849 | fi | |
8850 | rm conftest.$ac_ext | |
8851 | LIBS=$ac_func_search_save_LIBS | |
8852 | fi | |
8853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
8854 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
8855 | ac_res=$ac_cv_search_waddstr | |
8856 | if test "$ac_res" != no; then : | |
8857 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
8858 | |
8859 | fi | |
8860 | ||
8861 | ||
cb01cfba JB |
8862 | if test "$ac_cv_search_waddstr" != no; then |
8863 | curses_found=yes | |
8864 | fi | |
8865 | fi | |
8866 | ||
8867 | # Check whether we should enable the TUI, but only do so if we really | |
8868 | # can. | |
8869 | if test x"$enable_tui" != xno; then | |
0ad6b8ee | 8870 | if test -d "$srcdir/tui"; then |
cb01cfba | 8871 | if test "$curses_found" != no; then |
6c7a06a3 TT |
8872 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
8873 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
8874 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
8875 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
8876 | else |
8877 | if test x"$enable_tui" = xyes; then | |
d0ac1c44 | 8878 | as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 8879 | else |
81ecdfbb RW |
8880 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
8881 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
8882 | fi |
8883 | fi | |
8884 | fi | |
8885 | fi | |
8886 | ||
8887 | # Since GDB uses Readline, we need termcap functionality. In many | |
8888 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 8889 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
8890 | |
8891 | case $host_os in | |
8892 | cygwin*) | |
0ad6b8ee | 8893 | if test -d "$srcdir/libtermcap"; then |
6c7a06a3 TT |
8894 | LIBS="../libtermcap/libtermcap.a $LIBS" |
8895 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
8896 | fi ;; | |
8897 | go32* | *djgpp*) | |
8898 | ac_cv_search_tgetent="none required" | |
8899 | ;; | |
6c7a06a3 TT |
8900 | esac |
8901 | ||
8902 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
8903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
8904 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
d0ac1c44 | 8905 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb | 8906 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8907 | else |
8908 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
8910 | /* end confdefs.h. */ |
8911 | ||
81ecdfbb RW |
8912 | /* Override any GCC internal prototype to avoid an error. |
8913 | Use char because int might match the return type of a GCC | |
8914 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
8915 | #ifdef __cplusplus |
8916 | extern "C" | |
8917 | #endif | |
6c7a06a3 TT |
8918 | char tgetent (); |
8919 | int | |
8920 | main () | |
8921 | { | |
81ecdfbb | 8922 | return tgetent (); |
6c7a06a3 TT |
8923 | ; |
8924 | return 0; | |
8925 | } | |
8926 | _ACEOF | |
2578ecb1 | 8927 | for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
8928 | if test -z "$ac_lib"; then |
8929 | ac_res="none required" | |
8930 | else | |
8931 | ac_res=-l$ac_lib | |
6c7a06a3 | 8932 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8933 | fi |
8934 | if ac_fn_c_try_link "$LINENO"; then : | |
8935 | ac_cv_search_tgetent=$ac_res | |
8936 | fi | |
8937 | rm -f core conftest.err conftest.$ac_objext \ | |
8938 | conftest$ac_exeext | |
d0ac1c44 | 8939 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb RW |
8940 | break |
8941 | fi | |
8942 | done | |
d0ac1c44 | 8943 | if ${ac_cv_search_tgetent+:} false; then : |
6c7a06a3 | 8944 | |
6c7a06a3 | 8945 | else |
81ecdfbb | 8946 | ac_cv_search_tgetent=no |
6c7a06a3 | 8947 | fi |
81ecdfbb | 8948 | rm conftest.$ac_ext |
6c7a06a3 TT |
8949 | LIBS=$ac_func_search_save_LIBS |
8950 | fi | |
81ecdfbb RW |
8951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
8952 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
8953 | ac_res=$ac_cv_search_tgetent | |
8954 | if test "$ac_res" != no; then : | |
8955 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 8956 | |
06825bd1 MK |
8957 | fi |
8958 | ||
06825bd1 | 8959 | |
bec39cab | 8960 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 8961 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
8962 | fi |
8963 | ||
3841debe | 8964 | |
81ecdfbb RW |
8965 | # Check whether --with-system-readline was given. |
8966 | if test "${with_system_readline+set}" = set; then : | |
8967 | withval=$with_system_readline; | |
8968 | fi | |
6a30b0a5 | 8969 | |
6a30b0a5 AS |
8970 | |
8971 | if test "$with_system_readline" = yes; then | |
86c6b807 TT |
8972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 |
8973 | $as_echo_n "checking whether system readline is new enough... " >&6; } | |
8974 | if ${gdb_cv_readline_ok+:} false; then : | |
8975 | $as_echo_n "(cached) " >&6 | |
8976 | else | |
8977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8978 | /* end confdefs.h. */ | |
8979 | #include <stdio.h> | |
8980 | #include <readline/readline.h> | |
8981 | int | |
8982 | main () | |
8983 | { | |
8984 | #if RL_VERSION_MAJOR < 7 | |
8985 | # error "readline version 7 required" | |
8986 | #endif | |
8987 | ; | |
8988 | return 0; | |
8989 | } | |
8990 | _ACEOF | |
8991 | if ac_fn_c_try_compile "$LINENO"; then : | |
8992 | gdb_cv_readline_ok=yes | |
8993 | else | |
8994 | gdb_cv_readline_ok=no | |
8995 | fi | |
8996 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8997 | fi | |
8998 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 | |
8999 | $as_echo "$gdb_cv_readline_ok" >&6; } | |
9000 | if test "$gdb_cv_readline_ok" != yes; then | |
9001 | as_fn_error $? "system readline is not new enough" "$LINENO" 5 | |
9002 | fi | |
9003 | ||
6a30b0a5 AS |
9004 | READLINE=-lreadline |
9005 | READLINE_DEPS= | |
9006 | READLINE_CFLAGS= | |
39037522 | 9007 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9008 | else |
9009 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9010 | READLINE_DEPS='$(READLINE)' | |
9011 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9012 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9013 | fi |
9014 | ||
9015 | ||
9016 | ||
9017 | ||
9018 | ||
f997c383 SD |
9019 | # Generate jit-reader.h |
9020 | ||
9021 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9022 | TARGET_PTR= | |
9023 | ||
9024 | # The cast to long int works around a bug in the HP C Compiler | |
9025 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9026 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9027 | # This bug is HP SR number 8606223364. | |
9028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
9029 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
d0ac1c44 | 9030 | if ${ac_cv_sizeof_unsigned_long_long+:} false; then : |
f997c383 SD |
9031 | $as_echo_n "(cached) " >&6 |
9032 | else | |
9033 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9034 | ||
9035 | else | |
9036 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
9037 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9038 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9039 | as_fn_error 77 "cannot compute sizeof (unsigned long long) |
9040 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9041 | else |
9042 | ac_cv_sizeof_unsigned_long_long=0 | |
9043 | fi | |
9044 | fi | |
9045 | ||
9046 | fi | |
9047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9048 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9049 | ||
9050 | ||
9051 | ||
9052 | cat >>confdefs.h <<_ACEOF | |
9053 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9054 | _ACEOF | |
9055 | ||
9056 | ||
9057 | # The cast to long int works around a bug in the HP C Compiler | |
9058 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9059 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9060 | # This bug is HP SR number 8606223364. | |
9061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9062 | $as_echo_n "checking size of unsigned long... " >&6; } | |
d0ac1c44 | 9063 | if ${ac_cv_sizeof_unsigned_long+:} false; then : |
f997c383 SD |
9064 | $as_echo_n "(cached) " >&6 |
9065 | else | |
9066 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9067 | ||
9068 | else | |
9069 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9070 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9071 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9072 | as_fn_error 77 "cannot compute sizeof (unsigned long) |
9073 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9074 | else |
9075 | ac_cv_sizeof_unsigned_long=0 | |
9076 | fi | |
9077 | fi | |
9078 | ||
9079 | fi | |
9080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9081 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9082 | ||
9083 | ||
9084 | ||
9085 | cat >>confdefs.h <<_ACEOF | |
9086 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9087 | _ACEOF | |
9088 | ||
9089 | ||
9090 | # The cast to long int works around a bug in the HP C Compiler | |
9091 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9092 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9093 | # This bug is HP SR number 8606223364. | |
9094 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9095 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
d0ac1c44 | 9096 | if ${ac_cv_sizeof_unsigned___int128+:} false; then : |
f997c383 SD |
9097 | $as_echo_n "(cached) " >&6 |
9098 | else | |
9099 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9100 | ||
9101 | else | |
9102 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9103 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9104 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9105 | as_fn_error 77 "cannot compute sizeof (unsigned __int128) |
9106 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9107 | else |
9108 | ac_cv_sizeof_unsigned___int128=0 | |
9109 | fi | |
9110 | fi | |
9111 | ||
9112 | fi | |
9113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9114 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9115 | ||
9116 | ||
9117 | ||
9118 | cat >>confdefs.h <<_ACEOF | |
9119 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9120 | _ACEOF | |
9121 | ||
9122 | ||
9123 | ||
9124 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9125 | TARGET_PTR="unsigned long" | |
9126 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9127 | TARGET_PTR="unsigned long long" | |
9128 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9129 | TARGET_PTR="unsigned __int128" | |
9130 | else | |
9131 | TARGET_PTR="unsigned long" | |
9132 | fi | |
9133 | ||
9134 | ||
9135 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9136 | ||
9137 | ||
a2d08b9e SD |
9138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9139 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 9140 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9141 | $as_echo_n "(cached) " >&6 |
9142 | else | |
9143 | ac_func_search_save_LIBS=$LIBS | |
9144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9145 | /* end confdefs.h. */ | |
9146 | ||
9147 | /* Override any GCC internal prototype to avoid an error. | |
9148 | Use char because int might match the return type of a GCC | |
9149 | builtin and then its argument prototype would still apply. */ | |
9150 | #ifdef __cplusplus | |
9151 | extern "C" | |
9152 | #endif | |
9153 | char dlopen (); | |
9154 | int | |
9155 | main () | |
9156 | { | |
9157 | return dlopen (); | |
9158 | ; | |
9159 | return 0; | |
9160 | } | |
9161 | _ACEOF | |
9162 | for ac_lib in '' dl; do | |
9163 | if test -z "$ac_lib"; then | |
9164 | ac_res="none required" | |
9165 | else | |
9166 | ac_res=-l$ac_lib | |
9167 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9168 | fi | |
9169 | if ac_fn_c_try_link "$LINENO"; then : | |
9170 | ac_cv_search_dlopen=$ac_res | |
9171 | fi | |
9172 | rm -f core conftest.err conftest.$ac_objext \ | |
9173 | conftest$ac_exeext | |
d0ac1c44 | 9174 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9175 | break |
9176 | fi | |
9177 | done | |
d0ac1c44 | 9178 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9179 | |
9180 | else | |
9181 | ac_cv_search_dlopen=no | |
9182 | fi | |
9183 | rm conftest.$ac_ext | |
9184 | LIBS=$ac_func_search_save_LIBS | |
9185 | fi | |
9186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9187 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9188 | ac_res=$ac_cv_search_dlopen | |
9189 | if test "$ac_res" != no; then : | |
9190 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9191 | ||
9192 | fi | |
9193 | ||
9194 | ||
39037522 | 9195 | |
b8e0a31c SD |
9196 | |
9197 | # Check whether --with-jit-reader-dir was given. | |
9198 | if test "${with_jit_reader_dir+set}" = set; then : | |
9199 | withval=$with_jit_reader_dir; | |
9200 | JIT_READER_DIR=$withval | |
9201 | else | |
9202 | JIT_READER_DIR=${libdir}/gdb | |
9203 | fi | |
9204 | ||
9205 | ||
9206 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9207 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9208 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9209 | ac_define_dir=`eval echo $ac_define_dir` | |
9210 | ||
9211 | cat >>confdefs.h <<_ACEOF | |
9212 | #define JIT_READER_DIR "$ac_define_dir" | |
9213 | _ACEOF | |
9214 | ||
9215 | ||
9216 | ||
9217 | ||
9218 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9219 | if test "x$prefix" = xNONE; then | |
9220 | test_prefix=/usr/local | |
9221 | else | |
9222 | test_prefix=$prefix | |
9223 | fi | |
9224 | else | |
9225 | test_prefix=$exec_prefix | |
9226 | fi | |
9227 | value=0 | |
9228 | case ${ac_define_dir} in | |
9229 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9230 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9231 | value=1 | |
9232 | ;; | |
9233 | esac | |
9234 | ||
9235 | cat >>confdefs.h <<_ACEOF | |
9236 | #define JIT_READER_DIR_RELOCATABLE $value | |
9237 | _ACEOF | |
9238 | ||
9239 | ||
9240 | ||
9241 | ||
9242 | ||
81ecdfbb RW |
9243 | # Check whether --with-expat was given. |
9244 | if test "${with_expat+set}" = set; then : | |
9245 | withval=$with_expat; | |
5c39566f DJ |
9246 | else |
9247 | with_expat=auto | |
81ecdfbb RW |
9248 | fi |
9249 | ||
9250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9251 | $as_echo_n "checking whether to use expat... " >&6; } | |
9252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9253 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9254 | |
9255 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9256 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9257 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9258 | HAVE_LIBEXPAT=no |
9259 | else | |
9260 | ||
3841debe DJ |
9261 | |
9262 | ||
9263 | ||
9264 | ||
9265 | ||
9266 | ||
9267 | ||
9268 | use_additional=yes | |
9269 | ||
9270 | acl_save_prefix="$prefix" | |
9271 | prefix="$acl_final_prefix" | |
9272 | acl_save_exec_prefix="$exec_prefix" | |
9273 | exec_prefix="$acl_final_exec_prefix" | |
9274 | ||
9275 | eval additional_includedir=\"$includedir\" | |
9276 | eval additional_libdir=\"$libdir\" | |
9277 | ||
9278 | exec_prefix="$acl_save_exec_prefix" | |
9279 | prefix="$acl_save_prefix" | |
9280 | ||
9281 | ||
81ecdfbb RW |
9282 | # Check whether --with-libexpat-prefix was given. |
9283 | if test "${with_libexpat_prefix+set}" = set; then : | |
9284 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9285 | if test "X$withval" = "Xno"; then |
9286 | use_additional=no | |
9287 | else | |
9288 | if test "X$withval" = "X"; then | |
9289 | ||
9290 | acl_save_prefix="$prefix" | |
9291 | prefix="$acl_final_prefix" | |
9292 | acl_save_exec_prefix="$exec_prefix" | |
9293 | exec_prefix="$acl_final_exec_prefix" | |
9294 | ||
9295 | eval additional_includedir=\"$includedir\" | |
9296 | eval additional_libdir=\"$libdir\" | |
9297 | ||
9298 | exec_prefix="$acl_save_exec_prefix" | |
9299 | prefix="$acl_save_prefix" | |
9300 | ||
9301 | else | |
9302 | additional_includedir="$withval/include" | |
9303 | additional_libdir="$withval/lib" | |
9304 | fi | |
9305 | fi | |
9306 | ||
81ecdfbb RW |
9307 | fi |
9308 | ||
3841debe DJ |
9309 | LIBEXPAT= |
9310 | LTLIBEXPAT= | |
9311 | INCEXPAT= | |
9312 | rpathdirs= | |
9313 | ltrpathdirs= | |
9314 | names_already_handled= | |
9315 | names_next_round='expat ' | |
9316 | while test -n "$names_next_round"; do | |
9317 | names_this_round="$names_next_round" | |
9318 | names_next_round= | |
9319 | for name in $names_this_round; do | |
9320 | already_handled= | |
9321 | for n in $names_already_handled; do | |
9322 | if test "$n" = "$name"; then | |
9323 | already_handled=yes | |
9324 | break | |
9325 | fi | |
9326 | done | |
9327 | if test -z "$already_handled"; then | |
9328 | names_already_handled="$names_already_handled $name" | |
9329 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9330 | eval value=\"\$HAVE_LIB$uppername\" | |
9331 | if test -n "$value"; then | |
9332 | if test "$value" = yes; then | |
9333 | eval value=\"\$LIB$uppername\" | |
9334 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9335 | eval value=\"\$LTLIB$uppername\" | |
9336 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9337 | else | |
9338 | : | |
9339 | fi | |
9340 | else | |
9341 | found_dir= | |
9342 | found_la= | |
9343 | found_so= | |
9344 | found_a= | |
9345 | if test $use_additional = yes; then | |
9346 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9347 | found_dir="$additional_libdir" | |
9348 | found_so="$additional_libdir/lib$name.$shlibext" | |
9349 | if test -f "$additional_libdir/lib$name.la"; then | |
9350 | found_la="$additional_libdir/lib$name.la" | |
9351 | fi | |
9352 | else | |
9353 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9354 | found_dir="$additional_libdir" | |
9355 | found_a="$additional_libdir/lib$name.$libext" | |
9356 | if test -f "$additional_libdir/lib$name.la"; then | |
9357 | found_la="$additional_libdir/lib$name.la" | |
9358 | fi | |
9359 | fi | |
9360 | fi | |
9361 | fi | |
9362 | if test "X$found_dir" = "X"; then | |
9363 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9364 | ||
9365 | acl_save_prefix="$prefix" | |
9366 | prefix="$acl_final_prefix" | |
9367 | acl_save_exec_prefix="$exec_prefix" | |
9368 | exec_prefix="$acl_final_exec_prefix" | |
9369 | eval x=\"$x\" | |
9370 | exec_prefix="$acl_save_exec_prefix" | |
9371 | prefix="$acl_save_prefix" | |
9372 | ||
9373 | case "$x" in | |
9374 | -L*) | |
9375 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9376 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9377 | found_dir="$dir" | |
9378 | found_so="$dir/lib$name.$shlibext" | |
9379 | if test -f "$dir/lib$name.la"; then | |
9380 | found_la="$dir/lib$name.la" | |
9381 | fi | |
9382 | else | |
9383 | if test -f "$dir/lib$name.$libext"; then | |
9384 | found_dir="$dir" | |
9385 | found_a="$dir/lib$name.$libext" | |
9386 | if test -f "$dir/lib$name.la"; then | |
9387 | found_la="$dir/lib$name.la" | |
9388 | fi | |
9389 | fi | |
9390 | fi | |
9391 | ;; | |
9392 | esac | |
9393 | if test "X$found_dir" != "X"; then | |
9394 | break | |
9395 | fi | |
9396 | done | |
9397 | fi | |
9398 | if test "X$found_dir" != "X"; then | |
9399 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9400 | if test "X$found_so" != "X"; then | |
9401 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9402 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9403 | else | |
9404 | haveit= | |
9405 | for x in $ltrpathdirs; do | |
9406 | if test "X$x" = "X$found_dir"; then | |
9407 | haveit=yes | |
9408 | break | |
9409 | fi | |
9410 | done | |
9411 | if test -z "$haveit"; then | |
9412 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9413 | fi | |
9414 | if test "$hardcode_direct" = yes; then | |
9415 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9416 | else | |
9417 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9418 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9419 | haveit= | |
9420 | for x in $rpathdirs; do | |
9421 | if test "X$x" = "X$found_dir"; then | |
9422 | haveit=yes | |
9423 | break | |
9424 | fi | |
9425 | done | |
9426 | if test -z "$haveit"; then | |
9427 | rpathdirs="$rpathdirs $found_dir" | |
9428 | fi | |
9429 | else | |
9430 | haveit= | |
9431 | for x in $LDFLAGS $LIBEXPAT; do | |
9432 | ||
9433 | acl_save_prefix="$prefix" | |
9434 | prefix="$acl_final_prefix" | |
9435 | acl_save_exec_prefix="$exec_prefix" | |
9436 | exec_prefix="$acl_final_exec_prefix" | |
9437 | eval x=\"$x\" | |
9438 | exec_prefix="$acl_save_exec_prefix" | |
9439 | prefix="$acl_save_prefix" | |
9440 | ||
9441 | if test "X$x" = "X-L$found_dir"; then | |
9442 | haveit=yes | |
9443 | break | |
9444 | fi | |
9445 | done | |
9446 | if test -z "$haveit"; then | |
9447 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9448 | fi | |
9449 | if test "$hardcode_minus_L" != no; then | |
9450 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9451 | else | |
9452 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9453 | fi | |
9454 | fi | |
9455 | fi | |
9456 | fi | |
9457 | else | |
9458 | if test "X$found_a" != "X"; then | |
9459 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9460 | else | |
9461 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9462 | fi | |
9463 | fi | |
9464 | additional_includedir= | |
9465 | case "$found_dir" in | |
9466 | */lib | */lib/) | |
9467 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9468 | additional_includedir="$basedir/include" | |
9469 | ;; | |
9470 | esac | |
9471 | if test "X$additional_includedir" != "X"; then | |
9472 | if test "X$additional_includedir" != "X/usr/include"; then | |
9473 | haveit= | |
9474 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9475 | if test -n "$GCC"; then | |
9476 | case $host_os in | |
9477 | linux*) haveit=yes;; | |
9478 | esac | |
9479 | fi | |
9480 | fi | |
9481 | if test -z "$haveit"; then | |
9482 | for x in $CPPFLAGS $INCEXPAT; do | |
9483 | ||
9484 | acl_save_prefix="$prefix" | |
9485 | prefix="$acl_final_prefix" | |
9486 | acl_save_exec_prefix="$exec_prefix" | |
9487 | exec_prefix="$acl_final_exec_prefix" | |
9488 | eval x=\"$x\" | |
9489 | exec_prefix="$acl_save_exec_prefix" | |
9490 | prefix="$acl_save_prefix" | |
9491 | ||
9492 | if test "X$x" = "X-I$additional_includedir"; then | |
9493 | haveit=yes | |
9494 | break | |
9495 | fi | |
9496 | done | |
9497 | if test -z "$haveit"; then | |
9498 | if test -d "$additional_includedir"; then | |
9499 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9500 | fi | |
9501 | fi | |
9502 | fi | |
9503 | fi | |
9504 | fi | |
9505 | if test -n "$found_la"; then | |
9506 | save_libdir="$libdir" | |
9507 | case "$found_la" in | |
9508 | */* | *\\*) . "$found_la" ;; | |
9509 | *) . "./$found_la" ;; | |
9510 | esac | |
9511 | libdir="$save_libdir" | |
9512 | for dep in $dependency_libs; do | |
9513 | case "$dep" in | |
9514 | -L*) | |
9515 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9516 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9517 | haveit= | |
9518 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9519 | if test -n "$GCC"; then | |
9520 | case $host_os in | |
9521 | linux*) haveit=yes;; | |
9522 | esac | |
9523 | fi | |
9524 | fi | |
9525 | if test -z "$haveit"; then | |
9526 | haveit= | |
9527 | for x in $LDFLAGS $LIBEXPAT; do | |
9528 | ||
9529 | acl_save_prefix="$prefix" | |
9530 | prefix="$acl_final_prefix" | |
9531 | acl_save_exec_prefix="$exec_prefix" | |
9532 | exec_prefix="$acl_final_exec_prefix" | |
9533 | eval x=\"$x\" | |
9534 | exec_prefix="$acl_save_exec_prefix" | |
9535 | prefix="$acl_save_prefix" | |
9536 | ||
9537 | if test "X$x" = "X-L$additional_libdir"; then | |
9538 | haveit=yes | |
9539 | break | |
9540 | fi | |
9541 | done | |
9542 | if test -z "$haveit"; then | |
9543 | if test -d "$additional_libdir"; then | |
9544 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9545 | fi | |
9546 | fi | |
9547 | haveit= | |
9548 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9549 | ||
9550 | acl_save_prefix="$prefix" | |
9551 | prefix="$acl_final_prefix" | |
9552 | acl_save_exec_prefix="$exec_prefix" | |
9553 | exec_prefix="$acl_final_exec_prefix" | |
9554 | eval x=\"$x\" | |
9555 | exec_prefix="$acl_save_exec_prefix" | |
9556 | prefix="$acl_save_prefix" | |
9557 | ||
9558 | if test "X$x" = "X-L$additional_libdir"; then | |
9559 | haveit=yes | |
9560 | break | |
9561 | fi | |
9562 | done | |
9563 | if test -z "$haveit"; then | |
9564 | if test -d "$additional_libdir"; then | |
9565 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9566 | fi | |
9567 | fi | |
9568 | fi | |
9569 | fi | |
9570 | ;; | |
9571 | -R*) | |
9572 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9573 | if test "$enable_rpath" != no; then | |
9574 | haveit= | |
9575 | for x in $rpathdirs; do | |
9576 | if test "X$x" = "X$dir"; then | |
9577 | haveit=yes | |
9578 | break | |
9579 | fi | |
9580 | done | |
9581 | if test -z "$haveit"; then | |
9582 | rpathdirs="$rpathdirs $dir" | |
9583 | fi | |
9584 | haveit= | |
9585 | for x in $ltrpathdirs; do | |
9586 | if test "X$x" = "X$dir"; then | |
9587 | haveit=yes | |
9588 | break | |
9589 | fi | |
9590 | done | |
9591 | if test -z "$haveit"; then | |
9592 | ltrpathdirs="$ltrpathdirs $dir" | |
9593 | fi | |
9594 | fi | |
9595 | ;; | |
9596 | -l*) | |
9597 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9598 | ;; | |
9599 | *.la) | |
9600 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9601 | ;; | |
9602 | *) | |
9603 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9604 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9605 | ;; | |
81ecdfbb RW |
9606 | esac |
9607 | done | |
9608 | fi | |
9609 | else | |
9610 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9611 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9612 | fi | |
9613 | fi | |
9614 | fi | |
9615 | done | |
9616 | done | |
9617 | if test "X$rpathdirs" != "X"; then | |
9618 | if test -n "$hardcode_libdir_separator"; then | |
9619 | alldirs= | |
9620 | for found_dir in $rpathdirs; do | |
9621 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9622 | done | |
9623 | acl_save_libdir="$libdir" | |
9624 | libdir="$alldirs" | |
9625 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9626 | libdir="$acl_save_libdir" | |
9627 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9628 | else | |
9629 | for found_dir in $rpathdirs; do | |
9630 | acl_save_libdir="$libdir" | |
9631 | libdir="$found_dir" | |
9632 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9633 | libdir="$acl_save_libdir" | |
9634 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9635 | done | |
9636 | fi | |
9637 | fi | |
9638 | if test "X$ltrpathdirs" != "X"; then | |
9639 | for found_dir in $ltrpathdirs; do | |
9640 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9641 | done | |
9642 | fi | |
a9322a30 TT |
9643 | |
9644 | ||
81ecdfbb | 9645 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9646 | |
81ecdfbb RW |
9647 | for element in $INCEXPAT; do |
9648 | haveit= | |
9649 | for x in $CPPFLAGS; do | |
a9322a30 | 9650 | |
81ecdfbb RW |
9651 | acl_save_prefix="$prefix" |
9652 | prefix="$acl_final_prefix" | |
9653 | acl_save_exec_prefix="$exec_prefix" | |
9654 | exec_prefix="$acl_final_exec_prefix" | |
9655 | eval x=\"$x\" | |
9656 | exec_prefix="$acl_save_exec_prefix" | |
9657 | prefix="$acl_save_prefix" | |
a8111142 | 9658 | |
81ecdfbb RW |
9659 | if test "X$x" = "X$element"; then |
9660 | haveit=yes | |
9661 | break | |
9662 | fi | |
9663 | done | |
9664 | if test -z "$haveit"; then | |
9665 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9666 | fi | |
9667 | done | |
a9322a30 TT |
9668 | |
9669 | ||
81ecdfbb RW |
9670 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9671 | $as_echo_n "checking for libexpat... " >&6; } | |
d0ac1c44 | 9672 | if ${ac_cv_libexpat+:} false; then : |
81ecdfbb | 9673 | $as_echo_n "(cached) " >&6 |
bec39cab | 9674 | else |
bec39cab | 9675 | |
81ecdfbb RW |
9676 | ac_save_LIBS="$LIBS" |
9677 | LIBS="$LIBS $LIBEXPAT" | |
9678 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9679 | /* end confdefs.h. */ |
81ecdfbb RW |
9680 | #include "expat.h" |
9681 | int | |
9682 | main () | |
9683 | { | |
9684 | XML_Parser p = XML_ParserCreate (0); | |
9685 | ; | |
9686 | return 0; | |
9687 | } | |
bec39cab | 9688 | _ACEOF |
81ecdfbb RW |
9689 | if ac_fn_c_try_link "$LINENO"; then : |
9690 | ac_cv_libexpat=yes | |
c906108c | 9691 | else |
81ecdfbb | 9692 | ac_cv_libexpat=no |
bec39cab | 9693 | fi |
81ecdfbb RW |
9694 | rm -f core conftest.err conftest.$ac_objext \ |
9695 | conftest$ac_exeext conftest.$ac_ext | |
9696 | LIBS="$ac_save_LIBS" | |
c906108c | 9697 | |
95ca63c4 | 9698 | fi |
81ecdfbb RW |
9699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9700 | $as_echo "$ac_cv_libexpat" >&6; } | |
9701 | if test "$ac_cv_libexpat" = yes; then | |
9702 | HAVE_LIBEXPAT=yes | |
bec39cab | 9703 | |
81ecdfbb | 9704 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9705 | |
81ecdfbb RW |
9706 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9707 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
9709 | $as_echo "$LIBEXPAT" >&6; } | |
9710 | else | |
9711 | HAVE_LIBEXPAT=no | |
9712 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9713 | LIBEXPAT= | |
9714 | LTLIBEXPAT= | |
9715 | fi | |
95ca63c4 CF |
9716 | |
9717 | ||
9718 | ||
7cb9022a MK |
9719 | |
9720 | ||
bec39cab | 9721 | |
81ecdfbb RW |
9722 | if test "$HAVE_LIBEXPAT" != yes; then |
9723 | if test "$with_expat" = yes; then | |
d0ac1c44 | 9724 | as_fn_error $? "expat is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
9725 | else |
9726 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
9727 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
9728 | fi | |
9729 | else | |
9730 | save_LIBS=$LIBS | |
9731 | LIBS="$LIBS $LIBEXPAT" | |
9732 | for ac_func in XML_StopParser | |
9733 | do : | |
9734 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
d0ac1c44 | 9735 | if test "x$ac_cv_func_XML_StopParser" = xyes; then : |
bec39cab | 9736 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9737 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 9738 | _ACEOF |
95ca63c4 | 9739 | |
bec39cab | 9740 | fi |
bec39cab | 9741 | done |
95ca63c4 | 9742 | |
81ecdfbb RW |
9743 | LIBS=$save_LIBS |
9744 | fi | |
a9322a30 TT |
9745 | fi |
9746 | ||
2400729e UW |
9747 | |
9748 | # Check whether --with-mpfr was given. | |
9749 | if test "${with_mpfr+set}" = set; then : | |
9750 | withval=$with_mpfr; | |
9751 | else | |
9752 | with_mpfr=auto | |
9753 | fi | |
9754 | ||
9755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
9756 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
9757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
9758 | $as_echo "$with_mpfr" >&6; } | |
9759 | ||
9760 | if test "${with_mpfr}" = no; then | |
9761 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
9762 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
9763 | HAVE_LIBMPFR=no | |
9764 | else | |
9765 | ||
9766 | ||
9767 | ||
9768 | ||
9769 | ||
9770 | ||
9771 | ||
9772 | ||
9773 | use_additional=yes | |
9774 | ||
9775 | acl_save_prefix="$prefix" | |
9776 | prefix="$acl_final_prefix" | |
9777 | acl_save_exec_prefix="$exec_prefix" | |
9778 | exec_prefix="$acl_final_exec_prefix" | |
9779 | ||
9780 | eval additional_includedir=\"$includedir\" | |
9781 | eval additional_libdir=\"$libdir\" | |
9782 | ||
9783 | exec_prefix="$acl_save_exec_prefix" | |
9784 | prefix="$acl_save_prefix" | |
9785 | ||
9786 | ||
9787 | # Check whether --with-libmpfr-prefix was given. | |
9788 | if test "${with_libmpfr_prefix+set}" = set; then : | |
9789 | withval=$with_libmpfr_prefix; | |
9790 | if test "X$withval" = "Xno"; then | |
9791 | use_additional=no | |
9792 | else | |
9793 | if test "X$withval" = "X"; then | |
9794 | ||
9795 | acl_save_prefix="$prefix" | |
9796 | prefix="$acl_final_prefix" | |
9797 | acl_save_exec_prefix="$exec_prefix" | |
9798 | exec_prefix="$acl_final_exec_prefix" | |
9799 | ||
9800 | eval additional_includedir=\"$includedir\" | |
9801 | eval additional_libdir=\"$libdir\" | |
9802 | ||
9803 | exec_prefix="$acl_save_exec_prefix" | |
9804 | prefix="$acl_save_prefix" | |
9805 | ||
9806 | else | |
9807 | additional_includedir="$withval/include" | |
9808 | additional_libdir="$withval/lib" | |
9809 | fi | |
9810 | fi | |
9811 | ||
9812 | fi | |
9813 | ||
9814 | LIBMPFR= | |
9815 | LTLIBMPFR= | |
9816 | INCMPFR= | |
9817 | rpathdirs= | |
9818 | ltrpathdirs= | |
9819 | names_already_handled= | |
da658607 | 9820 | names_next_round='mpfr gmp' |
2400729e UW |
9821 | while test -n "$names_next_round"; do |
9822 | names_this_round="$names_next_round" | |
9823 | names_next_round= | |
9824 | for name in $names_this_round; do | |
9825 | already_handled= | |
9826 | for n in $names_already_handled; do | |
9827 | if test "$n" = "$name"; then | |
9828 | already_handled=yes | |
9829 | break | |
9830 | fi | |
9831 | done | |
9832 | if test -z "$already_handled"; then | |
9833 | names_already_handled="$names_already_handled $name" | |
9834 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9835 | eval value=\"\$HAVE_LIB$uppername\" | |
9836 | if test -n "$value"; then | |
9837 | if test "$value" = yes; then | |
9838 | eval value=\"\$LIB$uppername\" | |
9839 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
9840 | eval value=\"\$LTLIB$uppername\" | |
9841 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
9842 | else | |
9843 | : | |
9844 | fi | |
9845 | else | |
9846 | found_dir= | |
9847 | found_la= | |
9848 | found_so= | |
9849 | found_a= | |
9850 | if test $use_additional = yes; then | |
9851 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
9852 | found_dir="$additional_libdir" | |
9853 | found_so="$additional_libdir/lib$name.$shlibext" | |
9854 | if test -f "$additional_libdir/lib$name.la"; then | |
9855 | found_la="$additional_libdir/lib$name.la" | |
9856 | fi | |
9857 | else | |
9858 | if test -f "$additional_libdir/lib$name.$libext"; then | |
9859 | found_dir="$additional_libdir" | |
9860 | found_a="$additional_libdir/lib$name.$libext" | |
9861 | if test -f "$additional_libdir/lib$name.la"; then | |
9862 | found_la="$additional_libdir/lib$name.la" | |
9863 | fi | |
9864 | fi | |
9865 | fi | |
9866 | fi | |
9867 | if test "X$found_dir" = "X"; then | |
9868 | for x in $LDFLAGS $LTLIBMPFR; do | |
9869 | ||
9870 | acl_save_prefix="$prefix" | |
9871 | prefix="$acl_final_prefix" | |
9872 | acl_save_exec_prefix="$exec_prefix" | |
9873 | exec_prefix="$acl_final_exec_prefix" | |
9874 | eval x=\"$x\" | |
9875 | exec_prefix="$acl_save_exec_prefix" | |
9876 | prefix="$acl_save_prefix" | |
9877 | ||
9878 | case "$x" in | |
9879 | -L*) | |
9880 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9881 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
9882 | found_dir="$dir" | |
9883 | found_so="$dir/lib$name.$shlibext" | |
9884 | if test -f "$dir/lib$name.la"; then | |
9885 | found_la="$dir/lib$name.la" | |
9886 | fi | |
9887 | else | |
9888 | if test -f "$dir/lib$name.$libext"; then | |
9889 | found_dir="$dir" | |
9890 | found_a="$dir/lib$name.$libext" | |
9891 | if test -f "$dir/lib$name.la"; then | |
9892 | found_la="$dir/lib$name.la" | |
9893 | fi | |
9894 | fi | |
9895 | fi | |
9896 | ;; | |
9897 | esac | |
9898 | if test "X$found_dir" != "X"; then | |
9899 | break | |
9900 | fi | |
9901 | done | |
9902 | fi | |
9903 | if test "X$found_dir" != "X"; then | |
9904 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
9905 | if test "X$found_so" != "X"; then | |
9906 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9907 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9908 | else | |
9909 | haveit= | |
9910 | for x in $ltrpathdirs; do | |
9911 | if test "X$x" = "X$found_dir"; then | |
9912 | haveit=yes | |
9913 | break | |
9914 | fi | |
9915 | done | |
9916 | if test -z "$haveit"; then | |
9917 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9918 | fi | |
9919 | if test "$hardcode_direct" = yes; then | |
9920 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9921 | else | |
9922 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9923 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9924 | haveit= | |
9925 | for x in $rpathdirs; do | |
9926 | if test "X$x" = "X$found_dir"; then | |
9927 | haveit=yes | |
9928 | break | |
9929 | fi | |
9930 | done | |
9931 | if test -z "$haveit"; then | |
9932 | rpathdirs="$rpathdirs $found_dir" | |
9933 | fi | |
9934 | else | |
9935 | haveit= | |
9936 | for x in $LDFLAGS $LIBMPFR; do | |
9937 | ||
9938 | acl_save_prefix="$prefix" | |
9939 | prefix="$acl_final_prefix" | |
9940 | acl_save_exec_prefix="$exec_prefix" | |
9941 | exec_prefix="$acl_final_exec_prefix" | |
9942 | eval x=\"$x\" | |
9943 | exec_prefix="$acl_save_exec_prefix" | |
9944 | prefix="$acl_save_prefix" | |
9945 | ||
9946 | if test "X$x" = "X-L$found_dir"; then | |
9947 | haveit=yes | |
9948 | break | |
9949 | fi | |
9950 | done | |
9951 | if test -z "$haveit"; then | |
9952 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
9953 | fi | |
9954 | if test "$hardcode_minus_L" != no; then | |
9955 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
9956 | else | |
9957 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
9958 | fi | |
9959 | fi | |
9960 | fi | |
9961 | fi | |
9962 | else | |
9963 | if test "X$found_a" != "X"; then | |
9964 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
9965 | else | |
9966 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
9967 | fi | |
9968 | fi | |
9969 | additional_includedir= | |
9970 | case "$found_dir" in | |
9971 | */lib | */lib/) | |
9972 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9973 | additional_includedir="$basedir/include" | |
9974 | ;; | |
9975 | esac | |
9976 | if test "X$additional_includedir" != "X"; then | |
9977 | if test "X$additional_includedir" != "X/usr/include"; then | |
9978 | haveit= | |
9979 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9980 | if test -n "$GCC"; then | |
9981 | case $host_os in | |
9982 | linux*) haveit=yes;; | |
9983 | esac | |
9984 | fi | |
9985 | fi | |
9986 | if test -z "$haveit"; then | |
9987 | for x in $CPPFLAGS $INCMPFR; do | |
9988 | ||
9989 | acl_save_prefix="$prefix" | |
9990 | prefix="$acl_final_prefix" | |
9991 | acl_save_exec_prefix="$exec_prefix" | |
9992 | exec_prefix="$acl_final_exec_prefix" | |
9993 | eval x=\"$x\" | |
9994 | exec_prefix="$acl_save_exec_prefix" | |
9995 | prefix="$acl_save_prefix" | |
9996 | ||
9997 | if test "X$x" = "X-I$additional_includedir"; then | |
9998 | haveit=yes | |
9999 | break | |
10000 | fi | |
10001 | done | |
10002 | if test -z "$haveit"; then | |
10003 | if test -d "$additional_includedir"; then | |
10004 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
10005 | fi | |
10006 | fi | |
10007 | fi | |
10008 | fi | |
10009 | fi | |
10010 | if test -n "$found_la"; then | |
10011 | save_libdir="$libdir" | |
10012 | case "$found_la" in | |
10013 | */* | *\\*) . "$found_la" ;; | |
10014 | *) . "./$found_la" ;; | |
10015 | esac | |
10016 | libdir="$save_libdir" | |
10017 | for dep in $dependency_libs; do | |
10018 | case "$dep" in | |
10019 | -L*) | |
10020 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10021 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10022 | haveit= | |
10023 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10024 | if test -n "$GCC"; then | |
10025 | case $host_os in | |
10026 | linux*) haveit=yes;; | |
10027 | esac | |
10028 | fi | |
10029 | fi | |
10030 | if test -z "$haveit"; then | |
10031 | haveit= | |
10032 | for x in $LDFLAGS $LIBMPFR; do | |
10033 | ||
10034 | acl_save_prefix="$prefix" | |
10035 | prefix="$acl_final_prefix" | |
10036 | acl_save_exec_prefix="$exec_prefix" | |
10037 | exec_prefix="$acl_final_exec_prefix" | |
10038 | eval x=\"$x\" | |
10039 | exec_prefix="$acl_save_exec_prefix" | |
10040 | prefix="$acl_save_prefix" | |
10041 | ||
10042 | if test "X$x" = "X-L$additional_libdir"; then | |
10043 | haveit=yes | |
10044 | break | |
10045 | fi | |
10046 | done | |
10047 | if test -z "$haveit"; then | |
10048 | if test -d "$additional_libdir"; then | |
10049 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
10050 | fi | |
10051 | fi | |
10052 | haveit= | |
10053 | for x in $LDFLAGS $LTLIBMPFR; do | |
10054 | ||
10055 | acl_save_prefix="$prefix" | |
10056 | prefix="$acl_final_prefix" | |
10057 | acl_save_exec_prefix="$exec_prefix" | |
10058 | exec_prefix="$acl_final_exec_prefix" | |
10059 | eval x=\"$x\" | |
10060 | exec_prefix="$acl_save_exec_prefix" | |
10061 | prefix="$acl_save_prefix" | |
10062 | ||
10063 | if test "X$x" = "X-L$additional_libdir"; then | |
10064 | haveit=yes | |
10065 | break | |
10066 | fi | |
10067 | done | |
10068 | if test -z "$haveit"; then | |
10069 | if test -d "$additional_libdir"; then | |
10070 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
10071 | fi | |
10072 | fi | |
10073 | fi | |
10074 | fi | |
10075 | ;; | |
10076 | -R*) | |
10077 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10078 | if test "$enable_rpath" != no; then | |
10079 | haveit= | |
10080 | for x in $rpathdirs; do | |
10081 | if test "X$x" = "X$dir"; then | |
10082 | haveit=yes | |
10083 | break | |
10084 | fi | |
10085 | done | |
10086 | if test -z "$haveit"; then | |
10087 | rpathdirs="$rpathdirs $dir" | |
10088 | fi | |
10089 | haveit= | |
10090 | for x in $ltrpathdirs; do | |
10091 | if test "X$x" = "X$dir"; then | |
10092 | haveit=yes | |
10093 | break | |
10094 | fi | |
10095 | done | |
10096 | if test -z "$haveit"; then | |
10097 | ltrpathdirs="$ltrpathdirs $dir" | |
10098 | fi | |
10099 | fi | |
10100 | ;; | |
10101 | -l*) | |
10102 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10103 | ;; | |
10104 | *.la) | |
10105 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10106 | ;; | |
10107 | *) | |
10108 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10109 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10110 | ;; | |
10111 | esac | |
10112 | done | |
10113 | fi | |
10114 | else | |
10115 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10116 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10117 | fi | |
10118 | fi | |
10119 | fi | |
10120 | done | |
10121 | done | |
10122 | if test "X$rpathdirs" != "X"; then | |
10123 | if test -n "$hardcode_libdir_separator"; then | |
10124 | alldirs= | |
10125 | for found_dir in $rpathdirs; do | |
10126 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10127 | done | |
10128 | acl_save_libdir="$libdir" | |
10129 | libdir="$alldirs" | |
10130 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10131 | libdir="$acl_save_libdir" | |
10132 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10133 | else | |
10134 | for found_dir in $rpathdirs; do | |
10135 | acl_save_libdir="$libdir" | |
10136 | libdir="$found_dir" | |
10137 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10138 | libdir="$acl_save_libdir" | |
10139 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10140 | done | |
10141 | fi | |
10142 | fi | |
10143 | if test "X$ltrpathdirs" != "X"; then | |
10144 | for found_dir in $ltrpathdirs; do | |
10145 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10146 | done | |
10147 | fi | |
10148 | ||
10149 | ||
10150 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10151 | ||
10152 | for element in $INCMPFR; do | |
10153 | haveit= | |
10154 | for x in $CPPFLAGS; do | |
10155 | ||
10156 | acl_save_prefix="$prefix" | |
10157 | prefix="$acl_final_prefix" | |
10158 | acl_save_exec_prefix="$exec_prefix" | |
10159 | exec_prefix="$acl_final_exec_prefix" | |
10160 | eval x=\"$x\" | |
10161 | exec_prefix="$acl_save_exec_prefix" | |
10162 | prefix="$acl_save_prefix" | |
10163 | ||
10164 | if test "X$x" = "X$element"; then | |
10165 | haveit=yes | |
10166 | break | |
10167 | fi | |
10168 | done | |
10169 | if test -z "$haveit"; then | |
10170 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10171 | fi | |
10172 | done | |
10173 | ||
10174 | ||
10175 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10176 | $as_echo_n "checking for libmpfr... " >&6; } | |
d0ac1c44 | 10177 | if ${ac_cv_libmpfr+:} false; then : |
2400729e UW |
10178 | $as_echo_n "(cached) " >&6 |
10179 | else | |
10180 | ||
10181 | ac_save_LIBS="$LIBS" | |
10182 | LIBS="$LIBS $LIBMPFR" | |
10183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10184 | /* end confdefs.h. */ | |
10185 | #include <mpfr.h> | |
10186 | int | |
10187 | main () | |
10188 | { | |
10189 | mpfr_exp_t exp; mpfr_t x; | |
10190 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10191 | ; | |
10192 | return 0; | |
10193 | } | |
10194 | _ACEOF | |
10195 | if ac_fn_c_try_link "$LINENO"; then : | |
10196 | ac_cv_libmpfr=yes | |
10197 | else | |
10198 | ac_cv_libmpfr=no | |
10199 | fi | |
10200 | rm -f core conftest.err conftest.$ac_objext \ | |
10201 | conftest$ac_exeext conftest.$ac_ext | |
10202 | LIBS="$ac_save_LIBS" | |
10203 | ||
10204 | fi | |
10205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
10206 | $as_echo "$ac_cv_libmpfr" >&6; } | |
10207 | if test "$ac_cv_libmpfr" = yes; then | |
10208 | HAVE_LIBMPFR=yes | |
10209 | ||
10210 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
10211 | ||
10212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
10213 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
10214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
10215 | $as_echo "$LIBMPFR" >&6; } | |
10216 | else | |
10217 | HAVE_LIBMPFR=no | |
10218 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10219 | LIBMPFR= | |
10220 | LTLIBMPFR= | |
10221 | fi | |
10222 | ||
10223 | ||
10224 | ||
10225 | ||
10226 | ||
10227 | ||
10228 | if test "$HAVE_LIBMPFR" != yes; then | |
10229 | if test "$with_mpfr" = yes; then | |
d0ac1c44 | 10230 | as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 |
2400729e UW |
10231 | else |
10232 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
10233 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
10234 | fi | |
10235 | fi | |
10236 | fi | |
10237 | ||
d344e670 DE |
10238 | # --------------------- # |
10239 | # Check for libpython. # | |
10240 | # --------------------- # | |
10241 | ||
a9322a30 | 10242 | |
a9322a30 TT |
10243 | |
10244 | ||
ec685c5e | 10245 | |
0c4a4063 | 10246 | |
81ecdfbb RW |
10247 | # Check whether --with-python was given. |
10248 | if test "${with_python+set}" = set; then : | |
10249 | withval=$with_python; | |
bec39cab | 10250 | else |
81ecdfbb | 10251 | with_python=auto |
bec39cab | 10252 | fi |
bec39cab | 10253 | |
81ecdfbb RW |
10254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10255 | $as_echo_n "checking whether to use python... " >&6; } | |
10256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10257 | $as_echo "$with_python" >&6; } | |
9a156167 | 10258 | |
81ecdfbb RW |
10259 | if test "${with_python}" = no; then |
10260 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10261 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10262 | have_libpython=no | |
bec39cab | 10263 | else |
81ecdfbb | 10264 | case "${with_python}" in |
8c85a4e2 | 10265 | [\\/]* | ?:[\\/]*) |
0ad6b8ee | 10266 | if test -d "${with_python}"; then |
ec685c5e | 10267 | # Assume the python binary is ${with_python}/bin/python. |
ec685c5e | 10268 | python_prog="${with_python}/bin/python" |
0c4a4063 | 10269 | python_prefix= |
9c4ea6c5 JB |
10270 | # If python does not exit ${with_python}/bin, then try in |
10271 | # ${with_python}. On Windows/MinGW, this is where the Python | |
10272 | # executable is. | |
10273 | if test ! -x "${python_prog}"; then | |
10274 | python_prog="${with_python}/python" | |
10275 | python_prefix= | |
10276 | fi | |
e7a30f46 | 10277 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
10278 | # Fall back to gdb 7.0/7.1 behaviour. |
10279 | python_prog=missing | |
0c4a4063 | 10280 | python_prefix=${with_python} |
ec685c5e | 10281 | fi |
e7a30f46 | 10282 | elif test -x "${with_python}"; then |
ec685c5e DE |
10283 | # While we can't run python compiled for $host (unless host == build), |
10284 | # the user could write a script that provides the needed information, | |
10285 | # so we support that. | |
ec685c5e | 10286 | python_prog=${with_python} |
0c4a4063 | 10287 | python_prefix= |
ec685c5e | 10288 | else |
d0ac1c44 | 10289 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
ec685c5e | 10290 | fi |
81ecdfbb | 10291 | ;; |
ec685c5e DE |
10292 | */*) |
10293 | # Disallow --with-python=foo/bar. | |
d0ac1c44 | 10294 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
81ecdfbb | 10295 | ;; |
ec685c5e DE |
10296 | *) |
10297 | # The user has either specified auto, yes, or the name of the python | |
10298 | # program assumed to be in $PATH. | |
10299 | python_prefix= | |
10300 | case "${with_python}" in | |
10301 | yes | auto) | |
0ad6b8ee | 10302 | if test "${build}" = "${host}"; then |
ec685c5e DE |
10303 | # Extract the first word of "python", so it can be a program name with args. |
10304 | set dummy python; ac_word=$2 | |
10305 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10306 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 10307 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
10308 | $as_echo_n "(cached) " >&6 |
10309 | else | |
10310 | case $python_prog_path in | |
10311 | [\\/]* | ?:[\\/]*) | |
10312 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10313 | ;; | |
10314 | *) | |
10315 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10316 | for as_dir in $PATH | |
10317 | do | |
10318 | IFS=$as_save_IFS | |
10319 | test -z "$as_dir" && as_dir=. | |
10320 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 10321 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
10322 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
10323 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10324 | break 2 | |
10325 | fi | |
10326 | done | |
10327 | done | |
10328 | IFS=$as_save_IFS | |
10329 | ||
10330 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10331 | ;; | |
10332 | esac | |
10333 | fi | |
10334 | python_prog_path=$ac_cv_path_python_prog_path | |
10335 | if test -n "$python_prog_path"; then | |
10336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10337 | $as_echo "$python_prog_path" >&6; } | |
10338 | else | |
10339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10340 | $as_echo "no" >&6; } | |
10341 | fi | |
10342 | ||
10343 | ||
10344 | if test "${python_prog_path}" = missing; then | |
10345 | python_prog=missing | |
10346 | else | |
10347 | python_prog=${python_prog_path} | |
10348 | fi | |
10349 | else | |
10350 | # Not much we can do except assume the cross-compiler will find the | |
10351 | # right files. | |
10352 | python_prog=missing | |
10353 | fi | |
10354 | ;; | |
10355 | *) | |
10356 | # While we can't run python compiled for $host (unless host == build), | |
10357 | # the user could write a script that provides the needed information, | |
10358 | # so we support that. | |
10359 | python_prog="${with_python}" | |
10360 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10361 | set dummy ${python_prog}; ac_word=$2 | |
10362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10363 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 10364 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
10365 | $as_echo_n "(cached) " >&6 |
10366 | else | |
10367 | case $python_prog_path in | |
10368 | [\\/]* | ?:[\\/]*) | |
10369 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10370 | ;; | |
10371 | *) | |
10372 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10373 | for as_dir in $PATH | |
10374 | do | |
10375 | IFS=$as_save_IFS | |
10376 | test -z "$as_dir" && as_dir=. | |
10377 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 10378 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
10379 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
10380 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10381 | break 2 | |
10382 | fi | |
10383 | done | |
10384 | done | |
10385 | IFS=$as_save_IFS | |
10386 | ||
10387 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10388 | ;; | |
10389 | esac | |
10390 | fi | |
10391 | python_prog_path=$ac_cv_path_python_prog_path | |
10392 | if test -n "$python_prog_path"; then | |
10393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10394 | $as_echo "$python_prog_path" >&6; } | |
10395 | else | |
10396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10397 | $as_echo "no" >&6; } | |
10398 | fi | |
10399 | ||
10400 | ||
10401 | if test "${python_prog_path}" = missing; then | |
d0ac1c44 | 10402 | as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 |
ec685c5e DE |
10403 | fi |
10404 | ;; | |
10405 | esac | |
81ecdfbb RW |
10406 | esac |
10407 | ||
ec685c5e | 10408 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
10409 | # We have a python program to use, but it may be too old. |
10410 | # Don't flag an error for --with-python=auto (the default). | |
10411 | have_python_config=yes | |
ec685c5e DE |
10412 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
10413 | if test $? != 0; then | |
e7a30f46 DE |
10414 | have_python_config=failed |
10415 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10416 | as_fn_error $? "failure running python-config --includes" "$LINENO" 5 |
e7a30f46 | 10417 | fi |
ec685c5e DE |
10418 | fi |
10419 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10420 | if test $? != 0; then | |
e7a30f46 DE |
10421 | have_python_config=failed |
10422 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10423 | as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 |
e7a30f46 | 10424 | fi |
ec685c5e | 10425 | fi |
0c4a4063 DE |
10426 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
10427 | if test $? != 0; then | |
e7a30f46 DE |
10428 | have_python_config=failed |
10429 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10430 | as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 |
e7a30f46 | 10431 | fi |
0c4a4063 | 10432 | fi |
ec685c5e | 10433 | else |
ac534cba JB |
10434 | # We do not have a python executable we can use to determine where |
10435 | # to find the Python headers and libs. We cannot guess the include | |
10436 | # path from the python_prefix either, because that include path | |
10437 | # depends on the Python version. So, there is nothing much we can | |
10438 | # do except assume that the compiler will be able to find those files. | |
10439 | python_includes= | |
10440 | python_libs= | |
0c4a4063 | 10441 | have_python_config=no |
ec685c5e | 10442 | fi |
bec39cab | 10443 | |
ec685c5e DE |
10444 | # If we have python-config, only try the configuration it provides. |
10445 | # Otherwise fallback on the old way of trying different versions of | |
10446 | # python in turn. | |
81ecdfbb | 10447 | |
ec685c5e DE |
10448 | have_libpython=no |
10449 | if test "${have_python_config}" = yes; then | |
71737c43 | 10450 | |
ec685c5e DE |
10451 | |
10452 | new_CPPFLAGS=${python_includes} | |
10453 | new_LIBS=${python_libs} | |
71737c43 CB |
10454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
10455 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e | 10456 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10457 | save_LIBS=$LIBS |
ec685c5e | 10458 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 10459 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 10460 | found_usable_python=no |
81ecdfbb | 10461 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10462 | /* end confdefs.h. */ |
ac534cba | 10463 | #include "Python.h" |
81ecdfbb RW |
10464 | int |
10465 | main () | |
10466 | { | |
10467 | Py_Initialize (); | |
10468 | ; | |
10469 | return 0; | |
10470 | } | |
bec39cab | 10471 | _ACEOF |
81ecdfbb | 10472 | if ac_fn_c_try_link "$LINENO"; then : |
71737c43 | 10473 | have_libpython=yes |
ec685c5e | 10474 | found_usable_python=yes |
ac534cba JB |
10475 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10476 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 10477 | fi |
81ecdfbb RW |
10478 | rm -f core conftest.err conftest.$ac_objext \ |
10479 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10480 | CPPFLAGS=$save_CPPFLAGS |
10481 | LIBS=$save_LIBS | |
ec685c5e DE |
10482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10483 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10484 | |
e7a30f46 | 10485 | elif test "${have_python_config}" != failed; then |
ec685c5e | 10486 | if test "${have_libpython}" = no; then |
9a156167 | 10487 | |
420697bb TT |
10488 | |
10489 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 10490 | new_LIBS="-lpython2.7 ${python_libs}" |
71737c43 CB |
10491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
10492 | $as_echo_n "checking for python... " >&6; } | |
420697bb TT |
10493 | save_CPPFLAGS=$CPPFLAGS |
10494 | save_LIBS=$LIBS | |
10495 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 10496 | LIBS="$new_LIBS $LIBS" |
420697bb TT |
10497 | found_usable_python=no |
10498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10499 | /* end confdefs.h. */ | |
ac534cba | 10500 | #include "Python.h" |
420697bb TT |
10501 | int |
10502 | main () | |
10503 | { | |
10504 | Py_Initialize (); | |
10505 | ; | |
10506 | return 0; | |
10507 | } | |
10508 | _ACEOF | |
10509 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 10510 | have_libpython=yes |
420697bb | 10511 | found_usable_python=yes |
ac534cba JB |
10512 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10513 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
10514 | fi |
10515 | rm -f core conftest.err conftest.$ac_objext \ | |
10516 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10517 | CPPFLAGS=$save_CPPFLAGS |
10518 | LIBS=$save_LIBS | |
420697bb TT |
10519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10520 | $as_echo "${found_usable_python}" >&6; } | |
10521 | ||
10522 | fi | |
10523 | if test "${have_libpython}" = no; then | |
10524 | ||
ec685c5e DE |
10525 | |
10526 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 10527 | new_LIBS="-lpython2.6 ${python_libs}" |
71737c43 CB |
10528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
10529 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e DE |
10530 | save_CPPFLAGS=$CPPFLAGS |
10531 | save_LIBS=$LIBS | |
10532 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 10533 | LIBS="$new_LIBS $LIBS" |
ec685c5e DE |
10534 | found_usable_python=no |
10535 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10536 | /* end confdefs.h. */ | |
ac534cba | 10537 | #include "Python.h" |
ec685c5e DE |
10538 | int |
10539 | main () | |
10540 | { | |
10541 | Py_Initialize (); | |
10542 | ; | |
10543 | return 0; | |
10544 | } | |
10545 | _ACEOF | |
10546 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 10547 | have_libpython=yes |
ec685c5e | 10548 | found_usable_python=yes |
ac534cba JB |
10549 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10550 | PYTHON_LIBS=$new_LIBS | |
ec685c5e | 10551 | fi |
81ecdfbb RW |
10552 | rm -f core conftest.err conftest.$ac_objext \ |
10553 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10554 | CPPFLAGS=$save_CPPFLAGS |
10555 | LIBS=$save_LIBS | |
ec685c5e DE |
10556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10557 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10558 | |
ec685c5e DE |
10559 | fi |
10560 | fi | |
ec685c5e DE |
10561 | |
10562 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10563 | case "${with_python}" in |
10564 | yes) | |
d0ac1c44 | 10565 | as_fn_error $? "python is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
10566 | ;; |
10567 | auto) | |
10568 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10569 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10570 | ;; | |
10571 | *) | |
d0ac1c44 | 10572 | as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 |
81ecdfbb RW |
10573 | ;; |
10574 | esac | |
0c4a4063 DE |
10575 | else |
10576 | if test -n "${python_prefix}"; then | |
10577 | ||
10578 | cat >>confdefs.h <<_ACEOF | |
10579 | #define WITH_PYTHON_PATH "${python_prefix}" | |
10580 | _ACEOF | |
10581 | ||
10582 | ||
10583 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10584 | if test "x$prefix" = xNONE; then | |
10585 | test_prefix=/usr/local | |
10586 | else | |
10587 | test_prefix=$prefix | |
10588 | fi | |
10589 | else | |
10590 | test_prefix=$exec_prefix | |
10591 | fi | |
10592 | value=0 | |
10593 | case ${python_prefix} in | |
10594 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10595 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10596 | value=1 | |
10597 | ;; | |
10598 | esac | |
10599 | ||
10600 | cat >>confdefs.h <<_ACEOF | |
10601 | #define PYTHON_PATH_RELOCATABLE $value | |
10602 | _ACEOF | |
10603 | ||
10604 | ||
10605 | fi | |
81ecdfbb | 10606 | fi |
436868fb | 10607 | fi |
436868fb | 10608 | |
ec685c5e | 10609 | if test "${have_libpython}" != no; then |
436868fb | 10610 | |
81ecdfbb | 10611 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10612 | |
81ecdfbb RW |
10613 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10614 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10615 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 10616 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 10617 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 10618 | |
81ecdfbb RW |
10619 | # Flags needed to compile Python code (taken from python-config --cflags). |
10620 | # We cannot call python-config directly because it will output whatever was | |
10621 | # used when compiling the Python interpreter itself, including flags which | |
10622 | # would make the python-related objects be compiled differently from the | |
10623 | # rest of GDB (e.g., -O2 and -fPIC). | |
10624 | if test "${GCC}" = yes; then | |
ae292b3a TT |
10625 | tentative_python_cflags="-fno-strict-aliasing -fwrapv" |
10626 | # Python headers recommend -DNDEBUG, but it's unclear if that just | |
10627 | # refers to building Python itself. In release mode, though, it | |
10628 | # doesn't hurt for the Python code in gdb to follow. | |
10629 | $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG" | |
81ecdfbb | 10630 | fi |
436868fb | 10631 | |
81ecdfbb RW |
10632 | if test "x${tentative_python_cflags}" != x; then |
10633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
10634 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
10635 | for flag in ${tentative_python_cflags}; do | |
10636 | # Check that the compiler accepts it | |
10637 | saved_CFLAGS="$CFLAGS" | |
10638 | CFLAGS="$CFLAGS $flag" | |
10639 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 10640 | /* end confdefs.h. */ |
81ecdfbb | 10641 | |
a9322a30 TT |
10642 | int |
10643 | main () | |
10644 | { | |
a9322a30 TT |
10645 | |
10646 | ; | |
10647 | return 0; | |
10648 | } | |
bec39cab | 10649 | _ACEOF |
81ecdfbb RW |
10650 | if ac_fn_c_try_compile "$LINENO"; then : |
10651 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 10652 | fi |
81ecdfbb RW |
10653 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
10654 | CFLAGS="$saved_CFLAGS" | |
10655 | done | |
10656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
10657 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
10658 | fi | |
043b6510 | 10659 | |
c83393b9 JB |
10660 | # On x64 Windows, Python's include headers, and pyconfig.h in |
10661 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
10662 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
10663 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
10664 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
10665 | # The issue was reported to the Python community, but still isn't | |
10666 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
10667 | ||
043b6510 | 10668 | case "$gdb_host" in |
c83393b9 JB |
10669 | mingw64) |
10670 | if test "${GCC}" = yes; then | |
10671 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
10672 | fi | |
10673 | ;; | |
043b6510 | 10674 | esac |
81ecdfbb | 10675 | else |
6dddc817 DE |
10676 | # Even if Python support is not compiled in, we need to have this file |
10677 | # included so that the "python" command, et.al., still exists. | |
8fd8d003 | 10678 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
6dddc817 | 10679 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
a9322a30 | 10680 | fi |
9a156167 | 10681 | |
a4a1c157 PA |
10682 | # Work around Python http://bugs.python.org/issue10112. See also |
10683 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
10684 | # no effect. Note that the only test after this that uses Python is | |
10685 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
10686 | # run without -export-dynamic too. | |
10687 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
10688 | ||
10689 | ||
ed3ef339 DE |
10690 | |
10691 | ||
4df42755 DE |
10692 | if test "${have_libpython}" != no; then |
10693 | HAVE_PYTHON_TRUE= | |
10694 | HAVE_PYTHON_FALSE='#' | |
10695 | else | |
10696 | HAVE_PYTHON_TRUE='#' | |
10697 | HAVE_PYTHON_FALSE= | |
10698 | fi | |
10699 | ||
ed3ef339 DE |
10700 | |
10701 | # -------------------- # | |
10702 | # Check for libguile. # | |
10703 | # -------------------- # | |
10704 | ||
10705 | ||
e1402065 DE |
10706 | |
10707 | ||
10708 | ||
10709 | ||
10710 | # Check whether --with-guile was given. | |
10711 | if test "${with_guile+set}" = set; then : | |
10712 | withval=$with_guile; | |
10713 | else | |
10714 | with_guile=auto | |
10715 | fi | |
10716 | ||
10717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
10718 | $as_echo_n "checking whether to use guile... " >&6; } | |
10719 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
10720 | $as_echo "$with_guile" >&6; } | |
10721 | ||
ed3ef339 DE |
10722 | # Extract the first word of "pkg-config", so it can be a program name with args. |
10723 | set dummy pkg-config; ac_word=$2 | |
10724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10725 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 10726 | if ${ac_cv_path_pkg_config_prog_path+:} false; then : |
ed3ef339 DE |
10727 | $as_echo_n "(cached) " >&6 |
10728 | else | |
10729 | case $pkg_config_prog_path in | |
10730 | [\\/]* | ?:[\\/]*) | |
10731 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
10732 | ;; | |
10733 | *) | |
10734 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10735 | for as_dir in $PATH | |
10736 | do | |
10737 | IFS=$as_save_IFS | |
10738 | test -z "$as_dir" && as_dir=. | |
10739 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 10740 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ed3ef339 DE |
10741 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" |
10742 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10743 | break 2 | |
10744 | fi | |
10745 | done | |
10746 | done | |
10747 | IFS=$as_save_IFS | |
10748 | ||
10749 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
10750 | ;; | |
10751 | esac | |
10752 | fi | |
10753 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
10754 | if test -n "$pkg_config_prog_path"; then | |
10755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
10756 | $as_echo "$pkg_config_prog_path" >&6; } | |
10757 | else | |
10758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10759 | $as_echo "no" >&6; } | |
10760 | fi | |
10761 | ||
10762 | ||
10763 | ||
6e66f753 | 10764 | try_guile_versions="guile-2.0" |
ed3ef339 DE |
10765 | have_libguile=no |
10766 | case "${with_guile}" in | |
10767 | no) | |
10768 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
10769 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
10770 | ;; | |
10771 | auto) | |
e1402065 DE |
10772 | if test "${pkg_config_prog_path}" = "missing"; then |
10773 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
10774 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
10775 | else | |
ed3ef339 DE |
10776 | |
10777 | pkg_config=${pkg_config_prog_path} | |
10778 | guile_version_list=${try_guile_versions} | |
10779 | flag_errors=no | |
10780 | ||
ed3ef339 DE |
10781 | found_usable_guile=checking |
10782 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10783 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10784 | for guile_version in ${guile_version_list}; do | |
10785 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10786 | if test $? != 0; then | |
10787 | continue | |
10788 | fi | |
10789 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10790 | if test $? != 0; then | |
d0ac1c44 | 10791 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
10792 | fi |
10793 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10794 | if test $? != 0; then | |
d0ac1c44 | 10795 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
10796 | fi |
10797 | found_usable_guile=${guile_version} | |
10798 | break | |
10799 | done | |
10800 | if test "${found_usable_guile}" = "checking"; then | |
10801 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 10802 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
10803 | else |
10804 | found_usable_guile=no | |
10805 | fi | |
10806 | fi | |
10807 | if test "${found_usable_guile}" != no; then | |
10808 | save_CPPFLAGS=$CPPFLAGS | |
10809 | save_LIBS=$LIBS | |
10810 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10811 | LIBS="$LIBS $new_LIBS" | |
10812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10813 | /* end confdefs.h. */ | |
10814 | #include "libguile.h" | |
10815 | int | |
10816 | main () | |
10817 | { | |
10818 | scm_init_guile (); | |
10819 | ; | |
10820 | return 0; | |
10821 | } | |
10822 | _ACEOF | |
10823 | if ac_fn_c_try_link "$LINENO"; then : | |
10824 | have_libguile=yes | |
10825 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10826 | GUILE_LIBS=$new_LIBS | |
10827 | else | |
10828 | found_usable_guile=no | |
10829 | fi | |
10830 | rm -f core conftest.err conftest.$ac_objext \ | |
10831 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 10832 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 10833 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
10834 | |
10835 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10836 | ||
10837 | ||
10838 | fi | |
10839 | ||
ed3ef339 DE |
10840 | CPPFLAGS=$save_CPPFLAGS |
10841 | LIBS=$save_LIBS | |
10842 | if test "${found_usable_guile}" = no; then | |
10843 | if test "${flag_errors}" = yes; then | |
10844 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10845 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
10846 | as_fn_error $? "linking guile version ${guile_version} test program failed |
10847 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
10848 | fi |
10849 | fi | |
10850 | fi | |
10851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10852 | $as_echo "${found_usable_guile}" >&6; } | |
10853 | ||
e1402065 | 10854 | fi |
ed3ef339 DE |
10855 | ;; |
10856 | yes) | |
e1402065 | 10857 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 10858 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 10859 | fi |
ed3ef339 DE |
10860 | |
10861 | pkg_config=${pkg_config_prog_path} | |
10862 | guile_version_list=${try_guile_versions} | |
10863 | flag_errors=yes | |
10864 | ||
ed3ef339 DE |
10865 | found_usable_guile=checking |
10866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10867 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10868 | for guile_version in ${guile_version_list}; do | |
10869 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10870 | if test $? != 0; then | |
10871 | continue | |
10872 | fi | |
10873 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10874 | if test $? != 0; then | |
d0ac1c44 | 10875 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
10876 | fi |
10877 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10878 | if test $? != 0; then | |
d0ac1c44 | 10879 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
10880 | fi |
10881 | found_usable_guile=${guile_version} | |
10882 | break | |
10883 | done | |
10884 | if test "${found_usable_guile}" = "checking"; then | |
10885 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 10886 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
10887 | else |
10888 | found_usable_guile=no | |
10889 | fi | |
10890 | fi | |
10891 | if test "${found_usable_guile}" != no; then | |
10892 | save_CPPFLAGS=$CPPFLAGS | |
10893 | save_LIBS=$LIBS | |
10894 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10895 | LIBS="$LIBS $new_LIBS" | |
10896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10897 | /* end confdefs.h. */ | |
10898 | #include "libguile.h" | |
10899 | int | |
10900 | main () | |
10901 | { | |
10902 | scm_init_guile (); | |
10903 | ; | |
10904 | return 0; | |
10905 | } | |
10906 | _ACEOF | |
10907 | if ac_fn_c_try_link "$LINENO"; then : | |
10908 | have_libguile=yes | |
10909 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10910 | GUILE_LIBS=$new_LIBS | |
10911 | else | |
10912 | found_usable_guile=no | |
10913 | fi | |
10914 | rm -f core conftest.err conftest.$ac_objext \ | |
10915 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 10916 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 10917 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
10918 | |
10919 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
10920 | ||
10921 | ||
10922 | fi | |
10923 | ||
ed3ef339 DE |
10924 | CPPFLAGS=$save_CPPFLAGS |
10925 | LIBS=$save_LIBS | |
10926 | if test "${found_usable_guile}" = no; then | |
10927 | if test "${flag_errors}" = yes; then | |
10928 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
10929 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
10930 | as_fn_error $? "linking guile version ${guile_version} test program failed |
10931 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
10932 | fi |
10933 | fi | |
10934 | fi | |
10935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
10936 | $as_echo "${found_usable_guile}" >&6; } | |
10937 | ||
10938 | ;; | |
10939 | [\\/]* | ?:[\\/]*) | |
e1402065 | 10940 | if test -x "${with_guile}"; then |
ed3ef339 DE |
10941 | |
10942 | pkg_config=${with_guile} | |
10943 | guile_version_list=${try_guile_versions} | |
10944 | flag_errors=yes | |
10945 | ||
ed3ef339 DE |
10946 | found_usable_guile=checking |
10947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
10948 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
10949 | for guile_version in ${guile_version_list}; do | |
10950 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
10951 | if test $? != 0; then | |
10952 | continue | |
10953 | fi | |
10954 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
10955 | if test $? != 0; then | |
d0ac1c44 | 10956 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
10957 | fi |
10958 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
10959 | if test $? != 0; then | |
d0ac1c44 | 10960 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
10961 | fi |
10962 | found_usable_guile=${guile_version} | |
10963 | break | |
10964 | done | |
10965 | if test "${found_usable_guile}" = "checking"; then | |
10966 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 10967 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
10968 | else |
10969 | found_usable_guile=no | |
10970 | fi | |
10971 | fi | |
10972 | if test "${found_usable_guile}" != no; then | |
10973 | save_CPPFLAGS=$CPPFLAGS | |
10974 | save_LIBS=$LIBS | |
10975 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
10976 | LIBS="$LIBS $new_LIBS" | |
10977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10978 | /* end confdefs.h. */ | |
10979 | #include "libguile.h" | |
10980 | int | |
10981 | main () | |
10982 | { | |
10983 | scm_init_guile (); | |
10984 | ; | |
10985 | return 0; | |
10986 | } | |
10987 | _ACEOF | |
10988 | if ac_fn_c_try_link "$LINENO"; then : | |
10989 | have_libguile=yes | |
10990 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
10991 | GUILE_LIBS=$new_LIBS | |
10992 | else | |
10993 | found_usable_guile=no | |
10994 | fi | |
10995 | rm -f core conftest.err conftest.$ac_objext \ | |
10996 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 10997 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 10998 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
10999 | |
11000 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11001 | ||
11002 | ||
11003 | fi | |
11004 | ||
ed3ef339 DE |
11005 | CPPFLAGS=$save_CPPFLAGS |
11006 | LIBS=$save_LIBS | |
11007 | if test "${found_usable_guile}" = no; then | |
11008 | if test "${flag_errors}" = yes; then | |
11009 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11010 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11011 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11012 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11013 | fi |
11014 | fi | |
11015 | fi | |
11016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11017 | $as_echo "${found_usable_guile}" >&6; } | |
11018 | ||
e1402065 | 11019 | else |
d0ac1c44 | 11020 | as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 |
e1402065 | 11021 | fi |
ed3ef339 DE |
11022 | ;; |
11023 | "" | */*) | |
11024 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
d0ac1c44 | 11025 | as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 |
ed3ef339 DE |
11026 | ;; |
11027 | *) | |
11028 | # A space separate list of guile versions to try, in order. | |
e1402065 | 11029 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11030 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11031 | fi |
ed3ef339 DE |
11032 | |
11033 | pkg_config=${pkg_config_prog_path} | |
11034 | guile_version_list=${with_guile} | |
11035 | flag_errors=yes | |
11036 | ||
ed3ef339 DE |
11037 | found_usable_guile=checking |
11038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11039 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11040 | for guile_version in ${guile_version_list}; do | |
11041 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11042 | if test $? != 0; then | |
11043 | continue | |
11044 | fi | |
11045 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11046 | if test $? != 0; then | |
d0ac1c44 | 11047 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11048 | fi |
11049 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11050 | if test $? != 0; then | |
d0ac1c44 | 11051 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11052 | fi |
11053 | found_usable_guile=${guile_version} | |
11054 | break | |
11055 | done | |
11056 | if test "${found_usable_guile}" = "checking"; then | |
11057 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11058 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11059 | else |
11060 | found_usable_guile=no | |
11061 | fi | |
11062 | fi | |
11063 | if test "${found_usable_guile}" != no; then | |
11064 | save_CPPFLAGS=$CPPFLAGS | |
11065 | save_LIBS=$LIBS | |
11066 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11067 | LIBS="$LIBS $new_LIBS" | |
11068 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11069 | /* end confdefs.h. */ | |
11070 | #include "libguile.h" | |
11071 | int | |
11072 | main () | |
11073 | { | |
11074 | scm_init_guile (); | |
11075 | ; | |
11076 | return 0; | |
11077 | } | |
11078 | _ACEOF | |
11079 | if ac_fn_c_try_link "$LINENO"; then : | |
11080 | have_libguile=yes | |
11081 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11082 | GUILE_LIBS=$new_LIBS | |
11083 | else | |
11084 | found_usable_guile=no | |
11085 | fi | |
11086 | rm -f core conftest.err conftest.$ac_objext \ | |
11087 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11088 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11089 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11090 | |
11091 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11092 | ||
11093 | ||
11094 | fi | |
11095 | ||
ed3ef339 DE |
11096 | CPPFLAGS=$save_CPPFLAGS |
11097 | LIBS=$save_LIBS | |
11098 | if test "${found_usable_guile}" = no; then | |
11099 | if test "${flag_errors}" = yes; then | |
11100 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11101 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11102 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11103 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11104 | fi |
11105 | fi | |
11106 | fi | |
11107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11108 | $as_echo "${found_usable_guile}" >&6; } | |
11109 | ||
11110 | ;; | |
11111 | esac | |
11112 | ||
e76c5d17 | 11113 | if test "${have_libguile}" != no; then |
d342a0da DE |
11114 | case "${with_guile}" in |
11115 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11116 | |
11117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11118 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11119 | if ${ac_cv_guild_program_name+:} false; then : |
e76c5d17 DE |
11120 | $as_echo_n "(cached) " >&6 |
11121 | else | |
d342a0da | 11122 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11123 | |
11124 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11125 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11126 | # what the program name is, at the risk of getting it wrong if | |
11127 | # Guile was configured with '--program-suffix' or similar. | |
11128 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11129 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11130 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11131 | fi | |
11132 | ||
11133 | fi | |
11134 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11135 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11136 | ||
11137 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11138 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
e76c5d17 DE |
11139 | fi |
11140 | ||
11141 | GUILD="$ac_cv_guild_program_name" | |
11142 | ||
11143 | ||
d342a0da DE |
11144 | ;; |
11145 | *) | |
11146 | ||
11147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11148 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11149 | if ${ac_cv_guild_program_name+:} false; then : |
d342a0da DE |
11150 | $as_echo_n "(cached) " >&6 |
11151 | else | |
11152 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11153 | ||
11154 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11155 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11156 | # what the program name is, at the risk of getting it wrong if | |
11157 | # Guile was configured with '--program-suffix' or similar. | |
11158 | if test "x$ac_cv_guild_program_name" = "x"; then | |
11159 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
11160 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
11161 | fi | |
11162 | ||
11163 | fi | |
11164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11165 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11166 | ||
11167 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11168 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
d342a0da DE |
11169 | fi |
11170 | ||
11171 | GUILD="$ac_cv_guild_program_name" | |
11172 | ||
11173 | ||
11174 | ;; | |
11175 | esac | |
e76c5d17 DE |
11176 | |
11177 | ||
11178 | if test "$cross_compiling" = no; then | |
11179 | GUILD_TARGET_FLAG= | |
11180 | else | |
11181 | GUILD_TARGET_FLAG="--target=$host" | |
11182 | fi | |
11183 | ||
11184 | ||
11185 | ||
11186 | ||
11187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
11188 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
d0ac1c44 | 11189 | if ${ac_cv_guild_ok+:} false; then : |
e76c5d17 DE |
11190 | $as_echo_n "(cached) " >&6 |
11191 | else | |
11192 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
11193 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
11194 | ac_cv_guild_ok=yes | |
11195 | else | |
11196 | ac_cv_guild_ok=no | |
11197 | fi | |
11198 | fi | |
11199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
11200 | $as_echo "$ac_cv_guild_ok" >&6; } | |
11201 | ||
11202 | if test "$ac_cv_guild_ok" = no; then | |
11203 | have_libguile=no | |
11204 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
11205 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
11206 | fi | |
11207 | fi | |
11208 | ||
ed3ef339 DE |
11209 | if test "${have_libguile}" != no; then |
11210 | ||
11211 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
11212 | ||
11213 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
11214 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
11215 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
11216 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
11217 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
11218 | |
11219 | save_LIBS="$LIBS" | |
11220 | save_CPPFLAGS="$CPPFLAGS" | |
11221 | LIBS="$GUILE_LIBS" | |
11222 | CPPFLAGS="$GUILE_CPPFLAGS" | |
11223 | for ac_func in scm_new_smob | |
11224 | do : | |
11225 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
d0ac1c44 | 11226 | if test "x$ac_cv_func_scm_new_smob" = xyes; then : |
16954d5d LC |
11227 | cat >>confdefs.h <<_ACEOF |
11228 | #define HAVE_SCM_NEW_SMOB 1 | |
11229 | _ACEOF | |
11230 | ||
11231 | fi | |
11232 | done | |
11233 | ||
11234 | LIBS="$save_LIBS" | |
11235 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
11236 | else |
11237 | # Even if Guile support is not compiled in, we need to have these files | |
11238 | # included. | |
bd810fff | 11239 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
ed3ef339 DE |
11240 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
11241 | fi | |
9a156167 | 11242 | |
ac534cba | 11243 | |
4df42755 DE |
11244 | if test "${have_libguile}" != no; then |
11245 | HAVE_GUILE_TRUE= | |
11246 | HAVE_GUILE_FALSE='#' | |
11247 | else | |
11248 | HAVE_GUILE_TRUE='#' | |
11249 | HAVE_GUILE_FALSE= | |
11250 | fi | |
11251 | ||
ac534cba | 11252 | |
62f29fda TT |
11253 | # ---------------------------- # |
11254 | # Check for source highlight. # | |
11255 | # ---------------------------- # | |
11256 | ||
11257 | SRCHIGH_LIBS= | |
11258 | SRCHIGH_CFLAGS= | |
189b8c2e ST |
11259 | |
11260 | # Check whether --enable-source-highlight was given. | |
11261 | if test "${enable_source_highlight+set}" = set; then : | |
11262 | enableval=$enable_source_highlight; case "${enableval}" in | |
11263 | yes) enable_source_highlight=yes ;; | |
11264 | no) enable_source_highlight=no ;; | |
11265 | *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; | |
11266 | esac | |
11267 | else | |
11268 | enable_source_highlight=auto | |
11269 | fi | |
11270 | ||
11271 | ||
11272 | if test "${enable_source_highlight}" != "no"; then | |
11273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 | |
6c28e44a | 11274 | $as_echo_n "checking for the source-highlight library... " >&6; } |
189b8c2e ST |
11275 | if test "${pkg_config_prog_path}" = "missing"; then |
11276 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 | |
62f29fda | 11277 | $as_echo "no - pkg-config not found" >&6; } |
189b8c2e ST |
11278 | if test "${enable_source_highlight}" = "yes"; then |
11279 | as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 | |
11280 | fi | |
11281 | else | |
d806ea2d TT |
11282 | case "$LDFLAGS" in |
11283 | *static-libstdc*) | |
11284 | as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 | |
11285 | ;; | |
11286 | esac | |
11287 | ||
189b8c2e | 11288 | if ${pkg_config_prog_path} --exists source-highlight; then |
62f29fda TT |
11289 | SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` |
11290 | SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` | |
11291 | ||
11292 | $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h | |
11293 | ||
11294 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11295 | $as_echo "yes" >&6; } | |
189b8c2e | 11296 | else |
62f29fda TT |
11297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11298 | $as_echo "no" >&6; } | |
189b8c2e ST |
11299 | if test "${enable_source_highlight}" = "yes"; then |
11300 | as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 | |
11301 | fi | |
11302 | fi | |
11303 | fi | |
62f29fda TT |
11304 | fi |
11305 | ||
11306 | ||
11307 | ||
05ea2a05 TT |
11308 | # ------------------------- # |
11309 | # Checks for header files. # | |
11310 | # ------------------------- # | |
58bfce93 | 11311 | |
05ea2a05 TT |
11312 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
11313 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11314 | if ${ac_cv_header_stdc+:} false; then : | |
11315 | $as_echo_n "(cached) " >&6 | |
58bfce93 | 11316 | else |
5599c404 MM |
11317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11318 | /* end confdefs.h. */ | |
05ea2a05 TT |
11319 | #include <stdlib.h> |
11320 | #include <stdarg.h> | |
11321 | #include <string.h> | |
11322 | #include <float.h> | |
5599c404 | 11323 | |
05ea2a05 TT |
11324 | int |
11325 | main () | |
11326 | { | |
5599c404 | 11327 | |
05ea2a05 TT |
11328 | ; |
11329 | return 0; | |
11330 | } | |
5599c404 | 11331 | _ACEOF |
05ea2a05 TT |
11332 | if ac_fn_c_try_compile "$LINENO"; then : |
11333 | ac_cv_header_stdc=yes | |
5599c404 | 11334 | else |
05ea2a05 | 11335 | ac_cv_header_stdc=no |
5599c404 | 11336 | fi |
05ea2a05 | 11337 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58bfce93 | 11338 | |
05ea2a05 TT |
11339 | if test $ac_cv_header_stdc = yes; then |
11340 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11342 | /* end confdefs.h. */ | |
11343 | #include <string.h> | |
58bfce93 | 11344 | |
05ea2a05 TT |
11345 | _ACEOF |
11346 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11347 | $EGREP "memchr" >/dev/null 2>&1; then : | |
58bfce93 | 11348 | |
05ea2a05 TT |
11349 | else |
11350 | ac_cv_header_stdc=no | |
11351 | fi | |
11352 | rm -f conftest* | |
58bfce93 | 11353 | |
05ea2a05 | 11354 | fi |
58bfce93 | 11355 | |
05ea2a05 TT |
11356 | if test $ac_cv_header_stdc = yes; then |
11357 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11358 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11359 | /* end confdefs.h. */ | |
11360 | #include <stdlib.h> | |
58bfce93 | 11361 | |
05ea2a05 TT |
11362 | _ACEOF |
11363 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11364 | $EGREP "free" >/dev/null 2>&1; then : | |
58bfce93 | 11365 | |
05ea2a05 TT |
11366 | else |
11367 | ac_cv_header_stdc=no | |
11368 | fi | |
11369 | rm -f conftest* | |
58bfce93 | 11370 | |
05ea2a05 | 11371 | fi |
58bfce93 | 11372 | |
05ea2a05 TT |
11373 | if test $ac_cv_header_stdc = yes; then |
11374 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11375 | if test "$cross_compiling" = yes; then : | |
11376 | : | |
11377 | else | |
11378 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11379 | /* end confdefs.h. */ | |
11380 | #include <ctype.h> | |
11381 | #include <stdlib.h> | |
11382 | #if ((' ' & 0x0FF) == 0x020) | |
11383 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11384 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11385 | #else | |
11386 | # define ISLOWER(c) \ | |
11387 | (('a' <= (c) && (c) <= 'i') \ | |
11388 | || ('j' <= (c) && (c) <= 'r') \ | |
11389 | || ('s' <= (c) && (c) <= 'z')) | |
11390 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11391 | #endif | |
58bfce93 | 11392 | |
05ea2a05 TT |
11393 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
11394 | int | |
11395 | main () | |
11396 | { | |
11397 | int i; | |
11398 | for (i = 0; i < 256; i++) | |
11399 | if (XOR (islower (i), ISLOWER (i)) | |
11400 | || toupper (i) != TOUPPER (i)) | |
11401 | return 2; | |
11402 | return 0; | |
11403 | } | |
11404 | _ACEOF | |
11405 | if ac_fn_c_try_run "$LINENO"; then : | |
58bfce93 | 11406 | |
05ea2a05 TT |
11407 | else |
11408 | ac_cv_header_stdc=no | |
11409 | fi | |
11410 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11411 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11412 | fi | |
58bfce93 | 11413 | |
05ea2a05 TT |
11414 | fi |
11415 | fi | |
11416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
11417 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11418 | if test $ac_cv_header_stdc = yes; then | |
58bfce93 | 11419 | |
05ea2a05 | 11420 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
58bfce93 | 11421 | |
05ea2a05 | 11422 | fi |
58bfce93 | 11423 | |
05ea2a05 TT |
11424 | # elf_hp.h is for HP/UX 64-bit shared library support. |
11425 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \ | |
11426 | thread_db.h \ | |
11427 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
11428 | sys/resource.h sys/ptrace.h ptrace.h \ | |
11429 | sys/reg.h sys/debugreg.h sys/select.h \ | |
11430 | termios.h elf_hp.h | |
11431 | do : | |
11432 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11433 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11434 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
11435 | cat >>confdefs.h <<_ACEOF | |
11436 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
11437 | _ACEOF | |
58bfce93 MM |
11438 | |
11439 | fi | |
11440 | ||
05ea2a05 | 11441 | done |
58bfce93 | 11442 | |
05ea2a05 TT |
11443 | for ac_header in sys/user.h |
11444 | do : | |
11445 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
11446 | # include <sys/param.h> | |
11447 | #endif | |
58bfce93 | 11448 | |
05ea2a05 TT |
11449 | " |
11450 | if test "x$ac_cv_header_sys_user_h" = xyes; then : | |
11451 | cat >>confdefs.h <<_ACEOF | |
11452 | #define HAVE_SYS_USER_H 1 | |
11453 | _ACEOF | |
58bfce93 | 11454 | |
05ea2a05 | 11455 | fi |
58bfce93 | 11456 | |
05ea2a05 | 11457 | done |
58bfce93 | 11458 | |
58bfce93 | 11459 | |
05ea2a05 TT |
11460 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
11461 | do : | |
11462 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11463 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11464 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
11465 | cat >>confdefs.h <<_ACEOF | |
11466 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
11467 | _ACEOF | |
58bfce93 | 11468 | |
05ea2a05 | 11469 | fi |
58bfce93 | 11470 | |
05ea2a05 | 11471 | done |
58bfce93 | 11472 | |
05ea2a05 TT |
11473 | for ac_header in term.h |
11474 | do : | |
11475 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
11476 | # include <curses.h> | |
11477 | #endif | |
58bfce93 | 11478 | |
05ea2a05 TT |
11479 | " |
11480 | if test "x$ac_cv_header_term_h" = xyes; then : | |
11481 | cat >>confdefs.h <<_ACEOF | |
11482 | #define HAVE_TERM_H 1 | |
11483 | _ACEOF | |
58bfce93 | 11484 | |
05ea2a05 | 11485 | fi |
58bfce93 | 11486 | |
05ea2a05 | 11487 | done |
58bfce93 | 11488 | |
58bfce93 | 11489 | |
05ea2a05 TT |
11490 | # ------------------------- # |
11491 | # Checks for declarations. # | |
11492 | # ------------------------- # | |
58bfce93 | 11493 | |
58bfce93 | 11494 | |
05ea2a05 TT |
11495 | # Check for presence and size of long long. |
11496 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
11497 | if test "x$ac_cv_type_long_long" = xyes; then : | |
58bfce93 | 11498 | |
05ea2a05 TT |
11499 | cat >>confdefs.h <<_ACEOF |
11500 | #define HAVE_LONG_LONG 1 | |
11501 | _ACEOF | |
11502 | ||
11503 | # The cast to long int works around a bug in the HP C Compiler | |
11504 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11505 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11506 | # This bug is HP SR number 8606223364. | |
11507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
11508 | $as_echo_n "checking size of long long... " >&6; } | |
11509 | if ${ac_cv_sizeof_long_long+:} false; then : | |
58bfce93 MM |
11510 | $as_echo_n "(cached) " >&6 |
11511 | else | |
05ea2a05 | 11512 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
58bfce93 | 11513 | |
58bfce93 | 11514 | else |
05ea2a05 TT |
11515 | if test "$ac_cv_type_long_long" = yes; then |
11516 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11517 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11518 | as_fn_error 77 "cannot compute sizeof (long long) | |
11519 | See \`config.log' for more details" "$LINENO" 5; } | |
11520 | else | |
11521 | ac_cv_sizeof_long_long=0 | |
11522 | fi | |
58bfce93 | 11523 | fi |
58bfce93 MM |
11524 | |
11525 | fi | |
05ea2a05 TT |
11526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
11527 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
58bfce93 | 11528 | |
58bfce93 | 11529 | |
58bfce93 | 11530 | |
05ea2a05 TT |
11531 | cat >>confdefs.h <<_ACEOF |
11532 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
11533 | _ACEOF | |
58bfce93 MM |
11534 | |
11535 | ||
05ea2a05 | 11536 | fi |
58bfce93 MM |
11537 | |
11538 | ||
05ea2a05 TT |
11539 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
11540 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
11541 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
11542 | ac_have_decl=1 | |
11543 | else | |
11544 | ac_have_decl=0 | |
11545 | fi | |
58bfce93 | 11546 | |
05ea2a05 TT |
11547 | cat >>confdefs.h <<_ACEOF |
11548 | #define HAVE_DECL_BASENAME $ac_have_decl | |
c56ccc05 | 11549 | _ACEOF |
05ea2a05 TT |
11550 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
11551 | if test "x$ac_cv_have_decl_ffs" = xyes; then : | |
11552 | ac_have_decl=1 | |
11553 | else | |
11554 | ac_have_decl=0 | |
c56ccc05 | 11555 | fi |
c56ccc05 MM |
11556 | |
11557 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 11558 | #define HAVE_DECL_FFS $ac_have_decl |
c56ccc05 | 11559 | _ACEOF |
05ea2a05 TT |
11560 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" |
11561 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : | |
11562 | ac_have_decl=1 | |
11563 | else | |
11564 | ac_have_decl=0 | |
c56ccc05 | 11565 | fi |
c56ccc05 MM |
11566 | |
11567 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 11568 | #define HAVE_DECL_ASPRINTF $ac_have_decl |
c56ccc05 | 11569 | _ACEOF |
05ea2a05 TT |
11570 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
11571 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : | |
11572 | ac_have_decl=1 | |
11573 | else | |
11574 | ac_have_decl=0 | |
11575 | fi | |
c56ccc05 | 11576 | |
05ea2a05 TT |
11577 | cat >>confdefs.h <<_ACEOF |
11578 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
11579 | _ACEOF | |
11580 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
11581 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
11582 | ac_have_decl=1 | |
11583 | else | |
11584 | ac_have_decl=0 | |
c56ccc05 MM |
11585 | fi |
11586 | ||
05ea2a05 TT |
11587 | cat >>confdefs.h <<_ACEOF |
11588 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
11589 | _ACEOF | |
11590 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
11591 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : | |
11592 | ac_have_decl=1 | |
11593 | else | |
11594 | ac_have_decl=0 | |
58bfce93 MM |
11595 | fi |
11596 | ||
05ea2a05 TT |
11597 | cat >>confdefs.h <<_ACEOF |
11598 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
11599 | _ACEOF | |
c890192f | 11600 | |
05ea2a05 TT |
11601 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
11602 | if test "x$ac_cv_have_decl_strtol" = xyes; then : | |
11603 | ac_have_decl=1 | |
bec39cab | 11604 | else |
05ea2a05 TT |
11605 | ac_have_decl=0 |
11606 | fi | |
81ecdfbb | 11607 | |
05ea2a05 TT |
11608 | cat >>confdefs.h <<_ACEOF |
11609 | #define HAVE_DECL_STRTOL $ac_have_decl | |
11610 | _ACEOF | |
11611 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
11612 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : | |
11613 | ac_have_decl=1 | |
11614 | else | |
11615 | ac_have_decl=0 | |
11616 | fi | |
a9322a30 | 11617 | |
05ea2a05 TT |
11618 | cat >>confdefs.h <<_ACEOF |
11619 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
bec39cab | 11620 | _ACEOF |
05ea2a05 TT |
11621 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
11622 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : | |
11623 | ac_have_decl=1 | |
bec39cab | 11624 | else |
05ea2a05 | 11625 | ac_have_decl=0 |
a9322a30 | 11626 | fi |
bec39cab | 11627 | |
05ea2a05 TT |
11628 | cat >>confdefs.h <<_ACEOF |
11629 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
11630 | _ACEOF | |
11631 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
11632 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : | |
11633 | ac_have_decl=1 | |
11634 | else | |
11635 | ac_have_decl=0 | |
11636 | fi | |
bec39cab | 11637 | |
05ea2a05 TT |
11638 | cat >>confdefs.h <<_ACEOF |
11639 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
81ecdfbb | 11640 | _ACEOF |
bec39cab | 11641 | |
05ea2a05 TT |
11642 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" |
11643 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : | |
11644 | ac_have_decl=1 | |
bec39cab | 11645 | else |
05ea2a05 | 11646 | ac_have_decl=0 |
81ecdfbb | 11647 | fi |
81ecdfbb | 11648 | |
05ea2a05 TT |
11649 | cat >>confdefs.h <<_ACEOF |
11650 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
11651 | _ACEOF | |
81ecdfbb | 11652 | |
81ecdfbb | 11653 | |
06825bd1 | 11654 | |
05ea2a05 TT |
11655 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
11656 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
11657 | ac_have_decl=1 | |
81ecdfbb | 11658 | else |
05ea2a05 | 11659 | ac_have_decl=0 |
81ecdfbb | 11660 | fi |
bec39cab | 11661 | |
05ea2a05 TT |
11662 | cat >>confdefs.h <<_ACEOF |
11663 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
11664 | _ACEOF | |
81ecdfbb | 11665 | |
05ea2a05 TT |
11666 | |
11667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 | |
11668 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
11669 | if ${am_cv_val_LC_MESSAGES+:} false; then : | |
11670 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11671 | else |
81ecdfbb | 11672 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11673 | /* end confdefs.h. */ |
05ea2a05 | 11674 | #include <locale.h> |
a9322a30 TT |
11675 | int |
11676 | main () | |
11677 | { | |
05ea2a05 TT |
11678 | return LC_MESSAGES |
11679 | ; | |
a9322a30 TT |
11680 | return 0; |
11681 | } | |
bec39cab | 11682 | _ACEOF |
05ea2a05 TT |
11683 | if ac_fn_c_try_link "$LINENO"; then : |
11684 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 11685 | else |
05ea2a05 | 11686 | am_cv_val_LC_MESSAGES=no |
81ecdfbb | 11687 | fi |
05ea2a05 TT |
11688 | rm -f core conftest.err conftest.$ac_objext \ |
11689 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 11690 | fi |
05ea2a05 TT |
11691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
11692 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
11693 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 11694 | |
05ea2a05 | 11695 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
bec39cab | 11696 | |
05ea2a05 | 11697 | fi |
5ee754fc | 11698 | |
bec39cab | 11699 | |
05ea2a05 TT |
11700 | # ------------------ # |
11701 | # Checks for types. # | |
11702 | # ------------------ # | |
11703 | ||
11704 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | |
11705 | #include <sys/socket.h> | |
11706 | ||
11707 | " | |
11708 | if test "x$ac_cv_type_socklen_t" = xyes; then : | |
11709 | ||
11710 | cat >>confdefs.h <<_ACEOF | |
11711 | #define HAVE_SOCKLEN_T 1 | |
bec39cab | 11712 | _ACEOF |
c906108c | 11713 | |
05ea2a05 | 11714 | |
bec39cab | 11715 | fi |
81ecdfbb | 11716 | |
81ecdfbb | 11717 | |
05ea2a05 TT |
11718 | # ------------------------------------- # |
11719 | # Checks for compiler characteristics. # | |
11720 | # ------------------------------------- # | |
a9322a30 | 11721 | |
05ea2a05 TT |
11722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
11723 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
11724 | if ${ac_cv_c_const+:} false; then : | |
11725 | $as_echo_n "(cached) " >&6 | |
11726 | else | |
11727 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11728 | /* end confdefs.h. */ | |
bec39cab | 11729 | |
05ea2a05 TT |
11730 | int |
11731 | main () | |
11732 | { | |
bec39cab | 11733 | |
05ea2a05 TT |
11734 | #ifndef __cplusplus |
11735 | /* Ultrix mips cc rejects this sort of thing. */ | |
11736 | typedef int charset[2]; | |
11737 | const charset cs = { 0, 0 }; | |
11738 | /* SunOS 4.1.1 cc rejects this. */ | |
11739 | char const *const *pcpcc; | |
11740 | char **ppc; | |
11741 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
11742 | struct point {int x, y;}; | |
11743 | static struct point const zero = {0,0}; | |
11744 | /* AIX XL C 1.02.0.0 rejects this. | |
11745 | It does not let you subtract one const X* pointer from another in | |
11746 | an arm of an if-expression whose if-part is not a constant | |
11747 | expression */ | |
11748 | const char *g = "string"; | |
11749 | pcpcc = &g + (g ? g-g : 0); | |
11750 | /* HPUX 7.0 cc rejects these. */ | |
11751 | ++pcpcc; | |
11752 | ppc = (char**) pcpcc; | |
11753 | pcpcc = (char const *const *) ppc; | |
11754 | { /* SCO 3.2v4 cc rejects this sort of thing. */ | |
11755 | char tx; | |
11756 | char *t = &tx; | |
11757 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5ee754fc | 11758 | |
05ea2a05 TT |
11759 | *t++ = 0; |
11760 | if (s) return 0; | |
11761 | } | |
11762 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
11763 | int x[] = {25, 17}; | |
11764 | const int *foo = &x[0]; | |
11765 | ++foo; | |
11766 | } | |
11767 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
11768 | typedef const int *iptr; | |
11769 | iptr p = 0; | |
11770 | ++p; | |
11771 | } | |
11772 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying | |
11773 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
11774 | struct s { int j; const int *ap[3]; } bx; | |
11775 | struct s *b = &bx; b->j = 5; | |
11776 | } | |
11777 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
11778 | const int foo = 10; | |
11779 | if (!foo) return 0; | |
11780 | } | |
11781 | return !cs[0] && !zero.x; | |
11782 | #endif | |
5ee754fc | 11783 | |
05ea2a05 TT |
11784 | ; |
11785 | return 0; | |
11786 | } | |
bec39cab | 11787 | _ACEOF |
05ea2a05 TT |
11788 | if ac_fn_c_try_compile "$LINENO"; then : |
11789 | ac_cv_c_const=yes | |
11790 | else | |
11791 | ac_cv_c_const=no | |
11792 | fi | |
11793 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ee754fc | 11794 | fi |
05ea2a05 TT |
11795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
11796 | $as_echo "$ac_cv_c_const" >&6; } | |
11797 | if test $ac_cv_c_const = no; then | |
5ee754fc | 11798 | |
05ea2a05 | 11799 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 11800 | |
05ea2a05 TT |
11801 | fi |
11802 | ||
11803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
11804 | $as_echo_n "checking for inline... " >&6; } | |
11805 | if ${ac_cv_c_inline+:} false; then : | |
11806 | $as_echo_n "(cached) " >&6 | |
11807 | else | |
11808 | ac_cv_c_inline=no | |
11809 | for ac_kw in inline __inline__ __inline; do | |
11810 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11811 | /* end confdefs.h. */ | |
11812 | #ifndef __cplusplus | |
11813 | typedef int foo_t; | |
11814 | static $ac_kw foo_t static_foo () {return 0; } | |
11815 | $ac_kw foo_t foo () {return 0; } | |
81ecdfbb | 11816 | #endif |
bec39cab | 11817 | |
a8111142 | 11818 | _ACEOF |
05ea2a05 TT |
11819 | if ac_fn_c_try_compile "$LINENO"; then : |
11820 | ac_cv_c_inline=$ac_kw | |
a8111142 | 11821 | fi |
05ea2a05 TT |
11822 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11823 | test "$ac_cv_c_inline" != no && break | |
81ecdfbb | 11824 | done |
a8111142 | 11825 | |
05ea2a05 TT |
11826 | fi |
11827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
11828 | $as_echo "$ac_cv_c_inline" >&6; } | |
a8111142 | 11829 | |
05ea2a05 TT |
11830 | case $ac_cv_c_inline in |
11831 | inline | yes) ;; | |
11832 | *) | |
11833 | case $ac_cv_c_inline in | |
11834 | no) ac_val=;; | |
11835 | *) ac_val=$ac_cv_c_inline;; | |
11836 | esac | |
11837 | cat >>confdefs.h <<_ACEOF | |
11838 | #ifndef __cplusplus | |
11839 | #define inline $ac_val | |
11840 | #endif | |
07697489 | 11841 | _ACEOF |
05ea2a05 TT |
11842 | ;; |
11843 | esac | |
07697489 | 11844 | |
05ea2a05 TT |
11845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
11846 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
11847 | if ${ac_cv_c_bigendian+:} false; then : | |
07697489 PA |
11848 | $as_echo_n "(cached) " >&6 |
11849 | else | |
05ea2a05 TT |
11850 | ac_cv_c_bigendian=unknown |
11851 | # See if we're dealing with a universal compiler. | |
11852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11853 | /* end confdefs.h. */ | |
11854 | #ifndef __APPLE_CC__ | |
11855 | not a universal capable compiler | |
11856 | #endif | |
11857 | typedef int dummy; | |
07697489 | 11858 | |
05ea2a05 TT |
11859 | _ACEOF |
11860 | if ac_fn_c_try_compile "$LINENO"; then : | |
07697489 | 11861 | |
05ea2a05 TT |
11862 | # Check for potential -arch flags. It is not universal unless |
11863 | # there are at least two -arch flags with different values. | |
11864 | ac_arch= | |
11865 | ac_prev= | |
11866 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
11867 | if test -n "$ac_prev"; then | |
11868 | case $ac_word in | |
11869 | i?86 | x86_64 | ppc | ppc64) | |
11870 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
11871 | ac_arch=$ac_word | |
11872 | else | |
11873 | ac_cv_c_bigendian=universal | |
11874 | break | |
11875 | fi | |
11876 | ;; | |
11877 | esac | |
11878 | ac_prev= | |
11879 | elif test "x$ac_word" = "x-arch"; then | |
11880 | ac_prev=arch | |
11881 | fi | |
11882 | done | |
07697489 | 11883 | fi |
05ea2a05 TT |
11884 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11885 | if test $ac_cv_c_bigendian = unknown; then | |
11886 | # See if sys/param.h defines the BYTE_ORDER macro. | |
11887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11888 | /* end confdefs.h. */ | |
11889 | #include <sys/types.h> | |
11890 | #include <sys/param.h> | |
07697489 | 11891 | |
05ea2a05 TT |
11892 | int |
11893 | main () | |
11894 | { | |
11895 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
11896 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
11897 | && LITTLE_ENDIAN) | |
11898 | bogus endian macros | |
11899 | #endif | |
07697489 | 11900 | |
05ea2a05 TT |
11901 | ; |
11902 | return 0; | |
11903 | } | |
07697489 | 11904 | _ACEOF |
05ea2a05 TT |
11905 | if ac_fn_c_try_compile "$LINENO"; then : |
11906 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
11907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11908 | /* end confdefs.h. */ | |
11909 | #include <sys/types.h> | |
11910 | #include <sys/param.h> | |
07697489 | 11911 | |
05ea2a05 TT |
11912 | int |
11913 | main () | |
11914 | { | |
11915 | #if BYTE_ORDER != BIG_ENDIAN | |
11916 | not big endian | |
11917 | #endif | |
07697489 | 11918 | |
05ea2a05 TT |
11919 | ; |
11920 | return 0; | |
11921 | } | |
07697489 | 11922 | _ACEOF |
05ea2a05 TT |
11923 | if ac_fn_c_try_compile "$LINENO"; then : |
11924 | ac_cv_c_bigendian=yes | |
07697489 | 11925 | else |
05ea2a05 | 11926 | ac_cv_c_bigendian=no |
07697489 | 11927 | fi |
05ea2a05 | 11928 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 11929 | fi |
05ea2a05 TT |
11930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11931 | fi | |
11932 | if test $ac_cv_c_bigendian = unknown; then | |
11933 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
11934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11935 | /* end confdefs.h. */ | |
11936 | #include <limits.h> | |
07697489 | 11937 | |
05ea2a05 TT |
11938 | int |
11939 | main () | |
11940 | { | |
11941 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
11942 | bogus endian macros | |
11943 | #endif | |
07697489 | 11944 | |
05ea2a05 TT |
11945 | ; |
11946 | return 0; | |
11947 | } | |
07697489 | 11948 | _ACEOF |
05ea2a05 TT |
11949 | if ac_fn_c_try_compile "$LINENO"; then : |
11950 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
11951 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11952 | /* end confdefs.h. */ | |
11953 | #include <limits.h> | |
07697489 | 11954 | |
05ea2a05 TT |
11955 | int |
11956 | main () | |
11957 | { | |
11958 | #ifndef _BIG_ENDIAN | |
11959 | not big endian | |
11960 | #endif | |
07697489 | 11961 | |
05ea2a05 TT |
11962 | ; |
11963 | return 0; | |
11964 | } | |
07697489 | 11965 | _ACEOF |
05ea2a05 TT |
11966 | if ac_fn_c_try_compile "$LINENO"; then : |
11967 | ac_cv_c_bigendian=yes | |
07697489 | 11968 | else |
05ea2a05 | 11969 | ac_cv_c_bigendian=no |
07697489 | 11970 | fi |
05ea2a05 | 11971 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 11972 | fi |
05ea2a05 TT |
11973 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11974 | fi | |
11975 | if test $ac_cv_c_bigendian = unknown; then | |
11976 | # Compile a test program. | |
11977 | if test "$cross_compiling" = yes; then : | |
11978 | # Try to guess by grepping values from an object file. | |
11979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11980 | /* end confdefs.h. */ | |
11981 | short int ascii_mm[] = | |
11982 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
11983 | short int ascii_ii[] = | |
11984 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
11985 | int use_ascii (int i) { | |
11986 | return ascii_mm[i] + ascii_ii[i]; | |
11987 | } | |
11988 | short int ebcdic_ii[] = | |
11989 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
11990 | short int ebcdic_mm[] = | |
11991 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
11992 | int use_ebcdic (int i) { | |
11993 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
11994 | } | |
11995 | extern int foo; | |
07697489 | 11996 | |
05ea2a05 TT |
11997 | int |
11998 | main () | |
11999 | { | |
12000 | return use_ascii (foo) == use_ebcdic (foo); | |
12001 | ; | |
12002 | return 0; | |
12003 | } | |
07697489 | 12004 | _ACEOF |
05ea2a05 TT |
12005 | if ac_fn_c_try_compile "$LINENO"; then : |
12006 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12007 | ac_cv_c_bigendian=yes | |
12008 | fi | |
12009 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12010 | if test "$ac_cv_c_bigendian" = unknown; then | |
12011 | ac_cv_c_bigendian=no | |
12012 | else | |
12013 | # finding both strings is unlikely to happen, but who knows? | |
12014 | ac_cv_c_bigendian=unknown | |
12015 | fi | |
12016 | fi | |
07697489 | 12017 | fi |
05ea2a05 TT |
12018 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12019 | else | |
12020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12021 | /* end confdefs.h. */ | |
12022 | $ac_includes_default | |
12023 | int | |
12024 | main () | |
12025 | { | |
07697489 | 12026 | |
05ea2a05 TT |
12027 | /* Are we little or big endian? From Harbison&Steele. */ |
12028 | union | |
12029 | { | |
12030 | long int l; | |
12031 | char c[sizeof (long int)]; | |
12032 | } u; | |
12033 | u.l = 1; | |
12034 | return u.c[sizeof (long int) - 1] == 1; | |
12035 | ||
12036 | ; | |
12037 | return 0; | |
12038 | } | |
07697489 | 12039 | _ACEOF |
05ea2a05 TT |
12040 | if ac_fn_c_try_run "$LINENO"; then : |
12041 | ac_cv_c_bigendian=no | |
07697489 | 12042 | else |
05ea2a05 TT |
12043 | ac_cv_c_bigendian=yes |
12044 | fi | |
12045 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12046 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
07697489 PA |
12047 | fi |
12048 | ||
05ea2a05 | 12049 | fi |
07697489 | 12050 | fi |
05ea2a05 TT |
12051 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
12052 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12053 | case $ac_cv_c_bigendian in #( | |
12054 | yes) | |
12055 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12056 | ;; #( | |
12057 | no) | |
12058 | ;; #( | |
12059 | universal) | |
07697489 | 12060 | |
05ea2a05 | 12061 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
07697489 | 12062 | |
05ea2a05 TT |
12063 | ;; #( |
12064 | *) | |
12065 | as_fn_error $? "unknown endianness | |
12066 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12067 | esac | |
07697489 PA |
12068 | |
12069 | ||
05ea2a05 TT |
12070 | # ------------------------------ # |
12071 | # Checks for library functions. # | |
12072 | # ------------------------------ # | |
81ecdfbb | 12073 | |
05ea2a05 TT |
12074 | for ac_func in getuid getgid \ |
12075 | pipe poll pread pread64 pwrite resize_term \ | |
12076 | getpgid setsid \ | |
12077 | sigaction sigsetmask socketpair \ | |
12078 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ | |
12079 | setrlimit getrlimit posix_madvise waitpid \ | |
12080 | use_default_colors | |
12081 | do : | |
12082 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12083 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12084 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
12085 | cat >>confdefs.h <<_ACEOF | |
12086 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
a9322a30 | 12087 | _ACEOF |
5ee754fc | 12088 | |
05ea2a05 TT |
12089 | fi |
12090 | done | |
5ee754fc | 12091 | |
05ea2a05 TT |
12092 | |
12093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
12094 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12095 | if ${am_cv_langinfo_codeset+:} false; then : | |
81ecdfbb | 12096 | $as_echo_n "(cached) " >&6 |
bec39cab | 12097 | else |
81ecdfbb | 12098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12099 | /* end confdefs.h. */ |
05ea2a05 | 12100 | #include <langinfo.h> |
a9322a30 TT |
12101 | int |
12102 | main () | |
12103 | { | |
05ea2a05 | 12104 | char* cs = nl_langinfo(CODESET); |
a9322a30 TT |
12105 | ; |
12106 | return 0; | |
12107 | } | |
bec39cab | 12108 | _ACEOF |
81ecdfbb | 12109 | if ac_fn_c_try_link "$LINENO"; then : |
05ea2a05 | 12110 | am_cv_langinfo_codeset=yes |
bec39cab | 12111 | else |
05ea2a05 | 12112 | am_cv_langinfo_codeset=no |
81ecdfbb RW |
12113 | fi |
12114 | rm -f core conftest.err conftest.$ac_objext \ | |
12115 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 12116 | |
81ecdfbb | 12117 | fi |
05ea2a05 TT |
12118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12119 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
12120 | if test $am_cv_langinfo_codeset = yes; then | |
bec39cab | 12121 | |
05ea2a05 | 12122 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
81ecdfbb RW |
12123 | |
12124 | fi | |
12125 | ||
05ea2a05 TT |
12126 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
12127 | if test "x$ac_cv_type_size_t" = xyes; then : | |
81ecdfbb | 12128 | |
05ea2a05 | 12129 | else |
81ecdfbb RW |
12130 | |
12131 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12132 | #define size_t unsigned int |
7eb368b3 | 12133 | _ACEOF |
7eb368b3 | 12134 | |
7eb368b3 | 12135 | fi |
7eb368b3 | 12136 | |
7eb368b3 | 12137 | |
a9322a30 | 12138 | |
7eb368b3 | 12139 | |
05ea2a05 TT |
12140 | for ac_header in $ac_header_list |
12141 | do : | |
12142 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12143 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
12144 | " | |
12145 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12146 | cat >>confdefs.h <<_ACEOF | |
12147 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12148 | _ACEOF | |
7eb368b3 | 12149 | |
05ea2a05 | 12150 | fi |
7eb368b3 | 12151 | |
05ea2a05 | 12152 | done |
a9322a30 | 12153 | |
05ea2a05 TT |
12154 | |
12155 | ||
12156 | ||
12157 | ||
12158 | ||
12159 | ||
12160 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
12161 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
12162 | ||
12163 | else | |
bec39cab | 12164 | |
a9322a30 | 12165 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 12166 | #define pid_t int |
a9322a30 TT |
12167 | _ACEOF |
12168 | ||
05ea2a05 TT |
12169 | fi |
12170 | ||
12171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
12172 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
12173 | if ${ac_cv_path_SED+:} false; then : | |
12174 | $as_echo_n "(cached) " >&6 | |
12175 | else | |
12176 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
12177 | for ac_i in 1 2 3 4 5 6 7; do | |
12178 | ac_script="$ac_script$as_nl$ac_script" | |
12179 | done | |
12180 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
12181 | { ac_script=; unset ac_script;} | |
12182 | if test -z "$SED"; then | |
12183 | ac_path_SED_found=false | |
12184 | # Loop through the user's path and test for each of PROGNAME-LIST | |
12185 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12186 | for as_dir in $PATH | |
12187 | do | |
12188 | IFS=$as_save_IFS | |
12189 | test -z "$as_dir" && as_dir=. | |
12190 | for ac_prog in sed gsed; do | |
12191 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12192 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
12193 | as_fn_executable_p "$ac_path_SED" || continue | |
12194 | # Check for GNU ac_path_SED and select it if it is found. | |
12195 | # Check for GNU $ac_path_SED | |
12196 | case `"$ac_path_SED" --version 2>&1` in | |
12197 | *GNU*) | |
12198 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
12199 | *) | |
12200 | ac_count=0 | |
12201 | $as_echo_n 0123456789 >"conftest.in" | |
12202 | while : | |
12203 | do | |
12204 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
12205 | mv "conftest.tmp" "conftest.in" | |
12206 | cp "conftest.in" "conftest.nl" | |
12207 | $as_echo '' >> "conftest.nl" | |
12208 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
12209 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
12210 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
12211 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
12212 | # Best one so far, save it but keep looking for a better one | |
12213 | ac_cv_path_SED="$ac_path_SED" | |
12214 | ac_path_SED_max=$ac_count | |
12215 | fi | |
12216 | # 10*(2^10) chars as input seems more than enough | |
12217 | test $ac_count -gt 10 && break | |
12218 | done | |
12219 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
12220 | esac | |
a9322a30 | 12221 | |
05ea2a05 TT |
12222 | $ac_path_SED_found && break 3 |
12223 | done | |
12224 | done | |
12225 | done | |
12226 | IFS=$as_save_IFS | |
12227 | if test -z "$ac_cv_path_SED"; then | |
12228 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
12229 | fi | |
12230 | else | |
12231 | ac_cv_path_SED=$SED | |
a9322a30 TT |
12232 | fi |
12233 | ||
05ea2a05 TT |
12234 | fi |
12235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
12236 | $as_echo "$ac_cv_path_SED" >&6; } | |
12237 | SED="$ac_cv_path_SED" | |
12238 | rm -f conftest.sed | |
a9322a30 | 12239 | |
a9322a30 | 12240 | |
05ea2a05 TT |
12241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
12242 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
12243 | if ${ac_cv_header_stdc+:} false; then : | |
81ecdfbb | 12244 | $as_echo_n "(cached) " >&6 |
a9322a30 | 12245 | else |
81ecdfbb | 12246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12247 | /* end confdefs.h. */ |
05ea2a05 TT |
12248 | #include <stdlib.h> |
12249 | #include <stdarg.h> | |
12250 | #include <string.h> | |
12251 | #include <float.h> | |
a9322a30 TT |
12252 | |
12253 | int | |
12254 | main () | |
12255 | { | |
d0ac1c44 | 12256 | |
a9322a30 TT |
12257 | ; |
12258 | return 0; | |
12259 | } | |
bec39cab | 12260 | _ACEOF |
81ecdfbb | 12261 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 12262 | ac_cv_header_stdc=yes |
5ee754fc | 12263 | else |
05ea2a05 | 12264 | ac_cv_header_stdc=no |
5ee754fc | 12265 | fi |
81ecdfbb | 12266 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12267 | |
05ea2a05 TT |
12268 | if test $ac_cv_header_stdc = yes; then |
12269 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12270 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12271 | /* end confdefs.h. */ | |
12272 | #include <string.h> | |
bec39cab | 12273 | |
05ea2a05 TT |
12274 | _ACEOF |
12275 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12276 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 12277 | |
bec39cab | 12278 | else |
05ea2a05 TT |
12279 | ac_cv_header_stdc=no |
12280 | fi | |
12281 | rm -f conftest* | |
12282 | ||
12283 | fi | |
12284 | ||
12285 | if test $ac_cv_header_stdc = yes; then | |
12286 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 12287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12288 | /* end confdefs.h. */ |
05ea2a05 | 12289 | #include <stdlib.h> |
a9322a30 | 12290 | |
bec39cab | 12291 | _ACEOF |
05ea2a05 TT |
12292 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
12293 | $EGREP "free" >/dev/null 2>&1; then : | |
bec39cab | 12294 | |
05ea2a05 TT |
12295 | else |
12296 | ac_cv_header_stdc=no | |
5ee754fc | 12297 | fi |
05ea2a05 | 12298 | rm -f conftest* |
5ee754fc | 12299 | |
05ea2a05 | 12300 | fi |
bec39cab | 12301 | |
05ea2a05 TT |
12302 | if test $ac_cv_header_stdc = yes; then |
12303 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12304 | if test "$cross_compiling" = yes; then : | |
12305 | : | |
bec39cab | 12306 | else |
05ea2a05 | 12307 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
81ecdfbb | 12308 | /* end confdefs.h. */ |
05ea2a05 TT |
12309 | #include <ctype.h> |
12310 | #include <stdlib.h> | |
12311 | #if ((' ' & 0x0FF) == 0x020) | |
12312 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12313 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12314 | #else | |
12315 | # define ISLOWER(c) \ | |
12316 | (('a' <= (c) && (c) <= 'i') \ | |
12317 | || ('j' <= (c) && (c) <= 'r') \ | |
12318 | || ('s' <= (c) && (c) <= 'z')) | |
12319 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12320 | #endif | |
a9322a30 | 12321 | |
05ea2a05 | 12322 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
a9322a30 TT |
12323 | int |
12324 | main () | |
12325 | { | |
05ea2a05 TT |
12326 | int i; |
12327 | for (i = 0; i < 256; i++) | |
12328 | if (XOR (islower (i), ISLOWER (i)) | |
12329 | || toupper (i) != TOUPPER (i)) | |
12330 | return 2; | |
a9322a30 TT |
12331 | return 0; |
12332 | } | |
bec39cab | 12333 | _ACEOF |
05ea2a05 | 12334 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12335 | |
5ee754fc | 12336 | else |
05ea2a05 | 12337 | ac_cv_header_stdc=no |
5ee754fc | 12338 | fi |
05ea2a05 TT |
12339 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12340 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
81ecdfbb | 12341 | fi |
bec39cab | 12342 | |
05ea2a05 TT |
12343 | fi |
12344 | fi | |
12345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
12346 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12347 | if test $ac_cv_header_stdc = yes; then | |
81ecdfbb | 12348 | |
05ea2a05 TT |
12349 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
12350 | ||
12351 | fi | |
81ecdfbb | 12352 | |
05ea2a05 TT |
12353 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
12354 | # for constant arguments. Useless! | |
12355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
12356 | $as_echo_n "checking for working alloca.h... " >&6; } | |
12357 | if ${ac_cv_working_alloca_h+:} false; then : | |
12358 | $as_echo_n "(cached) " >&6 | |
12359 | else | |
12360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12361 | /* end confdefs.h. */ | |
12362 | #include <alloca.h> | |
7eb368b3 NR |
12363 | int |
12364 | main () | |
12365 | { | |
05ea2a05 TT |
12366 | char *p = (char *) alloca (2 * sizeof (int)); |
12367 | if (p) return 0; | |
7eb368b3 NR |
12368 | ; |
12369 | return 0; | |
12370 | } | |
12371 | _ACEOF | |
05ea2a05 TT |
12372 | if ac_fn_c_try_link "$LINENO"; then : |
12373 | ac_cv_working_alloca_h=yes | |
81ecdfbb | 12374 | else |
05ea2a05 | 12375 | ac_cv_working_alloca_h=no |
a9322a30 | 12376 | fi |
05ea2a05 TT |
12377 | rm -f core conftest.err conftest.$ac_objext \ |
12378 | conftest$ac_exeext conftest.$ac_ext | |
a9322a30 | 12379 | fi |
05ea2a05 TT |
12380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
12381 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
12382 | if test $ac_cv_working_alloca_h = yes; then | |
12383 | ||
12384 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
7eb368b3 | 12385 | |
7eb368b3 | 12386 | fi |
05ea2a05 TT |
12387 | |
12388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
12389 | $as_echo_n "checking for alloca... " >&6; } | |
12390 | if ${ac_cv_func_alloca_works+:} false; then : | |
12391 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12392 | else |
81ecdfbb | 12393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12394 | /* end confdefs.h. */ |
05ea2a05 TT |
12395 | #ifdef __GNUC__ |
12396 | # define alloca __builtin_alloca | |
12397 | #else | |
12398 | # ifdef _MSC_VER | |
12399 | # include <malloc.h> | |
12400 | # define alloca _alloca | |
12401 | # else | |
12402 | # ifdef HAVE_ALLOCA_H | |
12403 | # include <alloca.h> | |
12404 | # else | |
12405 | # ifdef _AIX | |
12406 | #pragma alloca | |
12407 | # else | |
12408 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
12409 | void *alloca (size_t); | |
12410 | # endif | |
12411 | # endif | |
12412 | # endif | |
12413 | # endif | |
12414 | #endif | |
12415 | ||
d3ea6809 MM |
12416 | int |
12417 | main () | |
12418 | { | |
05ea2a05 TT |
12419 | char *p = (char *) alloca (1); |
12420 | if (p) return 0; | |
81ecdfbb RW |
12421 | ; |
12422 | return 0; | |
d3ea6809 MM |
12423 | } |
12424 | _ACEOF | |
05ea2a05 TT |
12425 | if ac_fn_c_try_link "$LINENO"; then : |
12426 | ac_cv_func_alloca_works=yes | |
d3ea6809 | 12427 | else |
05ea2a05 | 12428 | ac_cv_func_alloca_works=no |
a9322a30 | 12429 | fi |
05ea2a05 TT |
12430 | rm -f core conftest.err conftest.$ac_objext \ |
12431 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 12432 | fi |
05ea2a05 TT |
12433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
12434 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
81ecdfbb | 12435 | |
05ea2a05 | 12436 | if test $ac_cv_func_alloca_works = yes; then |
d3ea6809 | 12437 | |
05ea2a05 | 12438 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
d3ea6809 | 12439 | |
05ea2a05 TT |
12440 | else |
12441 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
12442 | # that cause trouble. Some versions do not even contain alloca or | |
12443 | # contain a buggy version. If you still want to use their alloca, | |
12444 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
d3ea6809 | 12445 | |
05ea2a05 | 12446 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
d0ac1c44 | 12447 | |
05ea2a05 | 12448 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
d0ac1c44 SM |
12449 | |
12450 | ||
05ea2a05 TT |
12451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
12452 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
12453 | if ${ac_cv_os_cray+:} false; then : | |
12454 | $as_echo_n "(cached) " >&6 | |
12455 | else | |
12456 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12457 | /* end confdefs.h. */ | |
12458 | #if defined CRAY && ! defined CRAY2 | |
12459 | webecray | |
12460 | #else | |
12461 | wenotbecray | |
12462 | #endif | |
12463 | ||
12464 | _ACEOF | |
12465 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12466 | $EGREP "webecray" >/dev/null 2>&1; then : | |
12467 | ac_cv_os_cray=yes | |
12468 | else | |
12469 | ac_cv_os_cray=no | |
12470 | fi | |
12471 | rm -f conftest* | |
12472 | ||
12473 | fi | |
12474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
12475 | $as_echo "$ac_cv_os_cray" >&6; } | |
12476 | if test $ac_cv_os_cray = yes; then | |
12477 | for ac_func in _getb67 GETB67 getb67; do | |
12478 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12479 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12480 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
12481 | ||
12482 | cat >>confdefs.h <<_ACEOF | |
12483 | #define CRAY_STACKSEG_END $ac_func | |
12484 | _ACEOF | |
12485 | ||
12486 | break | |
12487 | fi | |
12488 | ||
12489 | done | |
12490 | fi | |
12491 | ||
12492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
12493 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
12494 | if ${ac_cv_c_stack_direction+:} false; then : | |
12495 | $as_echo_n "(cached) " >&6 | |
12496 | else | |
12497 | if test "$cross_compiling" = yes; then : | |
12498 | ac_cv_c_stack_direction=0 | |
12499 | else | |
12500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12501 | /* end confdefs.h. */ | |
12502 | $ac_includes_default | |
12503 | int | |
12504 | find_stack_direction (int *addr, int depth) | |
12505 | { | |
12506 | int dir, dummy = 0; | |
12507 | if (! addr) | |
12508 | addr = &dummy; | |
12509 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
12510 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
12511 | return dir + dummy; | |
12512 | } | |
12513 | ||
12514 | int | |
12515 | main (int argc, char **argv) | |
12516 | { | |
12517 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
12518 | } | |
12519 | _ACEOF | |
12520 | if ac_fn_c_try_run "$LINENO"; then : | |
12521 | ac_cv_c_stack_direction=1 | |
12522 | else | |
12523 | ac_cv_c_stack_direction=-1 | |
12524 | fi | |
12525 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12526 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12527 | fi | |
12528 | ||
12529 | fi | |
12530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12531 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
12532 | cat >>confdefs.h <<_ACEOF | |
12533 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12534 | _ACEOF | |
12535 | ||
12536 | ||
12537 | fi | |
12538 | ||
12539 | ||
12540 | WIN32APILIBS= | |
12541 | case ${host} in | |
12542 | *mingw32*) | |
12543 | ||
12544 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
12545 | ||
12546 | WIN32APILIBS="-lws2_32" | |
12547 | ;; | |
12548 | esac | |
12549 | ||
12550 | ||
12551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
12552 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12553 | if ${am_cv_langinfo_codeset+:} false; then : | |
12554 | $as_echo_n "(cached) " >&6 | |
12555 | else | |
12556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12557 | /* end confdefs.h. */ | |
12558 | #include <langinfo.h> | |
12559 | int | |
12560 | main () | |
12561 | { | |
12562 | char* cs = nl_langinfo(CODESET); | |
12563 | ; | |
12564 | return 0; | |
12565 | } | |
12566 | _ACEOF | |
12567 | if ac_fn_c_try_link "$LINENO"; then : | |
12568 | am_cv_langinfo_codeset=yes | |
12569 | else | |
12570 | am_cv_langinfo_codeset=no | |
12571 | fi | |
12572 | rm -f core conftest.err conftest.$ac_objext \ | |
12573 | conftest$ac_exeext conftest.$ac_ext | |
12574 | ||
12575 | fi | |
12576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
12577 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
12578 | if test $am_cv_langinfo_codeset = yes; then | |
12579 | ||
12580 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
12581 | ||
12582 | fi | |
12583 | ||
12584 | ||
12585 | 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 dlfcn.h linux/elf.h sys/procfs.h proc_service.h | |
81ecdfbb RW |
12586 | do : |
12587 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
05ea2a05 | 12588 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
d0ac1c44 | 12589 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
bec39cab | 12590 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12591 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 12592 | _ACEOF |
b757528f | 12593 | |
b757528f | 12594 | fi |
bec39cab | 12595 | |
a9322a30 | 12596 | done |
a3828db0 | 12597 | |
d0ac1c44 SM |
12598 | |
12599 | ||
a9322a30 | 12600 | for ac_func in getpagesize |
81ecdfbb RW |
12601 | do : |
12602 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d0ac1c44 | 12603 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
bec39cab | 12604 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12605 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 12606 | _ACEOF |
bcb3dc3d | 12607 | |
bcb3dc3d MK |
12608 | fi |
12609 | done | |
12610 | ||
81ecdfbb RW |
12611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
12612 | $as_echo_n "checking for working mmap... " >&6; } | |
d0ac1c44 | 12613 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
81ecdfbb | 12614 | $as_echo_n "(cached) " >&6 |
a9322a30 | 12615 | else |
81ecdfbb | 12616 | if test "$cross_compiling" = yes; then : |
a9322a30 | 12617 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 12618 | else |
81ecdfbb | 12619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12620 | /* end confdefs.h. */ |
a9322a30 TT |
12621 | $ac_includes_default |
12622 | /* malloc might have been renamed as rpl_malloc. */ | |
12623 | #undef malloc | |
bec39cab | 12624 | |
a9322a30 TT |
12625 | /* Thanks to Mike Haertel and Jim Avera for this test. |
12626 | Here is a matrix of mmap possibilities: | |
12627 | mmap private not fixed | |
12628 | mmap private fixed at somewhere currently unmapped | |
12629 | mmap private fixed at somewhere already mapped | |
12630 | mmap shared not fixed | |
12631 | mmap shared fixed at somewhere currently unmapped | |
12632 | mmap shared fixed at somewhere already mapped | |
12633 | For private mappings, we should verify that changes cannot be read() | |
12634 | back from the file, nor mmap's back from the file at a different | |
12635 | address. (There have been systems where private was not correctly | |
12636 | implemented like the infamous i386 svr4.0, and systems where the | |
12637 | VM page cache was not coherent with the file system buffer cache | |
12638 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
12639 | For shared mappings, we should conversely verify that changes get | |
12640 | propagated back to all the places they're supposed to be. | |
bec39cab | 12641 | |
a9322a30 TT |
12642 | Grep wants private fixed already mapped. |
12643 | The main things grep needs to know about mmap are: | |
12644 | * does it exist and is it safe to write into the mmap'd area | |
12645 | * how to use it (BSD variants) */ | |
8b9cf735 | 12646 | |
a9322a30 TT |
12647 | #include <fcntl.h> |
12648 | #include <sys/mman.h> | |
8b9cf735 | 12649 | |
81ecdfbb | 12650 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 12651 | char *malloc (); |
a3828db0 MK |
12652 | #endif |
12653 | ||
a9322a30 | 12654 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 12655 | #ifndef HAVE_GETPAGESIZE |
a9322a30 TT |
12656 | # ifdef _SC_PAGESIZE |
12657 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
12658 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 12659 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
12660 | # include <sys/param.h> |
12661 | # ifdef EXEC_PAGESIZE | |
12662 | # define getpagesize() EXEC_PAGESIZE | |
12663 | # else /* no EXEC_PAGESIZE */ | |
12664 | # ifdef NBPG | |
12665 | # define getpagesize() NBPG * CLSIZE | |
12666 | # ifndef CLSIZE | |
12667 | # define CLSIZE 1 | |
12668 | # endif /* no CLSIZE */ | |
12669 | # else /* no NBPG */ | |
12670 | # ifdef NBPC | |
12671 | # define getpagesize() NBPC | |
12672 | # else /* no NBPC */ | |
12673 | # ifdef PAGESIZE | |
12674 | # define getpagesize() PAGESIZE | |
12675 | # endif /* PAGESIZE */ | |
12676 | # endif /* no NBPC */ | |
12677 | # endif /* no NBPG */ | |
12678 | # endif /* no EXEC_PAGESIZE */ | |
12679 | # else /* no HAVE_SYS_PARAM_H */ | |
12680 | # define getpagesize() 8192 /* punt totally */ | |
12681 | # endif /* no HAVE_SYS_PARAM_H */ | |
12682 | # endif /* no _SC_PAGESIZE */ | |
12683 | ||
12684 | #endif /* no HAVE_GETPAGESIZE */ | |
12685 | ||
bec39cab AC |
12686 | int |
12687 | main () | |
12688 | { | |
a9322a30 | 12689 | char *data, *data2, *data3; |
d0ac1c44 | 12690 | const char *cdata2; |
a9322a30 | 12691 | int i, pagesize; |
d0ac1c44 | 12692 | int fd, fd2; |
a9322a30 TT |
12693 | |
12694 | pagesize = getpagesize (); | |
12695 | ||
12696 | /* First, make a file with some known garbage in it. */ | |
12697 | data = (char *) malloc (pagesize); | |
12698 | if (!data) | |
81ecdfbb | 12699 | return 1; |
a9322a30 TT |
12700 | for (i = 0; i < pagesize; ++i) |
12701 | *(data + i) = rand (); | |
12702 | umask (0); | |
12703 | fd = creat ("conftest.mmap", 0600); | |
12704 | if (fd < 0) | |
d0ac1c44 | 12705 | return 2; |
a9322a30 | 12706 | if (write (fd, data, pagesize) != pagesize) |
d0ac1c44 | 12707 | return 3; |
a9322a30 TT |
12708 | close (fd); |
12709 | ||
d0ac1c44 SM |
12710 | /* Next, check that the tail of a page is zero-filled. File must have |
12711 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
12712 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
12713 | if (fd2 < 0) | |
12714 | return 4; | |
12715 | cdata2 = ""; | |
12716 | if (write (fd2, cdata2, 1) != 1) | |
12717 | return 5; | |
12718 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
12719 | if (data2 == MAP_FAILED) | |
12720 | return 6; | |
12721 | for (i = 0; i < pagesize; ++i) | |
12722 | if (*(data2 + i)) | |
12723 | return 7; | |
12724 | close (fd2); | |
12725 | if (munmap (data2, pagesize)) | |
12726 | return 8; | |
12727 | ||
a9322a30 TT |
12728 | /* Next, try to mmap the file at a fixed address which already has |
12729 | something else allocated at it. If we can, also make sure that | |
12730 | we see the same garbage. */ | |
12731 | fd = open ("conftest.mmap", O_RDWR); | |
12732 | if (fd < 0) | |
d0ac1c44 | 12733 | return 9; |
a9322a30 TT |
12734 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
12735 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
d0ac1c44 | 12736 | return 10; |
a9322a30 TT |
12737 | for (i = 0; i < pagesize; ++i) |
12738 | if (*(data + i) != *(data2 + i)) | |
d0ac1c44 | 12739 | return 11; |
a9322a30 TT |
12740 | |
12741 | /* Finally, make sure that changes to the mapped area do not | |
12742 | percolate back to the file as seen by read(). (This is a bug on | |
12743 | some variants of i386 svr4.0.) */ | |
12744 | for (i = 0; i < pagesize; ++i) | |
12745 | *(data2 + i) = *(data2 + i) + 1; | |
12746 | data3 = (char *) malloc (pagesize); | |
12747 | if (!data3) | |
d0ac1c44 | 12748 | return 12; |
a9322a30 | 12749 | if (read (fd, data3, pagesize) != pagesize) |
d0ac1c44 | 12750 | return 13; |
a9322a30 TT |
12751 | for (i = 0; i < pagesize; ++i) |
12752 | if (*(data + i) != *(data3 + i)) | |
d0ac1c44 | 12753 | return 14; |
a9322a30 | 12754 | close (fd); |
81ecdfbb | 12755 | return 0; |
bec39cab AC |
12756 | } |
12757 | _ACEOF | |
81ecdfbb | 12758 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12759 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 12760 | else |
81ecdfbb | 12761 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 12762 | fi |
81ecdfbb RW |
12763 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12764 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 12765 | fi |
81ecdfbb | 12766 | |
a9322a30 | 12767 | fi |
81ecdfbb RW |
12768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
12769 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
12770 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
12771 | ||
81ecdfbb | 12772 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 12773 | |
086ec9eb | 12774 | fi |
d0ac1c44 | 12775 | rm -f conftest.mmap conftest.txt |
a3828db0 | 12776 | |
05ea2a05 | 12777 | for ac_header in vfork.h |
81ecdfbb RW |
12778 | do : |
12779 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 12780 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
a3828db0 | 12781 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12782 | #define HAVE_VFORK_H 1 |
bec39cab | 12783 | _ACEOF |
c906108c SS |
12784 | |
12785 | fi | |
a9322a30 | 12786 | |
a3828db0 | 12787 | done |
c906108c | 12788 | |
a9322a30 | 12789 | for ac_func in fork vfork |
81ecdfbb RW |
12790 | do : |
12791 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12792 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 12793 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
a3828db0 | 12794 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12795 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 12796 | _ACEOF |
b83266a0 | 12797 | |
97bf5e38 | 12798 | fi |
a3828db0 | 12799 | done |
b83266a0 | 12800 | |
a9322a30 | 12801 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
12802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
12803 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 12804 | if ${ac_cv_func_fork_works+:} false; then : |
81ecdfbb | 12805 | $as_echo_n "(cached) " >&6 |
a9322a30 | 12806 | else |
81ecdfbb | 12807 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12808 | ac_cv_func_fork_works=cross |
12809 | else | |
81ecdfbb RW |
12810 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12811 | /* end confdefs.h. */ | |
12812 | $ac_includes_default | |
12813 | int | |
12814 | main () | |
12815 | { | |
12816 | ||
12817 | /* By Ruediger Kuhlmann. */ | |
12818 | return fork () < 0; | |
12819 | ||
12820 | ; | |
12821 | return 0; | |
12822 | } | |
a9322a30 | 12823 | _ACEOF |
81ecdfbb | 12824 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12825 | ac_cv_func_fork_works=yes |
12826 | else | |
81ecdfbb | 12827 | ac_cv_func_fork_works=no |
a9322a30 | 12828 | fi |
81ecdfbb RW |
12829 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12830 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12831 | fi |
81ecdfbb | 12832 | |
a9322a30 | 12833 | fi |
81ecdfbb RW |
12834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
12835 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
12836 | |
12837 | else | |
12838 | ac_cv_func_fork_works=$ac_cv_func_fork | |
12839 | fi | |
12840 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12841 | case $host in | |
12842 | *-*-amigaos* | *-*-msdosdjgpp*) | |
12843 | # Override, as these systems have only a dummy fork() stub | |
12844 | ac_cv_func_fork_works=no | |
12845 | ;; | |
12846 | *) | |
12847 | ac_cv_func_fork_works=yes | |
12848 | ;; | |
12849 | esac | |
81ecdfbb RW |
12850 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
12851 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12852 | fi |
12853 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
12854 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
12855 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
12856 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 12857 | if ${ac_cv_func_vfork_works+:} false; then : |
81ecdfbb | 12858 | $as_echo_n "(cached) " >&6 |
a9322a30 | 12859 | else |
81ecdfbb | 12860 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
12861 | ac_cv_func_vfork_works=cross |
12862 | else | |
81ecdfbb | 12863 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
12864 | /* end confdefs.h. */ |
12865 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 12866 | $ac_includes_default |
a9322a30 | 12867 | #include <sys/wait.h> |
81ecdfbb | 12868 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
12869 | # include <vfork.h> |
12870 | #endif | |
12871 | /* On some sparc systems, changes by the child to local and incoming | |
12872 | argument registers are propagated back to the parent. The compiler | |
12873 | is told about this with #include <vfork.h>, but some compilers | |
12874 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
12875 | static variable whose address is put into a register that is | |
12876 | clobbered by the vfork. */ | |
12877 | static void | |
12878 | #ifdef __cplusplus | |
12879 | sparc_address_test (int arg) | |
12880 | # else | |
12881 | sparc_address_test (arg) int arg; | |
12882 | #endif | |
12883 | { | |
12884 | static pid_t child; | |
12885 | if (!child) { | |
12886 | child = vfork (); | |
12887 | if (child < 0) { | |
12888 | perror ("vfork"); | |
12889 | _exit(2); | |
12890 | } | |
12891 | if (!child) { | |
12892 | arg = getpid(); | |
12893 | write(-1, "", 0); | |
12894 | _exit (arg); | |
12895 | } | |
12896 | } | |
12897 | } | |
12898 | ||
12899 | int | |
12900 | main () | |
12901 | { | |
12902 | pid_t parent = getpid (); | |
12903 | pid_t child; | |
12904 | ||
12905 | sparc_address_test (0); | |
12906 | ||
12907 | child = vfork (); | |
12908 | ||
12909 | if (child == 0) { | |
12910 | /* Here is another test for sparc vfork register problems. This | |
12911 | test uses lots of local variables, at least as many local | |
12912 | variables as main has allocated so far including compiler | |
12913 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
12914 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
12915 | reuse the register of parent for one of the local variables, | |
12916 | since it will think that parent can't possibly be used any more | |
12917 | in this routine. Assigning to the local variable will thus | |
12918 | munge parent in the parent process. */ | |
12919 | pid_t | |
12920 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
12921 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
12922 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
12923 | use the same hardware register for all 8 local variables. */ | |
12924 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
12925 | || p != p5 || p != p6 || p != p7) | |
12926 | _exit(1); | |
12927 | ||
12928 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
12929 | from child file descriptors. If the child closes a descriptor | |
12930 | before it execs or exits, this munges the parent's descriptor | |
12931 | as well. Test for this by closing stdout in the child. */ | |
12932 | _exit(close(fileno(stdout)) != 0); | |
12933 | } else { | |
12934 | int status; | |
12935 | struct stat st; | |
12936 | ||
12937 | while (wait(&status) != child) | |
12938 | ; | |
81ecdfbb | 12939 | return ( |
a9322a30 TT |
12940 | /* Was there some problem with vforking? */ |
12941 | child < 0 | |
12942 | ||
12943 | /* Did the child fail? (This shouldn't happen.) */ | |
12944 | || status | |
12945 | ||
12946 | /* Did the vfork/compiler bug occur? */ | |
12947 | || parent != getpid() | |
12948 | ||
12949 | /* Did the file descriptor bug occur? */ | |
12950 | || fstat(fileno(stdout), &st) != 0 | |
12951 | ); | |
12952 | } | |
12953 | } | |
12954 | _ACEOF | |
81ecdfbb | 12955 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
12956 | ac_cv_func_vfork_works=yes |
12957 | else | |
81ecdfbb | 12958 | ac_cv_func_vfork_works=no |
a9322a30 | 12959 | fi |
81ecdfbb RW |
12960 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12961 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 12962 | fi |
81ecdfbb | 12963 | |
a9322a30 | 12964 | fi |
81ecdfbb RW |
12965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
12966 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
12967 | |
12968 | fi; | |
12969 | if test "x$ac_cv_func_fork_works" = xcross; then | |
12970 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
12971 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
12972 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
12973 | fi |
12974 | ||
12975 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
12976 | ||
81ecdfbb | 12977 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
12978 | |
12979 | else | |
12980 | ||
81ecdfbb | 12981 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
12982 | |
12983 | fi | |
12984 | if test "x$ac_cv_func_fork_works" = xyes; then | |
12985 | ||
81ecdfbb | 12986 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
12987 | |
12988 | fi | |
12989 | ||
05ea2a05 TT |
12990 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \ |
12991 | ptrace64 sbrk setns sigaltstack sigprocmask \ | |
12992 | setpgid setpgrp getrusage getauxval | |
81ecdfbb RW |
12993 | do : |
12994 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12995 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 12996 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
6c7a06a3 | 12997 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12998 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
12999 | _ACEOF |
13000 | ||
13001 | fi | |
13002 | done | |
13003 | ||
13004 | ||
05ea2a05 TT |
13005 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
13006 | " | |
13007 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : | |
13008 | ac_have_decl=1 | |
6c7a06a3 | 13009 | else |
05ea2a05 TT |
13010 | ac_have_decl=0 |
13011 | fi | |
13012 | ||
13013 | cat >>confdefs.h <<_ACEOF | |
13014 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl | |
13015 | _ACEOF | |
13016 | ||
13017 | ||
13018 | if test "$cross_compiling" = yes; then : | |
81ecdfbb | 13019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 | 13020 | /* end confdefs.h. */ |
05ea2a05 | 13021 | #include <sys/personality.h> |
6c7a06a3 TT |
13022 | int |
13023 | main () | |
13024 | { | |
05ea2a05 TT |
13025 | |
13026 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
13027 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
13028 | # endif | |
13029 | /* Test the flag could be set and stays set. */ | |
13030 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
13031 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
13032 | return 1 | |
bec39cab AC |
13033 | ; |
13034 | return 0; | |
13035 | } | |
13036 | _ACEOF | |
81ecdfbb | 13037 | if ac_fn_c_try_link "$LINENO"; then : |
05ea2a05 | 13038 | have_personality=true |
a4db0f07 | 13039 | else |
05ea2a05 | 13040 | have_personality=false |
a4db0f07 | 13041 | fi |
81ecdfbb RW |
13042 | rm -f core conftest.err conftest.$ac_objext \ |
13043 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 TT |
13044 | else |
13045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13046 | /* end confdefs.h. */ | |
13047 | #include <sys/personality.h> | |
13048 | int | |
13049 | main () | |
13050 | { | |
6c7a06a3 | 13051 | |
05ea2a05 TT |
13052 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE |
13053 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
13054 | # endif | |
13055 | /* Test the flag could be set and stays set. */ | |
13056 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
13057 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
13058 | return 1 | |
13059 | ; | |
13060 | return 0; | |
13061 | } | |
13062 | _ACEOF | |
13063 | if ac_fn_c_try_run "$LINENO"; then : | |
13064 | have_personality=true | |
13065 | else | |
13066 | have_personality=false | |
13067 | fi | |
13068 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13069 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a4db0f07 | 13070 | fi |
6c7a06a3 | 13071 | |
05ea2a05 TT |
13072 | if $have_personality |
13073 | then | |
a4db0f07 | 13074 | |
05ea2a05 | 13075 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
c906108c | 13076 | |
05ea2a05 | 13077 | fi |
d0ac1c44 | 13078 | |
05ea2a05 TT |
13079 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
13080 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
13081 | ac_have_decl=1 | |
d0ac1c44 | 13082 | else |
05ea2a05 TT |
13083 | ac_have_decl=0 |
13084 | fi | |
d0ac1c44 SM |
13085 | |
13086 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 TT |
13087 | #define HAVE_DECL_STRSTR $ac_have_decl |
13088 | _ACEOF | |
13089 | ||
13090 | ||
13091 | # ----------------------- # | |
13092 | # Checks for structures. # | |
13093 | # ----------------------- # | |
13094 | ||
13095 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
13096 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
13097 | ||
13098 | cat >>confdefs.h <<_ACEOF | |
13099 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
d0ac1c44 SM |
13100 | _ACEOF |
13101 | ||
05ea2a05 | 13102 | |
d0ac1c44 | 13103 | fi |
05ea2a05 TT |
13104 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
13105 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
d0ac1c44 | 13106 | |
05ea2a05 TT |
13107 | cat >>confdefs.h <<_ACEOF |
13108 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
13109 | _ACEOF | |
13110 | ||
13111 | ||
13112 | fi | |
13113 | ||
13114 | ||
13115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 | |
13116 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
13117 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
5e030278 TT |
13118 | $as_echo_n "(cached) " >&6 |
13119 | else | |
05ea2a05 TT |
13120 | ac_func_search_save_LIBS=$LIBS |
13121 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13122 | /* end confdefs.h. */ |
3266f10b | 13123 | |
05ea2a05 TT |
13124 | /* Override any GCC internal prototype to avoid an error. |
13125 | Use char because int might match the return type of a GCC | |
13126 | builtin and then its argument prototype would still apply. */ | |
13127 | #ifdef __cplusplus | |
13128 | extern "C" | |
13129 | #endif | |
13130 | char kinfo_getfile (); | |
3266f10b TT |
13131 | int |
13132 | main () | |
13133 | { | |
05ea2a05 | 13134 | return kinfo_getfile (); |
3266f10b TT |
13135 | ; |
13136 | return 0; | |
13137 | } | |
13138 | _ACEOF | |
05ea2a05 TT |
13139 | for ac_lib in '' util util-freebsd; do |
13140 | if test -z "$ac_lib"; then | |
13141 | ac_res="none required" | |
13142 | else | |
13143 | ac_res=-l$ac_lib | |
13144 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13145 | fi | |
13146 | if ac_fn_c_try_link "$LINENO"; then : | |
13147 | ac_cv_search_kinfo_getfile=$ac_res | |
3266f10b | 13148 | fi |
05ea2a05 TT |
13149 | rm -f core conftest.err conftest.$ac_objext \ |
13150 | conftest$ac_exeext | |
13151 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
13152 | break | |
13153 | fi | |
13154 | done | |
13155 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
3266f10b TT |
13156 | |
13157 | else | |
05ea2a05 | 13158 | ac_cv_search_kinfo_getfile=no |
3266f10b | 13159 | fi |
05ea2a05 TT |
13160 | rm conftest.$ac_ext |
13161 | LIBS=$ac_func_search_save_LIBS | |
13162 | fi | |
13163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
13164 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
13165 | ac_res=$ac_cv_search_kinfo_getfile | |
13166 | if test "$ac_res" != no; then : | |
13167 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13168 | ||
13169 | $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h | |
3266f10b TT |
13170 | |
13171 | fi | |
13172 | ||
3266f10b | 13173 | |
05ea2a05 TT |
13174 | # Check for std::thread. This does not work on some platforms, like |
13175 | # mingw and DJGPP. | |
13176 | ac_ext=cpp | |
13177 | ac_cpp='$CXXCPP $CPPFLAGS' | |
13178 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13179 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13180 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3266f10b | 13181 | |
3266f10b | 13182 | |
3266f10b | 13183 | |
3266f10b | 13184 | |
3266f10b | 13185 | |
05ea2a05 TT |
13186 | ac_ext=c |
13187 | ac_cpp='$CPP $CPPFLAGS' | |
13188 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13189 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13190 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3266f10b | 13191 | |
05ea2a05 | 13192 | ax_pthread_ok=no |
3266f10b | 13193 | |
05ea2a05 TT |
13194 | # We used to check for pthread.h first, but this fails if pthread.h |
13195 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
13196 | # It gets checked for in the link test anyway. | |
3266f10b | 13197 | |
05ea2a05 TT |
13198 | # First of all, check if the user has set any of the PTHREAD_LIBS, |
13199 | # etcetera environment variables, and if threads linking works using | |
13200 | # them: | |
13201 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
13202 | ax_pthread_save_CC="$CC" | |
13203 | ax_pthread_save_CFLAGS="$CFLAGS" | |
13204 | ax_pthread_save_LIBS="$LIBS" | |
13205 | if test "x$PTHREAD_CC" != "x"; then : | |
13206 | CC="$PTHREAD_CC" | |
3266f10b | 13207 | fi |
05ea2a05 TT |
13208 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
13209 | LIBS="$PTHREAD_LIBS $LIBS" | |
13210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
13211 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
13212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13213 | /* end confdefs.h. */ |
05ea2a05 TT |
13214 | |
13215 | /* Override any GCC internal prototype to avoid an error. | |
13216 | Use char because int might match the return type of a GCC | |
13217 | builtin and then its argument prototype would still apply. */ | |
13218 | #ifdef __cplusplus | |
13219 | extern "C" | |
13220 | #endif | |
13221 | char pthread_join (); | |
3266f10b TT |
13222 | int |
13223 | main () | |
13224 | { | |
05ea2a05 | 13225 | return pthread_join (); |
3266f10b TT |
13226 | ; |
13227 | return 0; | |
13228 | } | |
13229 | _ACEOF | |
13230 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 | 13231 | ax_pthread_ok=yes |
3266f10b TT |
13232 | fi |
13233 | rm -f core conftest.err conftest.$ac_objext \ | |
13234 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 TT |
13235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 |
13236 | $as_echo "$ax_pthread_ok" >&6; } | |
13237 | if test "x$ax_pthread_ok" = "xno"; then | |
13238 | PTHREAD_LIBS="" | |
13239 | PTHREAD_CFLAGS="" | |
13240 | fi | |
13241 | CC="$ax_pthread_save_CC" | |
13242 | CFLAGS="$ax_pthread_save_CFLAGS" | |
13243 | LIBS="$ax_pthread_save_LIBS" | |
3266f10b | 13244 | fi |
3266f10b | 13245 | |
05ea2a05 TT |
13246 | # We must check for the threads library under a number of different |
13247 | # names; the ordering is very important because some systems | |
13248 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
13249 | # libraries is broken (non-POSIX). | |
3266f10b | 13250 | |
05ea2a05 TT |
13251 | # Create a list of thread flags to try. Items starting with a "-" are |
13252 | # C compiler flags, and other items are library names, except for "none" | |
13253 | # which indicates that we try without any flags at all, and "pthread-config" | |
13254 | # which is a program returning the flags for the Pth emulation library. | |
3266f10b | 13255 | |
05ea2a05 | 13256 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
3266f10b | 13257 | |
05ea2a05 TT |
13258 | # The ordering *is* (sometimes) important. Some notes on the |
13259 | # individual items follow: | |
3266f10b | 13260 | |
05ea2a05 TT |
13261 | # pthreads: AIX (must check this before -lpthread) |
13262 | # none: in case threads are in libc; should be tried before -Kthread and | |
13263 | # other compiler flags to prevent continual compiler warnings | |
13264 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
13265 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
13266 | # (Note: HP C rejects this with "bad form for `-t' option") | |
13267 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
13268 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
13269 | # doesn't hurt to check since this sometimes defines pthreads and | |
13270 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
13271 | # is present but should not be used directly; and before -mthreads, | |
13272 | # because the compiler interprets this as "-mt" + "-hreads") | |
13273 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
13274 | # pthread: Linux, etcetera | |
13275 | # --thread-safe: KAI C++ | |
13276 | # pthread-config: use pthread-config program (for GNU Pth library) | |
3266f10b | 13277 | |
05ea2a05 | 13278 | case $host_os in |
3266f10b | 13279 | |
05ea2a05 | 13280 | freebsd*) |
3266f10b | 13281 | |
05ea2a05 TT |
13282 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
13283 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
3266f10b | 13284 | |
05ea2a05 TT |
13285 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" |
13286 | ;; | |
3266f10b | 13287 | |
05ea2a05 | 13288 | hpux*) |
3266f10b | 13289 | |
05ea2a05 TT |
13290 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable |
13291 | # multi-threading and also sets -lpthread." | |
13292 | ||
13293 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
13294 | ;; | |
13295 | ||
13296 | openedition*) | |
13297 | ||
13298 | # IBM z/OS requires a feature-test macro to be defined in order to | |
13299 | # enable POSIX threads at all, so give the user a hint if this is | |
13300 | # not set. (We don't define these ourselves, as they can affect | |
13301 | # other portions of the system API in unpredictable ways.) | |
13302 | ||
13303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13304 | /* end confdefs.h. */ |
05ea2a05 TT |
13305 | |
13306 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
13307 | AX_PTHREAD_ZOS_MISSING | |
13308 | # endif | |
3266f10b TT |
13309 | |
13310 | _ACEOF | |
13311 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
05ea2a05 TT |
13312 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : |
13313 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
13314 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
3266f10b TT |
13315 | fi |
13316 | rm -f conftest* | |
13317 | ||
05ea2a05 | 13318 | ;; |
3266f10b | 13319 | |
05ea2a05 | 13320 | solaris*) |
3266f10b | 13321 | |
05ea2a05 TT |
13322 | # On Solaris (at least, for some versions), libc contains stubbed |
13323 | # (non-functional) versions of the pthreads routines, so link-based | |
13324 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
13325 | # pthread_cleanup_push, or rather a function called by this macro, | |
13326 | # so we could check for that, but who knows whether they'll stub | |
13327 | # that too in a future libc.) So we'll check first for the | |
13328 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
13329 | ||
13330 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
13331 | ;; | |
13332 | esac | |
13333 | ||
13334 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
13335 | ||
13336 | if test "x$GCC" = "xyes"; then : | |
13337 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
3266f10b TT |
13338 | fi |
13339 | ||
05ea2a05 TT |
13340 | # The presence of a feature test macro requesting re-entrant function |
13341 | # definitions is, on some systems, a strong hint that pthreads support is | |
13342 | # correctly enabled | |
13343 | ||
13344 | case $host_os in | |
13345 | darwin* | hpux* | linux* | osf* | solaris*) | |
13346 | ax_pthread_check_macro="_REENTRANT" | |
13347 | ;; | |
13348 | ||
13349 | aix*) | |
13350 | ax_pthread_check_macro="_THREAD_SAFE" | |
13351 | ;; | |
13352 | ||
13353 | *) | |
13354 | ax_pthread_check_macro="--" | |
13355 | ;; | |
13356 | esac | |
13357 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
13358 | ax_pthread_check_cond=0 | |
13359 | else | |
13360 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
3266f10b TT |
13361 | fi |
13362 | ||
05ea2a05 TT |
13363 | # Are we compiling with Clang? |
13364 | ||
13365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
13366 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
13367 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
3266f10b TT |
13368 | $as_echo_n "(cached) " >&6 |
13369 | else | |
05ea2a05 TT |
13370 | ax_cv_PTHREAD_CLANG=no |
13371 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
13372 | if test "x$GCC" = "xyes"; then | |
13373 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13374 | /* end confdefs.h. */ |
05ea2a05 TT |
13375 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ |
13376 | # if defined(__clang__) && defined(__llvm__) | |
13377 | AX_PTHREAD_CC_IS_CLANG | |
13378 | # endif | |
3266f10b | 13379 | |
3266f10b | 13380 | _ACEOF |
05ea2a05 TT |
13381 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13382 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
13383 | ax_cv_PTHREAD_CLANG=yes | |
3266f10b | 13384 | fi |
05ea2a05 TT |
13385 | rm -f conftest* |
13386 | ||
13387 | fi | |
3266f10b TT |
13388 | |
13389 | fi | |
05ea2a05 TT |
13390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 |
13391 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
13392 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
3266f10b | 13393 | |
05ea2a05 | 13394 | ax_pthread_clang_warning=no |
3266f10b | 13395 | |
05ea2a05 TT |
13396 | # Clang needs special handling, because older versions handle the -pthread |
13397 | # option in a rather... idiosyncratic way | |
3266f10b | 13398 | |
05ea2a05 | 13399 | if test "x$ax_pthread_clang" = "xyes"; then |
3266f10b | 13400 | |
05ea2a05 | 13401 | # Clang takes -pthread; it has never supported any other flag |
b2ceabe8 | 13402 | |
05ea2a05 TT |
13403 | # (Note 1: This will need to be revisited if a system that Clang |
13404 | # supports has POSIX threads in a separate library. This tends not | |
13405 | # to be the way of modern systems, but it's conceivable.) | |
b2ceabe8 | 13406 | |
05ea2a05 TT |
13407 | # (Note 2: On some systems, notably Darwin, -pthread is not needed |
13408 | # to get POSIX threads support; the API is always present and | |
13409 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
13410 | # -pthread does define _REENTRANT, and while the Darwin headers | |
13411 | # ignore this macro, third-party headers might not.) | |
b2ceabe8 | 13412 | |
05ea2a05 TT |
13413 | PTHREAD_CFLAGS="-pthread" |
13414 | PTHREAD_LIBS= | |
3266f10b | 13415 | |
05ea2a05 TT |
13416 | ax_pthread_ok=yes |
13417 | ||
13418 | # However, older versions of Clang make a point of warning the user | |
13419 | # that, in an invocation where only linking and no compilation is | |
13420 | # taking place, the -pthread option has no effect ("argument unused | |
13421 | # during compilation"). They expect -pthread to be passed in only | |
13422 | # when source code is being compiled. | |
13423 | # | |
13424 | # Problem is, this is at odds with the way Automake and most other | |
13425 | # C build frameworks function, which is that the same flags used in | |
13426 | # compilation (CFLAGS) are also used in linking. Many systems | |
13427 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
13428 | # support, and in fact it is often not straightforward to specify a | |
13429 | # flag that is used only in the compilation phase and not in | |
13430 | # linking. Such a scenario is extremely rare in practice. | |
13431 | # | |
13432 | # Even though use of the -pthread flag in linking would only print | |
13433 | # a warning, this can be a nuisance for well-run software projects | |
13434 | # that build with -Werror. So if the active version of Clang has | |
13435 | # this misfeature, we search for an option to squash it. | |
13436 | ||
13437 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
13438 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
13439 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
13440 | $as_echo_n "(cached) " >&6 | |
13441 | else | |
13442 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
13443 | # Create an alternate version of $ac_link that compiles and | |
13444 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
13445 | # (.c -> exe), because the warning occurs only in the second | |
13446 | # step | |
13447 | ax_pthread_save_ac_link="$ac_link" | |
13448 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
13449 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
13450 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
13451 | ax_pthread_save_CFLAGS="$CFLAGS" | |
13452 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
13453 | if test "x$ax_pthread_try" = "xunknown"; then : | |
13454 | break | |
13455 | fi | |
13456 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
13457 | ac_link="$ax_pthread_save_ac_link" | |
13458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13459 | /* end confdefs.h. */ | |
13460 | int main(void){return 0;} | |
3266f10b TT |
13461 | _ACEOF |
13462 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
13463 | ac_link="$ax_pthread_2step_ac_link" |
13464 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13465 | /* end confdefs.h. */ | |
13466 | int main(void){return 0;} | |
13467 | _ACEOF | |
13468 | if ac_fn_c_try_link "$LINENO"; then : | |
13469 | break | |
3266f10b TT |
13470 | fi |
13471 | rm -f core conftest.err conftest.$ac_objext \ | |
13472 | conftest$ac_exeext conftest.$ac_ext | |
13473 | ||
13474 | fi | |
05ea2a05 TT |
13475 | rm -f core conftest.err conftest.$ac_objext \ |
13476 | conftest$ac_exeext conftest.$ac_ext | |
13477 | done | |
13478 | ac_link="$ax_pthread_save_ac_link" | |
13479 | CFLAGS="$ax_pthread_save_CFLAGS" | |
13480 | if test "x$ax_pthread_try" = "x"; then : | |
13481 | ax_pthread_try=no | |
13482 | fi | |
13483 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
3266f10b | 13484 | |
05ea2a05 TT |
13485 | fi |
13486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
13487 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
3266f10b | 13488 | |
05ea2a05 TT |
13489 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in |
13490 | no | unknown) ;; | |
13491 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
13492 | esac | |
3266f10b | 13493 | |
05ea2a05 | 13494 | fi # $ax_pthread_clang = yes |
3266f10b | 13495 | |
05ea2a05 TT |
13496 | if test "x$ax_pthread_ok" = "xno"; then |
13497 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
3266f10b | 13498 | |
05ea2a05 TT |
13499 | case $ax_pthread_try_flag in |
13500 | none) | |
13501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
13502 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
13503 | ;; | |
3266f10b | 13504 | |
05ea2a05 TT |
13505 | -mt,pthread) |
13506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
13507 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
13508 | PTHREAD_CFLAGS="-mt" | |
13509 | PTHREAD_LIBS="-lpthread" | |
13510 | ;; | |
3266f10b | 13511 | |
05ea2a05 TT |
13512 | -*) |
13513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
13514 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
13515 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
13516 | ;; | |
3266f10b | 13517 | |
05ea2a05 TT |
13518 | pthread-config) |
13519 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
13520 | set dummy pthread-config; ac_word=$2 | |
13521 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13522 | $as_echo_n "checking for $ac_word... " >&6; } | |
13523 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
13524 | $as_echo_n "(cached) " >&6 | |
13525 | else | |
13526 | if test -n "$ax_pthread_config"; then | |
13527 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
13528 | else | |
13529 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13530 | for as_dir in $PATH | |
13531 | do | |
13532 | IFS=$as_save_IFS | |
13533 | test -z "$as_dir" && as_dir=. | |
13534 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13535 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13536 | ac_cv_prog_ax_pthread_config="yes" | |
13537 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13538 | break 2 | |
13539 | fi | |
3266f10b | 13540 | done |
05ea2a05 TT |
13541 | done |
13542 | IFS=$as_save_IFS | |
3266f10b | 13543 | |
05ea2a05 TT |
13544 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" |
13545 | fi | |
13546 | fi | |
13547 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
13548 | if test -n "$ax_pthread_config"; then | |
13549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
13550 | $as_echo "$ax_pthread_config" >&6; } | |
3266f10b | 13551 | else |
05ea2a05 TT |
13552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13553 | $as_echo "no" >&6; } | |
3266f10b TT |
13554 | fi |
13555 | ||
5e030278 | 13556 | |
05ea2a05 TT |
13557 | if test "x$ax_pthread_config" = "xno"; then : |
13558 | continue | |
13559 | fi | |
13560 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
13561 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
13562 | ;; | |
5e030278 | 13563 | |
05ea2a05 TT |
13564 | *) |
13565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
13566 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
13567 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
13568 | ;; | |
13569 | esac | |
5e030278 | 13570 | |
5e030278 TT |
13571 | ax_pthread_save_CFLAGS="$CFLAGS" |
13572 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
13573 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
13574 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
13575 | |
13576 | # Check for various functions. We must include pthread.h, | |
13577 | # since some functions may be macros. (On the Sequent, we | |
13578 | # need a special flag -Kthread to make this header compile.) | |
13579 | # We check for pthread_join because it is in -lpthread on IRIX | |
13580 | # while pthread_create is in libc. We check for pthread_attr_init | |
13581 | # due to DEC craziness with -lpthreads. We check for | |
13582 | # pthread_cleanup_push because it is one of the few pthread | |
13583 | # functions on Solaris that doesn't have a non-functional libc stub. | |
13584 | # We try pthread_create on general principles. | |
13585 | ||
5e030278 TT |
13586 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13587 | /* end confdefs.h. */ | |
05ea2a05 TT |
13588 | #include <pthread.h> |
13589 | # if $ax_pthread_check_cond | |
13590 | # error "$ax_pthread_check_macro must be defined" | |
13591 | # endif | |
13592 | static void routine(void *a) { a = 0; } | |
13593 | static void *start_routine(void *a) { return a; } | |
5e030278 TT |
13594 | int |
13595 | main () | |
13596 | { | |
05ea2a05 TT |
13597 | pthread_t th; pthread_attr_t attr; |
13598 | pthread_create(&th, 0, start_routine, 0); | |
13599 | pthread_join(th, 0); | |
13600 | pthread_attr_init(&attr); | |
13601 | pthread_cleanup_push(routine, 0); | |
13602 | pthread_cleanup_pop(0) /* ; */ | |
5e030278 TT |
13603 | ; |
13604 | return 0; | |
13605 | } | |
13606 | _ACEOF | |
13607 | if ac_fn_c_try_link "$LINENO"; then : | |
13608 | ax_pthread_ok=yes | |
13609 | fi | |
13610 | rm -f core conftest.err conftest.$ac_objext \ | |
13611 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 13612 | |
5e030278 TT |
13613 | CFLAGS="$ax_pthread_save_CFLAGS" |
13614 | LIBS="$ax_pthread_save_LIBS" | |
05ea2a05 TT |
13615 | |
13616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
13617 | $as_echo "$ax_pthread_ok" >&6; } | |
13618 | if test "x$ax_pthread_ok" = "xyes"; then : | |
13619 | break | |
5e030278 TT |
13620 | fi |
13621 | ||
05ea2a05 TT |
13622 | PTHREAD_LIBS="" |
13623 | PTHREAD_CFLAGS="" | |
13624 | done | |
13625 | fi | |
5e030278 | 13626 | |
05ea2a05 TT |
13627 | # Various other checks: |
13628 | if test "x$ax_pthread_ok" = "xyes"; then | |
13629 | ax_pthread_save_CFLAGS="$CFLAGS" | |
13630 | ax_pthread_save_LIBS="$LIBS" | |
13631 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
13632 | LIBS="$PTHREAD_LIBS $LIBS" | |
5e030278 | 13633 | |
05ea2a05 TT |
13634 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
13635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
13636 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
13637 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
13638 | $as_echo_n "(cached) " >&6 | |
13639 | else | |
13640 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
13641 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
13642 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13643 | /* end confdefs.h. */ | |
13644 | #include <pthread.h> | |
13645 | int | |
13646 | main () | |
13647 | { | |
13648 | int attr = $ax_pthread_attr; return attr /* ; */ | |
13649 | ; | |
13650 | return 0; | |
13651 | } | |
13652 | _ACEOF | |
13653 | if ac_fn_c_try_link "$LINENO"; then : | |
13654 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
13655 | fi | |
13656 | rm -f core conftest.err conftest.$ac_objext \ | |
13657 | conftest$ac_exeext conftest.$ac_ext | |
13658 | done | |
5e030278 | 13659 | |
05ea2a05 TT |
13660 | fi |
13661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
13662 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
13663 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
13664 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
13665 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
5e030278 | 13666 | |
05ea2a05 TT |
13667 | cat >>confdefs.h <<_ACEOF |
13668 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
13669 | _ACEOF | |
5e030278 | 13670 | |
05ea2a05 | 13671 | ax_pthread_joinable_attr_defined=yes |
5e030278 | 13672 | |
05ea2a05 | 13673 | fi |
5e030278 | 13674 | |
05ea2a05 TT |
13675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 |
13676 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
13677 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
13678 | $as_echo_n "(cached) " >&6 | |
13679 | else | |
13680 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
13681 | case $host_os in | |
13682 | solaris*) | |
13683 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
13684 | ;; | |
13685 | esac | |
5e030278 | 13686 | |
05ea2a05 TT |
13687 | fi |
13688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
13689 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
13690 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
13691 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
13692 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
13693 | ax_pthread_special_flags_added=yes | |
13694 | fi | |
5e030278 | 13695 | |
05ea2a05 TT |
13696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 |
13697 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
13698 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
13699 | $as_echo_n "(cached) " >&6 | |
13700 | else | |
13701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13702 | /* end confdefs.h. */ | |
13703 | #include <pthread.h> | |
13704 | int | |
13705 | main () | |
13706 | { | |
13707 | int i = PTHREAD_PRIO_INHERIT; | |
13708 | ; | |
13709 | return 0; | |
13710 | } | |
13711 | _ACEOF | |
13712 | if ac_fn_c_try_link "$LINENO"; then : | |
13713 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
13714 | else | |
13715 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
13716 | fi | |
13717 | rm -f core conftest.err conftest.$ac_objext \ | |
13718 | conftest$ac_exeext conftest.$ac_ext | |
5e030278 | 13719 | |
05ea2a05 TT |
13720 | fi |
13721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
13722 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
13723 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
13724 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
5e030278 | 13725 | |
05ea2a05 | 13726 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h |
5e030278 | 13727 | |
05ea2a05 | 13728 | ax_pthread_prio_inherit_defined=yes |
5e030278 | 13729 | |
05ea2a05 | 13730 | fi |
5e030278 | 13731 | |
05ea2a05 TT |
13732 | CFLAGS="$ax_pthread_save_CFLAGS" |
13733 | LIBS="$ax_pthread_save_LIBS" | |
5e030278 | 13734 | |
05ea2a05 TT |
13735 | # More AIX lossage: compile with *_r variant |
13736 | if test "x$GCC" != "xyes"; then | |
13737 | case $host_os in | |
13738 | aix*) | |
13739 | case "x/$CC" in #( | |
13740 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
13741 | #handle absolute path differently from PATH based program lookup | |
13742 | case "x$CC" in #( | |
13743 | x/*) : | |
13744 | if as_fn_executable_p ${CC}_r; then : | |
13745 | PTHREAD_CC="${CC}_r" | |
13746 | fi ;; #( | |
13747 | *) : | |
13748 | for ac_prog in ${CC}_r | |
13749 | do | |
13750 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13751 | set dummy $ac_prog; ac_word=$2 | |
13752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13753 | $as_echo_n "checking for $ac_word... " >&6; } | |
13754 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
13755 | $as_echo_n "(cached) " >&6 | |
13756 | else | |
13757 | if test -n "$PTHREAD_CC"; then | |
13758 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
13759 | else | |
13760 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13761 | for as_dir in $PATH | |
13762 | do | |
13763 | IFS=$as_save_IFS | |
13764 | test -z "$as_dir" && as_dir=. | |
13765 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13766 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13767 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
13768 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13769 | break 2 | |
13770 | fi | |
13771 | done | |
13772 | done | |
13773 | IFS=$as_save_IFS | |
5e030278 | 13774 | |
5e030278 | 13775 | fi |
05ea2a05 TT |
13776 | fi |
13777 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
13778 | if test -n "$PTHREAD_CC"; then | |
13779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
13780 | $as_echo "$PTHREAD_CC" >&6; } | |
13781 | else | |
13782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
13783 | $as_echo "no" >&6; } | |
13784 | fi | |
5e030278 | 13785 | |
5e030278 | 13786 | |
05ea2a05 TT |
13787 | test -n "$PTHREAD_CC" && break |
13788 | done | |
13789 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
13790 | ;; | |
13791 | esac ;; #( | |
13792 | *) : | |
13793 | ;; | |
5e030278 | 13794 | esac |
05ea2a05 TT |
13795 | ;; |
13796 | esac | |
13797 | fi | |
13798 | fi | |
5e030278 | 13799 | |
05ea2a05 | 13800 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
5e030278 | 13801 | |
5e030278 | 13802 | |
5e030278 | 13803 | |
5e030278 | 13804 | |
5e030278 | 13805 | |
05ea2a05 TT |
13806 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
13807 | if test "x$ax_pthread_ok" = "xyes"; then | |
13808 | threads=yes | |
13809 | : | |
5e030278 | 13810 | else |
05ea2a05 TT |
13811 | ax_pthread_ok=no |
13812 | threads=no | |
5e030278 | 13813 | fi |
05ea2a05 TT |
13814 | ac_ext=cpp |
13815 | ac_cpp='$CXXCPP $CPPFLAGS' | |
13816 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13817 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13818 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5e030278 | 13819 | |
5e030278 | 13820 | |
05ea2a05 TT |
13821 | if test "$threads" = "yes"; then |
13822 | save_LIBS="$LIBS" | |
13823 | LIBS="$PTHREAD_LIBS $LIBS" | |
13824 | save_CXXFLAGS="$CXXFLAGS" | |
13825 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
13826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
13827 | $as_echo_n "checking for std::thread... " >&6; } | |
13828 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
13829 | $as_echo_n "(cached) " >&6 | |
13830 | else | |
13831 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 13832 | /* end confdefs.h. */ |
05ea2a05 TT |
13833 | #include <thread> |
13834 | void callback() { } | |
13835 | int | |
13836 | main () | |
13837 | { | |
13838 | std::thread t(callback); | |
13839 | ; | |
13840 | return 0; | |
13841 | } | |
5e030278 | 13842 | _ACEOF |
05ea2a05 TT |
13843 | if ac_fn_cxx_try_compile "$LINENO"; then : |
13844 | gdb_cv_cxx_std_thread=yes | |
13845 | else | |
13846 | gdb_cv_cxx_std_thread=no | |
5e030278 | 13847 | fi |
05ea2a05 TT |
13848 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13849 | fi | |
13850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
13851 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
5e030278 | 13852 | |
05ea2a05 TT |
13853 | # This check must be here, while LIBS includes any necessary |
13854 | # threading library. | |
13855 | for ac_func in pthread_sigmask pthread_setname_np | |
13856 | do : | |
13857 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13858 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13859 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
13860 | cat >>confdefs.h <<_ACEOF | |
13861 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
13862 | _ACEOF | |
5e030278 TT |
13863 | |
13864 | fi | |
05ea2a05 | 13865 | done |
5e030278 | 13866 | |
5e030278 | 13867 | |
05ea2a05 TT |
13868 | LIBS="$save_LIBS" |
13869 | CXXFLAGS="$save_CXXFLAGS" | |
13870 | fi | |
13871 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
5e030278 | 13872 | |
05ea2a05 | 13873 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h |
5e030278 | 13874 | |
05ea2a05 TT |
13875 | fi |
13876 | ac_ext=c | |
13877 | ac_cpp='$CPP $CPPFLAGS' | |
13878 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13879 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13880 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5e030278 | 13881 | |
5e030278 | 13882 | |
05ea2a05 TT |
13883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
13884 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
13885 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
13886 | $as_echo_n "(cached) " >&6 | |
13887 | else | |
13888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13889 | /* end confdefs.h. */ | |
5e030278 | 13890 | |
05ea2a05 | 13891 | #include <setjmp.h> |
5e030278 | 13892 | |
05ea2a05 TT |
13893 | int |
13894 | main () | |
13895 | { | |
13896 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
13897 | ; | |
13898 | return 0; | |
13899 | } | |
13900 | _ACEOF | |
13901 | if ac_fn_c_try_compile "$LINENO"; then : | |
13902 | gdb_cv_func_sigsetjmp=yes | |
13903 | else | |
13904 | gdb_cv_func_sigsetjmp=no | |
13905 | fi | |
13906 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13907 | fi | |
13908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
13909 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
13910 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 13911 | |
05ea2a05 | 13912 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 13913 | |
05ea2a05 TT |
13914 | fi |
13915 | ||
13916 | ||
13917 | # Check whether --with-intel_pt was given. | |
13918 | if test "${with_intel_pt+set}" = set; then : | |
13919 | withval=$with_intel_pt; | |
5e030278 | 13920 | else |
05ea2a05 | 13921 | with_intel_pt=auto |
5e030278 | 13922 | fi |
05ea2a05 TT |
13923 | |
13924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
13925 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
13926 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
13927 | $as_echo "$with_intel_pt" >&6; } | |
13928 | ||
13929 | if test "${with_intel_pt}" = no; then | |
13930 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
13931 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
13932 | HAVE_LIBIPT=no | |
13933 | else | |
13934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 13935 | /* end confdefs.h. */ |
5e030278 | 13936 | |
05ea2a05 TT |
13937 | #include <linux/perf_event.h> |
13938 | #ifndef PERF_ATTR_SIZE_VER5 | |
13939 | # error | |
13940 | #endif | |
5e030278 | 13941 | |
05ea2a05 TT |
13942 | _ACEOF |
13943 | if ac_fn_c_try_cpp "$LINENO"; then : | |
13944 | perf_event=yes | |
13945 | else | |
13946 | perf_event=no | |
5e030278 | 13947 | fi |
05ea2a05 TT |
13948 | rm -f conftest.err conftest.i conftest.$ac_ext |
13949 | if test "$perf_event" != yes; then | |
13950 | if test "$with_intel_pt" = yes; then | |
13951 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
13952 | else | |
13953 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
13954 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
13955 | fi | |
13956 | fi | |
5e030278 | 13957 | |
5e030278 | 13958 | |
5e030278 | 13959 | |
5e030278 | 13960 | |
5e030278 | 13961 | |
5e030278 | 13962 | |
5e030278 | 13963 | |
5e030278 | 13964 | |
5e030278 | 13965 | |
05ea2a05 | 13966 | use_additional=yes |
5e030278 | 13967 | |
05ea2a05 TT |
13968 | acl_save_prefix="$prefix" |
13969 | prefix="$acl_final_prefix" | |
13970 | acl_save_exec_prefix="$exec_prefix" | |
13971 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 13972 | |
05ea2a05 TT |
13973 | eval additional_includedir=\"$includedir\" |
13974 | eval additional_libdir=\"$libdir\" | |
5e030278 | 13975 | |
05ea2a05 TT |
13976 | exec_prefix="$acl_save_exec_prefix" |
13977 | prefix="$acl_save_prefix" | |
5e030278 | 13978 | |
5e030278 | 13979 | |
05ea2a05 TT |
13980 | # Check whether --with-libipt-prefix was given. |
13981 | if test "${with_libipt_prefix+set}" = set; then : | |
13982 | withval=$with_libipt_prefix; | |
13983 | if test "X$withval" = "Xno"; then | |
13984 | use_additional=no | |
13985 | else | |
13986 | if test "X$withval" = "X"; then | |
5e030278 | 13987 | |
05ea2a05 TT |
13988 | acl_save_prefix="$prefix" |
13989 | prefix="$acl_final_prefix" | |
13990 | acl_save_exec_prefix="$exec_prefix" | |
13991 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 13992 | |
05ea2a05 TT |
13993 | eval additional_includedir=\"$includedir\" |
13994 | eval additional_libdir=\"$libdir\" | |
5e030278 | 13995 | |
05ea2a05 TT |
13996 | exec_prefix="$acl_save_exec_prefix" |
13997 | prefix="$acl_save_prefix" | |
5e030278 | 13998 | |
05ea2a05 TT |
13999 | else |
14000 | additional_includedir="$withval/include" | |
14001 | additional_libdir="$withval/lib" | |
14002 | fi | |
14003 | fi | |
5e030278 TT |
14004 | |
14005 | fi | |
5e030278 | 14006 | |
05ea2a05 TT |
14007 | LIBIPT= |
14008 | LTLIBIPT= | |
14009 | INCIPT= | |
14010 | rpathdirs= | |
14011 | ltrpathdirs= | |
14012 | names_already_handled= | |
14013 | names_next_round='ipt ' | |
14014 | while test -n "$names_next_round"; do | |
14015 | names_this_round="$names_next_round" | |
14016 | names_next_round= | |
14017 | for name in $names_this_round; do | |
14018 | already_handled= | |
14019 | for n in $names_already_handled; do | |
14020 | if test "$n" = "$name"; then | |
14021 | already_handled=yes | |
14022 | break | |
14023 | fi | |
14024 | done | |
14025 | if test -z "$already_handled"; then | |
14026 | names_already_handled="$names_already_handled $name" | |
14027 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14028 | eval value=\"\$HAVE_LIB$uppername\" | |
14029 | if test -n "$value"; then | |
14030 | if test "$value" = yes; then | |
14031 | eval value=\"\$LIB$uppername\" | |
14032 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
14033 | eval value=\"\$LTLIB$uppername\" | |
14034 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
14035 | else | |
14036 | : | |
14037 | fi | |
14038 | else | |
14039 | found_dir= | |
14040 | found_la= | |
14041 | found_so= | |
14042 | found_a= | |
14043 | if test $use_additional = yes; then | |
14044 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
14045 | found_dir="$additional_libdir" | |
14046 | found_so="$additional_libdir/lib$name.$shlibext" | |
14047 | if test -f "$additional_libdir/lib$name.la"; then | |
14048 | found_la="$additional_libdir/lib$name.la" | |
14049 | fi | |
14050 | else | |
14051 | if test -f "$additional_libdir/lib$name.$libext"; then | |
14052 | found_dir="$additional_libdir" | |
14053 | found_a="$additional_libdir/lib$name.$libext" | |
14054 | if test -f "$additional_libdir/lib$name.la"; then | |
14055 | found_la="$additional_libdir/lib$name.la" | |
14056 | fi | |
14057 | fi | |
14058 | fi | |
14059 | fi | |
14060 | if test "X$found_dir" = "X"; then | |
14061 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 14062 | |
05ea2a05 TT |
14063 | acl_save_prefix="$prefix" |
14064 | prefix="$acl_final_prefix" | |
14065 | acl_save_exec_prefix="$exec_prefix" | |
14066 | exec_prefix="$acl_final_exec_prefix" | |
14067 | eval x=\"$x\" | |
14068 | exec_prefix="$acl_save_exec_prefix" | |
14069 | prefix="$acl_save_prefix" | |
5e030278 | 14070 | |
05ea2a05 TT |
14071 | case "$x" in |
14072 | -L*) | |
14073 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
14074 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
14075 | found_dir="$dir" | |
14076 | found_so="$dir/lib$name.$shlibext" | |
14077 | if test -f "$dir/lib$name.la"; then | |
14078 | found_la="$dir/lib$name.la" | |
14079 | fi | |
14080 | else | |
14081 | if test -f "$dir/lib$name.$libext"; then | |
14082 | found_dir="$dir" | |
14083 | found_a="$dir/lib$name.$libext" | |
14084 | if test -f "$dir/lib$name.la"; then | |
14085 | found_la="$dir/lib$name.la" | |
14086 | fi | |
14087 | fi | |
14088 | fi | |
14089 | ;; | |
14090 | esac | |
14091 | if test "X$found_dir" != "X"; then | |
14092 | break | |
14093 | fi | |
14094 | done | |
14095 | fi | |
14096 | if test "X$found_dir" != "X"; then | |
14097 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
14098 | if test "X$found_so" != "X"; then | |
14099 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14100 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14101 | else | |
14102 | haveit= | |
14103 | for x in $ltrpathdirs; do | |
14104 | if test "X$x" = "X$found_dir"; then | |
14105 | haveit=yes | |
14106 | break | |
14107 | fi | |
14108 | done | |
14109 | if test -z "$haveit"; then | |
14110 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14111 | fi | |
14112 | if test "$hardcode_direct" = yes; then | |
14113 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14114 | else | |
14115 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14116 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14117 | haveit= | |
14118 | for x in $rpathdirs; do | |
14119 | if test "X$x" = "X$found_dir"; then | |
14120 | haveit=yes | |
14121 | break | |
14122 | fi | |
14123 | done | |
14124 | if test -z "$haveit"; then | |
14125 | rpathdirs="$rpathdirs $found_dir" | |
14126 | fi | |
14127 | else | |
14128 | haveit= | |
14129 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 14130 | |
05ea2a05 TT |
14131 | acl_save_prefix="$prefix" |
14132 | prefix="$acl_final_prefix" | |
14133 | acl_save_exec_prefix="$exec_prefix" | |
14134 | exec_prefix="$acl_final_exec_prefix" | |
14135 | eval x=\"$x\" | |
14136 | exec_prefix="$acl_save_exec_prefix" | |
14137 | prefix="$acl_save_prefix" | |
5e030278 | 14138 | |
05ea2a05 TT |
14139 | if test "X$x" = "X-L$found_dir"; then |
14140 | haveit=yes | |
14141 | break | |
14142 | fi | |
14143 | done | |
14144 | if test -z "$haveit"; then | |
14145 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
14146 | fi | |
14147 | if test "$hardcode_minus_L" != no; then | |
14148 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14149 | else | |
14150 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
14151 | fi | |
14152 | fi | |
14153 | fi | |
14154 | fi | |
14155 | else | |
14156 | if test "X$found_a" != "X"; then | |
14157 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
14158 | else | |
14159 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
14160 | fi | |
14161 | fi | |
14162 | additional_includedir= | |
14163 | case "$found_dir" in | |
14164 | */lib | */lib/) | |
14165 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14166 | additional_includedir="$basedir/include" | |
14167 | ;; | |
14168 | esac | |
14169 | if test "X$additional_includedir" != "X"; then | |
14170 | if test "X$additional_includedir" != "X/usr/include"; then | |
14171 | haveit= | |
14172 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14173 | if test -n "$GCC"; then | |
14174 | case $host_os in | |
14175 | linux*) haveit=yes;; | |
14176 | esac | |
14177 | fi | |
14178 | fi | |
14179 | if test -z "$haveit"; then | |
14180 | for x in $CPPFLAGS $INCIPT; do | |
5e030278 | 14181 | |
05ea2a05 TT |
14182 | acl_save_prefix="$prefix" |
14183 | prefix="$acl_final_prefix" | |
14184 | acl_save_exec_prefix="$exec_prefix" | |
14185 | exec_prefix="$acl_final_exec_prefix" | |
14186 | eval x=\"$x\" | |
14187 | exec_prefix="$acl_save_exec_prefix" | |
14188 | prefix="$acl_save_prefix" | |
5e030278 | 14189 | |
05ea2a05 TT |
14190 | if test "X$x" = "X-I$additional_includedir"; then |
14191 | haveit=yes | |
14192 | break | |
14193 | fi | |
14194 | done | |
14195 | if test -z "$haveit"; then | |
14196 | if test -d "$additional_includedir"; then | |
14197 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
14198 | fi | |
14199 | fi | |
14200 | fi | |
14201 | fi | |
14202 | fi | |
14203 | if test -n "$found_la"; then | |
14204 | save_libdir="$libdir" | |
14205 | case "$found_la" in | |
14206 | */* | *\\*) . "$found_la" ;; | |
14207 | *) . "./$found_la" ;; | |
14208 | esac | |
14209 | libdir="$save_libdir" | |
14210 | for dep in $dependency_libs; do | |
14211 | case "$dep" in | |
14212 | -L*) | |
14213 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
14214 | if test "X$additional_libdir" != "X/usr/lib"; then | |
14215 | haveit= | |
14216 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
14217 | if test -n "$GCC"; then | |
14218 | case $host_os in | |
14219 | linux*) haveit=yes;; | |
14220 | esac | |
14221 | fi | |
14222 | fi | |
14223 | if test -z "$haveit"; then | |
14224 | haveit= | |
14225 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 14226 | |
05ea2a05 TT |
14227 | acl_save_prefix="$prefix" |
14228 | prefix="$acl_final_prefix" | |
14229 | acl_save_exec_prefix="$exec_prefix" | |
14230 | exec_prefix="$acl_final_exec_prefix" | |
14231 | eval x=\"$x\" | |
14232 | exec_prefix="$acl_save_exec_prefix" | |
14233 | prefix="$acl_save_prefix" | |
5e030278 | 14234 | |
05ea2a05 TT |
14235 | if test "X$x" = "X-L$additional_libdir"; then |
14236 | haveit=yes | |
14237 | break | |
14238 | fi | |
14239 | done | |
14240 | if test -z "$haveit"; then | |
14241 | if test -d "$additional_libdir"; then | |
14242 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
14243 | fi | |
14244 | fi | |
14245 | haveit= | |
14246 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 14247 | |
05ea2a05 TT |
14248 | acl_save_prefix="$prefix" |
14249 | prefix="$acl_final_prefix" | |
14250 | acl_save_exec_prefix="$exec_prefix" | |
14251 | exec_prefix="$acl_final_exec_prefix" | |
14252 | eval x=\"$x\" | |
14253 | exec_prefix="$acl_save_exec_prefix" | |
14254 | prefix="$acl_save_prefix" | |
5e030278 | 14255 | |
05ea2a05 TT |
14256 | if test "X$x" = "X-L$additional_libdir"; then |
14257 | haveit=yes | |
14258 | break | |
14259 | fi | |
14260 | done | |
14261 | if test -z "$haveit"; then | |
14262 | if test -d "$additional_libdir"; then | |
14263 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
14264 | fi | |
14265 | fi | |
14266 | fi | |
14267 | fi | |
14268 | ;; | |
14269 | -R*) | |
14270 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
14271 | if test "$enable_rpath" != no; then | |
14272 | haveit= | |
14273 | for x in $rpathdirs; do | |
14274 | if test "X$x" = "X$dir"; then | |
14275 | haveit=yes | |
14276 | break | |
14277 | fi | |
14278 | done | |
14279 | if test -z "$haveit"; then | |
14280 | rpathdirs="$rpathdirs $dir" | |
14281 | fi | |
14282 | haveit= | |
14283 | for x in $ltrpathdirs; do | |
14284 | if test "X$x" = "X$dir"; then | |
14285 | haveit=yes | |
14286 | break | |
14287 | fi | |
14288 | done | |
14289 | if test -z "$haveit"; then | |
14290 | ltrpathdirs="$ltrpathdirs $dir" | |
14291 | fi | |
14292 | fi | |
14293 | ;; | |
14294 | -l*) | |
14295 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
14296 | ;; | |
14297 | *.la) | |
14298 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
14299 | ;; | |
14300 | *) | |
14301 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
14302 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
14303 | ;; | |
14304 | esac | |
14305 | done | |
14306 | fi | |
14307 | else | |
14308 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
14309 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
14310 | fi | |
5e030278 | 14311 | fi |
05ea2a05 TT |
14312 | fi |
14313 | done | |
14314 | done | |
14315 | if test "X$rpathdirs" != "X"; then | |
14316 | if test -n "$hardcode_libdir_separator"; then | |
14317 | alldirs= | |
14318 | for found_dir in $rpathdirs; do | |
14319 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
14320 | done | |
14321 | acl_save_libdir="$libdir" | |
14322 | libdir="$alldirs" | |
14323 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14324 | libdir="$acl_save_libdir" | |
14325 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
14326 | else | |
14327 | for found_dir in $rpathdirs; do | |
14328 | acl_save_libdir="$libdir" | |
14329 | libdir="$found_dir" | |
14330 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14331 | libdir="$acl_save_libdir" | |
14332 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
14333 | done | |
14334 | fi | |
14335 | fi | |
14336 | if test "X$ltrpathdirs" != "X"; then | |
14337 | for found_dir in $ltrpathdirs; do | |
14338 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
14339 | done | |
14340 | fi | |
5e030278 TT |
14341 | |
14342 | ||
05ea2a05 | 14343 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 14344 | |
05ea2a05 TT |
14345 | for element in $INCIPT; do |
14346 | haveit= | |
14347 | for x in $CPPFLAGS; do | |
5e030278 | 14348 | |
05ea2a05 TT |
14349 | acl_save_prefix="$prefix" |
14350 | prefix="$acl_final_prefix" | |
14351 | acl_save_exec_prefix="$exec_prefix" | |
14352 | exec_prefix="$acl_final_exec_prefix" | |
14353 | eval x=\"$x\" | |
14354 | exec_prefix="$acl_save_exec_prefix" | |
14355 | prefix="$acl_save_prefix" | |
5e030278 | 14356 | |
05ea2a05 TT |
14357 | if test "X$x" = "X$element"; then |
14358 | haveit=yes | |
14359 | break | |
14360 | fi | |
14361 | done | |
14362 | if test -z "$haveit"; then | |
14363 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
14364 | fi | |
14365 | done | |
5e030278 TT |
14366 | |
14367 | ||
05ea2a05 TT |
14368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 |
14369 | $as_echo_n "checking for libipt... " >&6; } | |
14370 | if ${ac_cv_libipt+:} false; then : | |
5e030278 TT |
14371 | $as_echo_n "(cached) " >&6 |
14372 | else | |
05ea2a05 TT |
14373 | |
14374 | ac_save_LIBS="$LIBS" | |
14375 | LIBS="$LIBS $LIBIPT" | |
14376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14377 | /* end confdefs.h. */ |
05ea2a05 | 14378 | #include "intel-pt.h" |
5e030278 TT |
14379 | int |
14380 | main () | |
14381 | { | |
05ea2a05 | 14382 | pt_insn_alloc_decoder (0); |
5e030278 TT |
14383 | ; |
14384 | return 0; | |
14385 | } | |
14386 | _ACEOF | |
05ea2a05 TT |
14387 | if ac_fn_c_try_link "$LINENO"; then : |
14388 | ac_cv_libipt=yes | |
5e030278 | 14389 | else |
05ea2a05 | 14390 | ac_cv_libipt=no |
5e030278 | 14391 | fi |
05ea2a05 TT |
14392 | rm -f core conftest.err conftest.$ac_objext \ |
14393 | conftest$ac_exeext conftest.$ac_ext | |
14394 | LIBS="$ac_save_LIBS" | |
14395 | ||
5e030278 | 14396 | fi |
05ea2a05 TT |
14397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
14398 | $as_echo "$ac_cv_libipt" >&6; } | |
14399 | if test "$ac_cv_libipt" = yes; then | |
14400 | HAVE_LIBIPT=yes | |
21987b9c | 14401 | |
05ea2a05 TT |
14402 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
14403 | ||
14404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
14405 | $as_echo_n "checking how to link with libipt... " >&6; } | |
14406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
14407 | $as_echo "$LIBIPT" >&6; } | |
14408 | else | |
14409 | HAVE_LIBIPT=no | |
14410 | CPPFLAGS="$ac_save_CPPFLAGS" | |
14411 | LIBIPT= | |
14412 | LTLIBIPT= | |
14413 | fi | |
14414 | ||
14415 | ||
14416 | ||
14417 | ||
14418 | ||
14419 | ||
14420 | if test "$HAVE_LIBIPT" != yes; then | |
14421 | if test "$with_intel_pt" = yes; then | |
14422 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
14423 | else | |
14424 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
14425 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
14426 | fi | |
14427 | else | |
14428 | save_LIBS=$LIBS | |
14429 | LIBS="$LIBS $LIBIPT" | |
14430 | for ac_func in pt_insn_event | |
21987b9c | 14431 | do : |
05ea2a05 TT |
14432 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" |
14433 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
21987b9c | 14434 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 14435 | #define HAVE_PT_INSN_EVENT 1 |
21987b9c TT |
14436 | _ACEOF |
14437 | ||
14438 | fi | |
14439 | done | |
14440 | ||
05ea2a05 TT |
14441 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> |
14442 | " | |
14443 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
21987b9c | 14444 | |
05ea2a05 TT |
14445 | cat >>confdefs.h <<_ACEOF |
14446 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
14447 | _ACEOF | |
5e030278 | 14448 | |
5e030278 | 14449 | |
05ea2a05 TT |
14450 | fi |
14451 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
14452 | " | |
14453 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
14454 | ||
14455 | cat >>confdefs.h <<_ACEOF | |
14456 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
14457 | _ACEOF | |
5e030278 TT |
14458 | |
14459 | ||
05ea2a05 TT |
14460 | fi |
14461 | ||
14462 | LIBS=$save_LIBS | |
14463 | fi | |
14464 | fi | |
14465 | ||
14466 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
14467 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
14468 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
14469 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
e9bcb658 GB |
14470 | $as_echo_n "(cached) " >&6 |
14471 | else | |
14472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14473 | /* end confdefs.h. */ | |
14474 | ||
05ea2a05 TT |
14475 | #define _SYSCALL32 |
14476 | /* Needed for new procfs interface on sparc-solaris. */ | |
14477 | #define _STRUCTURED_PROC 1 | |
14478 | #include <sys/procfs.h> | |
e9bcb658 GB |
14479 | int |
14480 | main () | |
14481 | { | |
05ea2a05 | 14482 | gregset_t avar |
e9bcb658 GB |
14483 | ; |
14484 | return 0; | |
14485 | } | |
14486 | _ACEOF | |
14487 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 14488 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
e9bcb658 | 14489 | else |
05ea2a05 | 14490 | bfd_cv_have_sys_procfs_type_gregset_t=no |
54019719 PA |
14491 | |
14492 | fi | |
05ea2a05 | 14493 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
06825bd1 | 14494 | fi |
06825bd1 | 14495 | |
05ea2a05 | 14496 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
a3828db0 | 14497 | |
05ea2a05 | 14498 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
06825bd1 | 14499 | |
05ea2a05 TT |
14500 | fi |
14501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
14502 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
14503 | ||
14504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
14505 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
14506 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
81ecdfbb | 14507 | $as_echo_n "(cached) " >&6 |
bec39cab | 14508 | else |
81ecdfbb | 14509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14510 | /* end confdefs.h. */ |
05ea2a05 TT |
14511 | |
14512 | #define _SYSCALL32 | |
14513 | /* Needed for new procfs interface on sparc-solaris. */ | |
14514 | #define _STRUCTURED_PROC 1 | |
14515 | #include <sys/procfs.h> | |
bec39cab AC |
14516 | int |
14517 | main () | |
14518 | { | |
05ea2a05 | 14519 | fpregset_t avar |
064ef605 DJ |
14520 | ; |
14521 | return 0; | |
14522 | } | |
14523 | _ACEOF | |
9b30624b | 14524 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
14525 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
14526 | else | |
14527 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
14528 | ||
14529 | fi | |
14530 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14531 | fi | |
14532 | ||
14533 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
14534 | ||
14535 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
14536 | ||
14537 | fi | |
14538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
14539 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
14540 | ||
14541 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
14542 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
14543 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
14544 | $as_echo_n "(cached) " >&6 | |
064ef605 | 14545 | else |
81ecdfbb | 14546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 14547 | /* end confdefs.h. */ |
05ea2a05 TT |
14548 | |
14549 | #define _SYSCALL32 | |
14550 | /* Needed for new procfs interface on sparc-solaris. */ | |
14551 | #define _STRUCTURED_PROC 1 | |
14552 | #include <sys/procfs.h> | |
064ef605 DJ |
14553 | int |
14554 | main () | |
14555 | { | |
05ea2a05 | 14556 | prgregset_t avar |
bec39cab AC |
14557 | ; |
14558 | return 0; | |
14559 | } | |
14560 | _ACEOF | |
9b30624b | 14561 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 14562 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
70f9f479 | 14563 | else |
05ea2a05 TT |
14564 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
14565 | ||
70f9f479 | 14566 | fi |
81ecdfbb | 14567 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 14568 | fi |
bec39cab | 14569 | |
05ea2a05 | 14570 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
70f9f479 | 14571 | |
05ea2a05 TT |
14572 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
14573 | ||
14574 | fi | |
14575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
14576 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
14577 | ||
14578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
14579 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
14580 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
81ecdfbb | 14581 | $as_echo_n "(cached) " >&6 |
bec39cab | 14582 | else |
81ecdfbb | 14583 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 14584 | /* end confdefs.h. */ |
05ea2a05 TT |
14585 | |
14586 | #define _SYSCALL32 | |
14587 | /* Needed for new procfs interface on sparc-solaris. */ | |
14588 | #define _STRUCTURED_PROC 1 | |
14589 | #include <sys/procfs.h> | |
064ef605 DJ |
14590 | int |
14591 | main () | |
14592 | { | |
05ea2a05 | 14593 | prfpregset_t avar |
064ef605 DJ |
14594 | ; |
14595 | return 0; | |
14596 | } | |
14597 | _ACEOF | |
9b30624b | 14598 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 14599 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
064ef605 | 14600 | else |
05ea2a05 | 14601 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
064ef605 | 14602 | |
5c7f2947 | 14603 | fi |
81ecdfbb | 14604 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
05ea2a05 TT |
14605 | fi |
14606 | ||
14607 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
14608 | ||
14609 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h | |
14610 | ||
14611 | fi | |
14612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
14613 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
14614 | ||
14615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
14616 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
14617 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
14618 | $as_echo_n "(cached) " >&6 | |
14619 | else | |
14620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 14621 | /* end confdefs.h. */ |
05ea2a05 TT |
14622 | |
14623 | #define _SYSCALL32 | |
14624 | /* Needed for new procfs interface on sparc-solaris. */ | |
14625 | #define _STRUCTURED_PROC 1 | |
14626 | #include <sys/procfs.h> | |
bec39cab AC |
14627 | int |
14628 | main () | |
14629 | { | |
05ea2a05 | 14630 | prgregset32_t avar |
bec39cab AC |
14631 | ; |
14632 | return 0; | |
14633 | } | |
14634 | _ACEOF | |
9b30624b | 14635 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
14636 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
14637 | else | |
14638 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
a3828db0 | 14639 | |
064ef605 | 14640 | fi |
81ecdfbb | 14641 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 14642 | fi |
96d7229d | 14643 | |
05ea2a05 | 14644 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
78434e59 | 14645 | |
05ea2a05 | 14646 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
78434e59 | 14647 | |
05ea2a05 TT |
14648 | fi |
14649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
14650 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
54019719 | 14651 | |
05ea2a05 TT |
14652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
14653 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
14654 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
81ecdfbb | 14655 | $as_echo_n "(cached) " >&6 |
bec39cab | 14656 | else |
81ecdfbb | 14657 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14658 | /* end confdefs.h. */ |
05ea2a05 TT |
14659 | |
14660 | #define _SYSCALL32 | |
14661 | /* Needed for new procfs interface on sparc-solaris. */ | |
14662 | #define _STRUCTURED_PROC 1 | |
14663 | #include <sys/procfs.h> | |
bec39cab AC |
14664 | int |
14665 | main () | |
14666 | { | |
05ea2a05 | 14667 | lwpid_t avar |
bec39cab AC |
14668 | ; |
14669 | return 0; | |
14670 | } | |
14671 | _ACEOF | |
05ea2a05 TT |
14672 | if ac_fn_c_try_compile "$LINENO"; then : |
14673 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
c906108c | 14674 | else |
05ea2a05 TT |
14675 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
14676 | ||
c906108c | 14677 | fi |
05ea2a05 | 14678 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 14679 | fi |
81ecdfbb | 14680 | |
05ea2a05 | 14681 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
a3828db0 | 14682 | |
05ea2a05 | 14683 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
97bf5e38 | 14684 | |
05ea2a05 TT |
14685 | fi |
14686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
14687 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
a3828db0 | 14688 | |
05ea2a05 TT |
14689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
14690 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
14691 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
81ecdfbb | 14692 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 14693 | else |
81ecdfbb | 14694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14695 | /* end confdefs.h. */ |
a3828db0 | 14696 | |
05ea2a05 TT |
14697 | #define _SYSCALL32 |
14698 | /* Needed for new procfs interface on sparc-solaris. */ | |
14699 | #define _STRUCTURED_PROC 1 | |
14700 | #include <sys/procfs.h> | |
bec39cab AC |
14701 | int |
14702 | main () | |
14703 | { | |
05ea2a05 | 14704 | psaddr_t avar |
bec39cab AC |
14705 | ; |
14706 | return 0; | |
14707 | } | |
14708 | _ACEOF | |
81ecdfbb | 14709 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 14710 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 14711 | else |
05ea2a05 TT |
14712 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
14713 | ||
c906108c | 14714 | fi |
81ecdfbb | 14715 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14716 | fi |
c3f6f71d | 14717 | |
05ea2a05 | 14718 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
c906108c | 14719 | |
05ea2a05 | 14720 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
db1ff28b | 14721 | |
05ea2a05 TT |
14722 | fi |
14723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
14724 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
14725 | ||
14726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 | |
14727 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } | |
14728 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
db1ff28b JK |
14729 | $as_echo_n "(cached) " >&6 |
14730 | else | |
14731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14732 | /* end confdefs.h. */ | |
05ea2a05 TT |
14733 | |
14734 | #define _SYSCALL32 | |
14735 | /* Needed for new procfs interface on sparc-solaris. */ | |
14736 | #define _STRUCTURED_PROC 1 | |
14737 | #include <sys/procfs.h> | |
db1ff28b JK |
14738 | int |
14739 | main () | |
14740 | { | |
05ea2a05 | 14741 | elf_fpregset_t avar |
db1ff28b JK |
14742 | ; |
14743 | return 0; | |
14744 | } | |
14745 | _ACEOF | |
14746 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 14747 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
db1ff28b | 14748 | else |
05ea2a05 TT |
14749 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
14750 | ||
db1ff28b JK |
14751 | fi |
14752 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14753 | fi | |
db1ff28b | 14754 | |
05ea2a05 | 14755 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
db1ff28b | 14756 | |
05ea2a05 | 14757 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
db1ff28b | 14758 | |
05ea2a05 TT |
14759 | fi |
14760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
14761 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
db1ff28b | 14762 | |
05ea2a05 TT |
14763 | fi |
14764 | ||
14765 | ||
14766 | # Check the return and argument types of ptrace. | |
14767 | ||
14768 | ||
14769 | for ac_header in sys/ptrace.h ptrace.h | |
14770 | do : | |
14771 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
14772 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
14773 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
14774 | cat >>confdefs.h <<_ACEOF | |
14775 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
14776 | _ACEOF | |
db1ff28b JK |
14777 | |
14778 | fi | |
14779 | ||
05ea2a05 TT |
14780 | done |
14781 | ||
81ecdfbb | 14782 | |
05ea2a05 TT |
14783 | gdb_ptrace_headers=' |
14784 | #include <sys/types.h> | |
14785 | #if HAVE_SYS_PTRACE_H | |
14786 | # include <sys/ptrace.h> | |
14787 | #endif | |
14788 | #if HAVE_UNISTD_H | |
14789 | # include <unistd.h> | |
14790 | #endif | |
14791 | ' | |
14792 | # There is no point in checking if we don't have a prototype. | |
14793 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers | |
81ecdfbb | 14794 | " |
05ea2a05 TT |
14795 | if test "x$ac_cv_have_decl_ptrace" = xyes; then : |
14796 | ac_have_decl=1 | |
14797 | else | |
14798 | ac_have_decl=0 | |
14799 | fi | |
c906108c | 14800 | |
5c45e068 | 14801 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 14802 | #define HAVE_DECL_PTRACE $ac_have_decl |
bec39cab | 14803 | _ACEOF |
05ea2a05 | 14804 | if test $ac_have_decl = 1; then : |
c906108c | 14805 | |
05ea2a05 | 14806 | else |
5c45e068 | 14807 | |
05ea2a05 TT |
14808 | : ${gdb_cv_func_ptrace_ret='int'} |
14809 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
c906108c | 14810 | |
05ea2a05 | 14811 | fi |
5c45e068 | 14812 | |
05ea2a05 TT |
14813 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
14814 | # empty argument list, so check for that explicitly. | |
14815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
14816 | $as_echo_n "checking return type of ptrace... " >&6; } | |
14817 | if ${gdb_cv_func_ptrace_ret+:} false; then : | |
81ecdfbb | 14818 | $as_echo_n "(cached) " >&6 |
bec39cab | 14819 | else |
81ecdfbb | 14820 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14821 | /* end confdefs.h. */ |
05ea2a05 | 14822 | $gdb_ptrace_headers |
bec39cab AC |
14823 | int |
14824 | main () | |
14825 | { | |
05ea2a05 | 14826 | extern long ptrace (enum __ptrace_request, ...); |
bec39cab AC |
14827 | ; |
14828 | return 0; | |
14829 | } | |
14830 | _ACEOF | |
81ecdfbb | 14831 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 14832 | gdb_cv_func_ptrace_ret='long' |
bec39cab | 14833 | else |
81ecdfbb | 14834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14835 | /* end confdefs.h. */ |
05ea2a05 | 14836 | $gdb_ptrace_headers |
bec39cab AC |
14837 | int |
14838 | main () | |
14839 | { | |
05ea2a05 | 14840 | extern int ptrace (); |
bec39cab AC |
14841 | ; |
14842 | return 0; | |
14843 | } | |
14844 | _ACEOF | |
81ecdfbb | 14845 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 14846 | gdb_cv_func_ptrace_ret='int' |
27ca5dad | 14847 | else |
05ea2a05 | 14848 | gdb_cv_func_ptrace_ret='long' |
27ca5dad | 14849 | fi |
81ecdfbb | 14850 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 14851 | fi |
05ea2a05 | 14852 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 14853 | fi |
05ea2a05 TT |
14854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
14855 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
5c45e068 MK |
14856 | |
14857 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 14858 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret |
bec39cab | 14859 | _ACEOF |
3862412b | 14860 | |
05ea2a05 TT |
14861 | # Check argument types. |
14862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
14863 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
14864 | if ${gdb_cv_func_ptrace_args+:} false; then : | |
14865 | $as_echo_n "(cached) " >&6 | |
14866 | else | |
5c45e068 | 14867 | |
05ea2a05 TT |
14868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14869 | /* end confdefs.h. */ | |
14870 | $gdb_ptrace_headers | |
14871 | int | |
14872 | main () | |
14873 | { | |
14874 | extern long ptrace (enum __ptrace_request, ...); | |
14875 | ; | |
14876 | return 0; | |
14877 | } | |
bec39cab | 14878 | _ACEOF |
05ea2a05 TT |
14879 | if ac_fn_c_try_compile "$LINENO"; then : |
14880 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' | |
14881 | else | |
14882 | ||
14883 | for gdb_arg1 in 'int' 'long'; do | |
14884 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
14885 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
14886 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
14887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14888 | /* end confdefs.h. */ | |
14889 | $gdb_ptrace_headers | |
14890 | int | |
14891 | main () | |
14892 | { | |
3862412b | 14893 | |
05ea2a05 TT |
14894 | extern $gdb_cv_func_ptrace_ret |
14895 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
5c45e068 | 14896 | |
05ea2a05 TT |
14897 | ; |
14898 | return 0; | |
14899 | } | |
14900 | _ACEOF | |
14901 | if ac_fn_c_try_compile "$LINENO"; then : | |
14902 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | |
14903 | break 4; | |
97bf5e38 | 14904 | fi |
05ea2a05 TT |
14905 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
14906 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
14907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14908 | /* end confdefs.h. */ | |
14909 | $gdb_ptrace_headers | |
14910 | int | |
14911 | main () | |
14912 | { | |
3862412b | 14913 | |
05ea2a05 TT |
14914 | extern $gdb_cv_func_ptrace_ret |
14915 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
5c45e068 | 14916 | |
05ea2a05 TT |
14917 | ; |
14918 | return 0; | |
14919 | } | |
6fea9e18 | 14920 | _ACEOF |
05ea2a05 | 14921 | if ac_fn_c_try_compile "$LINENO"; then : |
6fea9e18 | 14922 | |
05ea2a05 TT |
14923 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
14924 | break 5; | |
14925 | fi | |
14926 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14927 | done | |
14928 | done | |
14929 | done | |
14930 | done | |
14931 | done | |
14932 | # Provide a safe default value. | |
14933 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
6fea9e18 L |
14934 | |
14935 | fi | |
05ea2a05 TT |
14936 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
14937 | fi | |
14938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
14939 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
14940 | ac_save_IFS=$IFS; IFS=',' | |
14941 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
14942 | IFS=$ac_save_IFS | |
14943 | shift | |
6fea9e18 L |
14944 | |
14945 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 14946 | #define PTRACE_TYPE_ARG1 $1 |
6fea9e18 L |
14947 | _ACEOF |
14948 | ||
14949 | ||
05ea2a05 TT |
14950 | cat >>confdefs.h <<_ACEOF |
14951 | #define PTRACE_TYPE_ARG3 $3 | |
bec39cab | 14952 | _ACEOF |
451928c5 | 14953 | |
60ca704f | 14954 | |
05ea2a05 TT |
14955 | cat >>confdefs.h <<_ACEOF |
14956 | #define PTRACE_TYPE_ARG4 $4 | |
14957 | _ACEOF | |
14958 | ||
14959 | if test -n "$5"; then | |
14960 | ||
14961 | cat >>confdefs.h <<_ACEOF | |
14962 | #define PTRACE_TYPE_ARG5 $5 | |
14963 | _ACEOF | |
451928c5 | 14964 | |
97bf5e38 | 14965 | fi |
451928c5 | 14966 | |
05ea2a05 TT |
14967 | |
14968 | if test "$cross_compiling" = no; then | |
14969 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
14970 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
14971 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 14972 | $as_echo_n "(cached) " >&6 |
05ea2a05 TT |
14973 | else |
14974 | if test "$cross_compiling" = yes; then : | |
14975 | as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
451928c5 | 14976 | else |
81ecdfbb | 14977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14978 | /* end confdefs.h. */ |
05ea2a05 | 14979 | $ac_includes_default |
bec39cab AC |
14980 | int |
14981 | main () | |
14982 | { | |
05ea2a05 TT |
14983 | /* If this system has a BSD-style setpgrp which takes arguments, |
14984 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
14985 | exit successfully. */ | |
14986 | return setpgrp (1,1) != -1; | |
bec39cab AC |
14987 | ; |
14988 | return 0; | |
14989 | } | |
14990 | _ACEOF | |
05ea2a05 TT |
14991 | if ac_fn_c_try_run "$LINENO"; then : |
14992 | ac_cv_func_setpgrp_void=no | |
451928c5 | 14993 | else |
05ea2a05 | 14994 | ac_cv_func_setpgrp_void=yes |
451928c5 | 14995 | fi |
05ea2a05 TT |
14996 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14997 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
451928c5 AC |
14998 | fi |
14999 | ||
05ea2a05 TT |
15000 | fi |
15001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 | |
15002 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15003 | if test $ac_cv_func_setpgrp_void = yes; then | |
60ca704f | 15004 | |
05ea2a05 | 15005 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
451928c5 | 15006 | |
97bf5e38 | 15007 | fi |
451928c5 | 15008 | |
05ea2a05 TT |
15009 | else |
15010 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15011 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15012 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15013 | $as_echo_n "(cached) " >&6 |
3862412b | 15014 | else |
81ecdfbb | 15015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15016 | /* end confdefs.h. */ |
05ea2a05 TT |
15017 | |
15018 | #include <unistd.h> | |
15019 | ||
bec39cab AC |
15020 | int |
15021 | main () | |
15022 | { | |
05ea2a05 TT |
15023 | |
15024 | if (setpgrp(1,1) == -1) | |
15025 | exit (0); | |
15026 | else | |
15027 | exit (1); | |
15028 | ||
bec39cab AC |
15029 | ; |
15030 | return 0; | |
15031 | } | |
15032 | _ACEOF | |
81ecdfbb | 15033 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15034 | ac_cv_func_setpgrp_void=no |
3862412b | 15035 | else |
05ea2a05 | 15036 | ac_cv_func_setpgrp_void=yes |
3862412b | 15037 | fi |
81ecdfbb | 15038 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b | 15039 | fi |
05ea2a05 TT |
15040 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
15041 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15042 | if test "$ac_cv_func_setpgrp_void" = yes; then | |
15043 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h | |
3862412b | 15044 | |
05ea2a05 | 15045 | fi |
97bf5e38 | 15046 | fi |
3862412b | 15047 | |
05ea2a05 TT |
15048 | # Assume we'll default to using the included libiberty regex. |
15049 | gdb_use_included_regex=yes | |
15050 | ||
15051 | # However, if the system regex is GNU regex, then default to *not* | |
15052 | # using the included regex. | |
15053 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 | |
15054 | $as_echo_n "checking for GNU regex... " >&6; } | |
15055 | if ${gdb_cv_have_gnu_regex+:} false; then : | |
81ecdfbb | 15056 | $as_echo_n "(cached) " >&6 |
3862412b | 15057 | else |
81ecdfbb | 15058 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15059 | /* end confdefs.h. */ |
05ea2a05 | 15060 | #include <gnu-versions.h> |
bec39cab AC |
15061 | int |
15062 | main () | |
15063 | { | |
05ea2a05 TT |
15064 | #define REGEX_INTERFACE_VERSION 1 |
15065 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
15066 | # error "Version mismatch" | |
15067 | #endif | |
bec39cab AC |
15068 | ; |
15069 | return 0; | |
15070 | } | |
15071 | _ACEOF | |
81ecdfbb | 15072 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15073 | gdb_cv_have_gnu_regex=yes |
3862412b | 15074 | else |
05ea2a05 | 15075 | gdb_cv_have_gnu_regex=no |
3862412b | 15076 | fi |
81ecdfbb | 15077 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b | 15078 | fi |
05ea2a05 TT |
15079 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 |
15080 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
15081 | if test "$gdb_cv_have_gnu_regex" = yes; then | |
15082 | gdb_use_included_regex=no | |
15083 | fi | |
3862412b | 15084 | |
3862412b | 15085 | |
05ea2a05 TT |
15086 | # Check whether --with-included-regex was given. |
15087 | if test "${with_included_regex+set}" = set; then : | |
15088 | withval=$with_included_regex; gdb_with_regex=$withval | |
15089 | else | |
15090 | gdb_with_regex=$gdb_use_included_regex | |
97bf5e38 | 15091 | fi |
3862412b | 15092 | |
05ea2a05 | 15093 | if test "$gdb_with_regex" = yes; then |
6e9567fe | 15094 | |
05ea2a05 | 15095 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h |
6e9567fe JB |
15096 | |
15097 | fi | |
15098 | ||
05ea2a05 TT |
15099 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
15100 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
15101 | #include <sys/proc.h> | |
6e9567fe | 15102 | |
e6cdd38e | 15103 | " |
05ea2a05 | 15104 | if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : |
e6cdd38e JB |
15105 | |
15106 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15107 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
e6cdd38e JB |
15108 | _ACEOF |
15109 | ||
15110 | ||
15111 | fi | |
15112 | ||
6e9567fe | 15113 | |
05ea2a05 TT |
15114 | # See if <sys/lwp.h> defines `struct lwp`. |
15115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 | |
15116 | $as_echo_n "checking for struct lwp... " >&6; } | |
15117 | if ${gdb_cv_struct_lwp+:} false; then : | |
81ecdfbb | 15118 | $as_echo_n "(cached) " >&6 |
596c9d4b | 15119 | else |
81ecdfbb | 15120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15121 | /* end confdefs.h. */ |
05ea2a05 TT |
15122 | #include <sys/param.h> |
15123 | #define _KMEMUSER | |
15124 | #include <sys/lwp.h> | |
bec39cab AC |
15125 | int |
15126 | main () | |
15127 | { | |
05ea2a05 | 15128 | struct lwp l; |
bec39cab AC |
15129 | ; |
15130 | return 0; | |
15131 | } | |
15132 | _ACEOF | |
81ecdfbb | 15133 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15134 | gdb_cv_struct_lwp=yes |
596c9d4b | 15135 | else |
05ea2a05 | 15136 | gdb_cv_struct_lwp=no |
596c9d4b | 15137 | fi |
81ecdfbb | 15138 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b | 15139 | fi |
05ea2a05 TT |
15140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
15141 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
15142 | if test "$gdb_cv_struct_lwp" = yes; then | |
596c9d4b | 15143 | |
05ea2a05 | 15144 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
596c9d4b | 15145 | |
05ea2a05 | 15146 | fi |
451928c5 | 15147 | |
05ea2a05 TT |
15148 | # See if <machine/reg.h> degines `struct reg'. |
15149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 | |
15150 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
15151 | if ${gdb_cv_struct_reg+:} false; then : | |
81ecdfbb | 15152 | $as_echo_n "(cached) " >&6 |
d84dd0c5 | 15153 | else |
81ecdfbb | 15154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15155 | /* end confdefs.h. */ |
05ea2a05 TT |
15156 | #include <sys/types.h> |
15157 | #include <machine/reg.h> | |
bec39cab AC |
15158 | int |
15159 | main () | |
15160 | { | |
05ea2a05 | 15161 | struct reg r; |
bec39cab AC |
15162 | ; |
15163 | return 0; | |
15164 | } | |
15165 | _ACEOF | |
81ecdfbb | 15166 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15167 | gdb_cv_struct_reg=yes |
d84dd0c5 | 15168 | else |
05ea2a05 | 15169 | gdb_cv_struct_reg=no |
d84dd0c5 | 15170 | fi |
81ecdfbb | 15171 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 | 15172 | fi |
05ea2a05 TT |
15173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
15174 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
15175 | if test "$gdb_cv_struct_reg" = yes; then | |
d84dd0c5 | 15176 | |
05ea2a05 | 15177 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
bec39cab | 15178 | |
05ea2a05 | 15179 | fi |
d84dd0c5 | 15180 | |
05ea2a05 TT |
15181 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
15182 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
15183 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> | |
15184 | #include <machine/reg.h> | |
15185 | " | |
15186 | if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : | |
d84dd0c5 | 15187 | |
05ea2a05 TT |
15188 | cat >>confdefs.h <<_ACEOF |
15189 | #define HAVE_STRUCT_REG_R_FS 1 | |
15190 | _ACEOF | |
15191 | ||
15192 | ||
15193 | fi | |
15194 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> | |
15195 | #include <machine/reg.h> | |
15196 | " | |
15197 | if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : | |
15198 | ||
15199 | cat >>confdefs.h <<_ACEOF | |
15200 | #define HAVE_STRUCT_REG_R_GS 1 | |
15201 | _ACEOF | |
15202 | ||
15203 | ||
15204 | fi | |
15205 | ||
15206 | ||
15207 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. | |
15208 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
15209 | # `struct user_regs_struct'. | |
15210 | 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> | |
15211 | #include <sys/user.h> | |
15212 | " | |
15213 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then : | |
c906108c | 15214 | |
05ea2a05 TT |
15215 | cat >>confdefs.h <<_ACEOF |
15216 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
bec39cab | 15217 | _ACEOF |
05ea2a05 | 15218 | |
bec39cab | 15219 | |
c906108c | 15220 | fi |
05ea2a05 TT |
15221 | 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> |
15222 | #include <sys/user.h> | |
15223 | " | |
15224 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then : | |
c906108c | 15225 | |
05ea2a05 TT |
15226 | cat >>confdefs.h <<_ACEOF |
15227 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
15228 | _ACEOF | |
bec39cab | 15229 | |
c906108c | 15230 | |
05ea2a05 | 15231 | fi |
c906108c | 15232 | |
05ea2a05 TT |
15233 | |
15234 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. | |
15235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 | |
15236 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
15237 | if ${gdb_cv_have_ptrace_getregs+:} false; then : | |
81ecdfbb | 15238 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15239 | else |
81ecdfbb | 15240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15241 | /* end confdefs.h. */ |
05ea2a05 | 15242 | #include <sys/ptrace.h> |
bec39cab AC |
15243 | int |
15244 | main () | |
15245 | { | |
05ea2a05 | 15246 | PTRACE_GETREGS; |
bec39cab AC |
15247 | ; |
15248 | return 0; | |
15249 | } | |
15250 | _ACEOF | |
81ecdfbb | 15251 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15252 | gdb_cv_have_ptrace_getregs=yes |
d45fe813 | 15253 | else |
05ea2a05 | 15254 | gdb_cv_have_ptrace_getregs=no |
d45fe813 | 15255 | fi |
81ecdfbb | 15256 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15257 | fi |
15258 | ||
05ea2a05 TT |
15259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
15260 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
15261 | if test "$gdb_cv_have_ptrace_getregs" = yes; then | |
bec39cab | 15262 | |
05ea2a05 | 15263 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
d45fe813 | 15264 | |
05ea2a05 | 15265 | fi |
d45fe813 | 15266 | |
05ea2a05 TT |
15267 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
15268 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 | |
15269 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
15270 | if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : | |
81ecdfbb | 15271 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15272 | else |
81ecdfbb | 15273 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15274 | /* end confdefs.h. */ |
05ea2a05 | 15275 | #include <sys/ptrace.h> |
bec39cab AC |
15276 | int |
15277 | main () | |
15278 | { | |
05ea2a05 | 15279 | PTRACE_GETFPXREGS; |
bec39cab AC |
15280 | ; |
15281 | return 0; | |
15282 | } | |
15283 | _ACEOF | |
81ecdfbb | 15284 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15285 | gdb_cv_have_ptrace_getfpxregs=yes |
d45fe813 | 15286 | else |
05ea2a05 | 15287 | gdb_cv_have_ptrace_getfpxregs=no |
d45fe813 | 15288 | fi |
81ecdfbb | 15289 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15290 | fi |
15291 | ||
05ea2a05 TT |
15292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
15293 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
15294 | if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then | |
bec39cab | 15295 | |
05ea2a05 | 15296 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
d45fe813 | 15297 | |
05ea2a05 | 15298 | fi |
d45fe813 | 15299 | |
05ea2a05 TT |
15300 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
15301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 | |
15302 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
15303 | if ${gdb_cv_have_pt_getdbregs+:} false; then : | |
81ecdfbb | 15304 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15305 | else |
81ecdfbb | 15306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15307 | /* end confdefs.h. */ |
05ea2a05 TT |
15308 | #include <sys/types.h> |
15309 | #include <sys/ptrace.h> | |
bec39cab AC |
15310 | int |
15311 | main () | |
15312 | { | |
05ea2a05 | 15313 | PT_GETDBREGS; |
bec39cab AC |
15314 | ; |
15315 | return 0; | |
15316 | } | |
15317 | _ACEOF | |
81ecdfbb | 15318 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15319 | gdb_cv_have_pt_getdbregs=yes |
d45fe813 | 15320 | else |
05ea2a05 | 15321 | gdb_cv_have_pt_getdbregs=no |
d45fe813 | 15322 | fi |
81ecdfbb | 15323 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15324 | fi |
15325 | ||
05ea2a05 TT |
15326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
15327 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
15328 | if test "$gdb_cv_have_pt_getdbregs" = yes; then | |
bec39cab | 15329 | |
05ea2a05 | 15330 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
d45fe813 | 15331 | |
05ea2a05 | 15332 | fi |
c906108c | 15333 | |
05ea2a05 TT |
15334 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
15335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 | |
15336 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
15337 | if ${gdb_cv_have_pt_getxmmregs+:} false; then : | |
81ecdfbb | 15338 | $as_echo_n "(cached) " >&6 |
c906108c | 15339 | else |
81ecdfbb | 15340 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15341 | /* end confdefs.h. */ |
05ea2a05 TT |
15342 | #include <sys/types.h> |
15343 | #include <sys/ptrace.h> | |
bec39cab AC |
15344 | int |
15345 | main () | |
15346 | { | |
05ea2a05 | 15347 | PT_GETXMMREGS; |
bec39cab AC |
15348 | ; |
15349 | return 0; | |
15350 | } | |
15351 | _ACEOF | |
81ecdfbb | 15352 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15353 | gdb_cv_have_pt_getxmmregs=yes |
c906108c | 15354 | else |
05ea2a05 | 15355 | gdb_cv_have_pt_getxmmregs=no |
c906108c | 15356 | fi |
81ecdfbb | 15357 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
15358 | fi |
15359 | ||
05ea2a05 TT |
15360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
15361 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
15362 | if test "$gdb_cv_have_pt_getxmmregs" = yes; then | |
bec39cab | 15363 | |
05ea2a05 | 15364 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
c906108c | 15365 | |
05ea2a05 | 15366 | fi |
c906108c | 15367 | |
05ea2a05 TT |
15368 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
15369 | # Older FreeBSD versions don't have the pl_tdname member of | |
15370 | # `struct ptrace_lwpinfo'. | |
15371 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
15372 | " | |
15373 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : | |
43b7e92b | 15374 | |
05ea2a05 TT |
15375 | cat >>confdefs.h <<_ACEOF |
15376 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
43b7e92b | 15377 | _ACEOF |
43b7e92b | 15378 | |
05ea2a05 | 15379 | |
43b7e92b GB |
15380 | fi |
15381 | ||
43b7e92b | 15382 | |
05ea2a05 TT |
15383 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
15384 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
15385 | # FreeBSD 10.3. | |
15386 | 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> | |
15387 | " | |
15388 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : | |
15389 | ||
15390 | cat >>confdefs.h <<_ACEOF | |
15391 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
15392 | _ACEOF | |
43b7e92b | 15393 | |
43b7e92b | 15394 | |
c906108c | 15395 | fi |
c906108c | 15396 | |
05ea2a05 | 15397 | |
bc8bcb4b | 15398 | # Check if the compiler supports the `long long' type. |
c906108c | 15399 | |
81ecdfbb RW |
15400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
15401 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
d0ac1c44 | 15402 | if ${gdb_cv_c_long_long+:} false; then : |
81ecdfbb | 15403 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15404 | else |
81ecdfbb | 15405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15406 | /* end confdefs.h. */ |
bc8bcb4b | 15407 | extern long long foo; |
bec39cab AC |
15408 | int |
15409 | main () | |
15410 | { | |
bc8bcb4b | 15411 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
15412 | ; |
15413 | return 0; | |
15414 | } | |
15415 | _ACEOF | |
81ecdfbb | 15416 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
15417 | gdb_cv_c_long_long=yes |
15418 | else | |
81ecdfbb | 15419 | gdb_cv_c_long_long=no |
97bf5e38 | 15420 | fi |
81ecdfbb | 15421 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15422 | fi |
81ecdfbb RW |
15423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
15424 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
0ad6b8ee | 15425 | if test "$gdb_cv_c_long_long" != yes; then |
74a0d9f6 | 15426 | # libdecnumber requires long long. |
d0ac1c44 | 15427 | as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 |
97bf5e38 MK |
15428 | fi |
15429 | ||
bc8bcb4b | 15430 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 15431 | |
81ecdfbb RW |
15432 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
15433 | $as_echo_n "checking for long long support in printf... " >&6; } | |
d0ac1c44 | 15434 | if ${gdb_cv_printf_has_long_long+:} false; then : |
81ecdfbb | 15435 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15436 | else |
81ecdfbb | 15437 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15438 | gdb_cv_printf_has_long_long=no |
15439 | else | |
81ecdfbb | 15440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15441 | /* end confdefs.h. */ |
bc8bcb4b MK |
15442 | $ac_includes_default |
15443 | int | |
15444 | main () | |
15445 | { | |
15446 | char buf[32]; | |
97bf5e38 MK |
15447 | long long l = 0; |
15448 | l = (l << 16) + 0x0123; | |
15449 | l = (l << 16) + 0x4567; | |
15450 | l = (l << 16) + 0x89ab; | |
15451 | l = (l << 16) + 0xcdef; | |
15452 | sprintf (buf, "0x%016llx", l); | |
15453 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
15454 | ; |
15455 | return 0; | |
c906108c | 15456 | } |
bec39cab | 15457 | _ACEOF |
81ecdfbb | 15458 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
15459 | gdb_cv_printf_has_long_long=yes |
15460 | else | |
81ecdfbb | 15461 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 15462 | fi |
81ecdfbb RW |
15463 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15464 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 15465 | fi |
81ecdfbb | 15466 | |
97bf5e38 | 15467 | fi |
81ecdfbb RW |
15468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
15469 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
0ad6b8ee | 15470 | if test "$gdb_cv_printf_has_long_long" = yes; then |
bc8bcb4b | 15471 | |
81ecdfbb | 15472 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
15473 | |
15474 | fi | |
97bf5e38 | 15475 | |
1a619819 LM |
15476 | # Check if the compiler and runtime support printing decfloats. |
15477 | ||
81ecdfbb RW |
15478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
15479 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
d0ac1c44 | 15480 | if ${gdb_cv_printf_has_decfloat+:} false; then : |
81ecdfbb | 15481 | $as_echo_n "(cached) " >&6 |
1a619819 | 15482 | else |
81ecdfbb | 15483 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
15484 | gdb_cv_printf_has_decfloat=no |
15485 | else | |
81ecdfbb | 15486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
15487 | /* end confdefs.h. */ |
15488 | $ac_includes_default | |
15489 | int | |
15490 | main () | |
15491 | { | |
15492 | char buf[64]; | |
15493 | _Decimal32 d32 = 1.2345df; | |
15494 | _Decimal64 d64 = 1.2345dd; | |
15495 | _Decimal128 d128 = 1.2345dl; | |
15496 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
15497 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
15498 | ; | |
15499 | return 0; | |
15500 | } | |
15501 | _ACEOF | |
81ecdfbb | 15502 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
15503 | gdb_cv_printf_has_decfloat=yes |
15504 | else | |
81ecdfbb | 15505 | gdb_cv_printf_has_decfloat=no |
1a619819 | 15506 | fi |
81ecdfbb RW |
15507 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15508 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 15509 | fi |
81ecdfbb | 15510 | |
1a619819 | 15511 | fi |
81ecdfbb RW |
15512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
15513 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
0ad6b8ee | 15514 | if test "$gdb_cv_printf_has_decfloat" = yes; then |
1a619819 | 15515 | |
81ecdfbb | 15516 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
15517 | |
15518 | fi | |
15519 | ||
bc8bcb4b MK |
15520 | # Check if the compiler supports the `long double' type. We can't use |
15521 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
15522 | # constants defined in <float.h> that fail on some systems, | |
15523 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 15524 | |
81ecdfbb RW |
15525 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
15526 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
d0ac1c44 | 15527 | if ${gdb_cv_c_long_double+:} false; then : |
81ecdfbb | 15528 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15529 | else |
81ecdfbb | 15530 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15531 | /* end confdefs.h. */ |
97bf5e38 | 15532 | long double foo; |
bec39cab | 15533 | _ACEOF |
81ecdfbb | 15534 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 15535 | gdb_cv_c_long_double=yes |
97bf5e38 | 15536 | else |
81ecdfbb | 15537 | gdb_cv_c_long_double=no |
97bf5e38 | 15538 | fi |
81ecdfbb | 15539 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15540 | fi |
81ecdfbb RW |
15541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
15542 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
0ad6b8ee | 15543 | if test "$gdb_cv_c_long_double" = yes; then |
c906108c | 15544 | |
81ecdfbb | 15545 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
15546 | |
15547 | fi | |
15548 | ||
bc8bcb4b | 15549 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 15550 | |
81ecdfbb RW |
15551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
15552 | $as_echo_n "checking for long double support in printf... " >&6; } | |
d0ac1c44 | 15553 | if ${gdb_cv_printf_has_long_double+:} false; then : |
81ecdfbb | 15554 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15555 | else |
81ecdfbb | 15556 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15557 | gdb_cv_printf_has_long_double=no |
15558 | else | |
81ecdfbb | 15559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15560 | /* end confdefs.h. */ |
bc8bcb4b MK |
15561 | $ac_includes_default |
15562 | int | |
15563 | main () | |
15564 | { | |
15565 | char buf[16]; | |
97bf5e38 MK |
15566 | long double f = 3.141592653; |
15567 | sprintf (buf, "%Lg", f); | |
15568 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
15569 | ; |
15570 | return 0; | |
97bf5e38 | 15571 | } |
bec39cab | 15572 | _ACEOF |
81ecdfbb | 15573 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 15574 | gdb_cv_printf_has_long_double=yes |
c906108c | 15575 | else |
81ecdfbb | 15576 | gdb_cv_printf_has_long_double=no |
c906108c | 15577 | fi |
81ecdfbb RW |
15578 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15579 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 15580 | fi |
81ecdfbb | 15581 | |
c906108c | 15582 | fi |
81ecdfbb RW |
15583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
15584 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
0ad6b8ee | 15585 | if test "$gdb_cv_printf_has_long_double" = yes; then |
bc8bcb4b | 15586 | |
81ecdfbb | 15587 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
15588 | |
15589 | fi | |
97bf5e38 | 15590 | |
bc8bcb4b | 15591 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 15592 | |
81ecdfbb RW |
15593 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
15594 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
d0ac1c44 | 15595 | if ${gdb_cv_scanf_has_long_double+:} false; then : |
81ecdfbb | 15596 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15597 | else |
81ecdfbb | 15598 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15599 | gdb_cv_scanf_has_long_double=no |
15600 | else | |
81ecdfbb | 15601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15602 | /* end confdefs.h. */ |
bc8bcb4b MK |
15603 | #include <stdio.h> |
15604 | int | |
15605 | main () | |
15606 | { | |
15607 | char *buf = "3.141592653"; | |
97bf5e38 MK |
15608 | long double f = 0; |
15609 | sscanf (buf, "%Lg", &f); | |
15610 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
15611 | ; |
15612 | return 0; | |
97bf5e38 | 15613 | } |
bec39cab | 15614 | _ACEOF |
81ecdfbb | 15615 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
15616 | gdb_cv_scanf_has_long_double=yes |
15617 | else | |
81ecdfbb | 15618 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 15619 | fi |
81ecdfbb RW |
15620 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15621 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 15622 | fi |
81ecdfbb | 15623 | |
c906108c | 15624 | fi |
81ecdfbb RW |
15625 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
15626 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
0ad6b8ee | 15627 | if test "$gdb_cv_scanf_has_long_double" = yes; then |
bc8bcb4b | 15628 | |
81ecdfbb | 15629 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
15630 | |
15631 | fi | |
c906108c | 15632 | |
438013df AO |
15633 | case ${host_os} in |
15634 | aix*) | |
81ecdfbb RW |
15635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
15636 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d0ac1c44 | 15637 | if ${gdb_cv_bigtoc+:} false; then : |
81ecdfbb | 15638 | $as_echo_n "(cached) " >&6 |
438013df | 15639 | else |
bec39cab | 15640 | |
438013df AO |
15641 | SAVE_LDFLAGS=$LDFLAGS |
15642 | ||
15643 | case $GCC in | |
15644 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
15645 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
15646 | esac | |
15647 | ||
15648 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 15649 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15650 | /* end confdefs.h. */ |
438013df | 15651 | |
bec39cab AC |
15652 | int |
15653 | main () | |
15654 | { | |
438013df | 15655 | int i; |
bec39cab AC |
15656 | ; |
15657 | return 0; | |
15658 | } | |
15659 | _ACEOF | |
81ecdfbb | 15660 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 15661 | |
81ecdfbb RW |
15662 | else |
15663 | gdb_cv_bigtoc= | |
438013df | 15664 | fi |
81ecdfbb RW |
15665 | rm -f core conftest.err conftest.$ac_objext \ |
15666 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 15667 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 15668 | |
bec39cab | 15669 | fi |
81ecdfbb RW |
15670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
15671 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
15672 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
15673 | ;; | |
15674 | esac | |
15675 | ||
38f6b338 | 15676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 15677 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
15678 | dynamic_list=false |
15679 | if test "${gdb_native}" = yes; then | |
15680 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
15681 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
15682 | # may not be supported there. | |
15683 | old_LDFLAGS="$LDFLAGS" | |
15684 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
15685 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
15686 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
15687 | if test "${have_libpython}" = no; then | |
15688 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
15689 | /* end confdefs.h. */ |
15690 | ||
15691 | int | |
15692 | main () | |
15693 | { | |
15694 | ||
15695 | ; | |
15696 | return 0; | |
15697 | } | |
15698 | _ACEOF | |
15699 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
15700 | dynamic_list=true |
15701 | fi | |
15702 | rm -f core conftest.err conftest.$ac_objext \ | |
15703 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
15704 | else |
15705 | # Workaround http://bugs.python.org/issue4434 where static | |
15706 | # libpythonX.Y.a would get its symbols required for | |
15707 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
15708 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
15709 | |
15710 | # Note the workaround for Python | |
15711 | # http://bugs.python.org/issue10112 earlier has removed | |
15712 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
15713 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
15714 | # always pass. | |
38f6b338 JK |
15715 | old_CFLAGS="$CFLAGS" |
15716 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
15717 | old_LIBS="$LIBS" |
15718 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
15719 | old_CPPFLAGS="$CPPFLAGS" |
15720 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 15721 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 15722 | true |
f6528abd | 15723 | else |
3bebe2f2 JK |
15724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15725 | /* end confdefs.h. */ | |
1b4f615e | 15726 | #include "Python.h" |
3bebe2f2 JK |
15727 | int |
15728 | main () | |
15729 | { | |
15730 | int err; | |
38f6b338 JK |
15731 | Py_Initialize (); |
15732 | err = PyRun_SimpleString ("import itertools\n"); | |
15733 | Py_Finalize (); | |
15734 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
15735 | ; |
15736 | return 0; | |
15737 | } | |
15738 | _ACEOF | |
15739 | if ac_fn_c_try_run "$LINENO"; then : | |
15740 | dynamic_list=true | |
15741 | fi | |
15742 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15743 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15744 | fi | |
15745 | ||
8c1fb155 | 15746 | LIBS="$old_LIBS" |
38f6b338 | 15747 | CFLAGS="$old_CFLAGS" |
1b4f615e | 15748 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
15749 | fi |
15750 | LDFLAGS="$old_LDFLAGS" | |
15751 | fi | |
15752 | if $dynamic_list; then | |
15753 | found="-Wl,--dynamic-list" | |
15754 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 15755 | else |
38f6b338 JK |
15756 | found="-rdynamic" |
15757 | RDYNAMIC="-rdynamic" | |
f6528abd | 15758 | fi |
f6528abd | 15759 | |
38f6b338 | 15760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 15761 | $as_echo "$found" >&6; } |
0407b3f1 | 15762 | |
f6528abd | 15763 | |
0ad6b8ee | 15764 | if test "${build}" = "${host}" -a "${host}" = "${target}" ; then |
c906108c | 15765 | case ${host_os} in |
d92419e5 | 15766 | aix*) |
81ecdfbb RW |
15767 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
15768 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
d0ac1c44 | 15769 | if ${gdb_cv_have_aix_thread_debug+:} false; then : |
81ecdfbb | 15770 | $as_echo_n "(cached) " >&6 |
bec39cab | 15771 | else |
81ecdfbb | 15772 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15773 | /* end confdefs.h. */ |
d92419e5 | 15774 | #include <sys/pthdebug.h> |
bec39cab AC |
15775 | int |
15776 | main () | |
15777 | { | |
d92419e5 JB |
15778 | #ifndef PTHDB_VERSION_3 |
15779 | #error | |
15780 | #endif | |
bec39cab AC |
15781 | ; |
15782 | return 0; | |
15783 | } | |
15784 | _ACEOF | |
81ecdfbb | 15785 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
15786 | gdb_cv_have_aix_thread_debug=yes |
15787 | else | |
81ecdfbb | 15788 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 15789 | fi |
81ecdfbb | 15790 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
15791 | fi |
15792 | ||
81ecdfbb RW |
15793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
15794 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
0ad6b8ee | 15795 | if test "$gdb_cv_have_aix_thread_debug" = yes; then |
d92419e5 | 15796 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" |
3483b318 | 15797 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 15798 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
15799 | |
15800 | # Older versions of AIX do not provide the declaration for | |
15801 | # the getthrds function (it appears that it was introduced | |
15802 | # with AIX 6.x). | |
15803 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
15804 | " | |
d0ac1c44 | 15805 | if test "x$ac_cv_have_decl_getthrds" = xyes; then : |
d645e32e JB |
15806 | ac_have_decl=1 |
15807 | else | |
15808 | ac_have_decl=0 | |
15809 | fi | |
15810 | ||
15811 | cat >>confdefs.h <<_ACEOF | |
15812 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
15813 | _ACEOF | |
15814 | ||
d92419e5 JB |
15815 | fi |
15816 | ;; | |
c906108c | 15817 | esac |
bec39cab | 15818 | |
c906108c SS |
15819 | fi |
15820 | ||
3f47be5c | 15821 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
15822 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
15823 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
d0ac1c44 | 15824 | if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : |
81ecdfbb | 15825 | $as_echo_n "(cached) " >&6 |
bec39cab | 15826 | else |
81ecdfbb | 15827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15828 | /* end confdefs.h. */ |
3f47be5c | 15829 | #include <thread_db.h> |
bec39cab AC |
15830 | int |
15831 | main () | |
15832 | { | |
3f47be5c | 15833 | int i = TD_NOTALLOC; |
bec39cab AC |
15834 | ; |
15835 | return 0; | |
15836 | } | |
15837 | _ACEOF | |
81ecdfbb | 15838 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
15839 | gdb_cv_thread_db_h_has_td_notalloc=yes |
15840 | else | |
81ecdfbb | 15841 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 15842 | |
3f47be5c | 15843 | fi |
81ecdfbb | 15844 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 15845 | |
bec39cab | 15846 | fi |
81ecdfbb RW |
15847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
15848 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
15849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
15850 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
d0ac1c44 | 15851 | if ${gdb_cv_thread_db_h_has_td_version+:} false; then : |
81ecdfbb | 15852 | $as_echo_n "(cached) " >&6 |
59f80f10 | 15853 | else |
81ecdfbb | 15854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
15855 | /* end confdefs.h. */ |
15856 | #include <thread_db.h> | |
15857 | int | |
15858 | main () | |
15859 | { | |
15860 | int i = TD_VERSION; | |
15861 | ; | |
15862 | return 0; | |
15863 | } | |
15864 | _ACEOF | |
81ecdfbb | 15865 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
15866 | gdb_cv_thread_db_h_has_td_version=yes |
15867 | else | |
81ecdfbb | 15868 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
15869 | |
15870 | fi | |
81ecdfbb | 15871 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
15872 | |
15873 | fi | |
81ecdfbb RW |
15874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
15875 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
15876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
15877 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
d0ac1c44 | 15878 | if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : |
81ecdfbb | 15879 | $as_echo_n "(cached) " >&6 |
59f80f10 | 15880 | else |
81ecdfbb | 15881 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
15882 | /* end confdefs.h. */ |
15883 | #include <thread_db.h> | |
15884 | int | |
15885 | main () | |
15886 | { | |
15887 | int i = TD_NOTLS; | |
15888 | ; | |
15889 | return 0; | |
15890 | } | |
15891 | _ACEOF | |
81ecdfbb | 15892 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
15893 | gdb_cv_thread_db_h_has_td_notls=yes |
15894 | else | |
81ecdfbb | 15895 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
15896 | |
15897 | fi | |
81ecdfbb | 15898 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
15899 | |
15900 | fi | |
81ecdfbb RW |
15901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
15902 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
15903 | fi |
15904 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 15905 | |
81ecdfbb | 15906 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 15907 | |
59f80f10 DJ |
15908 | fi |
15909 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
15910 | ||
81ecdfbb | 15911 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
15912 | |
15913 | fi | |
15914 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
15915 | ||
81ecdfbb | 15916 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 15917 | |
3f47be5c EZ |
15918 | fi |
15919 | ||
e655c1a2 PA |
15920 | case $host_os in |
15921 | go32* | *djgpp*) | |
15922 | gdbinit=gdb.ini | |
15923 | ;; | |
15924 | *) | |
15925 | gdbinit=.gdbinit | |
15926 | ;; | |
15927 | esac | |
15928 | ||
15929 | cat >>confdefs.h <<_ACEOF | |
15930 | #define GDBINIT "$gdbinit" | |
15931 | _ACEOF | |
15932 | ||
15933 | ||
fb40c209 | 15934 | |
f83d8a90 DE |
15935 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
15936 | # except that the argument to --with-sysroot is optional. | |
15937 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
15938 | if test "x$with_sysroot" = xyes; then | |
15939 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
15940 | fi | |
bec39cab | 15941 | |
81ecdfbb RW |
15942 | # Check whether --with-sysroot was given. |
15943 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
15944 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
15945 | else | |
15946 | TARGET_SYSTEM_ROOT= | |
15947 | fi | |
030292b7 | 15948 | |
030292b7 | 15949 | |
f83d8a90 DE |
15950 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
15951 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15952 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
15953 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 15954 | |
f83d8a90 DE |
15955 | cat >>confdefs.h <<_ACEOF |
15956 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
15957 | _ACEOF | |
bec39cab | 15958 | |
030292b7 | 15959 | |
b14b1491 | 15960 | |
f83d8a90 DE |
15961 | |
15962 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
15963 | if test "x$prefix" = xNONE; then | |
15964 | test_prefix=/usr/local | |
15965 | else | |
15966 | test_prefix=$prefix | |
15967 | fi | |
15968 | else | |
15969 | test_prefix=$exec_prefix | |
15970 | fi | |
15971 | value=0 | |
15972 | case ${ac_define_dir} in | |
15973 | "${test_prefix}"|"${test_prefix}/"*|\ | |
15974 | '${exec_prefix}'|'${exec_prefix}/'*) | |
15975 | value=1 | |
15976 | ;; | |
15977 | esac | |
15978 | ||
15979 | cat >>confdefs.h <<_ACEOF | |
15980 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
15981 | _ACEOF | |
030292b7 DJ |
15982 | |
15983 | ||
15984 | ||
16e7150e | 15985 | |
16e7150e | 15986 | |
81ecdfbb RW |
15987 | # Check whether --with-system-gdbinit was given. |
15988 | if test "${with_system_gdbinit+set}" = set; then : | |
15989 | withval=$with_system_gdbinit; | |
b14b1491 TT |
15990 | SYSTEM_GDBINIT=$withval |
15991 | else | |
15992 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
15993 | fi |
15994 | ||
16e7150e JG |
15995 | |
15996 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
15997 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 15998 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
15999 | ac_define_dir=`eval echo $ac_define_dir` |
16000 | ||
16001 | cat >>confdefs.h <<_ACEOF | |
16002 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
16003 | _ACEOF | |
16004 | ||
16005 | ||
16006 | ||
0c4a4063 | 16007 | |
b14b1491 TT |
16008 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
16009 | if test "x$prefix" = xNONE; then | |
16010 | test_prefix=/usr/local | |
16011 | else | |
16012 | test_prefix=$prefix | |
16013 | fi | |
16014 | else | |
16015 | test_prefix=$exec_prefix | |
16016 | fi | |
16017 | value=0 | |
16018 | case ${ac_define_dir} in | |
16019 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16020 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16021 | value=1 | |
16022 | ;; | |
16023 | esac | |
16e7150e | 16024 | |
b14b1491 TT |
16025 | cat >>confdefs.h <<_ACEOF |
16026 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
16027 | _ACEOF |
16028 | ||
b14b1491 | 16029 | |
16e7150e | 16030 | |
0c4a4063 | 16031 | |
b835bb52 | 16032 | |
ed2a2229 CB |
16033 | # Check whether --with-system-gdbinit-dir was given. |
16034 | if test "${with_system_gdbinit_dir+set}" = set; then : | |
16035 | withval=$with_system_gdbinit_dir; | |
16036 | SYSTEM_GDBINIT_DIR=$withval | |
16037 | else | |
16038 | SYSTEM_GDBINIT_DIR= | |
16039 | fi | |
16040 | ||
16041 | ||
16042 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16043 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16044 | ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR` | |
16045 | ac_define_dir=`eval echo $ac_define_dir` | |
16046 | ||
16047 | cat >>confdefs.h <<_ACEOF | |
16048 | #define SYSTEM_GDBINIT_DIR "$ac_define_dir" | |
16049 | _ACEOF | |
16050 | ||
16051 | ||
16052 | ||
16053 | ||
16054 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16055 | if test "x$prefix" = xNONE; then | |
16056 | test_prefix=/usr/local | |
16057 | else | |
16058 | test_prefix=$prefix | |
16059 | fi | |
16060 | else | |
16061 | test_prefix=$exec_prefix | |
16062 | fi | |
16063 | value=0 | |
16064 | case ${ac_define_dir} in | |
16065 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16066 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16067 | value=1 | |
16068 | ;; | |
16069 | esac | |
16070 | ||
16071 | cat >>confdefs.h <<_ACEOF | |
16072 | #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value | |
16073 | _ACEOF | |
16074 | ||
16075 | ||
16076 | ||
16077 | ||
16078 | ||
81ecdfbb RW |
16079 | # Check whether --enable-werror was given. |
16080 | if test "${enable_werror+set}" = set; then : | |
16081 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
16082 | yes | y) ERROR_ON_WARNING="yes" ;; |
16083 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 16084 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 16085 | esac |
81ecdfbb RW |
16086 | fi |
16087 | ||
094a342e | 16088 | |
9a084706 PA |
16089 | # Enable -Werror by default when using gcc. Turn it off for releases. |
16090 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
16091 | ERROR_ON_WARNING=yes |
16092 | fi | |
16093 | ||
16094 | WERROR_CFLAGS="" | |
16095 | if test "${ERROR_ON_WARNING}" = yes ; then | |
16096 | WERROR_CFLAGS="-Werror" | |
16097 | fi | |
16098 | ||
cf6de44d | 16099 | # The options we'll try to enable. |
aac331e4 | 16100 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 16101 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
aac331e4 | 16102 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 16103 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 16104 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
7f8a5d38 | 16105 | -Wno-mismatched-tags \ |
632e107b | 16106 | -Wno-error=deprecated-register \ |
85e26832 | 16107 | -Wsuggest-override \ |
1a34f210 | 16108 | -Wimplicit-fallthrough=3 \ |
96643e35 | 16109 | -Wduplicated-cond \ |
33a6bc35 TT |
16110 | -Wshadow=local \ |
16111 | -Wdeprecated-copy \ | |
16112 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 16113 | -Wredundant-move \ |
8ddd8e0e | 16114 | -Wmissing-declarations \ |
898e7f60 SM |
16115 | -Wstrict-null-sentinel \ |
16116 | " | |
3bc3d82a | 16117 | |
3526781e | 16118 | case "${host}" in |
4fa7574e RO |
16119 | *-*-mingw32*) |
16120 | # Enable -Wno-format by default when using gcc on mingw since many | |
16121 | # GCC versions complain about %I64. | |
16122 | build_warnings="$build_warnings -Wno-format" ;; | |
16123 | *-*-solaris*) | |
16124 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
16125 | # doesn't understand. | |
16126 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
16127 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
16128 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
16129 | *) |
16130 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
16131 | # but there's a special case for this below. | |
16132 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
3526781e DJ |
16133 | esac |
16134 | ||
81ecdfbb RW |
16135 | # Check whether --enable-build-warnings was given. |
16136 | if test "${enable_build_warnings+set}" = set; then : | |
16137 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
16138 | yes) ;; |
16139 | no) build_warnings="-w";; | |
16140 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16141 | build_warnings="${build_warnings} ${t}";; | |
16142 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16143 | build_warnings="${t} ${build_warnings}";; | |
16144 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16145 | esac | |
d4f3574e | 16146 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 16147 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 16148 | fi |
81ecdfbb RW |
16149 | fi |
16150 | # Check whether --enable-gdb-build-warnings was given. | |
16151 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
16152 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
16153 | yes) ;; |
16154 | no) build_warnings="-w";; | |
16155 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16156 | build_warnings="${build_warnings} ${t}";; | |
16157 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16158 | build_warnings="${t} ${build_warnings}";; | |
16159 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16160 | esac | |
16161 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
16162 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
16163 | fi | |
81ecdfbb | 16164 | fi |
3bc3d82a PA |
16165 | |
16166 | # The set of warnings supported by a C++ compiler is not the same as | |
16167 | # of the C compiler. | |
cf6de44d | 16168 | ac_ext=cpp |
3bc3d82a PA |
16169 | ac_cpp='$CXXCPP $CPPFLAGS' |
16170 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16171 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16172 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
16173 | ||
3bc3d82a | 16174 | |
81ecdfbb | 16175 | WARN_CFLAGS="" |
c906108c SS |
16176 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
16177 | then | |
81ecdfbb RW |
16178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
16179 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
16180 | # Separate out the -Werror flag as some files just cannot be |
16181 | # compiled with it enabled. | |
16182 | for w in ${build_warnings}; do | |
7544db95 PA |
16183 | # GCC does not complain about -Wno-unknown-warning. Invert |
16184 | # and test -Wunknown-warning instead. | |
16185 | case $w in | |
16186 | -Wno-*) | |
16187 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
16188 | -Wformat-nonliteral) |
16189 | # gcc requires -Wformat before -Wformat-nonliteral | |
16190 | # will work, so stick them together. | |
16191 | w="-Wformat $w" | |
16192 | wtest="$w" | |
16193 | ;; | |
7544db95 PA |
16194 | *) |
16195 | wtest=$w ;; | |
16196 | esac | |
16197 | ||
746a987d AC |
16198 | case $w in |
16199 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
16200 | *) |
16201 | # Check whether GCC accepts it. | |
4536bbc6 | 16202 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 16203 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 16204 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 16205 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
16206 | if test "x$w" = "x-Wunused-variable"; then |
16207 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
16208 | # fixed in GCC 4.9. This test is derived from the gdb | |
16209 | # source code that triggered this bug in GCC. | |
16210 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16211 | /* end confdefs.h. */ | |
16212 | struct scoped_restore_base {}; | |
16213 | struct scoped_restore_tmpl : public scoped_restore_base { | |
16214 | ~scoped_restore_tmpl() {} | |
16215 | }; | |
16216 | int | |
16217 | main () | |
16218 | { | |
16219 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
16220 | ; | |
16221 | return 0; | |
16222 | } | |
16223 | _ACEOF | |
16224 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
16225 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
16226 | fi | |
16227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16228 | else | |
16229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16230 | /* end confdefs.h. */ |
4536bbc6 | 16231 | |
bec39cab AC |
16232 | int |
16233 | main () | |
16234 | { | |
4536bbc6 | 16235 | |
bec39cab AC |
16236 | ; |
16237 | return 0; | |
16238 | } | |
16239 | _ACEOF | |
3bc3d82a | 16240 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 16241 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 16242 | fi |
81ecdfbb | 16243 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a0de763e | 16244 | fi |
4536bbc6 | 16245 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 16246 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
16247 | esac |
16248 | done | |
81ecdfbb RW |
16249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
16250 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
16251 | fi |
16252 | ||
16253 | ||
104c1213 | 16254 | |
cf6de44d | 16255 | ac_ext=c |
3bc3d82a PA |
16256 | ac_cpp='$CPP $CPPFLAGS' |
16257 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16258 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16259 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
16260 | ||
3bc3d82a | 16261 | |
b835bb52 | 16262 | |
f35d5ade TT |
16263 | # Check whether --enable-ubsan was given. |
16264 | if test "${enable_ubsan+set}" = set; then : | |
16265 | enableval=$enable_ubsan; | |
16266 | else | |
eff98030 | 16267 | enable_ubsan=no |
f35d5ade TT |
16268 | fi |
16269 | ||
16270 | if test "x$enable_ubsan" = xauto; then | |
16271 | if $development; then | |
16272 | enable_ubsan=yes | |
16273 | fi | |
16274 | fi | |
16275 | ac_ext=cpp | |
16276 | ac_cpp='$CXXCPP $CPPFLAGS' | |
16277 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16278 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16279 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
16280 | ||
16281 | if test "x$enable_ubsan" = xyes; then | |
16282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5 | |
16283 | $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; } | |
16284 | saved_CXXFLAGS="$CXXFLAGS" | |
16285 | CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
16286 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16287 | /* end confdefs.h. */ | |
16288 | ||
16289 | int | |
16290 | main () | |
16291 | { | |
16292 | ||
16293 | ; | |
16294 | return 0; | |
16295 | } | |
16296 | _ACEOF | |
16297 | if ac_fn_cxx_try_link "$LINENO"; then : | |
16298 | enable_ubsan=yes | |
16299 | else | |
16300 | enable_ubsan=no | |
16301 | fi | |
16302 | rm -f core conftest.err conftest.$ac_objext \ | |
16303 | conftest$ac_exeext conftest.$ac_ext | |
16304 | CXXFLAGS="$saved_CXXFLAGS" | |
16305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 | |
16306 | $as_echo "$enable_ubsan" >&6; } | |
16307 | if test "x$enable_ubsan" = xyes; then | |
16308 | WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
16309 | CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined" | |
16310 | fi | |
16311 | fi | |
16312 | ac_ext=c | |
16313 | ac_cpp='$CPP $CPPFLAGS' | |
16314 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16315 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16316 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
16317 | ||
16318 | ||
16319 | ||
7a292a7a | 16320 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
16321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
16322 | $as_echo_n "checking for cygwin... " >&6; } | |
d0ac1c44 | 16323 | if ${gdb_cv_os_cygwin+:} false; then : |
81ecdfbb | 16324 | $as_echo_n "(cached) " >&6 |
bec39cab | 16325 | else |
81ecdfbb | 16326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16327 | /* end confdefs.h. */ |
7a292a7a SS |
16328 | |
16329 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
16330 | lose | |
16331 | #endif | |
bec39cab | 16332 | _ACEOF |
7a292a7a | 16333 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 16334 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
16335 | gdb_cv_os_cygwin=yes |
16336 | else | |
7a292a7a SS |
16337 | gdb_cv_os_cygwin=no |
16338 | fi | |
16339 | rm -f conftest* | |
16340 | ||
16341 | fi | |
81ecdfbb RW |
16342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
16343 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 16344 | |
aff38e61 | 16345 | |
3eb25fda | 16346 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 16347 | case ${host} in |
95cbc983 AC |
16348 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
16349 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 16350 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
c1168a2f | 16351 | *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;; |
aff38e61 AC |
16352 | esac |
16353 | ||
16354 | ||
cd0fc7c3 SS |
16355 | # libreadline needs libuser32.a in a cygwin environment |
16356 | WIN32LIBS= | |
0ad6b8ee | 16357 | if test x"$gdb_cv_os_cygwin" = xyes; then |
c5394b80 JM |
16358 | WIN32LIBS="-luser32" |
16359 | case "${target}" in | |
16360 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
16361 | ;; | |
16362 | esac | |
cd0fc7c3 | 16363 | fi |
c906108c | 16364 | |
b4505029 | 16365 | # The ser-tcp.c module requires sockets. |
b2ceabe8 TT |
16366 | # Note that WIN32APILIBS is set by GDB_AC_COMMON. |
16367 | WIN32LIBS="$WIN32LIBS $WIN32APILIBS" | |
7a292a7a | 16368 | |
31d99776 | 16369 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
16370 | |
16371 | OLD_CFLAGS=$CFLAGS | |
16372 | OLD_LDFLAGS=$LDFLAGS | |
16373 | OLD_LIBS=$LIBS | |
16374 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
16375 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
16376 | # always want our bfd. | |
16377 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
16378 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
16379 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 16380 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 16381 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 16382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb | 16383 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
d0ac1c44 | 16384 | if ${gdb_cv_var_elf+:} false; then : |
81ecdfbb | 16385 | $as_echo_n "(cached) " >&6 |
31d99776 | 16386 | else |
81ecdfbb | 16387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
16388 | /* end confdefs.h. */ |
16389 | #include <stdlib.h> | |
def63ff0 TT |
16390 | #include "bfd.h" |
16391 | #include "elf-bfd.h" | |
31d99776 DJ |
16392 | |
16393 | int | |
16394 | main () | |
16395 | { | |
def63ff0 | 16396 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
16397 | ; |
16398 | return 0; | |
16399 | } | |
16400 | _ACEOF | |
81ecdfbb | 16401 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
16402 | gdb_cv_var_elf=yes |
16403 | else | |
81ecdfbb | 16404 | gdb_cv_var_elf=no |
31d99776 | 16405 | fi |
81ecdfbb RW |
16406 | rm -f core conftest.err conftest.$ac_objext \ |
16407 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 16408 | fi |
81ecdfbb RW |
16409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
16410 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
16411 | CFLAGS=$OLD_CFLAGS |
16412 | LDFLAGS=$OLD_LDFLAGS | |
16413 | LIBS=$OLD_LIBS | |
0ad6b8ee | 16414 | if test "$gdb_cv_var_elf" = yes; then |
d4777acb | 16415 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
31d99776 | 16416 | |
81ecdfbb | 16417 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 16418 | |
075ff26d JK |
16419 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
16420 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
16421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
16422 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 16423 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
16424 | $as_echo_n "(cached) " >&6 |
16425 | else | |
16426 | ac_func_search_save_LIBS=$LIBS | |
16427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16428 | /* end confdefs.h. */ | |
16429 | ||
16430 | /* Override any GCC internal prototype to avoid an error. | |
16431 | Use char because int might match the return type of a GCC | |
16432 | builtin and then its argument prototype would still apply. */ | |
16433 | #ifdef __cplusplus | |
16434 | extern "C" | |
16435 | #endif | |
16436 | char dlopen (); | |
16437 | int | |
16438 | main () | |
16439 | { | |
16440 | return dlopen (); | |
16441 | ; | |
16442 | return 0; | |
16443 | } | |
16444 | _ACEOF | |
16445 | for ac_lib in '' dl; do | |
16446 | if test -z "$ac_lib"; then | |
16447 | ac_res="none required" | |
16448 | else | |
16449 | ac_res=-l$ac_lib | |
16450 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
16451 | fi | |
16452 | if ac_fn_c_try_link "$LINENO"; then : | |
16453 | ac_cv_search_dlopen=$ac_res | |
16454 | fi | |
16455 | rm -f core conftest.err conftest.$ac_objext \ | |
16456 | conftest$ac_exeext | |
d0ac1c44 | 16457 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
16458 | break |
16459 | fi | |
16460 | done | |
d0ac1c44 | 16461 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
16462 | |
16463 | else | |
16464 | ac_cv_search_dlopen=no | |
16465 | fi | |
16466 | rm conftest.$ac_ext | |
16467 | LIBS=$ac_func_search_save_LIBS | |
16468 | fi | |
16469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
16470 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
16471 | ac_res=$ac_cv_search_dlopen | |
16472 | if test "$ac_res" != no; then : | |
16473 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
16474 | ||
16475 | fi | |
16476 | ||
075ff26d | 16477 | fi |
31d99776 | 16478 | fi |
31d99776 | 16479 | |
4f05add4 TT |
16480 | # Add macho support to GDB, but only if BFD includes it. |
16481 | ||
16482 | OLD_CFLAGS=$CFLAGS | |
16483 | OLD_LDFLAGS=$LDFLAGS | |
16484 | OLD_LIBS=$LIBS | |
16485 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
16486 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
16487 | # always want our bfd. | |
16488 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
16489 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
16490 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 16491 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 16492 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
16493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
16494 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
d0ac1c44 | 16495 | if ${gdb_cv_var_macho+:} false; then : |
4f05add4 TT |
16496 | $as_echo_n "(cached) " >&6 |
16497 | else | |
16498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16499 | /* end confdefs.h. */ | |
16500 | #include <stdlib.h> | |
16501 | #include "bfd.h" | |
16502 | #include "mach-o.h" | |
16503 | ||
16504 | int | |
16505 | main () | |
16506 | { | |
16507 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
16508 | ; | |
16509 | return 0; | |
16510 | } | |
16511 | _ACEOF | |
16512 | if ac_fn_c_try_link "$LINENO"; then : | |
16513 | gdb_cv_var_macho=yes | |
16514 | else | |
16515 | gdb_cv_var_macho=no | |
16516 | fi | |
16517 | rm -f core conftest.err conftest.$ac_objext \ | |
16518 | conftest$ac_exeext conftest.$ac_ext | |
16519 | fi | |
16520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
16521 | $as_echo "$gdb_cv_var_macho" >&6; } | |
16522 | CFLAGS=$OLD_CFLAGS | |
16523 | LDFLAGS=$OLD_LDFLAGS | |
16524 | LIBS=$OLD_LIBS | |
0ad6b8ee | 16525 | if test "$gdb_cv_var_macho" = yes; then |
4f05add4 TT |
16526 | CONFIG_OBS="$CONFIG_OBS machoread.o" |
16527 | fi | |
16528 | ||
121ce6e5 DJ |
16529 | # Add any host-specific objects to GDB. |
16530 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
16531 | ||
608e2dbb | 16532 | # If building on ELF, look for lzma support for embedded compressed debug info. |
0ad6b8ee | 16533 | if test "$gdb_cv_var_elf" = yes; then |
608e2dbb TT |
16534 | |
16535 | # Check whether --with-lzma was given. | |
16536 | if test "${with_lzma+set}" = set; then : | |
16537 | withval=$with_lzma; | |
16538 | else | |
16539 | with_lzma=auto | |
16540 | fi | |
16541 | ||
16542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
16543 | $as_echo_n "checking whether to use lzma... " >&6; } | |
16544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
16545 | $as_echo "$with_lzma" >&6; } | |
16546 | ||
16547 | if test "${with_lzma}" != no; then | |
16548 | ||
16549 | ||
16550 | ||
16551 | ||
16552 | ||
16553 | ||
16554 | ||
16555 | ||
16556 | use_additional=yes | |
16557 | ||
16558 | acl_save_prefix="$prefix" | |
16559 | prefix="$acl_final_prefix" | |
16560 | acl_save_exec_prefix="$exec_prefix" | |
16561 | exec_prefix="$acl_final_exec_prefix" | |
16562 | ||
16563 | eval additional_includedir=\"$includedir\" | |
16564 | eval additional_libdir=\"$libdir\" | |
16565 | ||
16566 | exec_prefix="$acl_save_exec_prefix" | |
16567 | prefix="$acl_save_prefix" | |
16568 | ||
16569 | ||
16570 | # Check whether --with-liblzma-prefix was given. | |
16571 | if test "${with_liblzma_prefix+set}" = set; then : | |
16572 | withval=$with_liblzma_prefix; | |
16573 | if test "X$withval" = "Xno"; then | |
16574 | use_additional=no | |
16575 | else | |
16576 | if test "X$withval" = "X"; then | |
16577 | ||
16578 | acl_save_prefix="$prefix" | |
16579 | prefix="$acl_final_prefix" | |
16580 | acl_save_exec_prefix="$exec_prefix" | |
16581 | exec_prefix="$acl_final_exec_prefix" | |
16582 | ||
16583 | eval additional_includedir=\"$includedir\" | |
16584 | eval additional_libdir=\"$libdir\" | |
16585 | ||
16586 | exec_prefix="$acl_save_exec_prefix" | |
16587 | prefix="$acl_save_prefix" | |
16588 | ||
16589 | else | |
16590 | additional_includedir="$withval/include" | |
16591 | additional_libdir="$withval/lib" | |
16592 | fi | |
16593 | fi | |
16594 | ||
16595 | fi | |
16596 | ||
16597 | LIBLZMA= | |
16598 | LTLIBLZMA= | |
16599 | INCLZMA= | |
16600 | rpathdirs= | |
16601 | ltrpathdirs= | |
16602 | names_already_handled= | |
16603 | names_next_round='lzma ' | |
16604 | while test -n "$names_next_round"; do | |
16605 | names_this_round="$names_next_round" | |
16606 | names_next_round= | |
16607 | for name in $names_this_round; do | |
16608 | already_handled= | |
16609 | for n in $names_already_handled; do | |
16610 | if test "$n" = "$name"; then | |
16611 | already_handled=yes | |
16612 | break | |
16613 | fi | |
16614 | done | |
16615 | if test -z "$already_handled"; then | |
16616 | names_already_handled="$names_already_handled $name" | |
16617 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
16618 | eval value=\"\$HAVE_LIB$uppername\" | |
16619 | if test -n "$value"; then | |
16620 | if test "$value" = yes; then | |
16621 | eval value=\"\$LIB$uppername\" | |
16622 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
16623 | eval value=\"\$LTLIB$uppername\" | |
16624 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
16625 | else | |
16626 | : | |
16627 | fi | |
16628 | else | |
16629 | found_dir= | |
16630 | found_la= | |
16631 | found_so= | |
16632 | found_a= | |
16633 | if test $use_additional = yes; then | |
16634 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
16635 | found_dir="$additional_libdir" | |
16636 | found_so="$additional_libdir/lib$name.$shlibext" | |
16637 | if test -f "$additional_libdir/lib$name.la"; then | |
16638 | found_la="$additional_libdir/lib$name.la" | |
16639 | fi | |
16640 | else | |
16641 | if test -f "$additional_libdir/lib$name.$libext"; then | |
16642 | found_dir="$additional_libdir" | |
16643 | found_a="$additional_libdir/lib$name.$libext" | |
16644 | if test -f "$additional_libdir/lib$name.la"; then | |
16645 | found_la="$additional_libdir/lib$name.la" | |
16646 | fi | |
16647 | fi | |
16648 | fi | |
16649 | fi | |
16650 | if test "X$found_dir" = "X"; then | |
16651 | for x in $LDFLAGS $LTLIBLZMA; do | |
16652 | ||
16653 | acl_save_prefix="$prefix" | |
16654 | prefix="$acl_final_prefix" | |
16655 | acl_save_exec_prefix="$exec_prefix" | |
16656 | exec_prefix="$acl_final_exec_prefix" | |
16657 | eval x=\"$x\" | |
16658 | exec_prefix="$acl_save_exec_prefix" | |
16659 | prefix="$acl_save_prefix" | |
16660 | ||
16661 | case "$x" in | |
16662 | -L*) | |
16663 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
16664 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
16665 | found_dir="$dir" | |
16666 | found_so="$dir/lib$name.$shlibext" | |
16667 | if test -f "$dir/lib$name.la"; then | |
16668 | found_la="$dir/lib$name.la" | |
16669 | fi | |
16670 | else | |
16671 | if test -f "$dir/lib$name.$libext"; then | |
16672 | found_dir="$dir" | |
16673 | found_a="$dir/lib$name.$libext" | |
16674 | if test -f "$dir/lib$name.la"; then | |
16675 | found_la="$dir/lib$name.la" | |
16676 | fi | |
16677 | fi | |
16678 | fi | |
16679 | ;; | |
16680 | esac | |
16681 | if test "X$found_dir" != "X"; then | |
16682 | break | |
16683 | fi | |
16684 | done | |
16685 | fi | |
16686 | if test "X$found_dir" != "X"; then | |
16687 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
16688 | if test "X$found_so" != "X"; then | |
16689 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
16690 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
16691 | else | |
16692 | haveit= | |
16693 | for x in $ltrpathdirs; do | |
16694 | if test "X$x" = "X$found_dir"; then | |
16695 | haveit=yes | |
16696 | break | |
16697 | fi | |
16698 | done | |
16699 | if test -z "$haveit"; then | |
16700 | ltrpathdirs="$ltrpathdirs $found_dir" | |
16701 | fi | |
16702 | if test "$hardcode_direct" = yes; then | |
16703 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
16704 | else | |
16705 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
16706 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
16707 | haveit= | |
16708 | for x in $rpathdirs; do | |
16709 | if test "X$x" = "X$found_dir"; then | |
16710 | haveit=yes | |
16711 | break | |
16712 | fi | |
16713 | done | |
16714 | if test -z "$haveit"; then | |
16715 | rpathdirs="$rpathdirs $found_dir" | |
16716 | fi | |
16717 | else | |
16718 | haveit= | |
16719 | for x in $LDFLAGS $LIBLZMA; do | |
16720 | ||
16721 | acl_save_prefix="$prefix" | |
16722 | prefix="$acl_final_prefix" | |
16723 | acl_save_exec_prefix="$exec_prefix" | |
16724 | exec_prefix="$acl_final_exec_prefix" | |
16725 | eval x=\"$x\" | |
16726 | exec_prefix="$acl_save_exec_prefix" | |
16727 | prefix="$acl_save_prefix" | |
16728 | ||
16729 | if test "X$x" = "X-L$found_dir"; then | |
16730 | haveit=yes | |
16731 | break | |
16732 | fi | |
16733 | done | |
16734 | if test -z "$haveit"; then | |
16735 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
16736 | fi | |
16737 | if test "$hardcode_minus_L" != no; then | |
16738 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
16739 | else | |
16740 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
16741 | fi | |
16742 | fi | |
16743 | fi | |
16744 | fi | |
16745 | else | |
16746 | if test "X$found_a" != "X"; then | |
16747 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
16748 | else | |
16749 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
16750 | fi | |
16751 | fi | |
16752 | additional_includedir= | |
16753 | case "$found_dir" in | |
16754 | */lib | */lib/) | |
16755 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
16756 | additional_includedir="$basedir/include" | |
16757 | ;; | |
16758 | esac | |
16759 | if test "X$additional_includedir" != "X"; then | |
16760 | if test "X$additional_includedir" != "X/usr/include"; then | |
16761 | haveit= | |
16762 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
16763 | if test -n "$GCC"; then | |
16764 | case $host_os in | |
16765 | linux*) haveit=yes;; | |
16766 | esac | |
16767 | fi | |
16768 | fi | |
16769 | if test -z "$haveit"; then | |
16770 | for x in $CPPFLAGS $INCLZMA; do | |
16771 | ||
16772 | acl_save_prefix="$prefix" | |
16773 | prefix="$acl_final_prefix" | |
16774 | acl_save_exec_prefix="$exec_prefix" | |
16775 | exec_prefix="$acl_final_exec_prefix" | |
16776 | eval x=\"$x\" | |
16777 | exec_prefix="$acl_save_exec_prefix" | |
16778 | prefix="$acl_save_prefix" | |
16779 | ||
16780 | if test "X$x" = "X-I$additional_includedir"; then | |
16781 | haveit=yes | |
16782 | break | |
16783 | fi | |
16784 | done | |
16785 | if test -z "$haveit"; then | |
16786 | if test -d "$additional_includedir"; then | |
16787 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
16788 | fi | |
16789 | fi | |
16790 | fi | |
16791 | fi | |
16792 | fi | |
16793 | if test -n "$found_la"; then | |
16794 | save_libdir="$libdir" | |
16795 | case "$found_la" in | |
16796 | */* | *\\*) . "$found_la" ;; | |
16797 | *) . "./$found_la" ;; | |
16798 | esac | |
16799 | libdir="$save_libdir" | |
16800 | for dep in $dependency_libs; do | |
16801 | case "$dep" in | |
16802 | -L*) | |
16803 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
16804 | if test "X$additional_libdir" != "X/usr/lib"; then | |
16805 | haveit= | |
16806 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
16807 | if test -n "$GCC"; then | |
16808 | case $host_os in | |
16809 | linux*) haveit=yes;; | |
16810 | esac | |
16811 | fi | |
16812 | fi | |
16813 | if test -z "$haveit"; then | |
16814 | haveit= | |
16815 | for x in $LDFLAGS $LIBLZMA; do | |
16816 | ||
16817 | acl_save_prefix="$prefix" | |
16818 | prefix="$acl_final_prefix" | |
16819 | acl_save_exec_prefix="$exec_prefix" | |
16820 | exec_prefix="$acl_final_exec_prefix" | |
16821 | eval x=\"$x\" | |
16822 | exec_prefix="$acl_save_exec_prefix" | |
16823 | prefix="$acl_save_prefix" | |
16824 | ||
16825 | if test "X$x" = "X-L$additional_libdir"; then | |
16826 | haveit=yes | |
16827 | break | |
16828 | fi | |
16829 | done | |
16830 | if test -z "$haveit"; then | |
16831 | if test -d "$additional_libdir"; then | |
16832 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
16833 | fi | |
16834 | fi | |
16835 | haveit= | |
16836 | for x in $LDFLAGS $LTLIBLZMA; do | |
16837 | ||
16838 | acl_save_prefix="$prefix" | |
16839 | prefix="$acl_final_prefix" | |
16840 | acl_save_exec_prefix="$exec_prefix" | |
16841 | exec_prefix="$acl_final_exec_prefix" | |
16842 | eval x=\"$x\" | |
16843 | exec_prefix="$acl_save_exec_prefix" | |
16844 | prefix="$acl_save_prefix" | |
16845 | ||
16846 | if test "X$x" = "X-L$additional_libdir"; then | |
16847 | haveit=yes | |
16848 | break | |
16849 | fi | |
16850 | done | |
16851 | if test -z "$haveit"; then | |
16852 | if test -d "$additional_libdir"; then | |
16853 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
16854 | fi | |
16855 | fi | |
16856 | fi | |
16857 | fi | |
16858 | ;; | |
16859 | -R*) | |
16860 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
16861 | if test "$enable_rpath" != no; then | |
16862 | haveit= | |
16863 | for x in $rpathdirs; do | |
16864 | if test "X$x" = "X$dir"; then | |
16865 | haveit=yes | |
16866 | break | |
16867 | fi | |
16868 | done | |
16869 | if test -z "$haveit"; then | |
16870 | rpathdirs="$rpathdirs $dir" | |
16871 | fi | |
16872 | haveit= | |
16873 | for x in $ltrpathdirs; do | |
16874 | if test "X$x" = "X$dir"; then | |
16875 | haveit=yes | |
16876 | break | |
16877 | fi | |
16878 | done | |
16879 | if test -z "$haveit"; then | |
16880 | ltrpathdirs="$ltrpathdirs $dir" | |
16881 | fi | |
16882 | fi | |
16883 | ;; | |
16884 | -l*) | |
16885 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
16886 | ;; | |
16887 | *.la) | |
16888 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
16889 | ;; | |
16890 | *) | |
16891 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
16892 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
16893 | ;; | |
16894 | esac | |
16895 | done | |
16896 | fi | |
16897 | else | |
16898 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
16899 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
16900 | fi | |
16901 | fi | |
16902 | fi | |
16903 | done | |
16904 | done | |
16905 | if test "X$rpathdirs" != "X"; then | |
16906 | if test -n "$hardcode_libdir_separator"; then | |
16907 | alldirs= | |
16908 | for found_dir in $rpathdirs; do | |
16909 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
16910 | done | |
16911 | acl_save_libdir="$libdir" | |
16912 | libdir="$alldirs" | |
16913 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16914 | libdir="$acl_save_libdir" | |
16915 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
16916 | else | |
16917 | for found_dir in $rpathdirs; do | |
16918 | acl_save_libdir="$libdir" | |
16919 | libdir="$found_dir" | |
16920 | eval flag=\"$hardcode_libdir_flag_spec\" | |
16921 | libdir="$acl_save_libdir" | |
16922 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
16923 | done | |
16924 | fi | |
16925 | fi | |
16926 | if test "X$ltrpathdirs" != "X"; then | |
16927 | for found_dir in $ltrpathdirs; do | |
16928 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
16929 | done | |
16930 | fi | |
16931 | ||
16932 | ||
16933 | ac_save_CPPFLAGS="$CPPFLAGS" | |
16934 | ||
16935 | for element in $INCLZMA; do | |
16936 | haveit= | |
16937 | for x in $CPPFLAGS; do | |
16938 | ||
16939 | acl_save_prefix="$prefix" | |
16940 | prefix="$acl_final_prefix" | |
16941 | acl_save_exec_prefix="$exec_prefix" | |
16942 | exec_prefix="$acl_final_exec_prefix" | |
16943 | eval x=\"$x\" | |
16944 | exec_prefix="$acl_save_exec_prefix" | |
16945 | prefix="$acl_save_prefix" | |
16946 | ||
16947 | if test "X$x" = "X$element"; then | |
16948 | haveit=yes | |
16949 | break | |
16950 | fi | |
16951 | done | |
16952 | if test -z "$haveit"; then | |
16953 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
16954 | fi | |
16955 | done | |
16956 | ||
16957 | ||
16958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
16959 | $as_echo_n "checking for liblzma... " >&6; } | |
d0ac1c44 | 16960 | if ${ac_cv_liblzma+:} false; then : |
608e2dbb TT |
16961 | $as_echo_n "(cached) " >&6 |
16962 | else | |
16963 | ||
16964 | ac_save_LIBS="$LIBS" | |
16965 | LIBS="$LIBS $LIBLZMA" | |
16966 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16967 | /* end confdefs.h. */ | |
16968 | #include "lzma.h" | |
16969 | int | |
16970 | main () | |
16971 | { | |
16972 | lzma_index_iter iter; | |
16973 | lzma_index_iter_init (&iter, 0); | |
16974 | lzma_mf_is_supported (LZMA_MF_HC3); | |
16975 | ; | |
16976 | return 0; | |
16977 | } | |
16978 | _ACEOF | |
16979 | if ac_fn_c_try_link "$LINENO"; then : | |
16980 | ac_cv_liblzma=yes | |
16981 | else | |
16982 | ac_cv_liblzma=no | |
16983 | fi | |
16984 | rm -f core conftest.err conftest.$ac_objext \ | |
16985 | conftest$ac_exeext conftest.$ac_ext | |
16986 | LIBS="$ac_save_LIBS" | |
16987 | ||
16988 | fi | |
16989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
16990 | $as_echo "$ac_cv_liblzma" >&6; } | |
16991 | if test "$ac_cv_liblzma" = yes; then | |
16992 | HAVE_LIBLZMA=yes | |
16993 | ||
16994 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
16995 | ||
16996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
16997 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
16998 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
16999 | $as_echo "$LIBLZMA" >&6; } | |
17000 | else | |
17001 | HAVE_LIBLZMA=no | |
17002 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17003 | LIBLZMA= | |
17004 | LTLIBLZMA= | |
17005 | fi | |
17006 | ||
17007 | ||
17008 | ||
17009 | ||
17010 | ||
17011 | ||
17012 | if test "$HAVE_LIBLZMA" != yes; then | |
17013 | if test "$with_lzma" = yes; then | |
d0ac1c44 | 17014 | as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 |
608e2dbb TT |
17015 | fi |
17016 | fi | |
17017 | fi | |
17018 | fi | |
17019 | ||
3fc11d3e JM |
17020 | LIBGUI="../libgui/src/libgui.a" |
17021 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
17022 | ||
17023 | ||
7a292a7a | 17024 | |
3fc11d3e JM |
17025 | WIN32LDAPP= |
17026 | ||
17027 | ||
17028 | ||
d91670b9 | 17029 | case "${host}" in |
686a5eed | 17030 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
17031 | configdir="win" |
17032 | ;; | |
17033 | *) | |
17034 | configdir="unix" | |
17035 | ;; | |
17036 | esac | |
3fc11d3e JM |
17037 | |
17038 | GDBTKLIBS= | |
17039 | if test "${enable_gdbtk}" = "yes"; then | |
17040 | ||
d1c3b63a KS |
17041 | # Gdbtk must have an absolute path to srcdir in order to run |
17042 | # properly when not installed. | |
17043 | here=`pwd` | |
17044 | cd ${srcdir} | |
17045 | GDBTK_SRC_DIR=`pwd` | |
17046 | cd $here | |
17047 | ||
bec39cab | 17048 | |
5062cc19 KS |
17049 | # |
17050 | # Ok, lets find the tcl configuration | |
17051 | # First, look for one uninstalled. | |
17052 | # the alternative search directory is invoked by --with-tcl | |
17053 | # | |
3fc11d3e | 17054 | |
5062cc19 KS |
17055 | if test x"${no_tcl}" = x ; then |
17056 | # we reset no_tcl in case something fails here | |
17057 | no_tcl=true | |
bec39cab | 17058 | |
81ecdfbb RW |
17059 | # Check whether --with-tcl was given. |
17060 | if test "${with_tcl+set}" = set; then : | |
17061 | withval=$with_tcl; with_tclconfig=${withval} | |
17062 | fi | |
17063 | ||
17064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
17065 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
d0ac1c44 | 17066 | if ${ac_cv_c_tclconfig+:} false; then : |
81ecdfbb | 17067 | $as_echo_n "(cached) " >&6 |
3fc11d3e | 17068 | else |
bec39cab | 17069 | |
3fc11d3e | 17070 | |
5062cc19 KS |
17071 | # First check to see if --with-tcl was specified. |
17072 | case "${host}" in | |
17073 | *-*-cygwin*) platDir="win" ;; | |
17074 | *) platDir="unix" ;; | |
17075 | esac | |
17076 | if test x"${with_tclconfig}" != x ; then | |
17077 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
17078 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
17079 | else | |
d0ac1c44 | 17080 | as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17081 | fi |
17082 | fi | |
17083 | ||
17084 | # then check for a private Tcl installation | |
17085 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17086 | for i in \ | |
17087 | ../tcl \ | |
17088 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17089 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
17090 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17091 | ../../tcl \ | |
17092 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17093 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17094 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17095 | ../../../tcl \ | |
17096 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17097 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17098 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17099 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17100 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17101 | break | |
17102 | fi | |
17103 | done | |
17104 | fi | |
17105 | ||
17106 | # on Darwin, check in Framework installation locations | |
17107 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
17108 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
17109 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
17110 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
17111 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
17112 | ; do | |
17113 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
17114 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
17115 | break | |
17116 | fi | |
17117 | done | |
17118 | fi | |
17119 | ||
17120 | # check in a few common install locations | |
17121 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17122 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
17123 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
17124 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
17125 | `ls -d /usr/local/lib 2>/dev/null` \ | |
17126 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
17127 | `ls -d /usr/lib 2>/dev/null` \ | |
17128 | ; do | |
17129 | if test -f "$i/tclConfig.sh" ; then | |
17130 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
17131 | break | |
17132 | fi | |
17133 | done | |
17134 | fi | |
3fc11d3e | 17135 | |
5062cc19 KS |
17136 | # check in a few other private locations |
17137 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17138 | for i in \ | |
17139 | ${srcdir}/../tcl \ | |
17140 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17141 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
17142 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17143 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17144 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17145 | break | |
17146 | fi | |
17147 | done | |
17148 | fi | |
bec39cab | 17149 | |
3fc11d3e JM |
17150 | fi |
17151 | ||
5062cc19 KS |
17152 | |
17153 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17154 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
17155 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
17156 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
17157 | else |
17158 | no_tcl= | |
17159 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
17160 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17161 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
17162 | fi |
17163 | fi | |
3fc11d3e | 17164 | |
bec39cab | 17165 | |
85541719 DE |
17166 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
17167 | # point to doing Tcl. | |
bec39cab | 17168 | |
5062cc19 KS |
17169 | # |
17170 | # Ok, lets find the tk configuration | |
17171 | # First, look for one uninstalled. | |
17172 | # the alternative search directory is invoked by --with-tk | |
17173 | # | |
3fc11d3e | 17174 | |
5062cc19 KS |
17175 | if test x"${no_tk}" = x ; then |
17176 | # we reset no_tk in case something fails here | |
17177 | no_tk=true | |
bec39cab | 17178 | |
81ecdfbb RW |
17179 | # Check whether --with-tk was given. |
17180 | if test "${with_tk+set}" = set; then : | |
17181 | withval=$with_tk; with_tkconfig=${withval} | |
17182 | fi | |
17183 | ||
17184 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
17185 | $as_echo_n "checking for Tk configuration... " >&6; } | |
d0ac1c44 | 17186 | if ${ac_cv_c_tkconfig+:} false; then : |
81ecdfbb | 17187 | $as_echo_n "(cached) " >&6 |
bec39cab | 17188 | else |
3fc11d3e JM |
17189 | |
17190 | ||
5062cc19 KS |
17191 | # First check to see if --with-tkconfig was specified. |
17192 | if test x"${with_tkconfig}" != x ; then | |
17193 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
17194 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
17195 | else | |
d0ac1c44 | 17196 | as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17197 | fi |
17198 | fi | |
3fc11d3e | 17199 | |
5062cc19 KS |
17200 | # then check for a private Tk library |
17201 | case "${host}" in | |
17202 | *-*-cygwin*) platDir="win" ;; | |
17203 | *) platDir="unix" ;; | |
17204 | esac | |
17205 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17206 | for i in \ | |
17207 | ../tk \ | |
17208 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17209 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
17210 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
17211 | ../../tk \ | |
17212 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17213 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
17214 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
17215 | ../../../tk \ | |
17216 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17217 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
17218 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
17219 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
17220 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
17221 | break | |
17222 | fi | |
17223 | done | |
17224 | fi | |
17225 | ||
17226 | # on Darwin, check in Framework installation locations | |
17227 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
17228 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
17229 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
17230 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
17231 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
17232 | ; do | |
17233 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
17234 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
17235 | break | |
17236 | fi | |
17237 | done | |
17238 | fi | |
17239 | ||
17240 | # check in a few common install locations | |
17241 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17242 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
17243 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
17244 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
17245 | `ls -d /usr/local/lib 2>/dev/null` \ | |
17246 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
17247 | `ls -d /usr/lib 2>/dev/null` \ | |
17248 | ; do | |
17249 | if test -f "$i/tkConfig.sh" ; then | |
17250 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
17251 | break | |
17252 | fi | |
17253 | done | |
17254 | fi | |
17255 | # check in a few other private locations | |
17256 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17257 | for i in \ | |
17258 | ${srcdir}/../tk \ | |
17259 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17260 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
17261 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
17262 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
17263 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
17264 | break | |
17265 | fi | |
17266 | done | |
17267 | fi | |
3fc11d3e | 17268 | |
3fc11d3e JM |
17269 | fi |
17270 | ||
17271 | ||
5062cc19 KS |
17272 | if test x"${ac_cv_c_tkconfig}" = x ; then |
17273 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
17274 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
17275 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
17276 | else |
17277 | no_tk= | |
17278 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
17279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17280 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 17281 | fi |
3fc11d3e | 17282 | fi |
dd2504ab | 17283 | |
dd2504ab | 17284 | |
85541719 DE |
17285 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
17286 | ||
81ecdfbb RW |
17287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17288 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
17289 | |
17290 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
17291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
17292 | $as_echo "loading" >&6; } | |
85541719 DE |
17293 | . ${TCL_BIN_DIR}/tclConfig.sh |
17294 | else | |
81ecdfbb RW |
17295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17296 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
17297 | fi |
17298 | ||
17299 | # eval is required to do the TCL_DBGX substitution | |
17300 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
17301 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
17302 | ||
17303 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
17304 | # then set the common variable name to the value of the build variables. | |
17305 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
17306 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
17307 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
17308 | # installed and uninstalled version of Tcl. | |
17309 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
17310 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
17311 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
17312 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
17313 | elif test "`uname -s`" = "Darwin"; then | |
17314 | # If Tcl was built as a framework, attempt to use the libraries | |
17315 | # from the framework at the given location so that linking works | |
a68ffae9 | 17316 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
17317 | case ${TCL_DEFS} in |
17318 | *TCL_FRAMEWORK*) | |
17319 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
17320 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
17321 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
17322 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
17323 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
17324 | break | |
17325 | fi | |
17326 | done | |
17327 | fi | |
17328 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
17329 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
17330 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
17331 | fi | |
17332 | ;; | |
17333 | esac | |
17334 | fi | |
17335 | ||
17336 | # eval is required to do the TCL_DBGX substitution | |
17337 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
17338 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
17339 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
17340 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
17341 | ||
17342 | ||
17343 | ||
17344 | ||
17345 | ||
17346 | ||
17347 | ||
17348 | ||
17349 | ||
17350 | ||
17351 | ||
17352 | ||
17353 | ||
17354 | ||
17355 | ||
17356 | # Check for in-tree tcl | |
17357 | here=`pwd` | |
17358 | cd ${srcdir}/.. | |
17359 | topdir=`pwd` | |
17360 | cd ${here} | |
17361 | ||
17362 | intree="no" | |
17363 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
17364 | intree="yes" | |
17365 | fi | |
17366 | ||
17367 | # Find Tcl private headers | |
17368 | if test x"${intree}" = xno; then | |
17369 | ||
81ecdfbb RW |
17370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
17371 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
17372 | private_dir="" |
17373 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
17374 | if test -f ${dir}/tclInt.h ; then | |
17375 | private_dir=${dir} | |
17376 | fi | |
17377 | ||
17378 | if test x"${private_dir}" = x; then | |
d0ac1c44 | 17379 | as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
17380 | else |
17381 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
17382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
17383 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
17384 | fi |
17385 | ||
17386 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
17387 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
17388 | TCL_DEPS="" | |
17389 | else | |
17390 | # If building tcl in the same src tree, private headers | |
17391 | # are not needed, but we need to be sure to use the right | |
17392 | # headers library | |
17393 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
17394 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
17395 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
17396 | fi | |
17397 | ||
17398 | ||
17399 | ||
17400 | ||
17401 | ||
81ecdfbb RW |
17402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17403 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 17404 | |
5062cc19 | 17405 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
17406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
17407 | $as_echo "loading" >&6; } | |
5062cc19 | 17408 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 17409 | else |
81ecdfbb RW |
17410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17411 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 17412 | fi |
bec39cab | 17413 | |
5062cc19 KS |
17414 | # eval is required to do the TK_DBGX substitution |
17415 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
17416 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
17417 | ||
17418 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
17419 | # then set the common variable name to the value of the build variables. | |
17420 | # For example, the variable TK_LIB_SPEC will be set to the value | |
17421 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
17422 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
17423 | # installed and uninstalled version of Tcl. | |
85541719 | 17424 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
17425 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
17426 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
17427 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
17428 | elif test "`uname -s`" = "Darwin"; then | |
17429 | # If Tk was built as a framework, attempt to use the libraries | |
17430 | # from the framework at the given location so that linking works | |
a68ffae9 | 17431 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
17432 | case ${TK_DEFS} in |
17433 | *TK_FRAMEWORK*) | |
85541719 | 17434 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
17435 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
17436 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
17437 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
17438 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
17439 | break | |
17440 | fi | |
17441 | done | |
17442 | fi | |
85541719 | 17443 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
17444 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
17445 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
17446 | fi | |
17447 | ;; | |
17448 | esac | |
3fc11d3e JM |
17449 | fi |
17450 | ||
5062cc19 KS |
17451 | # eval is required to do the TK_DBGX substitution |
17452 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
17453 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
17454 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
17455 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 17456 | |
3fc11d3e JM |
17457 | |
17458 | ||
bec39cab AC |
17459 | |
17460 | ||
17461 | ||
17462 | ||
17463 | ||
17464 | ||
17465 | ||
3fc11d3e | 17466 | |
3fc11d3e | 17467 | |
bec39cab | 17468 | |
bec39cab | 17469 | |
85541719 DE |
17470 | # Check for in-tree Tk |
17471 | intree="no" | |
17472 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
17473 | intree="yes" | |
17474 | fi | |
3fc11d3e | 17475 | |
85541719 DE |
17476 | # Find Tk private headers |
17477 | if test x"${intree}" = xno; then | |
3fc11d3e | 17478 | |
81ecdfbb RW |
17479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
17480 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
17481 | private_dir="" |
17482 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
17483 | if test -f ${dir}/tkInt.h; then | |
17484 | private_dir=${dir} | |
3fc11d3e | 17485 | fi |
bec39cab | 17486 | |
5062cc19 | 17487 | if test x"${private_dir}" = x; then |
d0ac1c44 | 17488 | as_fn_error $? "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 17489 | else |
5062cc19 | 17490 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
17491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
17492 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 17493 | fi |
3fc11d3e | 17494 | |
85541719 DE |
17495 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
17496 | TK_LIBRARY=${TK_LIB_SPEC} | |
17497 | TK_DEPS="" | |
17498 | else | |
17499 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
17500 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
17501 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
17502 | fi | |
3fc11d3e JM |
17503 | |
17504 | ||
3fc11d3e JM |
17505 | |
17506 | ||
3fc11d3e | 17507 | |
85541719 | 17508 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 17509 | |
85541719 DE |
17510 | # Include some libraries that Tcl and Tk want. |
17511 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
17512 | # Yes, the ordering seems wrong here. But it isn't. | |
17513 | # TK_LIBS is the list of libraries that need to be linked | |
17514 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
17515 | # were in LIBS then any link tests after this point would | |
17516 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
17517 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 17518 | |
85541719 DE |
17519 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
17520 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
17521 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
17522 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
17523 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
17524 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
17525 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 17526 | |
0ad6b8ee | 17527 | if test x"$gdb_cv_os_cygwin" = xyes; then |
85541719 DE |
17528 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" |
17529 | WIN32LDAPP="-Wl,--subsystem,console" | |
17530 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 17531 | fi |
ffc6a242 | 17532 | |
81ecdfbb | 17533 | subdirs="$subdirs gdbtk" |
3ace7edb | 17534 | |
85541719 | 17535 | fi |
3fc11d3e JM |
17536 | fi |
17537 | ||
17538 | ||
17539 | ||
17540 | ||
17541 | ||
17542 | ||
17543 | ||
17544 | ||
81ecdfbb RW |
17545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
17546 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 17547 | |
c906108c | 17548 | |
81ecdfbb RW |
17549 | # Check whether --with-x was given. |
17550 | if test "${with_x+set}" = set; then : | |
17551 | withval=$with_x; | |
17552 | fi | |
c906108c SS |
17553 | |
17554 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
17555 | if test "x$with_x" = xno; then | |
17556 | # The user explicitly disabled X. | |
17557 | have_x=disabled | |
17558 | else | |
81ecdfbb | 17559 | case $x_includes,$x_libraries in #( |
d0ac1c44 SM |
17560 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
17561 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
81ecdfbb | 17562 | $as_echo_n "(cached) " >&6 |
c906108c SS |
17563 | else |
17564 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 17565 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 17566 | rm -f -r conftest.dir |
bec39cab AC |
17567 | if mkdir conftest.dir; then |
17568 | cd conftest.dir | |
bec39cab | 17569 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
17570 | incroot: |
17571 | @echo incroot='${INCROOT}' | |
17572 | usrlibdir: | |
17573 | @echo usrlibdir='${USRLIBDIR}' | |
17574 | libdir: | |
17575 | @echo libdir='${LIBDIR}' | |
17576 | _ACEOF | |
17577 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
d0ac1c44 | 17578 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
81ecdfbb RW |
17579 | for ac_var in incroot usrlibdir libdir; do |
17580 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
17581 | done | |
c906108c | 17582 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
17583 | for ac_extension in a so sl dylib la dll; do |
17584 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
17585 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 17586 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
17587 | fi |
17588 | done | |
17589 | # Screen out bogus values from the imake configuration. They are | |
17590 | # bogus both because they are the default anyway, and because | |
17591 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 17592 | case $ac_im_incroot in |
81ecdfbb | 17593 | /usr/include) ac_x_includes= ;; |
bec39cab | 17594 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 17595 | esac |
bec39cab | 17596 | case $ac_im_usrlibdir in |
81ecdfbb | 17597 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 17598 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
17599 | esac |
17600 | fi | |
17601 | cd .. | |
81ecdfbb | 17602 | rm -f -r conftest.dir |
c906108c SS |
17603 | fi |
17604 | ||
bec39cab AC |
17605 | # Standard set of common directories for X headers. |
17606 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
17607 | ac_x_header_dirs=' | |
17608 | /usr/X11/include | |
81ecdfbb | 17609 | /usr/X11R7/include |
bec39cab AC |
17610 | /usr/X11R6/include |
17611 | /usr/X11R5/include | |
17612 | /usr/X11R4/include | |
17613 | ||
17614 | /usr/include/X11 | |
81ecdfbb | 17615 | /usr/include/X11R7 |
bec39cab AC |
17616 | /usr/include/X11R6 |
17617 | /usr/include/X11R5 | |
17618 | /usr/include/X11R4 | |
17619 | ||
17620 | /usr/local/X11/include | |
81ecdfbb | 17621 | /usr/local/X11R7/include |
bec39cab AC |
17622 | /usr/local/X11R6/include |
17623 | /usr/local/X11R5/include | |
17624 | /usr/local/X11R4/include | |
17625 | ||
17626 | /usr/local/include/X11 | |
81ecdfbb | 17627 | /usr/local/include/X11R7 |
bec39cab AC |
17628 | /usr/local/include/X11R6 |
17629 | /usr/local/include/X11R5 | |
17630 | /usr/local/include/X11R4 | |
17631 | ||
17632 | /usr/X386/include | |
17633 | /usr/x386/include | |
17634 | /usr/XFree86/include/X11 | |
17635 | ||
17636 | /usr/include | |
17637 | /usr/local/include | |
17638 | /usr/unsupported/include | |
17639 | /usr/athena/include | |
17640 | /usr/local/x11r5/include | |
17641 | /usr/lpp/Xamples/include | |
17642 | ||
17643 | /usr/openwin/include | |
17644 | /usr/openwin/share/include' | |
17645 | ||
17646 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 17647 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 17648 | # First, try using that file with no special directory specified. |
81ecdfbb | 17649 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 17650 | /* end confdefs.h. */ |
81ecdfbb | 17651 | #include <X11/Xlib.h> |
bec39cab | 17652 | _ACEOF |
81ecdfbb | 17653 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
17654 | # We can compile using X headers with no special include directory. |
17655 | ac_x_includes= | |
17656 | else | |
bec39cab | 17657 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 17658 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
17659 | ac_x_includes=$ac_dir |
17660 | break | |
17661 | fi | |
17662 | done | |
c906108c | 17663 | fi |
d0ac1c44 | 17664 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 17665 | fi # $ac_x_includes = no |
c906108c | 17666 | |
bec39cab | 17667 | if test "$ac_x_libraries" = no; then |
c906108c | 17668 | # Check for the libraries. |
c906108c SS |
17669 | # See if we find them without any special options. |
17670 | # Don't add to $LIBS permanently. | |
bec39cab | 17671 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
17672 | LIBS="-lX11 $LIBS" |
17673 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 17674 | /* end confdefs.h. */ |
81ecdfbb | 17675 | #include <X11/Xlib.h> |
bec39cab AC |
17676 | int |
17677 | main () | |
17678 | { | |
81ecdfbb | 17679 | XrmInitialize () |
bec39cab AC |
17680 | ; |
17681 | return 0; | |
17682 | } | |
17683 | _ACEOF | |
81ecdfbb | 17684 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 17685 | LIBS=$ac_save_LIBS |
c906108c SS |
17686 | # We can link X programs with no special library path. |
17687 | ac_x_libraries= | |
17688 | else | |
81ecdfbb RW |
17689 | LIBS=$ac_save_LIBS |
17690 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 17691 | do |
bec39cab | 17692 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
17693 | for ac_extension in a so sl dylib la dll; do |
17694 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
17695 | ac_x_libraries=$ac_dir |
17696 | break 2 | |
17697 | fi | |
17698 | done | |
17699 | done | |
17700 | fi | |
81ecdfbb RW |
17701 | rm -f core conftest.err conftest.$ac_objext \ |
17702 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 17703 | fi # $ac_x_libraries = no |
c906108c | 17704 | |
81ecdfbb RW |
17705 | case $ac_x_includes,$ac_x_libraries in #( |
17706 | no,* | *,no | *\'*) | |
17707 | # Didn't find X, or a directory has "'" in its name. | |
17708 | ac_cv_have_x="have_x=no";; #( | |
17709 | *) | |
17710 | # Record where we found X for the cache. | |
17711 | ac_cv_have_x="have_x=yes\ | |
17712 | ac_x_includes='$ac_x_includes'\ | |
17713 | ac_x_libraries='$ac_x_libraries'" | |
17714 | esac | |
c906108c | 17715 | fi |
81ecdfbb RW |
17716 | ;; #( |
17717 | *) have_x=yes;; | |
17718 | esac | |
c906108c SS |
17719 | eval "$ac_cv_have_x" |
17720 | fi # $with_x != no | |
17721 | ||
17722 | if test "$have_x" != yes; then | |
81ecdfbb RW |
17723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
17724 | $as_echo "$have_x" >&6; } | |
c906108c SS |
17725 | no_x=yes |
17726 | else | |
17727 | # If each of the values was on the command line, it overrides each guess. | |
17728 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
17729 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
17730 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
17731 | ac_cv_have_x="have_x=yes\ |
17732 | ac_x_includes='$x_includes'\ | |
17733 | ac_x_libraries='$x_libraries'" | |
17734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
17735 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
17736 | fi |
17737 | ||
17738 | ||
bec39cab | 17739 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 17740 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
17741 | # This code just checks for a few cases where we'd like to ignore those |
17742 | # definitions, even when they're present in the '.mt' file. These cases | |
17743 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 17744 | # not part of the source tree. |
7a292a7a | 17745 | # |
81ecdfbb RW |
17746 | # Check whether --enable-sim was given. |
17747 | if test "${enable_sim+set}" = set; then : | |
17748 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
17749 | echo "enableval = ${enableval}"; |
17750 | case "${enableval}" in | |
17751 | yes) ignore_sim=false ;; | |
17752 | no) ignore_sim=true ;; | |
17753 | *) ignore_sim=false ;; | |
17754 | esac | |
17755 | else | |
17756 | ignore_sim=false | |
81ecdfbb RW |
17757 | fi |
17758 | ||
7a292a7a SS |
17759 | |
17760 | if test ! -d "${srcdir}/../sim"; then | |
17761 | ignore_sim=true | |
17762 | fi | |
17763 | ||
9b624dbe UW |
17764 | SIM= |
17765 | SIM_OBS= | |
17766 | if test "${ignore_sim}" = "false"; then | |
17767 | if test x"${gdb_sim}" != x ; then | |
17768 | SIM="${gdb_sim}" | |
17769 | SIM_OBS="remote-sim.o" | |
60ca704f | 17770 | |
81ecdfbb | 17771 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 17772 | |
976102cd PA |
17773 | |
17774 | # Some tdep code should only be compiled in when the ppc sim is | |
17775 | # built. PR sim/13418. | |
17776 | case $target in | |
17777 | powerpc*-*-*) | |
17778 | ||
17779 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
17780 | ||
17781 | ;; | |
17782 | esac | |
9b624dbe | 17783 | fi |
7a292a7a SS |
17784 | fi |
17785 | ||
17786 | ||
17787 | ||
c906108c SS |
17788 | |
17789 | ||
17790 | ||
17791 | ||
17792 | ||
17793 | ||
dfcd3bfb | 17794 | |
e56ac5c3 AC |
17795 | |
17796 | ||
b3a90332 AC |
17797 | |
17798 | ||
c35f4ffc | 17799 | # List of host floatformats. |
bec39cab AC |
17800 | |
17801 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 17802 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 17803 | _ACEOF |
c35f4ffc | 17804 | |
bec39cab AC |
17805 | |
17806 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 17807 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
17808 | _ACEOF |
17809 | ||
c35f4ffc | 17810 | |
bec39cab | 17811 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 17812 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 17813 | _ACEOF |
c35f4ffc AC |
17814 | |
17815 | ||
c906108c SS |
17816 | # target_subdir is used by the testsuite to find the target libraries. |
17817 | target_subdir= | |
17818 | if test "${host}" != "${target}"; then | |
17819 | target_subdir="${target_alias}/" | |
17820 | fi | |
17821 | ||
17822 | ||
21ea5acd | 17823 | # Import nat definitions. |
2b351b19 | 17824 | nat_makefile_frag=/dev/null |
771b4502 | 17825 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
17826 | . ${srcdir}/configure.nat |
17827 | nativefile=$NAT_FILE | |
c906108c | 17828 | fi |
c906108c | 17829 | |
c906108c SS |
17830 | |
17831 | ||
17832 | ||
21ea5acd SDJ |
17833 | |
17834 | ||
17835 | ||
17836 | ||
17837 | ||
c906108c SS |
17838 | |
17839 | ||
b00a8037 | 17840 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
17841 | |
17842 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 17843 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 17844 | _ACEOF |
b00a8037 DJ |
17845 | |
17846 | fi | |
17847 | ||
393fd4c3 YQ |
17848 | # Check for babeltrace and babeltrace-ctf |
17849 | ||
17850 | # Check whether --with-babeltrace was given. | |
17851 | if test "${with_babeltrace+set}" = set; then : | |
17852 | withval=$with_babeltrace; | |
17853 | else | |
17854 | with_babeltrace=auto | |
17855 | fi | |
17856 | ||
17857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
17858 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
17859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
17860 | $as_echo "$with_babeltrace" >&6; } | |
17861 | ||
17862 | if test "x$with_babeltrace" = "xno"; then | |
17863 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
17864 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
17865 | else | |
17866 | # Append -Werror to CFLAGS so that configure can catch the warning | |
17867 | # "assignment from incompatible pointer type", which is related to | |
17868 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
17869 | # in GDB, while babeltrace 1.0.3 is broken. | |
17870 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
17871 | # safe to save and restore CFLAGS here. | |
17872 | saved_CFLAGS=$CFLAGS | |
17873 | CFLAGS="$CFLAGS -Werror" | |
17874 | ||
17875 | ||
17876 | ||
17877 | ||
17878 | ||
17879 | ||
17880 | ||
17881 | ||
17882 | use_additional=yes | |
17883 | ||
17884 | acl_save_prefix="$prefix" | |
17885 | prefix="$acl_final_prefix" | |
17886 | acl_save_exec_prefix="$exec_prefix" | |
17887 | exec_prefix="$acl_final_exec_prefix" | |
17888 | ||
17889 | eval additional_includedir=\"$includedir\" | |
17890 | eval additional_libdir=\"$libdir\" | |
17891 | ||
17892 | exec_prefix="$acl_save_exec_prefix" | |
17893 | prefix="$acl_save_prefix" | |
17894 | ||
17895 | ||
17896 | # Check whether --with-libbabeltrace-prefix was given. | |
17897 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
17898 | withval=$with_libbabeltrace_prefix; | |
17899 | if test "X$withval" = "Xno"; then | |
17900 | use_additional=no | |
17901 | else | |
17902 | if test "X$withval" = "X"; then | |
17903 | ||
17904 | acl_save_prefix="$prefix" | |
17905 | prefix="$acl_final_prefix" | |
17906 | acl_save_exec_prefix="$exec_prefix" | |
17907 | exec_prefix="$acl_final_exec_prefix" | |
17908 | ||
17909 | eval additional_includedir=\"$includedir\" | |
17910 | eval additional_libdir=\"$libdir\" | |
17911 | ||
17912 | exec_prefix="$acl_save_exec_prefix" | |
17913 | prefix="$acl_save_prefix" | |
17914 | ||
17915 | else | |
17916 | additional_includedir="$withval/include" | |
17917 | additional_libdir="$withval/lib" | |
17918 | fi | |
17919 | fi | |
17920 | ||
17921 | fi | |
17922 | ||
17923 | LIBBABELTRACE= | |
17924 | LTLIBBABELTRACE= | |
17925 | INCBABELTRACE= | |
17926 | rpathdirs= | |
17927 | ltrpathdirs= | |
17928 | names_already_handled= | |
17929 | names_next_round='babeltrace babeltrace-ctf' | |
17930 | while test -n "$names_next_round"; do | |
17931 | names_this_round="$names_next_round" | |
17932 | names_next_round= | |
17933 | for name in $names_this_round; do | |
17934 | already_handled= | |
17935 | for n in $names_already_handled; do | |
17936 | if test "$n" = "$name"; then | |
17937 | already_handled=yes | |
17938 | break | |
17939 | fi | |
17940 | done | |
17941 | if test -z "$already_handled"; then | |
17942 | names_already_handled="$names_already_handled $name" | |
17943 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17944 | eval value=\"\$HAVE_LIB$uppername\" | |
17945 | if test -n "$value"; then | |
17946 | if test "$value" = yes; then | |
17947 | eval value=\"\$LIB$uppername\" | |
17948 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
17949 | eval value=\"\$LTLIB$uppername\" | |
17950 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
17951 | else | |
17952 | : | |
17953 | fi | |
17954 | else | |
17955 | found_dir= | |
17956 | found_la= | |
17957 | found_so= | |
17958 | found_a= | |
17959 | if test $use_additional = yes; then | |
17960 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
17961 | found_dir="$additional_libdir" | |
17962 | found_so="$additional_libdir/lib$name.$shlibext" | |
17963 | if test -f "$additional_libdir/lib$name.la"; then | |
17964 | found_la="$additional_libdir/lib$name.la" | |
17965 | fi | |
17966 | else | |
17967 | if test -f "$additional_libdir/lib$name.$libext"; then | |
17968 | found_dir="$additional_libdir" | |
17969 | found_a="$additional_libdir/lib$name.$libext" | |
17970 | if test -f "$additional_libdir/lib$name.la"; then | |
17971 | found_la="$additional_libdir/lib$name.la" | |
17972 | fi | |
17973 | fi | |
17974 | fi | |
17975 | fi | |
17976 | if test "X$found_dir" = "X"; then | |
17977 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
17978 | ||
17979 | acl_save_prefix="$prefix" | |
17980 | prefix="$acl_final_prefix" | |
17981 | acl_save_exec_prefix="$exec_prefix" | |
17982 | exec_prefix="$acl_final_exec_prefix" | |
17983 | eval x=\"$x\" | |
17984 | exec_prefix="$acl_save_exec_prefix" | |
17985 | prefix="$acl_save_prefix" | |
17986 | ||
17987 | case "$x" in | |
17988 | -L*) | |
17989 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
17990 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
17991 | found_dir="$dir" | |
17992 | found_so="$dir/lib$name.$shlibext" | |
17993 | if test -f "$dir/lib$name.la"; then | |
17994 | found_la="$dir/lib$name.la" | |
17995 | fi | |
17996 | else | |
17997 | if test -f "$dir/lib$name.$libext"; then | |
17998 | found_dir="$dir" | |
17999 | found_a="$dir/lib$name.$libext" | |
18000 | if test -f "$dir/lib$name.la"; then | |
18001 | found_la="$dir/lib$name.la" | |
18002 | fi | |
18003 | fi | |
18004 | fi | |
18005 | ;; | |
18006 | esac | |
18007 | if test "X$found_dir" != "X"; then | |
18008 | break | |
18009 | fi | |
18010 | done | |
18011 | fi | |
18012 | if test "X$found_dir" != "X"; then | |
18013 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
18014 | if test "X$found_so" != "X"; then | |
18015 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
18016 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18017 | else | |
18018 | haveit= | |
18019 | for x in $ltrpathdirs; do | |
18020 | if test "X$x" = "X$found_dir"; then | |
18021 | haveit=yes | |
18022 | break | |
18023 | fi | |
18024 | done | |
18025 | if test -z "$haveit"; then | |
18026 | ltrpathdirs="$ltrpathdirs $found_dir" | |
18027 | fi | |
18028 | if test "$hardcode_direct" = yes; then | |
18029 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18030 | else | |
18031 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
18032 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18033 | haveit= | |
18034 | for x in $rpathdirs; do | |
18035 | if test "X$x" = "X$found_dir"; then | |
18036 | haveit=yes | |
18037 | break | |
18038 | fi | |
18039 | done | |
18040 | if test -z "$haveit"; then | |
18041 | rpathdirs="$rpathdirs $found_dir" | |
18042 | fi | |
18043 | else | |
18044 | haveit= | |
18045 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18046 | ||
18047 | acl_save_prefix="$prefix" | |
18048 | prefix="$acl_final_prefix" | |
18049 | acl_save_exec_prefix="$exec_prefix" | |
18050 | exec_prefix="$acl_final_exec_prefix" | |
18051 | eval x=\"$x\" | |
18052 | exec_prefix="$acl_save_exec_prefix" | |
18053 | prefix="$acl_save_prefix" | |
18054 | ||
18055 | if test "X$x" = "X-L$found_dir"; then | |
18056 | haveit=yes | |
18057 | break | |
18058 | fi | |
18059 | done | |
18060 | if test -z "$haveit"; then | |
18061 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
18062 | fi | |
18063 | if test "$hardcode_minus_L" != no; then | |
18064 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18065 | else | |
18066 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
18067 | fi | |
18068 | fi | |
18069 | fi | |
18070 | fi | |
18071 | else | |
18072 | if test "X$found_a" != "X"; then | |
18073 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
18074 | else | |
18075 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
18076 | fi | |
18077 | fi | |
18078 | additional_includedir= | |
18079 | case "$found_dir" in | |
18080 | */lib | */lib/) | |
18081 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
18082 | additional_includedir="$basedir/include" | |
18083 | ;; | |
18084 | esac | |
18085 | if test "X$additional_includedir" != "X"; then | |
18086 | if test "X$additional_includedir" != "X/usr/include"; then | |
18087 | haveit= | |
18088 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
18089 | if test -n "$GCC"; then | |
18090 | case $host_os in | |
18091 | linux*) haveit=yes;; | |
18092 | esac | |
18093 | fi | |
18094 | fi | |
18095 | if test -z "$haveit"; then | |
18096 | for x in $CPPFLAGS $INCBABELTRACE; do | |
18097 | ||
18098 | acl_save_prefix="$prefix" | |
18099 | prefix="$acl_final_prefix" | |
18100 | acl_save_exec_prefix="$exec_prefix" | |
18101 | exec_prefix="$acl_final_exec_prefix" | |
18102 | eval x=\"$x\" | |
18103 | exec_prefix="$acl_save_exec_prefix" | |
18104 | prefix="$acl_save_prefix" | |
18105 | ||
18106 | if test "X$x" = "X-I$additional_includedir"; then | |
18107 | haveit=yes | |
18108 | break | |
18109 | fi | |
18110 | done | |
18111 | if test -z "$haveit"; then | |
18112 | if test -d "$additional_includedir"; then | |
18113 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
18114 | fi | |
18115 | fi | |
18116 | fi | |
18117 | fi | |
18118 | fi | |
18119 | if test -n "$found_la"; then | |
18120 | save_libdir="$libdir" | |
18121 | case "$found_la" in | |
18122 | */* | *\\*) . "$found_la" ;; | |
18123 | *) . "./$found_la" ;; | |
18124 | esac | |
18125 | libdir="$save_libdir" | |
18126 | for dep in $dependency_libs; do | |
18127 | case "$dep" in | |
18128 | -L*) | |
18129 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
18130 | if test "X$additional_libdir" != "X/usr/lib"; then | |
18131 | haveit= | |
18132 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
18133 | if test -n "$GCC"; then | |
18134 | case $host_os in | |
18135 | linux*) haveit=yes;; | |
18136 | esac | |
18137 | fi | |
18138 | fi | |
18139 | if test -z "$haveit"; then | |
18140 | haveit= | |
18141 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18142 | ||
18143 | acl_save_prefix="$prefix" | |
18144 | prefix="$acl_final_prefix" | |
18145 | acl_save_exec_prefix="$exec_prefix" | |
18146 | exec_prefix="$acl_final_exec_prefix" | |
18147 | eval x=\"$x\" | |
18148 | exec_prefix="$acl_save_exec_prefix" | |
18149 | prefix="$acl_save_prefix" | |
18150 | ||
18151 | if test "X$x" = "X-L$additional_libdir"; then | |
18152 | haveit=yes | |
18153 | break | |
18154 | fi | |
18155 | done | |
18156 | if test -z "$haveit"; then | |
18157 | if test -d "$additional_libdir"; then | |
18158 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
18159 | fi | |
18160 | fi | |
18161 | haveit= | |
18162 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18163 | ||
18164 | acl_save_prefix="$prefix" | |
18165 | prefix="$acl_final_prefix" | |
18166 | acl_save_exec_prefix="$exec_prefix" | |
18167 | exec_prefix="$acl_final_exec_prefix" | |
18168 | eval x=\"$x\" | |
18169 | exec_prefix="$acl_save_exec_prefix" | |
18170 | prefix="$acl_save_prefix" | |
18171 | ||
18172 | if test "X$x" = "X-L$additional_libdir"; then | |
18173 | haveit=yes | |
18174 | break | |
18175 | fi | |
18176 | done | |
18177 | if test -z "$haveit"; then | |
18178 | if test -d "$additional_libdir"; then | |
18179 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
18180 | fi | |
18181 | fi | |
18182 | fi | |
18183 | fi | |
18184 | ;; | |
18185 | -R*) | |
18186 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
18187 | if test "$enable_rpath" != no; then | |
18188 | haveit= | |
18189 | for x in $rpathdirs; do | |
18190 | if test "X$x" = "X$dir"; then | |
18191 | haveit=yes | |
18192 | break | |
18193 | fi | |
18194 | done | |
18195 | if test -z "$haveit"; then | |
18196 | rpathdirs="$rpathdirs $dir" | |
18197 | fi | |
18198 | haveit= | |
18199 | for x in $ltrpathdirs; do | |
18200 | if test "X$x" = "X$dir"; then | |
18201 | haveit=yes | |
18202 | break | |
18203 | fi | |
18204 | done | |
18205 | if test -z "$haveit"; then | |
18206 | ltrpathdirs="$ltrpathdirs $dir" | |
18207 | fi | |
18208 | fi | |
18209 | ;; | |
18210 | -l*) | |
18211 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
18212 | ;; | |
18213 | *.la) | |
18214 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
18215 | ;; | |
18216 | *) | |
18217 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
18218 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
18219 | ;; | |
18220 | esac | |
18221 | done | |
18222 | fi | |
18223 | else | |
18224 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
18225 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
18226 | fi | |
18227 | fi | |
18228 | fi | |
18229 | done | |
18230 | done | |
18231 | if test "X$rpathdirs" != "X"; then | |
18232 | if test -n "$hardcode_libdir_separator"; then | |
18233 | alldirs= | |
18234 | for found_dir in $rpathdirs; do | |
18235 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
18236 | done | |
18237 | acl_save_libdir="$libdir" | |
18238 | libdir="$alldirs" | |
18239 | eval flag=\"$hardcode_libdir_flag_spec\" | |
18240 | libdir="$acl_save_libdir" | |
18241 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
18242 | else | |
18243 | for found_dir in $rpathdirs; do | |
18244 | acl_save_libdir="$libdir" | |
18245 | libdir="$found_dir" | |
18246 | eval flag=\"$hardcode_libdir_flag_spec\" | |
18247 | libdir="$acl_save_libdir" | |
18248 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
18249 | done | |
18250 | fi | |
18251 | fi | |
18252 | if test "X$ltrpathdirs" != "X"; then | |
18253 | for found_dir in $ltrpathdirs; do | |
18254 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
18255 | done | |
18256 | fi | |
18257 | ||
18258 | ||
18259 | ac_save_CPPFLAGS="$CPPFLAGS" | |
18260 | ||
18261 | for element in $INCBABELTRACE; do | |
18262 | haveit= | |
18263 | for x in $CPPFLAGS; do | |
18264 | ||
18265 | acl_save_prefix="$prefix" | |
18266 | prefix="$acl_final_prefix" | |
18267 | acl_save_exec_prefix="$exec_prefix" | |
18268 | exec_prefix="$acl_final_exec_prefix" | |
18269 | eval x=\"$x\" | |
18270 | exec_prefix="$acl_save_exec_prefix" | |
18271 | prefix="$acl_save_prefix" | |
18272 | ||
18273 | if test "X$x" = "X$element"; then | |
18274 | haveit=yes | |
18275 | break | |
18276 | fi | |
18277 | done | |
18278 | if test -z "$haveit"; then | |
18279 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
18280 | fi | |
18281 | done | |
18282 | ||
18283 | ||
18284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
18285 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
d0ac1c44 | 18286 | if ${ac_cv_libbabeltrace+:} false; then : |
393fd4c3 YQ |
18287 | $as_echo_n "(cached) " >&6 |
18288 | else | |
18289 | ||
18290 | ac_save_LIBS="$LIBS" | |
18291 | LIBS="$LIBS $LIBBABELTRACE" | |
18292 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18293 | /* end confdefs.h. */ | |
18294 | #include <babeltrace/babeltrace.h> | |
18295 | #include <babeltrace/ctf/events.h> | |
18296 | #include <babeltrace/ctf/iterator.h> | |
18297 | int | |
18298 | main () | |
18299 | { | |
18300 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
18301 | struct bt_ctf_event *event = NULL; | |
18302 | const struct bt_definition *scope; | |
18303 | ||
13cdc2af | 18304 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 18305 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
18306 | scope = bt_ctf_get_top_level_scope (event, |
18307 | BT_STREAM_EVENT_HEADER); | |
18308 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
18309 | ||
18310 | ; | |
18311 | return 0; | |
18312 | } | |
18313 | _ACEOF | |
18314 | if ac_fn_c_try_link "$LINENO"; then : | |
18315 | ac_cv_libbabeltrace=yes | |
18316 | else | |
18317 | ac_cv_libbabeltrace=no | |
18318 | fi | |
18319 | rm -f core conftest.err conftest.$ac_objext \ | |
18320 | conftest$ac_exeext conftest.$ac_ext | |
18321 | LIBS="$ac_save_LIBS" | |
18322 | ||
18323 | fi | |
18324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
18325 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
18326 | if test "$ac_cv_libbabeltrace" = yes; then | |
18327 | HAVE_LIBBABELTRACE=yes | |
18328 | ||
18329 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
18330 | ||
18331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
18332 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
18333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
18334 | $as_echo "$LIBBABELTRACE" >&6; } | |
18335 | else | |
18336 | HAVE_LIBBABELTRACE=no | |
18337 | CPPFLAGS="$ac_save_CPPFLAGS" | |
18338 | LIBBABELTRACE= | |
18339 | LTLIBBABELTRACE= | |
18340 | fi | |
18341 | ||
18342 | ||
18343 | ||
18344 | ||
18345 | ||
18346 | ||
18347 | CFLAGS=$saved_CFLAGS | |
18348 | ||
18349 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
18350 | if test "$with_babeltrace" = yes; then | |
d0ac1c44 | 18351 | as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 |
393fd4c3 YQ |
18352 | else |
18353 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
18354 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
18355 | fi | |
18356 | fi | |
18357 | fi | |
18358 | ||
ccb1ba62 CB |
18359 | # Check for xxhash |
18360 | ||
18361 | # Check whether --with-xxhash was given. | |
18362 | if test "${with_xxhash+set}" = set; then : | |
18363 | withval=$with_xxhash; | |
18364 | else | |
18365 | with_xxhash=auto | |
18366 | fi | |
18367 | ||
18368 | ||
18369 | if test "x$with_xxhash" != "xno"; then | |
18370 | ||
18371 | ||
18372 | ||
18373 | ||
18374 | ||
18375 | ||
18376 | ||
18377 | ||
18378 | use_additional=yes | |
18379 | ||
18380 | acl_save_prefix="$prefix" | |
18381 | prefix="$acl_final_prefix" | |
18382 | acl_save_exec_prefix="$exec_prefix" | |
18383 | exec_prefix="$acl_final_exec_prefix" | |
18384 | ||
18385 | eval additional_includedir=\"$includedir\" | |
18386 | eval additional_libdir=\"$libdir\" | |
18387 | ||
18388 | exec_prefix="$acl_save_exec_prefix" | |
18389 | prefix="$acl_save_prefix" | |
18390 | ||
18391 | ||
18392 | # Check whether --with-libxxhash-prefix was given. | |
18393 | if test "${with_libxxhash_prefix+set}" = set; then : | |
18394 | withval=$with_libxxhash_prefix; | |
18395 | if test "X$withval" = "Xno"; then | |
18396 | use_additional=no | |
18397 | else | |
18398 | if test "X$withval" = "X"; then | |
18399 | ||
18400 | acl_save_prefix="$prefix" | |
18401 | prefix="$acl_final_prefix" | |
18402 | acl_save_exec_prefix="$exec_prefix" | |
18403 | exec_prefix="$acl_final_exec_prefix" | |
18404 | ||
18405 | eval additional_includedir=\"$includedir\" | |
18406 | eval additional_libdir=\"$libdir\" | |
18407 | ||
18408 | exec_prefix="$acl_save_exec_prefix" | |
18409 | prefix="$acl_save_prefix" | |
18410 | ||
18411 | else | |
18412 | additional_includedir="$withval/include" | |
18413 | additional_libdir="$withval/lib" | |
18414 | fi | |
18415 | fi | |
18416 | ||
18417 | fi | |
18418 | ||
18419 | LIBXXHASH= | |
18420 | LTLIBXXHASH= | |
18421 | INCXXHASH= | |
18422 | rpathdirs= | |
18423 | ltrpathdirs= | |
18424 | names_already_handled= | |
18425 | names_next_round='xxhash ' | |
18426 | while test -n "$names_next_round"; do | |
18427 | names_this_round="$names_next_round" | |
18428 | names_next_round= | |
18429 | for name in $names_this_round; do | |
18430 | already_handled= | |
18431 | for n in $names_already_handled; do | |
18432 | if test "$n" = "$name"; then | |
18433 | already_handled=yes | |
18434 | break | |
18435 | fi | |
18436 | done | |
18437 | if test -z "$already_handled"; then | |
18438 | names_already_handled="$names_already_handled $name" | |
18439 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
18440 | eval value=\"\$HAVE_LIB$uppername\" | |
18441 | if test -n "$value"; then | |
18442 | if test "$value" = yes; then | |
18443 | eval value=\"\$LIB$uppername\" | |
18444 | test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" | |
18445 | eval value=\"\$LTLIB$uppername\" | |
18446 | test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" | |
18447 | else | |
18448 | : | |
18449 | fi | |
18450 | else | |
18451 | found_dir= | |
18452 | found_la= | |
18453 | found_so= | |
18454 | found_a= | |
18455 | if test $use_additional = yes; then | |
18456 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
18457 | found_dir="$additional_libdir" | |
18458 | found_so="$additional_libdir/lib$name.$shlibext" | |
18459 | if test -f "$additional_libdir/lib$name.la"; then | |
18460 | found_la="$additional_libdir/lib$name.la" | |
18461 | fi | |
18462 | else | |
18463 | if test -f "$additional_libdir/lib$name.$libext"; then | |
18464 | found_dir="$additional_libdir" | |
18465 | found_a="$additional_libdir/lib$name.$libext" | |
18466 | if test -f "$additional_libdir/lib$name.la"; then | |
18467 | found_la="$additional_libdir/lib$name.la" | |
18468 | fi | |
18469 | fi | |
18470 | fi | |
18471 | fi | |
18472 | if test "X$found_dir" = "X"; then | |
18473 | for x in $LDFLAGS $LTLIBXXHASH; do | |
18474 | ||
18475 | acl_save_prefix="$prefix" | |
18476 | prefix="$acl_final_prefix" | |
18477 | acl_save_exec_prefix="$exec_prefix" | |
18478 | exec_prefix="$acl_final_exec_prefix" | |
18479 | eval x=\"$x\" | |
18480 | exec_prefix="$acl_save_exec_prefix" | |
18481 | prefix="$acl_save_prefix" | |
18482 | ||
18483 | case "$x" in | |
18484 | -L*) | |
18485 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
18486 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
18487 | found_dir="$dir" | |
18488 | found_so="$dir/lib$name.$shlibext" | |
18489 | if test -f "$dir/lib$name.la"; then | |
18490 | found_la="$dir/lib$name.la" | |
18491 | fi | |
18492 | else | |
18493 | if test -f "$dir/lib$name.$libext"; then | |
18494 | found_dir="$dir" | |
18495 | found_a="$dir/lib$name.$libext" | |
18496 | if test -f "$dir/lib$name.la"; then | |
18497 | found_la="$dir/lib$name.la" | |
18498 | fi | |
18499 | fi | |
18500 | fi | |
18501 | ;; | |
18502 | esac | |
18503 | if test "X$found_dir" != "X"; then | |
18504 | break | |
18505 | fi | |
18506 | done | |
18507 | fi | |
18508 | if test "X$found_dir" != "X"; then | |
18509 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name" | |
18510 | if test "X$found_so" != "X"; then | |
18511 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
18512 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
18513 | else | |
18514 | haveit= | |
18515 | for x in $ltrpathdirs; do | |
18516 | if test "X$x" = "X$found_dir"; then | |
18517 | haveit=yes | |
18518 | break | |
18519 | fi | |
18520 | done | |
18521 | if test -z "$haveit"; then | |
18522 | ltrpathdirs="$ltrpathdirs $found_dir" | |
18523 | fi | |
18524 | if test "$hardcode_direct" = yes; then | |
18525 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
18526 | else | |
18527 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
18528 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
18529 | haveit= | |
18530 | for x in $rpathdirs; do | |
18531 | if test "X$x" = "X$found_dir"; then | |
18532 | haveit=yes | |
18533 | break | |
18534 | fi | |
18535 | done | |
18536 | if test -z "$haveit"; then | |
18537 | rpathdirs="$rpathdirs $found_dir" | |
18538 | fi | |
18539 | else | |
18540 | haveit= | |
18541 | for x in $LDFLAGS $LIBXXHASH; do | |
18542 | ||
18543 | acl_save_prefix="$prefix" | |
18544 | prefix="$acl_final_prefix" | |
18545 | acl_save_exec_prefix="$exec_prefix" | |
18546 | exec_prefix="$acl_final_exec_prefix" | |
18547 | eval x=\"$x\" | |
18548 | exec_prefix="$acl_save_exec_prefix" | |
18549 | prefix="$acl_save_prefix" | |
18550 | ||
18551 | if test "X$x" = "X-L$found_dir"; then | |
18552 | haveit=yes | |
18553 | break | |
18554 | fi | |
18555 | done | |
18556 | if test -z "$haveit"; then | |
18557 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" | |
18558 | fi | |
18559 | if test "$hardcode_minus_L" != no; then | |
18560 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
18561 | else | |
18562 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
18563 | fi | |
18564 | fi | |
18565 | fi | |
18566 | fi | |
18567 | else | |
18568 | if test "X$found_a" != "X"; then | |
18569 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" | |
18570 | else | |
18571 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" | |
18572 | fi | |
18573 | fi | |
18574 | additional_includedir= | |
18575 | case "$found_dir" in | |
18576 | */lib | */lib/) | |
18577 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
18578 | additional_includedir="$basedir/include" | |
18579 | ;; | |
18580 | esac | |
18581 | if test "X$additional_includedir" != "X"; then | |
18582 | if test "X$additional_includedir" != "X/usr/include"; then | |
18583 | haveit= | |
18584 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
18585 | if test -n "$GCC"; then | |
18586 | case $host_os in | |
18587 | linux*) haveit=yes;; | |
18588 | esac | |
18589 | fi | |
18590 | fi | |
18591 | if test -z "$haveit"; then | |
18592 | for x in $CPPFLAGS $INCXXHASH; do | |
18593 | ||
18594 | acl_save_prefix="$prefix" | |
18595 | prefix="$acl_final_prefix" | |
18596 | acl_save_exec_prefix="$exec_prefix" | |
18597 | exec_prefix="$acl_final_exec_prefix" | |
18598 | eval x=\"$x\" | |
18599 | exec_prefix="$acl_save_exec_prefix" | |
18600 | prefix="$acl_save_prefix" | |
18601 | ||
18602 | if test "X$x" = "X-I$additional_includedir"; then | |
18603 | haveit=yes | |
18604 | break | |
18605 | fi | |
18606 | done | |
18607 | if test -z "$haveit"; then | |
18608 | if test -d "$additional_includedir"; then | |
18609 | INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" | |
18610 | fi | |
18611 | fi | |
18612 | fi | |
18613 | fi | |
18614 | fi | |
18615 | if test -n "$found_la"; then | |
18616 | save_libdir="$libdir" | |
18617 | case "$found_la" in | |
18618 | */* | *\\*) . "$found_la" ;; | |
18619 | *) . "./$found_la" ;; | |
18620 | esac | |
18621 | libdir="$save_libdir" | |
18622 | for dep in $dependency_libs; do | |
18623 | case "$dep" in | |
18624 | -L*) | |
18625 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
18626 | if test "X$additional_libdir" != "X/usr/lib"; then | |
18627 | haveit= | |
18628 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
18629 | if test -n "$GCC"; then | |
18630 | case $host_os in | |
18631 | linux*) haveit=yes;; | |
18632 | esac | |
18633 | fi | |
18634 | fi | |
18635 | if test -z "$haveit"; then | |
18636 | haveit= | |
18637 | for x in $LDFLAGS $LIBXXHASH; do | |
18638 | ||
18639 | acl_save_prefix="$prefix" | |
18640 | prefix="$acl_final_prefix" | |
18641 | acl_save_exec_prefix="$exec_prefix" | |
18642 | exec_prefix="$acl_final_exec_prefix" | |
18643 | eval x=\"$x\" | |
18644 | exec_prefix="$acl_save_exec_prefix" | |
18645 | prefix="$acl_save_prefix" | |
18646 | ||
18647 | if test "X$x" = "X-L$additional_libdir"; then | |
18648 | haveit=yes | |
18649 | break | |
18650 | fi | |
18651 | done | |
18652 | if test -z "$haveit"; then | |
18653 | if test -d "$additional_libdir"; then | |
18654 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" | |
18655 | fi | |
18656 | fi | |
18657 | haveit= | |
18658 | for x in $LDFLAGS $LTLIBXXHASH; do | |
18659 | ||
18660 | acl_save_prefix="$prefix" | |
18661 | prefix="$acl_final_prefix" | |
18662 | acl_save_exec_prefix="$exec_prefix" | |
18663 | exec_prefix="$acl_final_exec_prefix" | |
18664 | eval x=\"$x\" | |
18665 | exec_prefix="$acl_save_exec_prefix" | |
18666 | prefix="$acl_save_prefix" | |
18667 | ||
18668 | if test "X$x" = "X-L$additional_libdir"; then | |
18669 | haveit=yes | |
18670 | break | |
18671 | fi | |
18672 | done | |
18673 | if test -z "$haveit"; then | |
18674 | if test -d "$additional_libdir"; then | |
18675 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" | |
18676 | fi | |
18677 | fi | |
18678 | fi | |
18679 | fi | |
18680 | ;; | |
18681 | -R*) | |
18682 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
18683 | if test "$enable_rpath" != no; then | |
18684 | haveit= | |
18685 | for x in $rpathdirs; do | |
18686 | if test "X$x" = "X$dir"; then | |
18687 | haveit=yes | |
18688 | break | |
18689 | fi | |
18690 | done | |
18691 | if test -z "$haveit"; then | |
18692 | rpathdirs="$rpathdirs $dir" | |
18693 | fi | |
18694 | haveit= | |
18695 | for x in $ltrpathdirs; do | |
18696 | if test "X$x" = "X$dir"; then | |
18697 | haveit=yes | |
18698 | break | |
18699 | fi | |
18700 | done | |
18701 | if test -z "$haveit"; then | |
18702 | ltrpathdirs="$ltrpathdirs $dir" | |
18703 | fi | |
18704 | fi | |
18705 | ;; | |
18706 | -l*) | |
18707 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
18708 | ;; | |
18709 | *.la) | |
18710 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
18711 | ;; | |
18712 | *) | |
18713 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" | |
18714 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" | |
18715 | ;; | |
18716 | esac | |
18717 | done | |
18718 | fi | |
18719 | else | |
18720 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
18721 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" | |
18722 | fi | |
18723 | fi | |
18724 | fi | |
18725 | done | |
18726 | done | |
18727 | if test "X$rpathdirs" != "X"; then | |
18728 | if test -n "$hardcode_libdir_separator"; then | |
18729 | alldirs= | |
18730 | for found_dir in $rpathdirs; do | |
18731 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
18732 | done | |
18733 | acl_save_libdir="$libdir" | |
18734 | libdir="$alldirs" | |
18735 | eval flag=\"$hardcode_libdir_flag_spec\" | |
18736 | libdir="$acl_save_libdir" | |
18737 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
18738 | else | |
18739 | for found_dir in $rpathdirs; do | |
18740 | acl_save_libdir="$libdir" | |
18741 | libdir="$found_dir" | |
18742 | eval flag=\"$hardcode_libdir_flag_spec\" | |
18743 | libdir="$acl_save_libdir" | |
18744 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
18745 | done | |
18746 | fi | |
18747 | fi | |
18748 | if test "X$ltrpathdirs" != "X"; then | |
18749 | for found_dir in $ltrpathdirs; do | |
18750 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" | |
18751 | done | |
18752 | fi | |
18753 | ||
18754 | ||
18755 | ac_save_CPPFLAGS="$CPPFLAGS" | |
18756 | ||
18757 | for element in $INCXXHASH; do | |
18758 | haveit= | |
18759 | for x in $CPPFLAGS; do | |
18760 | ||
18761 | acl_save_prefix="$prefix" | |
18762 | prefix="$acl_final_prefix" | |
18763 | acl_save_exec_prefix="$exec_prefix" | |
18764 | exec_prefix="$acl_final_exec_prefix" | |
18765 | eval x=\"$x\" | |
18766 | exec_prefix="$acl_save_exec_prefix" | |
18767 | prefix="$acl_save_prefix" | |
18768 | ||
18769 | if test "X$x" = "X$element"; then | |
18770 | haveit=yes | |
18771 | break | |
18772 | fi | |
18773 | done | |
18774 | if test -z "$haveit"; then | |
18775 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
18776 | fi | |
18777 | done | |
18778 | ||
18779 | ||
18780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 | |
18781 | $as_echo_n "checking for libxxhash... " >&6; } | |
18782 | if ${ac_cv_libxxhash+:} false; then : | |
18783 | $as_echo_n "(cached) " >&6 | |
18784 | else | |
18785 | ||
18786 | ac_save_LIBS="$LIBS" | |
18787 | LIBS="$LIBS $LIBXXHASH" | |
18788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18789 | /* end confdefs.h. */ | |
18790 | #include <xxhash.h> | |
18791 | int | |
18792 | main () | |
18793 | { | |
18794 | XXH32("foo", 3, 0); | |
18795 | ||
18796 | ; | |
18797 | return 0; | |
18798 | } | |
18799 | _ACEOF | |
18800 | if ac_fn_c_try_link "$LINENO"; then : | |
18801 | ac_cv_libxxhash=yes | |
18802 | else | |
18803 | ac_cv_libxxhash=no | |
18804 | fi | |
18805 | rm -f core conftest.err conftest.$ac_objext \ | |
18806 | conftest$ac_exeext conftest.$ac_ext | |
18807 | LIBS="$ac_save_LIBS" | |
18808 | ||
18809 | fi | |
18810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 | |
18811 | $as_echo "$ac_cv_libxxhash" >&6; } | |
18812 | if test "$ac_cv_libxxhash" = yes; then | |
18813 | HAVE_LIBXXHASH=yes | |
18814 | ||
18815 | $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h | |
18816 | ||
18817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 | |
18818 | $as_echo_n "checking how to link with libxxhash... " >&6; } | |
18819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 | |
18820 | $as_echo "$LIBXXHASH" >&6; } | |
18821 | else | |
18822 | HAVE_LIBXXHASH=no | |
18823 | CPPFLAGS="$ac_save_CPPFLAGS" | |
18824 | LIBXXHASH= | |
18825 | LTLIBXXHASH= | |
18826 | fi | |
18827 | ||
18828 | ||
18829 | ||
18830 | ||
18831 | ||
18832 | ||
18833 | if test "$HAVE_LIBXXHASH" != yes; then | |
18834 | if test "$with_xxhash" = yes; then | |
18835 | as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 | |
18836 | fi | |
18837 | fi | |
18838 | if test "x$with_xxhash" = "xauto"; then | |
18839 | with_xxhash="$HAVE_LIBXXHASH" | |
18840 | fi | |
18841 | fi | |
18842 | ||
18843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 | |
18844 | $as_echo_n "checking whether to use xxhash... " >&6; } | |
18845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 | |
18846 | $as_echo "$with_xxhash" >&6; } | |
18847 | ||
a0a461e5 | 18848 | NM_H= |
c906108c SS |
18849 | rm -f nm.h |
18850 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
18851 | case "${nativefile}" in |
18852 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
18853 | * ) GDB_NM_FILE="${nativefile}" | |
18854 | esac | |
a0a461e5 TT |
18855 | ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE" |
18856 | ||
60ca704f SE |
18857 | |
18858 | cat >>confdefs.h <<_ACEOF | |
b78960be | 18859 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 18860 | _ACEOF |
5a2402b8 | 18861 | |
a0a461e5 | 18862 | NM_H=nm.h |
c906108c | 18863 | fi |
5a2402b8 AC |
18864 | |
18865 | ||
a0a461e5 | 18866 | |
e3487908 GKB |
18867 | for ac_prog in xsltproc |
18868 | do | |
18869 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
18870 | set dummy $ac_prog; ac_word=$2 | |
18871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
18872 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 18873 | if ${ac_cv_path_XSLTPROC+:} false; then : |
e3487908 GKB |
18874 | $as_echo_n "(cached) " >&6 |
18875 | else | |
18876 | case $XSLTPROC in | |
18877 | [\\/]* | ?:[\\/]*) | |
18878 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
18879 | ;; | |
18880 | *) | |
18881 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
18882 | for as_dir in $PATH | |
18883 | do | |
18884 | IFS=$as_save_IFS | |
18885 | test -z "$as_dir" && as_dir=. | |
18886 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 18887 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e3487908 GKB |
18888 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" |
18889 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
18890 | break 2 | |
18891 | fi | |
18892 | done | |
18893 | done | |
18894 | IFS=$as_save_IFS | |
18895 | ||
18896 | ;; | |
18897 | esac | |
18898 | fi | |
18899 | XSLTPROC=$ac_cv_path_XSLTPROC | |
18900 | if test -n "$XSLTPROC"; then | |
18901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
18902 | $as_echo "$XSLTPROC" >&6; } | |
18903 | else | |
18904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
18905 | $as_echo "no" >&6; } | |
18906 | fi | |
18907 | ||
18908 | ||
18909 | test -n "$XSLTPROC" && break | |
18910 | done | |
18911 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
18912 | ||
18913 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
18914 | if test "${XSLTPROC}" = missing; then | |
d0ac1c44 | 18915 | as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 |
e3487908 GKB |
18916 | fi |
18917 | fi | |
18918 | ||
18919 | ||
c906108c SS |
18920 | |
18921 | ||
c906108c | 18922 | |
81ecdfbb | 18923 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 18924 | |
bec39cab | 18925 | |
8ecfd7bd SDJ |
18926 | |
18927 | # Check whether we will enable the inclusion of unit tests when | |
18928 | # compiling GDB. | |
18929 | # | |
18930 | # The default value of this option changes depending whether we're on | |
18931 | # development mode (in which case it's "true") or not (in which case | |
18932 | # it's "false"). | |
18933 | # Check whether --enable-unit-tests was given. | |
18934 | if test "${enable_unit_tests+set}" = set; then : | |
18935 | enableval=$enable_unit_tests; case "${enableval}" in | |
18936 | yes) enable_unittests=true ;; | |
18937 | no) enable_unittests=false ;; | |
18938 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
18939 | esac | |
18940 | else | |
18941 | enable_unittests=$development | |
18942 | fi | |
18943 | ||
18944 | ||
18945 | if $enable_unittests; then | |
dcd1f979 TT |
18946 | |
18947 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
18948 | ||
8ecfd7bd | 18949 | |
01027315 TT |
18950 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o" |
18951 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c" | |
8ecfd7bd | 18952 | |
dcd1f979 TT |
18953 | fi |
18954 | ||
b292c783 | 18955 | |
8ecfd7bd | 18956 | |
f6a88844 JM |
18957 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
18958 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
18959 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
18960 | GDB_TRANSFORM_NAME=gdb | |
18961 | fi | |
18962 | ||
18963 | ||
18964 | ||
18965 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
18966 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
18967 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
18968 | GCORE_TRANSFORM_NAME=gcore | |
18969 | fi | |
18970 | ||
b292c783 JK |
18971 | |
18972 | ac_config_files="$ac_config_files gcore" | |
18973 | ||
141ec9f6 | 18974 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" |
81ecdfbb | 18975 | |
89a34d1b | 18976 | |
bec39cab AC |
18977 | cat >confcache <<\_ACEOF |
18978 | # This file is a shell script that caches the results of configure | |
18979 | # tests run on this system so they can be shared between configure | |
18980 | # scripts and configure runs, see configure's option --config-cache. | |
18981 | # It is not useful on other systems. If it contains results you don't | |
18982 | # want to keep, you may remove or edit it. | |
18983 | # | |
18984 | # config.status only pays attention to the cache file if you give it | |
18985 | # the --recheck option to rerun configure. | |
18986 | # | |
18987 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
18988 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
18989 | # following values. | |
18990 | ||
18991 | _ACEOF | |
18992 | ||
18993 | # The following way of writing the cache mishandles newlines in values, | |
18994 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 18995 | # So, we kill variables containing newlines. |
bec39cab AC |
18996 | # Ultrix sh set writes to stderr and can't be redirected directly, |
18997 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
18998 | ( |
18999 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
19000 | eval ac_val=\$$ac_var | |
19001 | case $ac_val in #( | |
19002 | *${as_nl}*) | |
19003 | case $ac_var in #( | |
19004 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
19005 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
19006 | esac | |
19007 | case $ac_var in #( | |
19008 | _ | IFS | as_nl) ;; #( | |
19009 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
19010 | *) { eval $ac_var=; unset $ac_var;} ;; | |
19011 | esac ;; | |
19012 | esac | |
19013 | done | |
19014 | ||
bec39cab | 19015 | (set) 2>&1 | |
81ecdfbb RW |
19016 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
19017 | *${as_nl}ac_space=\ *) | |
19018 | # `set' does not quote correctly, so add quotes: double-quote | |
19019 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
19020 | sed -n \ |
19021 | "s/'/'\\\\''/g; | |
19022 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 19023 | ;; #( |
bec39cab AC |
19024 | *) |
19025 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 19026 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 19027 | ;; |
81ecdfbb RW |
19028 | esac | |
19029 | sort | |
19030 | ) | | |
bec39cab | 19031 | sed ' |
81ecdfbb | 19032 | /^ac_cv_env_/b end |
bec39cab | 19033 | t clear |
81ecdfbb | 19034 | :clear |
bec39cab AC |
19035 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
19036 | t end | |
81ecdfbb RW |
19037 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
19038 | :end' >>confcache | |
19039 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
19040 | if test -w "$cache_file"; then | |
d0ac1c44 | 19041 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
19042 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
19043 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
19044 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
19045 | cat confcache >"$cache_file" | |
19046 | else | |
19047 | case $cache_file in #( | |
19048 | */* | ?:*) | |
19049 | mv -f confcache "$cache_file"$$ && | |
19050 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
19051 | *) | |
19052 | mv -f confcache "$cache_file" ;; | |
19053 | esac | |
19054 | fi | |
19055 | fi | |
bec39cab | 19056 | else |
81ecdfbb RW |
19057 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
19058 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
19059 | fi |
19060 | fi | |
19061 | rm -f confcache | |
19062 | ||
19063 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
19064 | # Let make expand exec_prefix. | |
19065 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
19066 | ||
bec39cab AC |
19067 | DEFS=-DHAVE_CONFIG_H |
19068 | ||
19069 | ac_libobjs= | |
19070 | ac_ltlibobjs= | |
d0ac1c44 | 19071 | U= |
bec39cab AC |
19072 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
19073 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
19074 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
19075 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
19076 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
19077 | # will be set to the directory where LIBOBJS objects are built. | |
19078 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
19079 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
19080 | done |
19081 | LIBOBJS=$ac_libobjs | |
19082 | ||
19083 | LTLIBOBJS=$ac_ltlibobjs | |
19084 | ||
19085 | ||
85981d60 | 19086 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 19087 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
81ecdfbb | 19088 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
85981d60 | 19089 | fi |
4df42755 | 19090 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
d0ac1c44 | 19091 | as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. |
4df42755 DE |
19092 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19093 | fi | |
19094 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
d0ac1c44 | 19095 | as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. |
4df42755 DE |
19096 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19097 | fi | |
81ecdfbb RW |
19098 | |
19099 | ||
d0ac1c44 | 19100 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 19101 | ac_write_fail=0 |
bec39cab AC |
19102 | ac_clean_files_save=$ac_clean_files |
19103 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
19104 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
19105 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
19106 | as_write_fail=0 | |
19107 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
19108 | #! $SHELL |
19109 | # Generated by $as_me. | |
19110 | # Run this file to recreate the current configuration. | |
19111 | # Compiler output produced by configure, useful for debugging | |
19112 | # configure, is in config.log if it exists. | |
19113 | ||
19114 | debug=false | |
19115 | ac_cs_recheck=false | |
19116 | ac_cs_silent=false | |
bec39cab | 19117 | |
81ecdfbb RW |
19118 | SHELL=\${CONFIG_SHELL-$SHELL} |
19119 | export SHELL | |
19120 | _ASEOF | |
19121 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
19122 | ## -------------------- ## | |
19123 | ## M4sh Initialization. ## | |
19124 | ## -------------------- ## | |
19125 | ||
19126 | # Be more Bourne compatible | |
19127 | DUALCASE=1; export DUALCASE # for MKS sh | |
19128 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
19129 | emulate sh |
19130 | NULLCMD=: | |
81ecdfbb | 19131 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
19132 | # is contrary to our usage. Disable this feature. |
19133 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
19134 | setopt NO_GLOB_SUBST |
19135 | else | |
19136 | case `(set -o) 2>/dev/null` in #( | |
19137 | *posix*) : | |
19138 | set -o posix ;; #( | |
19139 | *) : | |
19140 | ;; | |
19141 | esac | |
bec39cab | 19142 | fi |
bec39cab | 19143 | |
81ecdfbb RW |
19144 | |
19145 | as_nl=' | |
19146 | ' | |
19147 | export as_nl | |
19148 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
19149 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
19150 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
19151 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
19152 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
19153 | # but without wasting forks for bash or zsh. | |
19154 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
19155 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
19156 | as_echo='print -r --' | |
19157 | as_echo_n='print -rn --' | |
19158 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
19159 | as_echo='printf %s\n' | |
19160 | as_echo_n='printf %s' | |
19161 | else | |
19162 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
19163 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
19164 | as_echo_n='/usr/ucb/echo -n' | |
19165 | else | |
19166 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
19167 | as_echo_n_body='eval | |
19168 | arg=$1; | |
19169 | case $arg in #( | |
19170 | *"$as_nl"*) | |
19171 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
19172 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
19173 | esac; | |
19174 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
19175 | ' | |
19176 | export as_echo_n_body | |
19177 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
19178 | fi | |
19179 | export as_echo_body | |
19180 | as_echo='sh -c $as_echo_body as_echo' | |
19181 | fi | |
19182 | ||
19183 | # The user is always right. | |
19184 | if test "${PATH_SEPARATOR+set}" != set; then | |
19185 | PATH_SEPARATOR=: | |
19186 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
19187 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
19188 | PATH_SEPARATOR=';' | |
19189 | } | |
bec39cab AC |
19190 | fi |
19191 | ||
19192 | ||
81ecdfbb RW |
19193 | # IFS |
19194 | # We need space, tab and new line, in precisely that order. Quoting is | |
19195 | # there to prevent editors from complaining about space-tab. | |
19196 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
19197 | # splitting by setting IFS to empty value.) | |
19198 | IFS=" "" $as_nl" | |
19199 | ||
19200 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 19201 | as_myself= |
81ecdfbb RW |
19202 | case $0 in #(( |
19203 | *[\\/]* ) as_myself=$0 ;; | |
19204 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
19205 | for as_dir in $PATH | |
19206 | do | |
19207 | IFS=$as_save_IFS | |
19208 | test -z "$as_dir" && as_dir=. | |
19209 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
19210 | done | |
19211 | IFS=$as_save_IFS | |
19212 | ||
19213 | ;; | |
19214 | esac | |
19215 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
19216 | # in which case we are not to be found in the path. | |
19217 | if test "x$as_myself" = x; then | |
19218 | as_myself=$0 | |
19219 | fi | |
19220 | if test ! -f "$as_myself"; then | |
19221 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
19222 | exit 1 | |
19223 | fi | |
19224 | ||
19225 | # Unset variables that we do not need and which cause bugs (e.g. in | |
19226 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
19227 | # suppresses any "Segmentation fault" message there. '((' could | |
19228 | # trigger a bug in pdksh 5.2.14. | |
19229 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
19230 | do eval test x\${$as_var+set} = xset \ | |
19231 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
19232 | done | |
bec39cab AC |
19233 | PS1='$ ' |
19234 | PS2='> ' | |
19235 | PS4='+ ' | |
19236 | ||
19237 | # NLS nuisances. | |
81ecdfbb RW |
19238 | LC_ALL=C |
19239 | export LC_ALL | |
19240 | LANGUAGE=C | |
19241 | export LANGUAGE | |
19242 | ||
19243 | # CDPATH. | |
19244 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
19245 | ||
19246 | ||
d0ac1c44 SM |
19247 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
19248 | # ---------------------------------------- | |
81ecdfbb RW |
19249 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
19250 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 19251 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
19252 | as_fn_error () |
19253 | { | |
d0ac1c44 SM |
19254 | as_status=$1; test $as_status -eq 0 && as_status=1 |
19255 | if test "$4"; then | |
19256 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
19257 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 19258 | fi |
d0ac1c44 | 19259 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
19260 | as_fn_exit $as_status |
19261 | } # as_fn_error | |
19262 | ||
19263 | ||
19264 | # as_fn_set_status STATUS | |
19265 | # ----------------------- | |
19266 | # Set $? to STATUS, without forking. | |
19267 | as_fn_set_status () | |
19268 | { | |
19269 | return $1 | |
19270 | } # as_fn_set_status | |
19271 | ||
19272 | # as_fn_exit STATUS | |
19273 | # ----------------- | |
19274 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
19275 | as_fn_exit () | |
19276 | { | |
19277 | set +e | |
19278 | as_fn_set_status $1 | |
19279 | exit $1 | |
19280 | } # as_fn_exit | |
19281 | ||
19282 | # as_fn_unset VAR | |
19283 | # --------------- | |
19284 | # Portably unset VAR. | |
19285 | as_fn_unset () | |
19286 | { | |
19287 | { eval $1=; unset $1;} | |
19288 | } | |
19289 | as_unset=as_fn_unset | |
19290 | # as_fn_append VAR VALUE | |
19291 | # ---------------------- | |
19292 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
19293 | # advantage of any shell optimizations that allow amortized linear growth over | |
19294 | # repeated appends, instead of the typical quadratic growth present in naive | |
19295 | # implementations. | |
19296 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
19297 | eval 'as_fn_append () | |
19298 | { | |
19299 | eval $1+=\$2 | |
19300 | }' | |
19301 | else | |
19302 | as_fn_append () | |
19303 | { | |
19304 | eval $1=\$$1\$2 | |
19305 | } | |
19306 | fi # as_fn_append | |
19307 | ||
19308 | # as_fn_arith ARG... | |
19309 | # ------------------ | |
19310 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
19311 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
19312 | # must be portable across $(()) and expr. | |
19313 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
19314 | eval 'as_fn_arith () | |
19315 | { | |
19316 | as_val=$(( $* )) | |
19317 | }' | |
19318 | else | |
19319 | as_fn_arith () | |
19320 | { | |
19321 | as_val=`expr "$@" || test $? -eq 1` | |
19322 | } | |
19323 | fi # as_fn_arith | |
bec39cab | 19324 | |
81ecdfbb RW |
19325 | |
19326 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
19327 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
19328 | as_expr=expr |
19329 | else | |
19330 | as_expr=false | |
19331 | fi | |
19332 | ||
81ecdfbb | 19333 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
19334 | as_basename=basename |
19335 | else | |
19336 | as_basename=false | |
19337 | fi | |
19338 | ||
81ecdfbb RW |
19339 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
19340 | as_dirname=dirname | |
19341 | else | |
19342 | as_dirname=false | |
19343 | fi | |
bec39cab | 19344 | |
81ecdfbb | 19345 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
19346 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
19347 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
19348 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
19349 | $as_echo X/"$0" | | |
19350 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
19351 | s//\1/ | |
19352 | q | |
19353 | } | |
19354 | /^X\/\(\/\/\)$/{ | |
19355 | s//\1/ | |
19356 | q | |
19357 | } | |
19358 | /^X\/\(\/\).*/{ | |
19359 | s//\1/ | |
19360 | q | |
19361 | } | |
19362 | s/.*/./; q'` | |
b4e70030 | 19363 | |
b4e70030 JB |
19364 | # Avoid depending upon Character Ranges. |
19365 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
19366 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
19367 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
19368 | as_cr_digits='0123456789' | |
19369 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
19370 | ||
81ecdfbb RW |
19371 | ECHO_C= ECHO_N= ECHO_T= |
19372 | case `echo -n x` in #((((( | |
19373 | -n*) | |
19374 | case `echo 'xy\c'` in | |
19375 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
19376 | xy) ECHO_C='\c';; | |
19377 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
19378 | ECHO_T=' ';; | |
19379 | esac;; | |
19380 | *) | |
19381 | ECHO_N='-n';; | |
bec39cab AC |
19382 | esac |
19383 | ||
81ecdfbb RW |
19384 | rm -f conf$$ conf$$.exe conf$$.file |
19385 | if test -d conf$$.dir; then | |
19386 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 19387 | else |
81ecdfbb RW |
19388 | rm -f conf$$.dir |
19389 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 19390 | fi |
81ecdfbb RW |
19391 | if (echo >conf$$.file) 2>/dev/null; then |
19392 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 19393 | as_ln_s='ln -s' |
81ecdfbb RW |
19394 | # ... but there are two gotchas: |
19395 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
19396 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 19397 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 19398 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 19399 | as_ln_s='cp -pR' |
81ecdfbb RW |
19400 | elif ln conf$$.file conf$$ 2>/dev/null; then |
19401 | as_ln_s=ln | |
19402 | else | |
d0ac1c44 | 19403 | as_ln_s='cp -pR' |
b4e70030 | 19404 | fi |
bec39cab | 19405 | else |
d0ac1c44 | 19406 | as_ln_s='cp -pR' |
bec39cab | 19407 | fi |
81ecdfbb RW |
19408 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
19409 | rmdir conf$$.dir 2>/dev/null | |
19410 | ||
19411 | ||
19412 | # as_fn_mkdir_p | |
19413 | # ------------- | |
19414 | # Create "$as_dir" as a directory, including parents if necessary. | |
19415 | as_fn_mkdir_p () | |
19416 | { | |
19417 | ||
19418 | case $as_dir in #( | |
19419 | -*) as_dir=./$as_dir;; | |
19420 | esac | |
19421 | test -d "$as_dir" || eval $as_mkdir_p || { | |
19422 | as_dirs= | |
19423 | while :; do | |
19424 | case $as_dir in #( | |
19425 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
19426 | *) as_qdir=$as_dir;; | |
19427 | esac | |
19428 | as_dirs="'$as_qdir' $as_dirs" | |
19429 | as_dir=`$as_dirname -- "$as_dir" || | |
19430 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
19431 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
19432 | X"$as_dir" : 'X\(//\)$' \| \ | |
19433 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
19434 | $as_echo X"$as_dir" | | |
19435 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
19436 | s//\1/ | |
19437 | q | |
19438 | } | |
19439 | /^X\(\/\/\)[^/].*/{ | |
19440 | s//\1/ | |
19441 | q | |
19442 | } | |
19443 | /^X\(\/\/\)$/{ | |
19444 | s//\1/ | |
19445 | q | |
19446 | } | |
19447 | /^X\(\/\).*/{ | |
19448 | s//\1/ | |
19449 | q | |
19450 | } | |
19451 | s/.*/./; q'` | |
19452 | test -d "$as_dir" && break | |
19453 | done | |
19454 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 19455 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb | 19456 | |
bec39cab | 19457 | |
81ecdfbb | 19458 | } # as_fn_mkdir_p |
bec39cab | 19459 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 19460 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
19461 | else |
19462 | test -d ./-p && rmdir ./-p | |
19463 | as_mkdir_p=false | |
19464 | fi | |
19465 | ||
d0ac1c44 SM |
19466 | |
19467 | # as_fn_executable_p FILE | |
19468 | # ----------------------- | |
19469 | # Test if FILE is an executable regular file. | |
19470 | as_fn_executable_p () | |
19471 | { | |
19472 | test -f "$1" && test -x "$1" | |
19473 | } # as_fn_executable_p | |
19474 | as_test_x='test -x' | |
19475 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
19476 | |
19477 | # Sed expression to map a string onto a valid CPP name. | |
19478 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
19479 | ||
19480 | # Sed expression to map a string onto a valid variable name. | |
19481 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
19482 | ||
19483 | ||
bec39cab | 19484 | exec 6>&1 |
81ecdfbb RW |
19485 | ## ----------------------------------- ## |
19486 | ## Main body of $CONFIG_STATUS script. ## | |
19487 | ## ----------------------------------- ## | |
19488 | _ASEOF | |
19489 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
19490 | ||
19491 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
19492 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 19493 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
19494 | # values after options handling. |
19495 | ac_log=" | |
bec39cab | 19496 | This file was extended by $as_me, which was |
d0ac1c44 | 19497 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
19498 | |
19499 | CONFIG_FILES = $CONFIG_FILES | |
19500 | CONFIG_HEADERS = $CONFIG_HEADERS | |
19501 | CONFIG_LINKS = $CONFIG_LINKS | |
19502 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
19503 | $ $0 $@ | |
19504 | ||
81ecdfbb RW |
19505 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
19506 | " | |
19507 | ||
bec39cab AC |
19508 | _ACEOF |
19509 | ||
81ecdfbb RW |
19510 | case $ac_config_files in *" |
19511 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
19512 | esac | |
234b45d4 | 19513 | |
81ecdfbb RW |
19514 | case $ac_config_headers in *" |
19515 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
19516 | esac | |
b4e70030 | 19517 | |
b4e70030 | 19518 | |
81ecdfbb RW |
19519 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
19520 | # Files that config.status was made for. | |
19521 | config_files="$ac_config_files" | |
19522 | config_headers="$ac_config_headers" | |
19523 | config_links="$ac_config_links" | |
19524 | config_commands="$ac_config_commands" | |
234b45d4 | 19525 | |
81ecdfbb | 19526 | _ACEOF |
b4e70030 | 19527 | |
81ecdfbb | 19528 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 19529 | ac_cs_usage="\ |
81ecdfbb RW |
19530 | \`$as_me' instantiates files and other configuration actions |
19531 | from templates according to the current configuration. Unless the files | |
19532 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 19533 | |
81ecdfbb | 19534 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 19535 | |
bec39cab | 19536 | -h, --help print this help, then exit |
81ecdfbb | 19537 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 19538 | --config print configuration, then exit |
81ecdfbb RW |
19539 | -q, --quiet, --silent |
19540 | do not print progress messages | |
bec39cab AC |
19541 | -d, --debug don't remove temporary files |
19542 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
19543 | --file=FILE[:TEMPLATE] |
19544 | instantiate the configuration file FILE | |
19545 | --header=FILE[:TEMPLATE] | |
19546 | instantiate the configuration header FILE | |
234b45d4 | 19547 | |
bec39cab AC |
19548 | Configuration files: |
19549 | $config_files | |
234b45d4 | 19550 | |
bec39cab AC |
19551 | Configuration headers: |
19552 | $config_headers | |
234b45d4 | 19553 | |
bec39cab AC |
19554 | Configuration links: |
19555 | $config_links | |
234b45d4 | 19556 | |
bec39cab AC |
19557 | Configuration commands: |
19558 | $config_commands | |
19559 | ||
81ecdfbb | 19560 | Report bugs to the package provider." |
b4e70030 | 19561 | |
81ecdfbb RW |
19562 | _ACEOF |
19563 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 19564 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
19565 | ac_cs_version="\\ |
19566 | config.status | |
d0ac1c44 SM |
19567 | configured by $0, generated by GNU Autoconf 2.69, |
19568 | with options \\"\$ac_cs_config\\" | |
bec39cab | 19569 | |
d0ac1c44 | 19570 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
19571 | This config.status script is free software; the Free Software Foundation |
19572 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
19573 | |
19574 | ac_pwd='$ac_pwd' | |
19575 | srcdir='$srcdir' | |
19576 | INSTALL='$INSTALL' | |
81ecdfbb RW |
19577 | AWK='$AWK' |
19578 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
19579 | _ACEOF |
19580 | ||
81ecdfbb RW |
19581 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
19582 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
19583 | ac_need_defaults=: |
19584 | while test $# != 0 | |
19585 | do | |
19586 | case $1 in | |
d0ac1c44 | 19587 | --*=?*) |
81ecdfbb RW |
19588 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
19589 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 19590 | ac_shift=: |
c906108c | 19591 | ;; |
d0ac1c44 SM |
19592 | --*=) |
19593 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
19594 | ac_optarg= | |
19595 | ac_shift=: | |
19596 | ;; | |
81ecdfbb | 19597 | *) |
bec39cab AC |
19598 | ac_option=$1 |
19599 | ac_optarg=$2 | |
19600 | ac_shift=shift | |
c906108c | 19601 | ;; |
bec39cab | 19602 | esac |
c906108c | 19603 | |
bec39cab AC |
19604 | case $ac_option in |
19605 | # Handling of the options. | |
bec39cab AC |
19606 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
19607 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
19608 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
19609 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
19610 | --config | --confi | --conf | --con | --co | --c ) |
19611 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 19612 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
19613 | debug=: ;; |
19614 | --file | --fil | --fi | --f ) | |
19615 | $ac_shift | |
81ecdfbb RW |
19616 | case $ac_optarg in |
19617 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 19618 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
19619 | esac |
19620 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
19621 | ac_need_defaults=false;; |
19622 | --header | --heade | --head | --hea ) | |
19623 | $ac_shift | |
81ecdfbb RW |
19624 | case $ac_optarg in |
19625 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
19626 | esac | |
19627 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 19628 | ac_need_defaults=false;; |
81ecdfbb RW |
19629 | --he | --h) |
19630 | # Conflict between --help and --header | |
d0ac1c44 | 19631 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
19632 | Try \`$0 --help' for more information.";; |
19633 | --help | --hel | -h ) | |
19634 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
19635 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
19636 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
19637 | ac_cs_silent=: ;; | |
c906108c | 19638 | |
bec39cab | 19639 | # This is an error. |
d0ac1c44 | 19640 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 19641 | Try \`$0 --help' for more information." ;; |
c906108c | 19642 | |
81ecdfbb RW |
19643 | *) as_fn_append ac_config_targets " $1" |
19644 | ac_need_defaults=false ;; | |
c906108c | 19645 | |
bec39cab AC |
19646 | esac |
19647 | shift | |
19648 | done | |
c906108c | 19649 | |
bec39cab | 19650 | ac_configure_extra_args= |
c906108c | 19651 | |
bec39cab AC |
19652 | if $ac_cs_silent; then |
19653 | exec 6>/dev/null | |
19654 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
19655 | fi | |
c906108c | 19656 | |
bec39cab | 19657 | _ACEOF |
81ecdfbb | 19658 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 19659 | if \$ac_cs_recheck; then |
d0ac1c44 | 19660 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
19661 | shift |
19662 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
19663 | CONFIG_SHELL='$SHELL' | |
19664 | export CONFIG_SHELL | |
19665 | exec "\$@" | |
bec39cab AC |
19666 | fi |
19667 | ||
19668 | _ACEOF | |
81ecdfbb RW |
19669 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
19670 | exec 5>>config.log | |
19671 | { | |
19672 | echo | |
19673 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
19674 | ## Running $as_me. ## | |
19675 | _ASBOX | |
19676 | $as_echo "$ac_log" | |
19677 | } >&5 | |
bec39cab | 19678 | |
81ecdfbb RW |
19679 | _ACEOF |
19680 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 19681 | # |
81ecdfbb | 19682 | # INIT-COMMANDS |
c906108c | 19683 | # |
a417dc56 | 19684 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
a0a461e5 | 19685 | GDB_NM_FILE=$GDB_NM_FILE |
b4e70030 | 19686 | |
bec39cab AC |
19687 | _ACEOF |
19688 | ||
81ecdfbb | 19689 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 19690 | |
81ecdfbb | 19691 | # Handling of arguments. |
bec39cab | 19692 | for ac_config_target in $ac_config_targets |
c906108c | 19693 | do |
81ecdfbb RW |
19694 | case $ac_config_target in |
19695 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
19696 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 19697 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
a0a461e5 | 19698 | "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;; |
b292c783 | 19699 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 19700 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 19701 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
141ec9f6 | 19702 | "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; |
5ae98d25 | 19703 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 19704 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb | 19705 | |
d0ac1c44 | 19706 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c906108c SS |
19707 | esac |
19708 | done | |
19709 | ||
81ecdfbb | 19710 | |
bec39cab AC |
19711 | # If the user did not use the arguments to specify the items to instantiate, |
19712 | # then the envvar interface is used. Set only those that are not. | |
19713 | # We use the long form for the default assignment because of an extremely | |
19714 | # bizarre bug on SunOS 4.1.3. | |
19715 | if $ac_need_defaults; then | |
19716 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
19717 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
19718 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
19719 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
19720 | fi | |
19721 | ||
b4e70030 | 19722 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 19723 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 19724 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
19725 | # Hook for its removal unless debugging. |
19726 | # Note that there is a small window in which the directory will not be cleaned: | |
19727 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
19728 | $debug || |
19729 | { | |
d0ac1c44 | 19730 | tmp= ac_tmp= |
81ecdfbb | 19731 | trap 'exit_status=$? |
d0ac1c44 SM |
19732 | : "${ac_tmp:=$tmp}" |
19733 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
19734 | ' 0 |
19735 | trap 'as_fn_exit 1' 1 2 13 15 | |
19736 | } | |
19737 | # Create a (secure) tmp directory for tmp files. | |
19738 | ||
19739 | { | |
19740 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 19741 | test -d "$tmp" |
81ecdfbb RW |
19742 | } || |
19743 | { | |
19744 | tmp=./conf$$-$RANDOM | |
19745 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
19746 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
19747 | ac_tmp=$tmp | |
81ecdfbb RW |
19748 | |
19749 | # Set up the scripts for CONFIG_FILES section. | |
19750 | # No need to generate them if there are no CONFIG_FILES. | |
19751 | # This happens for instance with `./config.status config.h'. | |
19752 | if test -n "$CONFIG_FILES"; then | |
19753 | ||
19754 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
19755 | ac_cs_awk_getline=: | |
19756 | ac_cs_awk_pipe_init= | |
19757 | ac_cs_awk_read_file=' | |
19758 | while ((getline aline < (F[key])) > 0) | |
19759 | print(aline) | |
19760 | close(F[key])' | |
19761 | ac_cs_awk_pipe_fini= | |
19762 | else | |
19763 | ac_cs_awk_getline=false | |
19764 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
19765 | ac_cs_awk_read_file=' | |
19766 | print "|#_!!_#|" | |
19767 | print "cat " F[key] " &&" | |
19768 | '$ac_cs_awk_pipe_init | |
19769 | # The final `:' finishes the AND list. | |
19770 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
19771 | fi | |
19772 | ac_cr=`echo X | tr X '\015'` | |
19773 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
19774 | # But we know of no other shell where ac_cr would be empty at this | |
19775 | # point, so we can use a bashism as a fallback. | |
19776 | if test "x$ac_cr" = x; then | |
19777 | eval ac_cr=\$\'\\r\' | |
19778 | fi | |
19779 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
19780 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 19781 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
19782 | else |
19783 | ac_cs_awk_cr=$ac_cr | |
19784 | fi | |
19785 | ||
d0ac1c44 | 19786 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
19787 | _ACEOF |
19788 | ||
19789 | # Create commands to substitute file output variables. | |
19790 | { | |
19791 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d0ac1c44 | 19792 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
81ecdfbb RW |
19793 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
19794 | echo "_ACAWK" && | |
19795 | echo "_ACEOF" | |
19796 | } >conf$$files.sh && | |
19797 | . ./conf$$files.sh || | |
d0ac1c44 | 19798 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
19799 | rm -f conf$$files.sh |
19800 | ||
19801 | { | |
19802 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
19803 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
19804 | echo "_ACEOF" | |
19805 | } >conf$$subs.sh || | |
d0ac1c44 SM |
19806 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
19807 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
19808 | ac_delim='%!_!# ' |
19809 | for ac_last_try in false false false false false :; do | |
19810 | . ./conf$$subs.sh || | |
d0ac1c44 | 19811 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
19812 | |
19813 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
19814 | if test $ac_delim_n = $ac_delim_num; then | |
19815 | break | |
19816 | elif $ac_last_try; then | |
d0ac1c44 | 19817 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
19818 | else |
19819 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
19820 | fi | |
19821 | done | |
19822 | rm -f conf$$subs.sh | |
19823 | ||
19824 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 19825 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
19826 | _ACEOF |
19827 | sed -n ' | |
19828 | h | |
19829 | s/^/S["/; s/!.*/"]=/ | |
19830 | p | |
19831 | g | |
19832 | s/^[^!]*!// | |
19833 | :repl | |
19834 | t repl | |
19835 | s/'"$ac_delim"'$// | |
19836 | t delim | |
19837 | :nl | |
19838 | h | |
d0ac1c44 | 19839 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
19840 | t more1 |
19841 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
19842 | p | |
19843 | n | |
19844 | b repl | |
19845 | :more1 | |
19846 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
19847 | p | |
19848 | g | |
19849 | s/.\{148\}// | |
19850 | t nl | |
19851 | :delim | |
19852 | h | |
d0ac1c44 | 19853 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
19854 | t more2 |
19855 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
19856 | p | |
19857 | b | |
19858 | :more2 | |
19859 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
19860 | p | |
19861 | g | |
19862 | s/.\{148\}// | |
19863 | t delim | |
19864 | ' <conf$$subs.awk | sed ' | |
19865 | /^[^""]/{ | |
19866 | N | |
19867 | s/\n// | |
19868 | } | |
19869 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
19870 | rm -f conf$$subs.awk | |
19871 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
19872 | _ACAWK | |
d0ac1c44 | 19873 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
19874 | for (key in S) S_is_set[key] = 1 |
19875 | FS = "\a" | |
19876 | \$ac_cs_awk_pipe_init | |
19877 | } | |
19878 | { | |
19879 | line = $ 0 | |
19880 | nfields = split(line, field, "@") | |
19881 | substed = 0 | |
19882 | len = length(field[1]) | |
19883 | for (i = 2; i < nfields; i++) { | |
19884 | key = field[i] | |
19885 | keylen = length(key) | |
19886 | if (S_is_set[key]) { | |
19887 | value = S[key] | |
19888 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
19889 | len += length(value) + length(field[++i]) | |
19890 | substed = 1 | |
19891 | } else | |
19892 | len += 1 + keylen | |
19893 | } | |
19894 | if (nfields == 3 && !substed) { | |
19895 | key = field[2] | |
19896 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
19897 | \$ac_cs_awk_read_file | |
19898 | next | |
19899 | } | |
19900 | } | |
19901 | print line | |
b4e70030 | 19902 | } |
81ecdfbb RW |
19903 | \$ac_cs_awk_pipe_fini |
19904 | _ACAWK | |
19905 | _ACEOF | |
19906 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
19907 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
19908 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
19909 | else | |
19910 | cat | |
d0ac1c44 SM |
19911 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
19912 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
81ecdfbb RW |
19913 | _ACEOF |
19914 | ||
d0ac1c44 SM |
19915 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
19916 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
19917 | # trailing colons and then remove the whole line if VPATH becomes empty |
19918 | # (actually we leave an empty line to preserve line numbers). | |
19919 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
19920 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
19921 | h | |
19922 | s/// | |
19923 | s/^/:/ | |
19924 | s/[ ]*$/:/ | |
19925 | s/:\$(srcdir):/:/g | |
19926 | s/:\${srcdir}:/:/g | |
19927 | s/:@srcdir@:/:/g | |
19928 | s/^:*// | |
81ecdfbb | 19929 | s/:*$// |
d0ac1c44 SM |
19930 | x |
19931 | s/\(=[ ]*\).*/\1/ | |
19932 | G | |
19933 | s/\n// | |
81ecdfbb RW |
19934 | s/^[^=]*=[ ]*$// |
19935 | }' | |
19936 | fi | |
19937 | ||
19938 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
19939 | fi # test -n "$CONFIG_FILES" | |
19940 | ||
19941 | # Set up the scripts for CONFIG_HEADERS section. | |
19942 | # No need to generate them if there are no CONFIG_HEADERS. | |
19943 | # This happens for instance with `./config.status Makefile'. | |
19944 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 19945 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb RW |
19946 | BEGIN { |
19947 | _ACEOF | |
19948 | ||
19949 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
19950 | # here-document in config.status, that substitutes the proper values into | |
19951 | # config.h.in to produce config.h. | |
4e8d927d | 19952 | |
81ecdfbb RW |
19953 | # Create a delimiter string that does not exist in confdefs.h, to ease |
19954 | # handling of long lines. | |
19955 | ac_delim='%!_!# ' | |
19956 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
19957 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
19958 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
19959 | break |
19960 | elif $ac_last_try; then | |
d0ac1c44 | 19961 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
19962 | else |
19963 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
19964 | fi | |
19965 | done | |
4e8d927d | 19966 | |
81ecdfbb RW |
19967 | # For the awk script, D is an array of macro values keyed by name, |
19968 | # likewise P contains macro parameters if any. Preserve backslash | |
19969 | # newline sequences. | |
19970 | ||
19971 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
19972 | sed -n ' | |
19973 | s/.\{148\}/&'"$ac_delim"'/g | |
19974 | t rset | |
19975 | :rset | |
19976 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
19977 | t def | |
19978 | d | |
19979 | :def | |
19980 | s/\\$// | |
19981 | t bsnl | |
19982 | s/["\\]/\\&/g | |
19983 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
19984 | D["\1"]=" \3"/p | |
19985 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
19986 | d | |
19987 | :bsnl | |
19988 | s/["\\]/\\&/g | |
19989 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
19990 | D["\1"]=" \3\\\\\\n"\\/p | |
19991 | t cont | |
19992 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
19993 | t cont | |
19994 | d | |
19995 | :cont | |
19996 | n | |
19997 | s/.\{148\}/&'"$ac_delim"'/g | |
19998 | t clear | |
19999 | :clear | |
20000 | s/\\$// | |
20001 | t bsnlc | |
20002 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
20003 | d | |
20004 | :bsnlc | |
20005 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
20006 | b cont | |
20007 | ' <confdefs.h | sed ' | |
20008 | s/'"$ac_delim"'/"\\\ | |
20009 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
20010 | ||
20011 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20012 | for (key in D) D_is_set[key] = 1 | |
20013 | FS = "\a" | |
20014 | } | |
20015 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
20016 | line = \$ 0 | |
20017 | split(line, arg, " ") | |
20018 | if (arg[1] == "#") { | |
20019 | defundef = arg[2] | |
20020 | mac1 = arg[3] | |
20021 | } else { | |
20022 | defundef = substr(arg[1], 2) | |
20023 | mac1 = arg[2] | |
20024 | } | |
20025 | split(mac1, mac2, "(") #) | |
20026 | macro = mac2[1] | |
20027 | prefix = substr(line, 1, index(line, defundef) - 1) | |
20028 | if (D_is_set[macro]) { | |
20029 | # Preserve the white space surrounding the "#". | |
20030 | print prefix "define", macro P[macro] D[macro] | |
20031 | next | |
20032 | } else { | |
20033 | # Replace #undef with comments. This is necessary, for example, | |
20034 | # in the case of _POSIX_SOURCE, which is predefined and required | |
20035 | # on some systems where configure will not decide to define it. | |
20036 | if (defundef == "undef") { | |
20037 | print "/*", prefix defundef, macro, "*/" | |
20038 | next | |
20039 | } | |
20040 | } | |
b4e70030 | 20041 | } |
81ecdfbb RW |
20042 | { print } |
20043 | _ACAWK | |
b4e70030 | 20044 | _ACEOF |
81ecdfbb | 20045 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 20046 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb | 20047 | fi # test -n "$CONFIG_HEADERS" |
4e8d927d | 20048 | |
4e8d927d | 20049 | |
81ecdfbb RW |
20050 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
20051 | shift | |
20052 | for ac_tag | |
20053 | do | |
20054 | case $ac_tag in | |
20055 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
20056 | esac | |
20057 | case $ac_mode$ac_tag in | |
20058 | :[FHL]*:*);; | |
d0ac1c44 | 20059 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
20060 | :[FH]-) ac_tag=-:-;; |
20061 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
20062 | esac | |
20063 | ac_save_IFS=$IFS | |
20064 | IFS=: | |
20065 | set x $ac_tag | |
20066 | IFS=$ac_save_IFS | |
20067 | shift | |
20068 | ac_file=$1 | |
20069 | shift | |
4e8d927d | 20070 | |
81ecdfbb RW |
20071 | case $ac_mode in |
20072 | :L) ac_source=$1;; | |
20073 | :[FH]) | |
20074 | ac_file_inputs= | |
20075 | for ac_f | |
20076 | do | |
20077 | case $ac_f in | |
d0ac1c44 | 20078 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
20079 | *) # Look for the file first in the build tree, then in the source tree |
20080 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
20081 | # because $ac_f cannot contain `:'. | |
20082 | test -f "$ac_f" || | |
20083 | case $ac_f in | |
20084 | [\\/$]*) false;; | |
20085 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
20086 | esac || | |
d0ac1c44 | 20087 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
20088 | esac |
20089 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
20090 | as_fn_append ac_file_inputs " '$ac_f'" | |
20091 | done | |
20092 | ||
20093 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
20094 | # use $as_me), people would be surprised to read: | |
20095 | # /* config.h. Generated by config.status. */ | |
20096 | configure_input='Generated from '` | |
20097 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
20098 | `' by configure.' | |
20099 | if test x"$ac_file" != x-; then | |
20100 | configure_input="$ac_file. $configure_input" | |
20101 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
20102 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 20103 | fi |
81ecdfbb RW |
20104 | # Neutralize special characters interpreted by sed in replacement strings. |
20105 | case $configure_input in #( | |
20106 | *\&* | *\|* | *\\* ) | |
20107 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
20108 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
20109 | *) ac_sed_conf_input=$configure_input;; | |
20110 | esac | |
4e8d927d | 20111 | |
81ecdfbb | 20112 | case $ac_tag in |
d0ac1c44 SM |
20113 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
20114 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
20115 | esac |
20116 | ;; | |
c906108c SS |
20117 | esac |
20118 | ||
81ecdfbb | 20119 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
20120 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
20121 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
20122 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
20123 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
20124 | $as_echo X"$ac_file" | | |
20125 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
20126 | s//\1/ | |
20127 | q | |
20128 | } | |
20129 | /^X\(\/\/\)[^/].*/{ | |
20130 | s//\1/ | |
20131 | q | |
20132 | } | |
20133 | /^X\(\/\/\)$/{ | |
20134 | s//\1/ | |
20135 | q | |
20136 | } | |
20137 | /^X\(\/\).*/{ | |
20138 | s//\1/ | |
20139 | q | |
20140 | } | |
20141 | s/.*/./; q'` | |
20142 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
20143 | ac_builddir=. |
20144 | ||
81ecdfbb RW |
20145 | case "$ac_dir" in |
20146 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
20147 | *) | |
20148 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
20149 | # A ".." for each directory in $ac_dir_suffix. | |
20150 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
20151 | case $ac_top_builddir_sub in | |
20152 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
20153 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
20154 | esac ;; | |
20155 | esac | |
20156 | ac_abs_top_builddir=$ac_pwd | |
20157 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
20158 | # for backward compatibility: | |
20159 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
20160 | |
20161 | case $srcdir in | |
81ecdfbb | 20162 | .) # We are building in place. |
bec39cab | 20163 | ac_srcdir=. |
81ecdfbb RW |
20164 | ac_top_srcdir=$ac_top_builddir_sub |
20165 | ac_abs_top_srcdir=$ac_pwd ;; | |
20166 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 20167 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
20168 | ac_top_srcdir=$srcdir |
20169 | ac_abs_top_srcdir=$srcdir ;; | |
20170 | *) # Relative name. | |
20171 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
20172 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
20173 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 20174 | esac |
81ecdfbb | 20175 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 20176 | |
c906108c | 20177 | |
81ecdfbb RW |
20178 | case $ac_mode in |
20179 | :F) | |
20180 | # | |
20181 | # CONFIG_FILE | |
20182 | # | |
c906108c | 20183 | |
bec39cab AC |
20184 | case $INSTALL in |
20185 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 20186 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 20187 | esac |
81ecdfbb | 20188 | _ACEOF |
121ce6e5 | 20189 | |
81ecdfbb RW |
20190 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20191 | # If the template does not know about datarootdir, expand it. | |
20192 | # FIXME: This hack should be removed a few years after 2.60. | |
20193 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
20194 | ac_sed_dataroot=' | |
20195 | /datarootdir/ { | |
20196 | p | |
20197 | q | |
20198 | } | |
20199 | /@datadir@/p | |
20200 | /@docdir@/p | |
20201 | /@infodir@/p | |
20202 | /@localedir@/p | |
20203 | /@mandir@/p' | |
20204 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
20205 | *datarootdir*) ac_datarootdir_seen=yes;; | |
20206 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
20207 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
20208 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
20209 | _ACEOF | |
20210 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20211 | ac_datarootdir_hack=' | |
20212 | s&@datadir@&$datadir&g | |
20213 | s&@docdir@&$docdir&g | |
20214 | s&@infodir@&$infodir&g | |
20215 | s&@localedir@&$localedir&g | |
20216 | s&@mandir@&$mandir&g | |
20217 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
20218 | esac | |
4e8d927d | 20219 | _ACEOF |
81ecdfbb RW |
20220 | |
20221 | # Neutralize VPATH when `$srcdir' = `.'. | |
20222 | # Shell code in configure.ac might set extrasub. | |
20223 | # FIXME: do we really want to maintain this feature? | |
20224 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20225 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
20226 | $extrasub |
20227 | _ACEOF | |
81ecdfbb | 20228 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
20229 | :t |
20230 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
20231 | s|@configure_input@|$ac_sed_conf_input|;t t |
20232 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
20233 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
20234 | s&@srcdir@&$ac_srcdir&;t t | |
20235 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
20236 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
20237 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
20238 | s&@builddir@&$ac_builddir&;t t | |
20239 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
20240 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
20241 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
20242 | $ac_datarootdir_hack |
20243 | " | |
20244 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
20245 | if $ac_cs_awk_getline; then | |
d0ac1c44 | 20246 | $AWK -f "$ac_tmp/subs.awk" |
81ecdfbb | 20247 | else |
d0ac1c44 SM |
20248 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
20249 | fi \ | |
20250 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
20251 | |
20252 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
20253 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
20254 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
20255 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 20256 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 20257 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 20258 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 20259 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 20260 | |
d0ac1c44 | 20261 | rm -f "$ac_tmp/stdin" |
bec39cab | 20262 | case $ac_file in |
d0ac1c44 SM |
20263 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
20264 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 20265 | esac \ |
d0ac1c44 | 20266 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
20267 | ;; |
20268 | :H) | |
20269 | # | |
20270 | # CONFIG_HEADER | |
20271 | # | |
bec39cab | 20272 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
20273 | { |
20274 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
20275 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
20276 | } >"$ac_tmp/config.h" \ | |
20277 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
20278 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
20279 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
20280 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 20281 | else |
81ecdfbb | 20282 | rm -f "$ac_file" |
d0ac1c44 SM |
20283 | mv "$ac_tmp/config.h" "$ac_file" \ |
20284 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
20285 | fi |
20286 | else | |
81ecdfbb | 20287 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
20288 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
20289 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
bec39cab | 20290 | fi |
81ecdfbb RW |
20291 | ;; |
20292 | :L) | |
20293 | # | |
20294 | # CONFIG_LINK | |
20295 | # | |
c906108c | 20296 | |
81ecdfbb RW |
20297 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
20298 | : | |
b4e70030 | 20299 | else |
81ecdfbb RW |
20300 | # Prefer the file from the source tree if names are identical. |
20301 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
20302 | ac_source=$srcdir/$ac_source | |
20303 | fi | |
b4e70030 | 20304 | |
81ecdfbb RW |
20305 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
20306 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 20307 | |
81ecdfbb | 20308 | if test ! -r "$ac_source"; then |
d0ac1c44 | 20309 | as_fn_error $? "$ac_source: file not found" "$LINENO" 5 |
81ecdfbb RW |
20310 | fi |
20311 | rm -f "$ac_file" | |
bec39cab | 20312 | |
81ecdfbb | 20313 | # Try a relative symlink, then a hard link, then a copy. |
d0ac1c44 | 20314 | case $ac_source in |
81ecdfbb RW |
20315 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; |
20316 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
20317 | esac | |
20318 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
20319 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
20320 | cp -p "$ac_source" "$ac_file" || | |
d0ac1c44 | 20321 | as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 |
81ecdfbb RW |
20322 | fi |
20323 | ;; | |
20324 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
20325 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
20326 | ;; | |
c906108c | 20327 | esac |
b4e70030 | 20328 | |
bec39cab | 20329 | |
81ecdfbb | 20330 | case $ac_file$ac_mode in |
c5adaa19 | 20331 | "config.h":H) echo > stamp-h ;; |
81ecdfbb | 20332 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
a0a461e5 | 20333 | "nm.h":L) echo > stamp-nmh ;; |
b292c783 | 20334 | "gcore":F) chmod +x gcore ;; |
81ecdfbb | 20335 | |
bec39cab | 20336 | esac |
81ecdfbb | 20337 | done # for ac_tag |
c906108c | 20338 | |
bec39cab | 20339 | |
81ecdfbb | 20340 | as_fn_exit 0 |
bec39cab | 20341 | _ACEOF |
bec39cab AC |
20342 | ac_clean_files=$ac_clean_files_save |
20343 | ||
81ecdfbb | 20344 | test $ac_write_fail = 0 || |
d0ac1c44 | 20345 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 20346 | |
bec39cab AC |
20347 | |
20348 | # configure is writing to config.log, and then calls config.status. | |
20349 | # config.status does its own redirection, appending to config.log. | |
20350 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
20351 | # by configure, so config.status won't be able to write to it; its | |
20352 | # output is simply discarded. So we exec the FD to /dev/null, | |
20353 | # effectively closing config.log, so it can be properly (re)opened and | |
20354 | # appended to by config.status. When coming back to configure, we | |
20355 | # need to make the FD available again. | |
20356 | if test "$no_create" != yes; then | |
20357 | ac_cs_success=: | |
20358 | ac_config_status_args= | |
20359 | test "$silent" = yes && | |
20360 | ac_config_status_args="$ac_config_status_args --quiet" | |
20361 | exec 5>/dev/null | |
20362 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
20363 | exec 5>>config.log | |
20364 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
20365 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 20366 | $ac_cs_success || as_fn_exit 1 |
bec39cab | 20367 | fi |
c906108c | 20368 | |
bec39cab | 20369 | # |
81ecdfbb | 20370 | # CONFIG_SUBDIRS section. |
bec39cab | 20371 | # |
c906108c SS |
20372 | if test "$no_recursion" != yes; then |
20373 | ||
81ecdfbb RW |
20374 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
20375 | # so they do not pile up. | |
c906108c SS |
20376 | ac_sub_configure_args= |
20377 | ac_prev= | |
fdc59709 PB |
20378 | eval "set x $ac_configure_args" |
20379 | shift | |
20380 | for ac_arg | |
20381 | do | |
c906108c SS |
20382 | if test -n "$ac_prev"; then |
20383 | ac_prev= | |
20384 | continue | |
20385 | fi | |
bec39cab | 20386 | case $ac_arg in |
c906108c SS |
20387 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
20388 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
20389 | ac_prev=cache_file ;; | |
20390 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
20391 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
20392 | | --c=*) | |
20393 | ;; | |
20394 | --config-cache | -C) | |
c906108c SS |
20395 | ;; |
20396 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
20397 | ac_prev=srcdir ;; | |
20398 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
20399 | ;; | |
bec39cab AC |
20400 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
20401 | ac_prev=prefix ;; | |
20402 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
20403 | ;; | |
81ecdfbb RW |
20404 | --disable-option-checking) |
20405 | ;; | |
fdc59709 PB |
20406 | *) |
20407 | case $ac_arg in | |
81ecdfbb | 20408 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 20409 | esac |
81ecdfbb | 20410 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
20411 | esac |
20412 | done | |
20413 | ||
bec39cab AC |
20414 | # Always prepend --prefix to ensure using the same prefix |
20415 | # in subdir configurations. | |
fdc59709 PB |
20416 | ac_arg="--prefix=$prefix" |
20417 | case $ac_arg in | |
81ecdfbb | 20418 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 20419 | esac |
81ecdfbb RW |
20420 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
20421 | ||
20422 | # Pass --silent | |
20423 | if test "$silent" = yes; then | |
20424 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
20425 | fi | |
20426 | ||
20427 | # Always prepend --disable-option-checking to silence warnings, since | |
20428 | # different subdirs can have different --enable and --with options. | |
20429 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 20430 | |
b4e70030 | 20431 | ac_popdir=`pwd` |
bec39cab | 20432 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
20433 | |
20434 | # Do not complain, so a configure script can configure whichever | |
20435 | # parts of a large source tree are present. | |
fdc59709 | 20436 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 20437 | |
81ecdfbb RW |
20438 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
20439 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
20440 | $as_echo "$ac_msg" >&6 | |
20441 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
20442 | ac_builddir=. |
20443 | ||
81ecdfbb RW |
20444 | case "$ac_dir" in |
20445 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
20446 | *) | |
20447 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
20448 | # A ".." for each directory in $ac_dir_suffix. | |
20449 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
20450 | case $ac_top_builddir_sub in | |
20451 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
20452 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
20453 | esac ;; | |
20454 | esac | |
20455 | ac_abs_top_builddir=$ac_pwd | |
20456 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
20457 | # for backward compatibility: | |
20458 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
20459 | |
20460 | case $srcdir in | |
81ecdfbb | 20461 | .) # We are building in place. |
bec39cab | 20462 | ac_srcdir=. |
81ecdfbb RW |
20463 | ac_top_srcdir=$ac_top_builddir_sub |
20464 | ac_abs_top_srcdir=$ac_pwd ;; | |
20465 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 20466 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
20467 | ac_top_srcdir=$srcdir |
20468 | ac_abs_top_srcdir=$srcdir ;; | |
20469 | *) # Relative name. | |
20470 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
20471 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
20472 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 20473 | esac |
81ecdfbb | 20474 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 20475 | |
c906108c | 20476 | |
fdc59709 | 20477 | cd "$ac_dir" |
c906108c SS |
20478 | |
20479 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
20480 | if test -f "$ac_srcdir/configure.gnu"; then |
20481 | ac_sub_configure=$ac_srcdir/configure.gnu | |
20482 | elif test -f "$ac_srcdir/configure"; then | |
20483 | ac_sub_configure=$ac_srcdir/configure | |
20484 | elif test -f "$ac_srcdir/configure.in"; then | |
20485 | # This should be Cygnus configure. | |
20486 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 20487 | else |
81ecdfbb RW |
20488 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
20489 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
20490 | ac_sub_configure= |
20491 | fi | |
20492 | ||
20493 | # The recursion is here. | |
20494 | if test -n "$ac_sub_configure"; then | |
c906108c | 20495 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
20496 | case $cache_file in |
20497 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
20498 | *) # Relative name. |
20499 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 20500 | esac |
c906108c | 20501 | |
81ecdfbb RW |
20502 | { $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 |
20503 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 20504 | # The eval makes quoting arguments work. |
fdc59709 PB |
20505 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
20506 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 20507 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
20508 | fi |
20509 | ||
fdc59709 | 20510 | cd "$ac_popdir" |
c906108c SS |
20511 | done |
20512 | fi | |
81ecdfbb RW |
20513 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
20514 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
20515 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
20516 | fi | |
c906108c | 20517 |