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 | |
1776e3e5 NA |
634 | CTF_DEPS |
635 | LIBCTF | |
636 | ENABLE_LIBCTF | |
393fd4c3 YQ |
637 | LTLIBBABELTRACE |
638 | LIBBABELTRACE | |
639 | HAVE_LIBBABELTRACE | |
21ea5acd SDJ |
640 | HAVE_NATIVE_GCORE_HOST |
641 | NAT_GENERATED_FILES | |
642 | XM_CLIBS | |
643 | MH_CFLAGS | |
644 | LOADLIBES | |
645 | NAT_CDEPS | |
646 | NATDEPFILES | |
647 | NAT_FILE | |
81ecdfbb RW |
648 | target_subdir |
649 | CONFIG_UNINSTALL | |
650 | CONFIG_INSTALL | |
651 | CONFIG_CLEAN | |
652 | CONFIG_ALL | |
653 | CONFIG_SRCS | |
654 | CONFIG_DEPS | |
655 | CONFIG_OBS | |
656 | PROFILE_CFLAGS | |
657 | ENABLE_CFLAGS | |
658 | SIM_OBS | |
659 | SIM | |
660 | XMKMF | |
661 | GDBTK_SRC_DIR | |
662 | GDBTK_CFLAGS | |
663 | GDBTKLIBS | |
664 | X_LIBS | |
665 | X_LDFLAGS | |
666 | X_CFLAGS | |
667 | TK_XINCLUDES | |
668 | TK_DEPS | |
669 | TK_LIBRARY | |
670 | TK_INCLUDE | |
671 | TK_STUB_LIB_SPEC | |
672 | TK_STUB_LIB_FLAG | |
673 | TK_STUB_LIB_FILE | |
674 | TK_LIB_SPEC | |
675 | TK_LIB_FLAG | |
676 | TK_LIB_FILE | |
677 | TK_SRC_DIR | |
678 | TK_BIN_DIR | |
679 | TK_VERSION | |
680 | TCL_DEPS | |
681 | TCL_LIBRARY | |
682 | TCL_INCLUDE | |
683 | TCL_STUB_LIB_SPEC | |
684 | TCL_STUB_LIB_FLAG | |
685 | TCL_STUB_LIB_FILE | |
686 | TCL_LIB_SPEC | |
687 | TCL_LIB_FLAG | |
688 | TCL_LIB_FILE | |
689 | TCL_SRC_DIR | |
690 | TCL_BIN_DIR | |
691 | TCL_PATCH_LEVEL | |
692 | TCL_VERSION | |
693 | WIN32LDAPP | |
b2ceabe8 | 694 | WIN32LIBS |
81ecdfbb RW |
695 | GUI_CFLAGS_X |
696 | LIBGUI | |
608e2dbb TT |
697 | LTLIBLZMA |
698 | LIBLZMA | |
699 | HAVE_LIBLZMA | |
81ecdfbb RW |
700 | SER_HARDWIRE |
701 | WERROR_CFLAGS | |
702 | WARN_CFLAGS | |
ed2a2229 | 703 | SYSTEM_GDBINIT_DIR |
81ecdfbb | 704 | SYSTEM_GDBINIT |
81ecdfbb RW |
705 | TARGET_SYSTEM_ROOT |
706 | CONFIG_LDFLAGS | |
f6528abd | 707 | RDYNAMIC |
05ea2a05 TT |
708 | LTLIBIPT |
709 | LIBIPT | |
710 | HAVE_LIBIPT | |
5e030278 TT |
711 | PTHREAD_CFLAGS |
712 | PTHREAD_LIBS | |
713 | PTHREAD_CC | |
714 | ax_pthread_config | |
715 | SED | |
81ecdfbb | 716 | ALLOCA |
62f29fda TT |
717 | SRCHIGH_CFLAGS |
718 | SRCHIGH_LIBS | |
4df42755 DE |
719 | HAVE_GUILE_FALSE |
720 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
721 | GUILE_LIBS |
722 | GUILE_CPPFLAGS | |
e76c5d17 DE |
723 | GUILD_TARGET_FLAG |
724 | GUILD | |
ed3ef339 | 725 | pkg_config_prog_path |
4df42755 DE |
726 | HAVE_PYTHON_FALSE |
727 | HAVE_PYTHON_TRUE | |
ac534cba JB |
728 | PYTHON_LIBS |
729 | PYTHON_CPPFLAGS | |
81ecdfbb | 730 | PYTHON_CFLAGS |
ec685c5e | 731 | python_prog_path |
2400729e UW |
732 | LTLIBMPFR |
733 | LIBMPFR | |
734 | HAVE_LIBMPFR | |
81ecdfbb RW |
735 | LTLIBEXPAT |
736 | LIBEXPAT | |
737 | HAVE_LIBEXPAT | |
b8e0a31c | 738 | JIT_READER_DIR |
f997c383 | 739 | TARGET_PTR |
39037522 | 740 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
741 | READLINE_CFLAGS |
742 | READLINE_DEPS | |
743 | READLINE | |
016a3251 DD |
744 | LTLIBICONV |
745 | LIBICONV | |
711a72d3 L |
746 | zlibinc |
747 | zlibdir | |
81ecdfbb RW |
748 | MIG |
749 | WINDRES | |
750 | DLLTOOL | |
c971b7fa | 751 | AR |
81ecdfbb RW |
752 | YFLAGS |
753 | YACC | |
c971b7fa | 754 | RANLIB |
81ecdfbb | 755 | LN_S |
c971b7fa PA |
756 | INSTALL_DATA |
757 | INSTALL_SCRIPT | |
758 | INSTALL_PROGRAM | |
759 | AWK | |
81ecdfbb RW |
760 | REPORT_BUGS_TEXI |
761 | REPORT_BUGS_TO | |
762 | PKGVERSION | |
44cee4fd | 763 | CODESIGN_CERT |
f6720b1c AM |
764 | DEBUGINFOD_LIBS |
765 | DEBUGINFOD_CFLAGS | |
766 | PKG_CONFIG_LIBDIR | |
767 | PKG_CONFIG_PATH | |
768 | PKG_CONFIG | |
b292c783 | 769 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
770 | TARGET_OBS |
771 | subdirs | |
772 | GDB_DATADIR | |
773 | DEBUGDIR | |
5048e516 JK |
774 | MAKEINFO_EXTRA_FLAGS |
775 | MAKEINFOFLAGS | |
776 | MAKEINFO | |
81ecdfbb | 777 | PACKAGE |
81ecdfbb RW |
778 | CATOBJEXT |
779 | GENCAT | |
780 | INSTOBJEXT | |
781 | DATADIRNAME | |
782 | CATALOGS | |
783 | POSUB | |
784 | GMSGFMT | |
785 | XGETTEXT | |
786 | INCINTL | |
787 | LIBINTL_DEP | |
788 | LIBINTL | |
789 | USE_NLS | |
81ecdfbb RW |
790 | CCDEPMODE |
791 | DEPDIR | |
792 | am__leading_dot | |
0bcda685 PA |
793 | CXX_DIALECT |
794 | HAVE_CXX11 | |
4869db5e RM |
795 | INSTALL_STRIP_PROGRAM |
796 | STRIP | |
797 | install_sh | |
81ecdfbb RW |
798 | target_os |
799 | target_vendor | |
800 | target_cpu | |
801 | target | |
802 | host_os | |
803 | host_vendor | |
804 | host_cpu | |
805 | host | |
806 | build_os | |
807 | build_vendor | |
808 | build_cpu | |
809 | build | |
c971b7fa PA |
810 | EGREP |
811 | GREP | |
812 | CPP | |
3bc3d82a PA |
813 | ac_ct_CXX |
814 | CXXFLAGS | |
815 | CXX | |
81ecdfbb RW |
816 | OBJEXT |
817 | EXEEXT | |
818 | ac_ct_CC | |
819 | CPPFLAGS | |
820 | LDFLAGS | |
821 | CFLAGS | |
822 | CC | |
823 | MAINT | |
824 | MAINTAINER_MODE_FALSE | |
825 | MAINTAINER_MODE_TRUE | |
826 | target_alias | |
827 | host_alias | |
828 | build_alias | |
829 | LIBS | |
830 | ECHO_T | |
831 | ECHO_N | |
832 | ECHO_C | |
833 | DEFS | |
834 | mandir | |
835 | localedir | |
836 | libdir | |
837 | psdir | |
838 | pdfdir | |
839 | dvidir | |
840 | htmldir | |
841 | infodir | |
842 | docdir | |
843 | oldincludedir | |
844 | includedir | |
845 | localstatedir | |
846 | sharedstatedir | |
847 | sysconfdir | |
848 | datadir | |
849 | datarootdir | |
850 | libexecdir | |
851 | sbindir | |
852 | bindir | |
853 | program_transform_name | |
854 | prefix | |
855 | exec_prefix | |
856 | PACKAGE_URL | |
857 | PACKAGE_BUGREPORT | |
858 | PACKAGE_STRING | |
859 | PACKAGE_VERSION | |
860 | PACKAGE_TARNAME | |
861 | PACKAGE_NAME | |
862 | PATH_SEPARATOR | |
863 | SHELL' | |
2b351b19 | 864 | ac_subst_files='nat_makefile_frag' |
81ecdfbb RW |
865 | ac_user_opts=' |
866 | enable_option_checking | |
867 | enable_maintainer_mode | |
da2f07f1 JK |
868 | enable_plugins |
869 | enable_largefile | |
81ecdfbb RW |
870 | with_separate_debug_dir |
871 | with_gdb_datadir | |
872 | with_relocated_sources | |
7349ff92 | 873 | with_auto_load_dir |
bccbefd2 | 874 | with_auto_load_safe_path |
81ecdfbb RW |
875 | enable_targets |
876 | enable_64_bit_bfd | |
81ecdfbb RW |
877 | enable_gdbmi |
878 | enable_tui | |
879 | enable_gdbtk | |
0d79cdc4 | 880 | with_debuginfod |
05e7c244 | 881 | with_libunwind_ia64 |
81ecdfbb RW |
882 | with_curses |
883 | enable_profiling | |
44cee4fd | 884 | enable_codesign |
81ecdfbb RW |
885 | with_pkgversion |
886 | with_bugurl | |
711a72d3 | 887 | with_system_zlib |
016a3251 DD |
888 | with_gnu_ld |
889 | enable_rpath | |
81ecdfbb | 890 | with_libiconv_prefix |
9f1528a1 | 891 | with_libiconv_type |
478aac75 | 892 | with_iconv_bin |
81ecdfbb | 893 | with_system_readline |
b8e0a31c | 894 | with_jit_reader_dir |
81ecdfbb | 895 | with_expat |
81ecdfbb | 896 | with_libexpat_prefix |
9f1528a1 | 897 | with_libexpat_type |
2400729e UW |
898 | with_mpfr |
899 | with_libmpfr_prefix | |
9f1528a1 | 900 | with_libmpfr_type |
81ecdfbb | 901 | with_python |
d13c7322 | 902 | with_python_libdir |
ed3ef339 | 903 | with_guile |
189b8c2e | 904 | enable_source_highlight |
58bfce93 MM |
905 | with_intel_pt |
906 | with_libipt_prefix | |
9f1528a1 | 907 | with_libipt_type |
81ecdfbb RW |
908 | with_included_regex |
909 | with_sysroot | |
910 | with_system_gdbinit | |
ed2a2229 | 911 | with_system_gdbinit_dir |
81ecdfbb RW |
912 | enable_werror |
913 | enable_build_warnings | |
914 | enable_gdb_build_warnings | |
f35d5ade | 915 | enable_ubsan |
608e2dbb TT |
916 | with_lzma |
917 | with_liblzma_prefix | |
9f1528a1 | 918 | with_liblzma_type |
81ecdfbb RW |
919 | with_tcl |
920 | with_tk | |
921 | with_x | |
922 | enable_sim | |
393fd4c3 YQ |
923 | with_babeltrace |
924 | with_libbabeltrace_prefix | |
9f1528a1 | 925 | with_libbabeltrace_type |
ccb1ba62 | 926 | with_xxhash |
1776e3e5 | 927 | enable_libctf |
ccb1ba62 | 928 | with_libxxhash_prefix |
9f1528a1 | 929 | with_libxxhash_type |
8ecfd7bd | 930 | enable_unit_tests |
81ecdfbb RW |
931 | ' |
932 | ac_precious_vars='build_alias | |
933 | host_alias | |
934 | target_alias | |
935 | CC | |
936 | CFLAGS | |
937 | LDFLAGS | |
938 | LIBS | |
939 | CPPFLAGS | |
3bc3d82a PA |
940 | CXX |
941 | CXXFLAGS | |
942 | CCC | |
81ecdfbb | 943 | CPP |
f06e05e0 JK |
944 | MAKEINFO |
945 | MAKEINFOFLAGS | |
f6720b1c AM |
946 | PKG_CONFIG |
947 | PKG_CONFIG_PATH | |
948 | PKG_CONFIG_LIBDIR | |
949 | DEBUGINFOD_CFLAGS | |
950 | DEBUGINFOD_LIBS | |
81ecdfbb RW |
951 | YACC |
952 | YFLAGS | |
953 | XMKMF' | |
5ae98d25 | 954 | ac_subdirs_all='testsuite |
919adfe8 | 955 | gdbtk' |
c906108c SS |
956 | |
957 | # Initialize some variables set by options. | |
bec39cab AC |
958 | ac_init_help= |
959 | ac_init_version=false | |
81ecdfbb RW |
960 | ac_unrecognized_opts= |
961 | ac_unrecognized_sep= | |
c906108c SS |
962 | # The variables have the same names as the options, with |
963 | # dashes changed to underlines. | |
bec39cab | 964 | cache_file=/dev/null |
c906108c | 965 | exec_prefix=NONE |
c906108c | 966 | no_create= |
c906108c SS |
967 | no_recursion= |
968 | prefix=NONE | |
969 | program_prefix=NONE | |
970 | program_suffix=NONE | |
971 | program_transform_name=s,x,x, | |
972 | silent= | |
973 | site= | |
974 | srcdir= | |
c906108c SS |
975 | verbose= |
976 | x_includes=NONE | |
977 | x_libraries=NONE | |
bec39cab AC |
978 | |
979 | # Installation directory options. | |
980 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
981 | # and all the variables that are supposed to be based on exec_prefix | |
982 | # by default will actually change. | |
983 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 984 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
985 | bindir='${exec_prefix}/bin' |
986 | sbindir='${exec_prefix}/sbin' | |
987 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
988 | datarootdir='${prefix}/share' |
989 | datadir='${datarootdir}' | |
c906108c SS |
990 | sysconfdir='${prefix}/etc' |
991 | sharedstatedir='${prefix}/com' | |
992 | localstatedir='${prefix}/var' | |
c906108c SS |
993 | includedir='${prefix}/include' |
994 | oldincludedir='/usr/include' | |
81ecdfbb RW |
995 | docdir='${datarootdir}/doc/${PACKAGE}' |
996 | infodir='${datarootdir}/info' | |
997 | htmldir='${docdir}' | |
998 | dvidir='${docdir}' | |
999 | pdfdir='${docdir}' | |
1000 | psdir='${docdir}' | |
1001 | libdir='${exec_prefix}/lib' | |
1002 | localedir='${datarootdir}/locale' | |
1003 | mandir='${datarootdir}/man' | |
c906108c | 1004 | |
c906108c | 1005 | ac_prev= |
81ecdfbb | 1006 | ac_dashdash= |
c906108c SS |
1007 | for ac_option |
1008 | do | |
c906108c SS |
1009 | # If the previous option needs an argument, assign it. |
1010 | if test -n "$ac_prev"; then | |
81ecdfbb | 1011 | eval $ac_prev=\$ac_option |
c906108c SS |
1012 | ac_prev= |
1013 | continue | |
1014 | fi | |
1015 | ||
81ecdfbb | 1016 | case $ac_option in |
d0ac1c44 SM |
1017 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1018 | *=) ac_optarg= ;; | |
1019 | *) ac_optarg=yes ;; | |
81ecdfbb | 1020 | esac |
c906108c SS |
1021 | |
1022 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1023 | ||
81ecdfbb RW |
1024 | case $ac_dashdash$ac_option in |
1025 | --) | |
1026 | ac_dashdash=yes ;; | |
c906108c SS |
1027 | |
1028 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1029 | ac_prev=bindir ;; | |
1030 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1031 | bindir=$ac_optarg ;; |
c906108c SS |
1032 | |
1033 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1034 | ac_prev=build_alias ;; |
c906108c | 1035 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1036 | build_alias=$ac_optarg ;; |
c906108c SS |
1037 | |
1038 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1039 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1040 | ac_prev=cache_file ;; | |
1041 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1042 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1043 | cache_file=$ac_optarg ;; |
1044 | ||
1045 | --config-cache | -C) | |
1046 | cache_file=config.cache ;; | |
c906108c | 1047 | |
81ecdfbb | 1048 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1049 | ac_prev=datadir ;; |
81ecdfbb | 1050 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1051 | datadir=$ac_optarg ;; |
c906108c | 1052 | |
81ecdfbb RW |
1053 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1054 | | --dataroo | --dataro | --datar) | |
1055 | ac_prev=datarootdir ;; | |
1056 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1057 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1058 | datarootdir=$ac_optarg ;; | |
1059 | ||
c906108c | 1060 | -disable-* | --disable-*) |
81ecdfbb | 1061 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1062 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1063 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1064 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1065 | ac_useropt_orig=$ac_useropt |
1066 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1067 | case $ac_user_opts in | |
1068 | *" | |
1069 | "enable_$ac_useropt" | |
1070 | "*) ;; | |
1071 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1072 | ac_unrecognized_sep=', ';; | |
1073 | esac | |
1074 | eval enable_$ac_useropt=no ;; | |
1075 | ||
1076 | -docdir | --docdir | --docdi | --doc | --do) | |
1077 | ac_prev=docdir ;; | |
1078 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1079 | docdir=$ac_optarg ;; | |
1080 | ||
1081 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1082 | ac_prev=dvidir ;; | |
1083 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1084 | dvidir=$ac_optarg ;; | |
c906108c SS |
1085 | |
1086 | -enable-* | --enable-*) | |
81ecdfbb | 1087 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1088 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1089 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1090 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1091 | ac_useropt_orig=$ac_useropt |
1092 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1093 | case $ac_user_opts in | |
1094 | *" | |
1095 | "enable_$ac_useropt" | |
1096 | "*) ;; | |
1097 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1098 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1099 | esac |
81ecdfbb | 1100 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1101 | |
1102 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1103 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1104 | | --exec | --exe | --ex) | |
1105 | ac_prev=exec_prefix ;; | |
1106 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1107 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1108 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1109 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1110 | |
1111 | -gas | --gas | --ga | --g) | |
1112 | # Obsolete; use --with-gas. | |
1113 | with_gas=yes ;; | |
1114 | ||
bec39cab AC |
1115 | -help | --help | --hel | --he | -h) |
1116 | ac_init_help=long ;; | |
1117 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1118 | ac_init_help=recursive ;; | |
1119 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1120 | ac_init_help=short ;; | |
c906108c SS |
1121 | |
1122 | -host | --host | --hos | --ho) | |
bec39cab | 1123 | ac_prev=host_alias ;; |
c906108c | 1124 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1125 | host_alias=$ac_optarg ;; |
c906108c | 1126 | |
81ecdfbb RW |
1127 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1128 | ac_prev=htmldir ;; | |
1129 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1130 | | --ht=*) | |
1131 | htmldir=$ac_optarg ;; | |
1132 | ||
c906108c SS |
1133 | -includedir | --includedir | --includedi | --included | --include \ |
1134 | | --includ | --inclu | --incl | --inc) | |
1135 | ac_prev=includedir ;; | |
1136 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1137 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1138 | includedir=$ac_optarg ;; |
c906108c SS |
1139 | |
1140 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1141 | ac_prev=infodir ;; | |
1142 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1143 | infodir=$ac_optarg ;; |
c906108c SS |
1144 | |
1145 | -libdir | --libdir | --libdi | --libd) | |
1146 | ac_prev=libdir ;; | |
1147 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1148 | libdir=$ac_optarg ;; |
c906108c SS |
1149 | |
1150 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1151 | | --libexe | --libex | --libe) | |
1152 | ac_prev=libexecdir ;; | |
1153 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1154 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1155 | libexecdir=$ac_optarg ;; |
c906108c | 1156 | |
81ecdfbb RW |
1157 | -localedir | --localedir | --localedi | --localed | --locale) |
1158 | ac_prev=localedir ;; | |
1159 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1160 | localedir=$ac_optarg ;; | |
1161 | ||
c906108c | 1162 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1163 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1164 | ac_prev=localstatedir ;; |
1165 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1166 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1167 | localstatedir=$ac_optarg ;; |
c906108c SS |
1168 | |
1169 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1170 | ac_prev=mandir ;; | |
1171 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1172 | mandir=$ac_optarg ;; |
c906108c SS |
1173 | |
1174 | -nfp | --nfp | --nf) | |
1175 | # Obsolete; use --without-fp. | |
1176 | with_fp=no ;; | |
1177 | ||
1178 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1179 | | --no-cr | --no-c | -n) |
c906108c SS |
1180 | no_create=yes ;; |
1181 | ||
1182 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1183 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1184 | no_recursion=yes ;; | |
1185 | ||
1186 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1187 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1188 | | --oldin | --oldi | --old | --ol | --o) | |
1189 | ac_prev=oldincludedir ;; | |
1190 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1191 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1192 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1193 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1194 | |
1195 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1196 | ac_prev=prefix ;; | |
1197 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1198 | prefix=$ac_optarg ;; |
c906108c SS |
1199 | |
1200 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1201 | | --program-pre | --program-pr | --program-p) | |
1202 | ac_prev=program_prefix ;; | |
1203 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1204 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1205 | program_prefix=$ac_optarg ;; |
c906108c SS |
1206 | |
1207 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1208 | | --program-suf | --program-su | --program-s) | |
1209 | ac_prev=program_suffix ;; | |
1210 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1211 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1212 | program_suffix=$ac_optarg ;; |
c906108c SS |
1213 | |
1214 | -program-transform-name | --program-transform-name \ | |
1215 | | --program-transform-nam | --program-transform-na \ | |
1216 | | --program-transform-n | --program-transform- \ | |
1217 | | --program-transform | --program-transfor \ | |
1218 | | --program-transfo | --program-transf \ | |
1219 | | --program-trans | --program-tran \ | |
1220 | | --progr-tra | --program-tr | --program-t) | |
1221 | ac_prev=program_transform_name ;; | |
1222 | -program-transform-name=* | --program-transform-name=* \ | |
1223 | | --program-transform-nam=* | --program-transform-na=* \ | |
1224 | | --program-transform-n=* | --program-transform-=* \ | |
1225 | | --program-transform=* | --program-transfor=* \ | |
1226 | | --program-transfo=* | --program-transf=* \ | |
1227 | | --program-trans=* | --program-tran=* \ | |
1228 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1229 | program_transform_name=$ac_optarg ;; |
c906108c | 1230 | |
81ecdfbb RW |
1231 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1232 | ac_prev=pdfdir ;; | |
1233 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1234 | pdfdir=$ac_optarg ;; | |
1235 | ||
1236 | -psdir | --psdir | --psdi | --psd | --ps) | |
1237 | ac_prev=psdir ;; | |
1238 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1239 | psdir=$ac_optarg ;; | |
1240 | ||
c906108c SS |
1241 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1242 | | -silent | --silent | --silen | --sile | --sil) | |
1243 | silent=yes ;; | |
1244 | ||
1245 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1246 | ac_prev=sbindir ;; | |
1247 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1248 | | --sbi=* | --sb=*) | |
bec39cab | 1249 | sbindir=$ac_optarg ;; |
c906108c SS |
1250 | |
1251 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1252 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1253 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1254 | | --sha | --sh) | |
1255 | ac_prev=sharedstatedir ;; | |
1256 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1257 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1258 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1259 | | --sha=* | --sh=*) | |
bec39cab | 1260 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1261 | |
1262 | -site | --site | --sit) | |
1263 | ac_prev=site ;; | |
1264 | -site=* | --site=* | --sit=*) | |
bec39cab | 1265 | site=$ac_optarg ;; |
3ace7edb | 1266 | |
c906108c SS |
1267 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1268 | ac_prev=srcdir ;; | |
1269 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1270 | srcdir=$ac_optarg ;; |
c906108c SS |
1271 | |
1272 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1273 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1274 | ac_prev=sysconfdir ;; | |
1275 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1276 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1277 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1278 | |
1279 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1280 | ac_prev=target_alias ;; |
c906108c | 1281 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1282 | target_alias=$ac_optarg ;; |
c906108c SS |
1283 | |
1284 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1285 | verbose=yes ;; | |
1286 | ||
bec39cab AC |
1287 | -version | --version | --versio | --versi | --vers | -V) |
1288 | ac_init_version=: ;; | |
c906108c SS |
1289 | |
1290 | -with-* | --with-*) | |
81ecdfbb | 1291 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1292 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1293 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1294 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1295 | ac_useropt_orig=$ac_useropt |
1296 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1297 | case $ac_user_opts in | |
1298 | *" | |
1299 | "with_$ac_useropt" | |
1300 | "*) ;; | |
1301 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1302 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1303 | esac |
81ecdfbb | 1304 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1305 | |
1306 | -without-* | --without-*) | |
81ecdfbb | 1307 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1308 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1309 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1310 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1311 | ac_useropt_orig=$ac_useropt |
1312 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1313 | case $ac_user_opts in | |
1314 | *" | |
1315 | "with_$ac_useropt" | |
1316 | "*) ;; | |
1317 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1318 | ac_unrecognized_sep=', ';; | |
1319 | esac | |
1320 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1321 | |
1322 | --x) | |
1323 | # Obsolete; use --with-x. | |
1324 | with_x=yes ;; | |
1325 | ||
1326 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1327 | | --x-incl | --x-inc | --x-in | --x-i) | |
1328 | ac_prev=x_includes ;; | |
1329 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1330 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1331 | x_includes=$ac_optarg ;; |
c906108c SS |
1332 | |
1333 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1334 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1335 | ac_prev=x_libraries ;; | |
1336 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1337 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1338 | x_libraries=$ac_optarg ;; |
c906108c | 1339 | |
d0ac1c44 SM |
1340 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1341 | Try \`$0 --help' for more information" | |
c906108c SS |
1342 | ;; |
1343 | ||
bec39cab AC |
1344 | *=*) |
1345 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1346 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1347 | case $ac_envvar in #( |
1348 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1349 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1350 | esac |
1351 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1352 | export $ac_envvar ;; |
1353 | ||
c906108c | 1354 | *) |
bec39cab | 1355 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1356 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1357 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1358 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1359 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
c906108c SS |
1360 | ;; |
1361 | ||
1362 | esac | |
1363 | done | |
1364 | ||
1365 | if test -n "$ac_prev"; then | |
bec39cab | 1366 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1367 | as_fn_error $? "missing argument to $ac_option" |
c906108c | 1368 | fi |
c906108c | 1369 | |
81ecdfbb RW |
1370 | if test -n "$ac_unrecognized_opts"; then |
1371 | case $enable_option_checking in | |
1372 | no) ;; | |
d0ac1c44 | 1373 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1374 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
b4e70030 | 1375 | esac |
81ecdfbb | 1376 | fi |
b4e70030 | 1377 | |
81ecdfbb RW |
1378 | # Check all directory arguments for consistency. |
1379 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1380 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1381 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1382 | libdir localedir mandir | |
b4e70030 | 1383 | do |
81ecdfbb RW |
1384 | eval ac_val=\$$ac_var |
1385 | # Remove trailing slashes. | |
1386 | case $ac_val in | |
1387 | */ ) | |
1388 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1389 | eval $ac_var=\$ac_val;; | |
1390 | esac | |
1391 | # Be sure to have absolute directory names. | |
b4e70030 | 1392 | case $ac_val in |
81ecdfbb RW |
1393 | [\\/$]* | ?:[\\/]* ) continue;; |
1394 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1395 | esac |
d0ac1c44 | 1396 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1397 | done |
1398 | ||
bec39cab AC |
1399 | # There might be people who depend on the old broken behavior: `$host' |
1400 | # used to hold the argument of --host etc. | |
1401 | # FIXME: To remove some day. | |
1402 | build=$build_alias | |
1403 | host=$host_alias | |
1404 | target=$target_alias | |
1405 | ||
1406 | # FIXME: To remove some day. | |
1407 | if test "x$host_alias" != x; then | |
1408 | if test "x$build_alias" = x; then | |
1409 | cross_compiling=maybe | |
bec39cab AC |
1410 | elif test "x$build_alias" != "x$host_alias"; then |
1411 | cross_compiling=yes | |
1412 | fi | |
1413 | fi | |
c906108c | 1414 | |
bec39cab AC |
1415 | ac_tool_prefix= |
1416 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1417 | ||
1418 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1419 | |
c906108c | 1420 | |
81ecdfbb RW |
1421 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1422 | ac_ls_di=`ls -di .` && | |
1423 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1424 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1425 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1426 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1427 | |
1428 | ||
c906108c SS |
1429 | # Find the source files, if location was not specified. |
1430 | if test -z "$srcdir"; then | |
1431 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1432 | # Try the directory containing this script, then the parent directory. |
1433 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1434 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1435 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1436 | X"$as_myself" : 'X\(//\)$' \| \ | |
1437 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1438 | $as_echo X"$as_myself" | | |
1439 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1440 | s//\1/ | |
1441 | q | |
1442 | } | |
1443 | /^X\(\/\/\)[^/].*/{ | |
1444 | s//\1/ | |
1445 | q | |
1446 | } | |
1447 | /^X\(\/\/\)$/{ | |
1448 | s//\1/ | |
1449 | q | |
1450 | } | |
1451 | /^X\(\/\).*/{ | |
1452 | s//\1/ | |
1453 | q | |
1454 | } | |
1455 | s/.*/./; q'` | |
c906108c | 1456 | srcdir=$ac_confdir |
81ecdfbb | 1457 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1458 | srcdir=.. |
1459 | fi | |
1460 | else | |
1461 | ac_srcdir_defaulted=no | |
1462 | fi | |
81ecdfbb RW |
1463 | if test ! -r "$srcdir/$ac_unique_file"; then |
1464 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1465 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1466 | fi |
1467 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1468 | ac_abs_confdir=`( | |
d0ac1c44 | 1469 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1470 | pwd)` |
1471 | # When building in place, set srcdir=. | |
1472 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1473 | srcdir=. | |
1474 | fi | |
1475 | # Remove unnecessary trailing slashes from srcdir. | |
1476 | # Double slashes in file names in object file debugging info | |
1477 | # mess up M-x gdb in Emacs. | |
1478 | case $srcdir in | |
1479 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1480 | esac | |
1481 | for ac_var in $ac_precious_vars; do | |
1482 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1483 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1484 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1485 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1486 | done | |
c906108c | 1487 | |
bec39cab AC |
1488 | # |
1489 | # Report the --help message. | |
1490 | # | |
1491 | if test "$ac_init_help" = "long"; then | |
1492 | # Omit some internal or obsolete options to make the list less imposing. | |
1493 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1494 | cat <<_ACEOF | |
1495 | \`configure' configures this package to adapt to many kinds of systems. | |
1496 | ||
1497 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1498 | ||
1499 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1500 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1501 | ||
1502 | Defaults for the options are specified in brackets. | |
1503 | ||
1504 | Configuration: | |
1505 | -h, --help display this help and exit | |
1506 | --help=short display options specific to this package | |
1507 | --help=recursive display the short help of all the included packages | |
1508 | -V, --version display version information and exit | |
d0ac1c44 | 1509 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1510 | --cache-file=FILE cache test results in FILE [disabled] |
1511 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1512 | -n, --no-create do not create output files | |
1513 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1514 | ||
bec39cab AC |
1515 | Installation directories: |
1516 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1517 | [$ac_default_prefix] |
bec39cab | 1518 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1519 | [PREFIX] |
bec39cab AC |
1520 | |
1521 | By default, \`make install' will install all the files in | |
1522 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1523 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1524 | for instance \`--prefix=\$HOME'. | |
1525 | ||
1526 | For better control, use the options below. | |
1527 | ||
1528 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1529 | --bindir=DIR user executables [EPREFIX/bin] |
1530 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1531 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1532 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1533 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1534 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1535 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1536 | --includedir=DIR C header files [PREFIX/include] | |
1537 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1538 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1539 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1540 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1541 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1542 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1543 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1544 | --htmldir=DIR html documentation [DOCDIR] | |
1545 | --dvidir=DIR dvi documentation [DOCDIR] | |
1546 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1547 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1548 | _ACEOF |
1549 | ||
1550 | cat <<\_ACEOF | |
1551 | ||
9009e1ae MR |
1552 | Program names: |
1553 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1554 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1555 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1556 | ||
bec39cab AC |
1557 | X features: |
1558 | --x-includes=DIR X include files are in DIR | |
1559 | --x-libraries=DIR X library files are in DIR | |
1560 | ||
1561 | System types: | |
1562 | --build=BUILD configure for building on BUILD [guessed] | |
1563 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1564 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1565 | _ACEOF | |
1566 | fi | |
1567 | ||
1568 | if test -n "$ac_init_help"; then | |
1569 | ||
1570 | cat <<\_ACEOF | |
1571 | ||
1572 | Optional Features: | |
81ecdfbb | 1573 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1574 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1575 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1576 | --enable-maintainer-mode |
1577 | enable make rules and dependencies not useful (and | |
1578 | sometimes confusing) to the casual installer | |
2974be62 | 1579 | --enable-plugins Enable support for plugins |
da2f07f1 | 1580 | --disable-largefile omit support for large files |
a1220294 TT |
1581 | --enable-targets=TARGETS |
1582 | alternative target configurations | |
c0993dbe | 1583 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1584 | --disable-gdbmi disable machine-interface (MI) |
1585 | --enable-tui enable full-screen terminal user interface (TUI) | |
1586 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1587 | --enable-profiling enable profiling of GDB | |
44cee4fd | 1588 | --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
3841debe | 1589 | --disable-rpath do not hardcode runtime library paths |
189b8c2e ST |
1590 | --enable-source-highlight |
1591 | enable source-highlight for source listings | |
a1220294 | 1592 | --enable-werror treat compile warnings as errors |
32c1c914 | 1593 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1594 | --enable-gdb-build-warnings |
32c1c914 | 1595 | enable GDB specific build-time compiler warnings if |
a1220294 | 1596 | gcc is used |
f35d5ade | 1597 | --enable-ubsan enable undefined behavior sanitizer (auto/yes/no) |
32c1c914 | 1598 | --enable-sim link gdb with simulator |
1776e3e5 | 1599 | --enable-libctf Handle .ctf type-info sections [default=yes] |
8ecfd7bd SDJ |
1600 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1601 | GDB | |
bec39cab AC |
1602 | |
1603 | Optional Packages: | |
1604 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1605 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1606 | --with-separate-debug-dir=PATH |
32c1c914 | 1607 | look for global separate debug info in this path |
62e4f60c | 1608 | [LIBDIR/debug] |
b14b1491 TT |
1609 | --with-gdb-datadir=PATH look for global separate data files in this path |
1610 | [DATADIR/gdb] | |
29b0e8a2 | 1611 | --with-relocated-sources=PATH |
32c1c914 | 1612 | automatically relocate this path for source files |
7349ff92 | 1613 | --with-auto-load-dir=PATH |
aff139ff | 1614 | directories from which to load auto-loaded scripts |
1564a261 | 1615 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1616 | --with-auto-load-safe-path=PATH |
aff139ff | 1617 | directories safe to hold auto-loaded files |
7349ff92 | 1618 | [--with-auto-load-dir] |
bccbefd2 JK |
1619 | --without-auto-load-safe-path |
1620 | do not restrict auto-loaded files locations | |
0d79cdc4 AM |
1621 | --with-debuginfod Enable debuginfo lookups with debuginfod |
1622 | (auto/yes/no) | |
05e7c244 | 1623 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1624 | --with-curses use the curses library instead of the termcap |
1625 | library | |
c16158bc JM |
1626 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1627 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1628 | --with-system-zlib use installed libz |
016a3251 DD |
1629 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1630 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1631 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
9f1528a1 | 1632 | --with-libiconv-type=TYPE type of library to search for (auto/static/shared) |
478aac75 | 1633 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1634 | --with-system-readline use installed readline library |
b8e0a31c SD |
1635 | --with-jit-reader-dir=PATH |
1636 | directory to load the JIT readers from | |
5c39566f | 1637 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1638 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1639 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
9f1528a1 | 1640 | --with-libexpat-type=TYPE type of library to search for (auto/static/shared) |
2400729e UW |
1641 | --with-mpfr include MPFR support (auto/yes/no) |
1642 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib | |
1643 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir | |
9f1528a1 | 1644 | --with-libmpfr-type=TYPE type of library to search for (auto/static/shared) |
0c4a4063 DE |
1645 | --with-python[=PYTHON] include python support |
1646 | (auto/yes/no/<python-program>) | |
d13c7322 AB |
1647 | --with-python-libdir[=DIR] |
1648 | search for python's libraries in DIR | |
ed3ef339 DE |
1649 | --with-guile[=GUILE] include guile support |
1650 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1651 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1652 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1653 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
9f1528a1 | 1654 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
a1220294 TT |
1655 | --without-included-regex |
1656 | don't use included regex; this is the default on | |
1657 | systems with version 2 of the GNU C library (use | |
1658 | with caution on other system) | |
81ecdfbb | 1659 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1660 | --with-system-gdbinit=PATH |
32c1c914 | 1661 | automatically load a system-wide gdbinit file |
ed2a2229 CB |
1662 | --with-system-gdbinit-dir=PATH |
1663 | automatically load system-wide gdbinit files from | |
1664 | this directory | |
608e2dbb TT |
1665 | --with-lzma support lzma compression (auto/yes/no) |
1666 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1667 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
9f1528a1 | 1668 | --with-liblzma-type=TYPE type of library to search for (auto/static/shared) |
5062cc19 KS |
1669 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1670 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1671 | --with-x use the X Window System |
393fd4c3 YQ |
1672 | --with-babeltrace include babeltrace support (auto/yes/no) |
1673 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1674 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
9f1528a1 | 1675 | --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared) |
ccb1ba62 CB |
1676 | --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) |
1677 | --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib | |
1678 | --without-libxxhash-prefix don't search for libxxhash in includedir and libdir | |
9f1528a1 | 1679 | --with-libxxhash-type=TYPE type of library to search for (auto/static/shared) |
bec39cab AC |
1680 | |
1681 | Some influential environment variables: | |
1682 | CC C compiler command | |
1683 | CFLAGS C compiler flags | |
1684 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1685 | nonstandard directory <lib dir> | |
81ecdfbb | 1686 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1687 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1688 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1689 | CXX C++ compiler command |
1690 | CXXFLAGS C++ compiler flags | |
bec39cab | 1691 | CPP C preprocessor |
f06e05e0 JK |
1692 | MAKEINFO Parent configure detects if it is of sufficient version. |
1693 | MAKEINFOFLAGS | |
1694 | Parameters for MAKEINFO. | |
f6720b1c AM |
1695 | PKG_CONFIG path to pkg-config utility |
1696 | PKG_CONFIG_PATH | |
1697 | directories to add to pkg-config's search path | |
1698 | PKG_CONFIG_LIBDIR | |
1699 | path overriding pkg-config's built-in search path | |
1700 | DEBUGINFOD_CFLAGS | |
1701 | C compiler flags for DEBUGINFOD, overriding pkg-config | |
1702 | DEBUGINFOD_LIBS | |
1703 | linker flags for DEBUGINFOD, overriding pkg-config | |
d0ac1c44 SM |
1704 | YACC The `Yet Another Compiler Compiler' implementation to use. |
1705 | Defaults to the first program found out of: `bison -y', `byacc', | |
1706 | `yacc'. | |
81ecdfbb RW |
1707 | YFLAGS The list of arguments that will be passed by default to $YACC. |
1708 | This script will default YFLAGS to the empty string to avoid a | |
1709 | default value of `-d' given by some make applications. | |
1710 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1711 | |
1712 | Use these variables to override the choices made by `configure' or to help | |
1713 | it to find libraries and programs with nonstandard names/locations. | |
1714 | ||
81ecdfbb | 1715 | Report bugs to the package provider. |
bec39cab | 1716 | _ACEOF |
81ecdfbb | 1717 | ac_status=$? |
bec39cab AC |
1718 | fi |
1719 | ||
1720 | if test "$ac_init_help" = "recursive"; then | |
1721 | # If there are subdirs, report their specific --help. | |
bec39cab | 1722 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1723 | test -d "$ac_dir" || |
1724 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1725 | continue | |
bec39cab AC |
1726 | ac_builddir=. |
1727 | ||
81ecdfbb RW |
1728 | case "$ac_dir" in |
1729 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1730 | *) | |
1731 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1732 | # A ".." for each directory in $ac_dir_suffix. | |
1733 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1734 | case $ac_top_builddir_sub in | |
1735 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1736 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1737 | esac ;; | |
1738 | esac | |
1739 | ac_abs_top_builddir=$ac_pwd | |
1740 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1741 | # for backward compatibility: | |
1742 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1743 | |
1744 | case $srcdir in | |
81ecdfbb | 1745 | .) # We are building in place. |
bec39cab | 1746 | ac_srcdir=. |
81ecdfbb RW |
1747 | ac_top_srcdir=$ac_top_builddir_sub |
1748 | ac_abs_top_srcdir=$ac_pwd ;; | |
1749 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1750 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1751 | ac_top_srcdir=$srcdir |
1752 | ac_abs_top_srcdir=$srcdir ;; | |
1753 | *) # Relative name. | |
1754 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1755 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1756 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1757 | esac |
81ecdfbb | 1758 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1759 | |
81ecdfbb RW |
1760 | cd "$ac_dir" || { ac_status=$?; continue; } |
1761 | # Check for guested configure. | |
1762 | if test -f "$ac_srcdir/configure.gnu"; then | |
1763 | echo && | |
1764 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1765 | elif test -f "$ac_srcdir/configure"; then | |
1766 | echo && | |
1767 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1768 | else |
81ecdfbb RW |
1769 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1770 | fi || ac_status=$? | |
1771 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1772 | done |
1773 | fi | |
1774 | ||
81ecdfbb | 1775 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1776 | if $ac_init_version; then |
1777 | cat <<\_ACEOF | |
81ecdfbb | 1778 | configure |
d0ac1c44 | 1779 | generated by GNU Autoconf 2.69 |
bec39cab | 1780 | |
d0ac1c44 | 1781 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1782 | This configure script is free software; the Free Software Foundation |
1783 | gives unlimited permission to copy, distribute and modify it. | |
1784 | _ACEOF | |
81ecdfbb | 1785 | exit |
bec39cab | 1786 | fi |
bec39cab | 1787 | |
81ecdfbb RW |
1788 | ## ------------------------ ## |
1789 | ## Autoconf initialization. ## | |
1790 | ## ------------------------ ## | |
bec39cab | 1791 | |
81ecdfbb RW |
1792 | # ac_fn_c_try_compile LINENO |
1793 | # -------------------------- | |
1794 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1795 | ac_fn_c_try_compile () | |
1796 | { | |
1797 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1798 | rm -f conftest.$ac_objext | |
1799 | if { { ac_try="$ac_compile" | |
1800 | case "(($ac_try" in | |
1801 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1802 | *) ac_try_echo=$ac_try;; | |
1803 | esac | |
1804 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1805 | $as_echo "$ac_try_echo"; } >&5 | |
1806 | (eval "$ac_compile") 2>conftest.err | |
1807 | ac_status=$? | |
1808 | if test -s conftest.err; then | |
1809 | grep -v '^ *+' conftest.err >conftest.er1 | |
1810 | cat conftest.er1 >&5 | |
1811 | mv -f conftest.er1 conftest.err | |
1812 | fi | |
1813 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1814 | test $ac_status = 0; } && { | |
1815 | test -z "$ac_c_werror_flag" || | |
1816 | test ! -s conftest.err | |
1817 | } && test -s conftest.$ac_objext; then : | |
1818 | ac_retval=0 | |
1819 | else | |
1820 | $as_echo "$as_me: failed program was:" >&5 | |
1821 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1822 | |
81ecdfbb RW |
1823 | ac_retval=1 |
1824 | fi | |
d0ac1c44 SM |
1825 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1826 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1827 | |
1828 | } # ac_fn_c_try_compile | |
1829 | ||
3bc3d82a PA |
1830 | # ac_fn_cxx_try_compile LINENO |
1831 | # ---------------------------- | |
1832 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1833 | ac_fn_cxx_try_compile () | |
1834 | { | |
1835 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1836 | rm -f conftest.$ac_objext | |
1837 | if { { ac_try="$ac_compile" | |
1838 | case "(($ac_try" in | |
1839 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1840 | *) ac_try_echo=$ac_try;; | |
1841 | esac | |
1842 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1843 | $as_echo "$ac_try_echo"; } >&5 | |
1844 | (eval "$ac_compile") 2>conftest.err | |
1845 | ac_status=$? | |
1846 | if test -s conftest.err; then | |
1847 | grep -v '^ *+' conftest.err >conftest.er1 | |
1848 | cat conftest.er1 >&5 | |
1849 | mv -f conftest.er1 conftest.err | |
1850 | fi | |
1851 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1852 | test $ac_status = 0; } && { | |
1853 | test -z "$ac_cxx_werror_flag" || | |
1854 | test ! -s conftest.err | |
1855 | } && test -s conftest.$ac_objext; then : | |
1856 | ac_retval=0 | |
1857 | else | |
1858 | $as_echo "$as_me: failed program was:" >&5 | |
1859 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1860 | ||
1861 | ac_retval=1 | |
1862 | fi | |
d0ac1c44 SM |
1863 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1864 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1865 | |
1866 | } # ac_fn_cxx_try_compile | |
1867 | ||
81ecdfbb RW |
1868 | # ac_fn_c_try_cpp LINENO |
1869 | # ---------------------- | |
1870 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1871 | ac_fn_c_try_cpp () | |
bec39cab | 1872 | { |
81ecdfbb RW |
1873 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1874 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1875 | case "(($ac_try" in | |
1876 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1877 | *) ac_try_echo=$ac_try;; | |
1878 | esac | |
1879 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1880 | $as_echo "$ac_try_echo"; } >&5 | |
1881 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1882 | ac_status=$? | |
1883 | if test -s conftest.err; then | |
1884 | grep -v '^ *+' conftest.err >conftest.er1 | |
1885 | cat conftest.er1 >&5 | |
1886 | mv -f conftest.er1 conftest.err | |
1887 | fi | |
1888 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1889 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1890 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1891 | test ! -s conftest.err | |
1892 | }; then : | |
1893 | ac_retval=0 | |
1894 | else | |
1895 | $as_echo "$as_me: failed program was:" >&5 | |
1896 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1897 | |
81ecdfbb RW |
1898 | ac_retval=1 |
1899 | fi | |
d0ac1c44 SM |
1900 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1901 | as_fn_set_status $ac_retval | |
bec39cab | 1902 | |
81ecdfbb | 1903 | } # ac_fn_c_try_cpp |
bec39cab | 1904 | |
81ecdfbb RW |
1905 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1906 | # ------------------------------------------------------- | |
1907 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1908 | # the include files in INCLUDES and setting the cache variable VAR | |
1909 | # accordingly. | |
1910 | ac_fn_c_check_header_mongrel () | |
1911 | { | |
1912 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1913 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1914 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1915 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1916 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1917 | $as_echo_n "(cached) " >&6 |
1918 | fi | |
1919 | eval ac_res=\$$3 | |
1920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1921 | $as_echo "$ac_res" >&6; } | |
1922 | else | |
1923 | # Is the header compilable? | |
1924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1925 | $as_echo_n "checking $2 usability... " >&6; } | |
1926 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1927 | /* end confdefs.h. */ | |
1928 | $4 | |
1929 | #include <$2> | |
1930 | _ACEOF | |
1931 | if ac_fn_c_try_compile "$LINENO"; then : | |
1932 | ac_header_compiler=yes | |
1933 | else | |
1934 | ac_header_compiler=no | |
1935 | fi | |
1936 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1938 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1939 | |
81ecdfbb RW |
1940 | # Is the header present? |
1941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1942 | $as_echo_n "checking $2 presence... " >&6; } | |
1943 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1944 | /* end confdefs.h. */ | |
1945 | #include <$2> | |
1946 | _ACEOF | |
1947 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1948 | ac_header_preproc=yes | |
1949 | else | |
1950 | ac_header_preproc=no | |
1951 | fi | |
d0ac1c44 | 1952 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1954 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1955 | |
81ecdfbb RW |
1956 | # So? What about this header? |
1957 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1958 | yes:no: ) | |
1959 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1960 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1961 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1962 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1963 | ;; | |
1964 | no:yes:* ) | |
1965 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1966 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1967 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1968 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1969 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1970 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1971 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1972 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1973 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1974 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1975 | ;; | |
1976 | esac | |
1977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1978 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1979 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1980 | $as_echo_n "(cached) " >&6 |
1981 | else | |
1982 | eval "$3=\$ac_header_compiler" | |
1983 | fi | |
1984 | eval ac_res=\$$3 | |
1985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1986 | $as_echo "$ac_res" >&6; } | |
1987 | fi | |
d0ac1c44 | 1988 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 1989 | |
81ecdfbb | 1990 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1991 | |
81ecdfbb RW |
1992 | # ac_fn_c_try_run LINENO |
1993 | # ---------------------- | |
1994 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1995 | # that executables *can* be run. | |
1996 | ac_fn_c_try_run () | |
1997 | { | |
1998 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1999 | if { { ac_try="$ac_link" | |
2000 | case "(($ac_try" in | |
2001 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2002 | *) ac_try_echo=$ac_try;; | |
2003 | esac | |
2004 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2005 | $as_echo "$ac_try_echo"; } >&5 | |
2006 | (eval "$ac_link") 2>&5 | |
2007 | ac_status=$? | |
2008 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2009 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2010 | { { case "(($ac_try" in | |
2011 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2012 | *) ac_try_echo=$ac_try;; | |
2013 | esac | |
2014 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2015 | $as_echo "$ac_try_echo"; } >&5 | |
2016 | (eval "$ac_try") 2>&5 | |
2017 | ac_status=$? | |
2018 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2019 | test $ac_status = 0; }; }; then : | |
2020 | ac_retval=0 | |
2021 | else | |
2022 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2023 | $as_echo "$as_me: failed program was:" >&5 | |
2024 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2025 | |
81ecdfbb RW |
2026 | ac_retval=$ac_status |
2027 | fi | |
2028 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2029 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2030 | as_fn_set_status $ac_retval | |
bec39cab | 2031 | |
81ecdfbb | 2032 | } # ac_fn_c_try_run |
bec39cab | 2033 | |
81ecdfbb RW |
2034 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2035 | # ------------------------------------------------------- | |
2036 | # Tests whether HEADER exists and can be compiled using the include files in | |
2037 | # INCLUDES, setting the cache variable VAR accordingly. | |
2038 | ac_fn_c_check_header_compile () | |
2039 | { | |
2040 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2042 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2043 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2044 | $as_echo_n "(cached) " >&6 |
2045 | else | |
2046 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2047 | /* end confdefs.h. */ | |
2048 | $4 | |
2049 | #include <$2> | |
bec39cab | 2050 | _ACEOF |
81ecdfbb RW |
2051 | if ac_fn_c_try_compile "$LINENO"; then : |
2052 | eval "$3=yes" | |
2053 | else | |
2054 | eval "$3=no" | |
2055 | fi | |
2056 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2057 | fi | |
2058 | eval ac_res=\$$3 | |
2059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2060 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2061 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 2062 | |
81ecdfbb | 2063 | } # ac_fn_c_check_header_compile |
bec39cab | 2064 | |
2974be62 AM |
2065 | # ac_fn_c_try_link LINENO |
2066 | # ----------------------- | |
2067 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2068 | ac_fn_c_try_link () | |
2069 | { | |
2070 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2071 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2072 | if { { ac_try="$ac_link" | |
2073 | case "(($ac_try" in | |
2074 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2075 | *) ac_try_echo=$ac_try;; | |
2076 | esac | |
2077 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2078 | $as_echo "$ac_try_echo"; } >&5 | |
2079 | (eval "$ac_link") 2>conftest.err | |
2080 | ac_status=$? | |
2081 | if test -s conftest.err; then | |
2082 | grep -v '^ *+' conftest.err >conftest.er1 | |
2083 | cat conftest.er1 >&5 | |
2084 | mv -f conftest.er1 conftest.err | |
2085 | fi | |
2086 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2087 | test $ac_status = 0; } && { | |
2088 | test -z "$ac_c_werror_flag" || | |
2089 | test ! -s conftest.err | |
2090 | } && test -s conftest$ac_exeext && { | |
2091 | test "$cross_compiling" = yes || | |
d0ac1c44 | 2092 | test -x conftest$ac_exeext |
2974be62 AM |
2093 | }; then : |
2094 | ac_retval=0 | |
2095 | else | |
2096 | $as_echo "$as_me: failed program was:" >&5 | |
2097 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2098 | ||
2099 | ac_retval=1 | |
2100 | fi | |
2101 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2102 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2103 | # interfere with the next link command; also delete a directory that is | |
2104 | # left behind by Apple's compiler. We do this before executing the actions. | |
2105 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2106 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2107 | as_fn_set_status $ac_retval | |
2974be62 AM |
2108 | |
2109 | } # ac_fn_c_try_link | |
2110 | ||
81ecdfbb RW |
2111 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2112 | # -------------------------------------------- | |
2113 | # Tries to find the compile-time value of EXPR in a program that includes | |
2114 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2115 | # computed | |
2116 | ac_fn_c_compute_int () | |
2117 | { | |
2118 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2119 | if test "$cross_compiling" = yes; then | |
2120 | # Depending upon the size, compute the lo and hi bounds. | |
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_lo=0 ac_mid=0 | |
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_hi=$ac_mid; break | |
2154 | else | |
2155 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2156 | if test $ac_lo -le $ac_mid; then | |
2157 | ac_lo= ac_hi= | |
2158 | break | |
2159 | fi | |
2160 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2161 | fi |
81ecdfbb RW |
2162 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2163 | done | |
c906108c | 2164 | else |
81ecdfbb RW |
2165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2166 | /* end confdefs.h. */ | |
2167 | $4 | |
2168 | int | |
2169 | main () | |
2170 | { | |
2171 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2172 | test_array [0] = 0; |
2173 | return test_array [0]; | |
bec39cab | 2174 | |
81ecdfbb RW |
2175 | ; |
2176 | return 0; | |
2177 | } | |
2178 | _ACEOF | |
2179 | if ac_fn_c_try_compile "$LINENO"; then : | |
2180 | ac_hi=-1 ac_mid=-1 | |
2181 | while :; do | |
2182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2183 | /* end confdefs.h. */ | |
2184 | $4 | |
2185 | int | |
2186 | main () | |
2187 | { | |
2188 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2189 | test_array [0] = 0; |
2190 | return test_array [0]; | |
bec39cab | 2191 | |
81ecdfbb RW |
2192 | ; |
2193 | return 0; | |
2194 | } | |
2195 | _ACEOF | |
2196 | if ac_fn_c_try_compile "$LINENO"; then : | |
2197 | ac_lo=$ac_mid; break | |
2198 | else | |
2199 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2200 | if test $ac_mid -le $ac_hi; then | |
2201 | ac_lo= ac_hi= | |
2202 | break | |
2203 | fi | |
2204 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2205 | fi | |
2206 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2207 | done | |
2208 | else | |
2209 | ac_lo= ac_hi= | |
2210 | fi | |
2211 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2212 | fi | |
2213 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2214 | # Binary search between lo and hi bounds. | |
2215 | while test "x$ac_lo" != "x$ac_hi"; do | |
2216 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2218 | /* end confdefs.h. */ | |
2219 | $4 | |
2220 | int | |
2221 | main () | |
2222 | { | |
2223 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2224 | test_array [0] = 0; |
2225 | return test_array [0]; | |
bec39cab | 2226 | |
81ecdfbb RW |
2227 | ; |
2228 | return 0; | |
2229 | } | |
2230 | _ACEOF | |
2231 | if ac_fn_c_try_compile "$LINENO"; then : | |
2232 | ac_hi=$ac_mid | |
2233 | else | |
2234 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2235 | fi | |
2236 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2237 | done | |
2238 | case $ac_lo in #(( | |
2239 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2240 | '') ac_retval=1 ;; | |
2241 | esac | |
2242 | else | |
2243 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2244 | /* end confdefs.h. */ | |
2245 | $4 | |
2246 | static long int longval () { return $2; } | |
2247 | static unsigned long int ulongval () { return $2; } | |
2248 | #include <stdio.h> | |
2249 | #include <stdlib.h> | |
2250 | int | |
2251 | main () | |
2252 | { | |
bec39cab | 2253 | |
81ecdfbb RW |
2254 | FILE *f = fopen ("conftest.val", "w"); |
2255 | if (! f) | |
2256 | return 1; | |
2257 | if (($2) < 0) | |
2258 | { | |
2259 | long int i = longval (); | |
2260 | if (i != ($2)) | |
2261 | return 1; | |
2262 | fprintf (f, "%ld", i); | |
2263 | } | |
2264 | else | |
2265 | { | |
2266 | unsigned long int i = ulongval (); | |
2267 | if (i != ($2)) | |
2268 | return 1; | |
2269 | fprintf (f, "%lu", i); | |
2270 | } | |
2271 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2272 | on some platforms. */ | |
2273 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2274 | |
81ecdfbb RW |
2275 | ; |
2276 | return 0; | |
2277 | } | |
2278 | _ACEOF | |
2279 | if ac_fn_c_try_run "$LINENO"; then : | |
2280 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2281 | else | |
2282 | ac_retval=1 | |
2283 | fi | |
2284 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2285 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2286 | rm -f conftest.val | |
bec39cab | 2287 | |
81ecdfbb | 2288 | fi |
d0ac1c44 SM |
2289 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2290 | as_fn_set_status $ac_retval | |
bec39cab | 2291 | |
81ecdfbb | 2292 | } # ac_fn_c_compute_int |
bec39cab | 2293 | |
55a8c076 YQ |
2294 | # ac_fn_c_check_func LINENO FUNC VAR |
2295 | # ---------------------------------- | |
2296 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2297 | ac_fn_c_check_func () | |
81ecdfbb RW |
2298 | { |
2299 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2301 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2302 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2303 | $as_echo_n "(cached) " >&6 |
2304 | else | |
81ecdfbb RW |
2305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2306 | /* end confdefs.h. */ | |
55a8c076 YQ |
2307 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2308 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2309 | #define $2 innocuous_$2 | |
2310 | ||
2311 | /* System header to define __stub macros and hopefully few prototypes, | |
2312 | which can conflict with char $2 (); below. | |
2313 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2314 | <limits.h> exists even on freestanding compilers. */ | |
2315 | ||
2316 | #ifdef __STDC__ | |
2317 | # include <limits.h> | |
2318 | #else | |
2319 | # include <assert.h> | |
2320 | #endif | |
2321 | ||
2322 | #undef $2 | |
2323 | ||
2324 | /* Override any GCC internal prototype to avoid an error. | |
2325 | Use char because int might match the return type of a GCC | |
2326 | builtin and then its argument prototype would still apply. */ | |
2327 | #ifdef __cplusplus | |
2328 | extern "C" | |
2329 | #endif | |
2330 | char $2 (); | |
2331 | /* The GNU C library defines this for functions which it implements | |
2332 | to always fail with ENOSYS. Some functions are actually named | |
2333 | something starting with __ and the normal name is an alias. */ | |
2334 | #if defined __stub_$2 || defined __stub___$2 | |
2335 | choke me | |
2336 | #endif | |
2337 | ||
2338 | int | |
2339 | main () | |
2340 | { | |
2341 | return $2 (); | |
2342 | ; | |
2343 | return 0; | |
2344 | } | |
2345 | _ACEOF | |
2346 | if ac_fn_c_try_link "$LINENO"; then : | |
2347 | eval "$3=yes" | |
2348 | else | |
2349 | eval "$3=no" | |
2350 | fi | |
2351 | rm -f core conftest.err conftest.$ac_objext \ | |
2352 | conftest$ac_exeext conftest.$ac_ext | |
2353 | fi | |
2354 | eval ac_res=\$$3 | |
2355 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2356 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2357 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
55a8c076 YQ |
2358 | |
2359 | } # ac_fn_c_check_func | |
2360 | ||
07697489 PA |
2361 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2362 | # ------------------------------------------- | |
2363 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2364 | # variable VAR accordingly. | |
2365 | ac_fn_c_check_type () | |
2366 | { | |
2367 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2369 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2370 | if eval \${$3+:} false; then : |
07697489 PA |
2371 | $as_echo_n "(cached) " >&6 |
2372 | else | |
2373 | eval "$3=no" | |
2374 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2375 | /* end confdefs.h. */ | |
2376 | $4 | |
2377 | int | |
2378 | main () | |
2379 | { | |
2380 | if (sizeof ($2)) | |
2381 | return 0; | |
2382 | ; | |
2383 | return 0; | |
2384 | } | |
2385 | _ACEOF | |
2386 | if ac_fn_c_try_compile "$LINENO"; then : | |
2387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2388 | /* end confdefs.h. */ | |
2389 | $4 | |
2390 | int | |
2391 | main () | |
2392 | { | |
2393 | if (sizeof (($2))) | |
2394 | return 0; | |
2395 | ; | |
2396 | return 0; | |
2397 | } | |
2398 | _ACEOF | |
2399 | if ac_fn_c_try_compile "$LINENO"; then : | |
2400 | ||
2401 | else | |
2402 | eval "$3=yes" | |
2403 | fi | |
2404 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2405 | fi | |
2406 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2407 | fi | |
2408 | eval ac_res=\$$3 | |
2409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2410 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2411 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
07697489 PA |
2412 | |
2413 | } # ac_fn_c_check_type | |
2414 | ||
f6720b1c AM |
2415 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2416 | # --------------------------------------------- | |
2417 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2418 | # accordingly. | |
2419 | ac_fn_c_check_decl () | |
2420 | { | |
2421 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2422 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2423 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2425 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2426 | if eval \${$3+:} false; then : | |
2427 | $as_echo_n "(cached) " >&6 | |
2428 | else | |
2429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2430 | /* end confdefs.h. */ | |
2431 | $4 | |
2432 | int | |
2433 | main () | |
2434 | { | |
2435 | #ifndef $as_decl_name | |
2436 | #ifdef __cplusplus | |
2437 | (void) $as_decl_use; | |
2438 | #else | |
2439 | (void) $as_decl_name; | |
2440 | #endif | |
2441 | #endif | |
2442 | ||
2443 | ; | |
2444 | return 0; | |
2445 | } | |
2446 | _ACEOF | |
2447 | if ac_fn_c_try_compile "$LINENO"; then : | |
2448 | eval "$3=yes" | |
2449 | else | |
2450 | eval "$3=no" | |
2451 | fi | |
2452 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2453 | fi | |
2454 | eval ac_res=\$$3 | |
2455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2456 | $as_echo "$ac_res" >&6; } | |
2457 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2458 | ||
2459 | } # ac_fn_c_check_decl | |
2460 | ||
05ea2a05 TT |
2461 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2462 | # ---------------------------------------------------- | |
2463 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2464 | # INCLUDES, setting cache variable VAR accordingly. | |
2465 | ac_fn_c_check_member () | |
2466 | { | |
2467 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2469 | $as_echo_n "checking for $2.$3... " >&6; } | |
2470 | if eval \${$4+:} false; then : | |
2471 | $as_echo_n "(cached) " >&6 | |
2472 | else | |
2473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2474 | /* end confdefs.h. */ | |
2475 | $5 | |
2476 | int | |
2477 | main () | |
2478 | { | |
2479 | static $2 ac_aggr; | |
2480 | if (ac_aggr.$3) | |
2481 | return 0; | |
2482 | ; | |
2483 | return 0; | |
2484 | } | |
2485 | _ACEOF | |
2486 | if ac_fn_c_try_compile "$LINENO"; then : | |
2487 | eval "$4=yes" | |
2488 | else | |
2489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2490 | /* end confdefs.h. */ | |
2491 | $5 | |
2492 | int | |
2493 | main () | |
2494 | { | |
2495 | static $2 ac_aggr; | |
2496 | if (sizeof ac_aggr.$3) | |
2497 | return 0; | |
2498 | ; | |
2499 | return 0; | |
2500 | } | |
2501 | _ACEOF | |
2502 | if ac_fn_c_try_compile "$LINENO"; then : | |
2503 | eval "$4=yes" | |
2504 | else | |
2505 | eval "$4=no" | |
2506 | fi | |
2507 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2508 | fi | |
2509 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2510 | fi | |
2511 | eval ac_res=\$$4 | |
2512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2513 | $as_echo "$ac_res" >&6; } | |
2514 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2515 | ||
2516 | } # ac_fn_c_check_member | |
2517 | ||
f35d5ade TT |
2518 | # ac_fn_cxx_try_link LINENO |
2519 | # ------------------------- | |
2520 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2521 | ac_fn_cxx_try_link () | |
2522 | { | |
2523 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2524 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2525 | if { { ac_try="$ac_link" | |
2526 | case "(($ac_try" in | |
2527 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2528 | *) ac_try_echo=$ac_try;; | |
2529 | esac | |
2530 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2531 | $as_echo "$ac_try_echo"; } >&5 | |
2532 | (eval "$ac_link") 2>conftest.err | |
2533 | ac_status=$? | |
2534 | if test -s conftest.err; then | |
2535 | grep -v '^ *+' conftest.err >conftest.er1 | |
2536 | cat conftest.er1 >&5 | |
2537 | mv -f conftest.er1 conftest.err | |
2538 | fi | |
2539 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2540 | test $ac_status = 0; } && { | |
2541 | test -z "$ac_cxx_werror_flag" || | |
2542 | test ! -s conftest.err | |
2543 | } && test -s conftest$ac_exeext && { | |
2544 | test "$cross_compiling" = yes || | |
2545 | test -x conftest$ac_exeext | |
2546 | }; then : | |
2547 | ac_retval=0 | |
2548 | else | |
2549 | $as_echo "$as_me: failed program was:" >&5 | |
2550 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2551 | ||
2552 | ac_retval=1 | |
2553 | fi | |
2554 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2555 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2556 | # interfere with the next link command; also delete a directory that is | |
2557 | # left behind by Apple's compiler. We do this before executing the actions. | |
2558 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2559 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2560 | as_fn_set_status $ac_retval | |
2561 | ||
2562 | } # ac_fn_cxx_try_link | |
21987b9c TT |
2563 | |
2564 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2565 | # ------------------------------------ | |
2566 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2567 | ac_fn_cxx_check_func () | |
2568 | { | |
2569 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2571 | $as_echo_n "checking for $2... " >&6; } | |
2572 | if eval \${$3+:} false; then : | |
2573 | $as_echo_n "(cached) " >&6 | |
2574 | else | |
2575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2576 | /* end confdefs.h. */ | |
2577 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2578 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2579 | #define $2 innocuous_$2 | |
2580 | ||
2581 | /* System header to define __stub macros and hopefully few prototypes, | |
2582 | which can conflict with char $2 (); below. | |
2583 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2584 | <limits.h> exists even on freestanding compilers. */ | |
2585 | ||
2586 | #ifdef __STDC__ | |
2587 | # include <limits.h> | |
2588 | #else | |
2589 | # include <assert.h> | |
2590 | #endif | |
2591 | ||
2592 | #undef $2 | |
2593 | ||
2594 | /* Override any GCC internal prototype to avoid an error. | |
2595 | Use char because int might match the return type of a GCC | |
2596 | builtin and then its argument prototype would still apply. */ | |
2597 | #ifdef __cplusplus | |
2598 | extern "C" | |
2599 | #endif | |
2600 | char $2 (); | |
2601 | /* The GNU C library defines this for functions which it implements | |
2602 | to always fail with ENOSYS. Some functions are actually named | |
2603 | something starting with __ and the normal name is an alias. */ | |
2604 | #if defined __stub_$2 || defined __stub___$2 | |
2605 | choke me | |
2606 | #endif | |
2607 | ||
2608 | int | |
2609 | main () | |
2610 | { | |
2611 | return $2 (); | |
2612 | ; | |
2613 | return 0; | |
2614 | } | |
2615 | _ACEOF | |
2616 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2617 | eval "$3=yes" | |
2618 | else | |
2619 | eval "$3=no" | |
2620 | fi | |
2621 | rm -f core conftest.err conftest.$ac_objext \ | |
2622 | conftest$ac_exeext conftest.$ac_ext | |
2623 | fi | |
2624 | eval ac_res=\$$3 | |
2625 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2626 | $as_echo "$ac_res" >&6; } | |
2627 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2628 | ||
2629 | } # ac_fn_cxx_check_func | |
81ecdfbb RW |
2630 | cat >config.log <<_ACEOF |
2631 | This file contains any messages produced by compilers while | |
2632 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2633 | |
81ecdfbb | 2634 | It was created by $as_me, which was |
d0ac1c44 | 2635 | generated by GNU Autoconf 2.69. Invocation command line was |
b4e70030 | 2636 | |
81ecdfbb | 2637 | $ $0 $@ |
413ccac7 | 2638 | |
81ecdfbb RW |
2639 | _ACEOF |
2640 | exec 5>>config.log | |
2641 | { | |
2642 | cat <<_ASUNAME | |
2643 | ## --------- ## | |
2644 | ## Platform. ## | |
2645 | ## --------- ## | |
413ccac7 | 2646 | |
81ecdfbb RW |
2647 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2648 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2649 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2650 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2651 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2652 | |
81ecdfbb RW |
2653 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2654 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2655 | |
81ecdfbb RW |
2656 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2657 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2658 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2659 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2660 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2661 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2662 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2663 | |
81ecdfbb | 2664 | _ASUNAME |
bec39cab | 2665 | |
bec39cab AC |
2666 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2667 | for as_dir in $PATH | |
2668 | do | |
2669 | IFS=$as_save_IFS | |
2670 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2671 | $as_echo "PATH: $as_dir" |
2672 | done | |
2673 | IFS=$as_save_IFS | |
bec39cab | 2674 | |
81ecdfbb | 2675 | } >&5 |
bec39cab | 2676 | |
81ecdfbb | 2677 | cat >&5 <<_ACEOF |
bec39cab | 2678 | |
bec39cab | 2679 | |
81ecdfbb RW |
2680 | ## ----------- ## |
2681 | ## Core tests. ## | |
2682 | ## ----------- ## | |
2683 | ||
2684 | _ACEOF | |
2685 | ||
2686 | ||
2687 | # Keep a trace of the command line. | |
2688 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2689 | # Strip out --silent because we don't want to record it for future runs. | |
2690 | # Also quote any args containing shell meta-characters. | |
2691 | # Make two passes to allow for proper duplicate-argument suppression. | |
2692 | ac_configure_args= | |
2693 | ac_configure_args0= | |
2694 | ac_configure_args1= | |
2695 | ac_must_keep_next=false | |
2696 | for ac_pass in 1 2 | |
2697 | do | |
2698 | for ac_arg | |
2699 | do | |
2700 | case $ac_arg in | |
2701 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2702 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2703 | | -silent | --silent | --silen | --sile | --sil) | |
2704 | continue ;; | |
2705 | *\'*) | |
2706 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2707 | esac | |
2708 | case $ac_pass in | |
2709 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2710 | 2) | |
2711 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2712 | if test $ac_must_keep_next = true; then | |
2713 | ac_must_keep_next=false # Got value, back to normal. | |
2714 | else | |
2715 | case $ac_arg in | |
2716 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2717 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2718 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2719 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2720 | case "$ac_configure_args0 " in | |
2721 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2722 | esac | |
2723 | ;; | |
2724 | -* ) ac_must_keep_next=true ;; | |
2725 | esac | |
2726 | fi | |
2727 | as_fn_append ac_configure_args " '$ac_arg'" | |
2728 | ;; | |
2729 | esac | |
2730 | done | |
2731 | done | |
2732 | { ac_configure_args0=; unset ac_configure_args0;} | |
2733 | { ac_configure_args1=; unset ac_configure_args1;} | |
2734 | ||
2735 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2736 | # config.log. We remove comments because anyway the quotes in there | |
2737 | # would cause problems or look ugly. | |
2738 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2739 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2740 | trap 'exit_status=$? | |
2741 | # Save into config.log some information that might help in debugging. | |
2742 | { | |
2743 | echo | |
2744 | ||
d0ac1c44 | 2745 | $as_echo "## ---------------- ## |
81ecdfbb | 2746 | ## Cache variables. ## |
d0ac1c44 | 2747 | ## ---------------- ##" |
81ecdfbb RW |
2748 | echo |
2749 | # The following way of writing the cache mishandles newlines in values, | |
2750 | ( | |
2751 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2752 | eval ac_val=\$$ac_var | |
2753 | case $ac_val in #( | |
2754 | *${as_nl}*) | |
2755 | case $ac_var in #( | |
2756 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2757 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2758 | esac | |
2759 | case $ac_var in #( | |
2760 | _ | IFS | as_nl) ;; #( | |
2761 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2762 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2763 | esac ;; | |
2764 | esac | |
2765 | done | |
2766 | (set) 2>&1 | | |
2767 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2768 | *${as_nl}ac_space=\ *) | |
2769 | sed -n \ | |
2770 | "s/'\''/'\''\\\\'\'''\''/g; | |
2771 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2772 | ;; #( | |
2773 | *) | |
2774 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2775 | ;; | |
2776 | esac | | |
2777 | sort | |
2778 | ) | |
2779 | echo | |
2780 | ||
d0ac1c44 | 2781 | $as_echo "## ----------------- ## |
81ecdfbb | 2782 | ## Output variables. ## |
d0ac1c44 | 2783 | ## ----------------- ##" |
81ecdfbb RW |
2784 | echo |
2785 | for ac_var in $ac_subst_vars | |
2786 | do | |
2787 | eval ac_val=\$$ac_var | |
2788 | case $ac_val in | |
2789 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2790 | esac | |
2791 | $as_echo "$ac_var='\''$ac_val'\''" | |
2792 | done | sort | |
2793 | echo | |
2794 | ||
2795 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2796 | $as_echo "## ------------------- ## |
81ecdfbb | 2797 | ## File substitutions. ## |
d0ac1c44 | 2798 | ## ------------------- ##" |
81ecdfbb RW |
2799 | echo |
2800 | for ac_var in $ac_subst_files | |
2801 | do | |
2802 | eval ac_val=\$$ac_var | |
2803 | case $ac_val in | |
2804 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2805 | esac | |
2806 | $as_echo "$ac_var='\''$ac_val'\''" | |
2807 | done | sort | |
2808 | echo | |
2809 | fi | |
2810 | ||
2811 | if test -s confdefs.h; then | |
d0ac1c44 | 2812 | $as_echo "## ----------- ## |
81ecdfbb | 2813 | ## confdefs.h. ## |
d0ac1c44 | 2814 | ## ----------- ##" |
81ecdfbb RW |
2815 | echo |
2816 | cat confdefs.h | |
2817 | echo | |
2818 | fi | |
2819 | test "$ac_signal" != 0 && | |
2820 | $as_echo "$as_me: caught signal $ac_signal" | |
2821 | $as_echo "$as_me: exit $exit_status" | |
2822 | } >&5 | |
2823 | rm -f core *.core core.conftest.* && | |
2824 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2825 | exit $exit_status | |
2826 | ' 0 | |
2827 | for ac_signal in 1 2 13 15; do | |
2828 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2829 | done | |
2830 | ac_signal=0 | |
2831 | ||
2832 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2833 | rm -f -r conftest* confdefs.h | |
2834 | ||
2835 | $as_echo "/* confdefs.h */" > confdefs.h | |
2836 | ||
2837 | # Predefined preprocessor variables. | |
2838 | ||
2839 | cat >>confdefs.h <<_ACEOF | |
2840 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2841 | _ACEOF | |
2842 | ||
2843 | cat >>confdefs.h <<_ACEOF | |
2844 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2845 | _ACEOF | |
2846 | ||
2847 | cat >>confdefs.h <<_ACEOF | |
2848 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2849 | _ACEOF | |
2850 | ||
2851 | cat >>confdefs.h <<_ACEOF | |
2852 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2853 | _ACEOF | |
2854 | ||
2855 | cat >>confdefs.h <<_ACEOF | |
2856 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2857 | _ACEOF | |
2858 | ||
2859 | cat >>confdefs.h <<_ACEOF | |
2860 | #define PACKAGE_URL "$PACKAGE_URL" | |
2861 | _ACEOF | |
2862 | ||
2863 | ||
2864 | # Let the site file select an alternate cache file if it wants to. | |
2865 | # Prefer an explicitly selected file to automatically selected ones. | |
2866 | ac_site_file1=NONE | |
2867 | ac_site_file2=NONE | |
2868 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2869 | # We do not want a PATH search for config.site. |
2870 | case $CONFIG_SITE in #(( | |
2871 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2872 | */*) ac_site_file1=$CONFIG_SITE;; | |
2873 | *) ac_site_file1=./$CONFIG_SITE;; | |
2874 | esac | |
81ecdfbb RW |
2875 | elif test "x$prefix" != xNONE; then |
2876 | ac_site_file1=$prefix/share/config.site | |
2877 | ac_site_file2=$prefix/etc/config.site | |
2878 | else | |
2879 | ac_site_file1=$ac_default_prefix/share/config.site | |
2880 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2881 | fi | |
2882 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2883 | do | |
2884 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2885 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2886 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2887 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2888 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
2889 | . "$ac_site_file" \ |
2890 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2891 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2892 | as_fn_error $? "failed to load site script $ac_site_file | |
2893 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
2894 | fi |
2895 | done | |
2896 | ||
2897 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2898 | # Some versions of bash will fail to source /dev/null (special files |
2899 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2900 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2901 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2902 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2903 | case $cache_file in | |
2904 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2905 | *) . "./$cache_file";; | |
2906 | esac | |
2907 | fi | |
2908 | else | |
2909 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2910 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2911 | >$cache_file | |
bec39cab AC |
2912 | fi |
2913 | ||
d0ac1c44 SM |
2914 | as_fn_append ac_header_list " stdlib.h" |
2915 | as_fn_append ac_header_list " unistd.h" | |
2916 | as_fn_append ac_header_list " sys/param.h" | |
81ecdfbb RW |
2917 | # Check that the precious variables saved in the cache have kept the same |
2918 | # value. | |
2919 | ac_cache_corrupted=false | |
2920 | for ac_var in $ac_precious_vars; do | |
2921 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2922 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2923 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2924 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2925 | case $ac_old_set,$ac_new_set in | |
2926 | set,) | |
2927 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2928 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2929 | ac_cache_corrupted=: ;; | |
2930 | ,set) | |
2931 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2932 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2933 | ac_cache_corrupted=: ;; | |
2934 | ,);; | |
2935 | *) | |
2936 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2937 | # differences in whitespace do not lead to failure. | |
2938 | ac_old_val_w=`echo x $ac_old_val` | |
2939 | ac_new_val_w=`echo x $ac_new_val` | |
2940 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2941 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2942 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2943 | ac_cache_corrupted=: | |
2944 | else | |
2945 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2946 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2947 | eval $ac_var=\$ac_old_val | |
2948 | fi | |
2949 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2950 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2951 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2952 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2953 | fi;; | |
2954 | esac | |
2955 | # Pass precious variables to config.status. | |
2956 | if test "$ac_new_set" = set; then | |
2957 | case $ac_new_val in | |
2958 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2959 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2960 | esac | |
2961 | case " $ac_configure_args " in | |
2962 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2963 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2964 | esac | |
2965 | fi | |
2966 | done | |
2967 | if $ac_cache_corrupted; then | |
2968 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2969 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2970 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2971 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2972 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
81ecdfbb RW |
2973 | fi |
2974 | ## -------------------- ## | |
2975 | ## Main body of script. ## | |
2976 | ## -------------------- ## | |
2977 | ||
2978 | ac_ext=c | |
2979 | ac_cpp='$CPP $CPPFLAGS' | |
2980 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2981 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2982 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2983 | ||
2984 | ||
2985 | ||
2986 | ||
2987 | ||
2988 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2989 | ||
2990 | ||
2991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2992 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2993 | # Check whether --enable-maintainer-mode was given. | |
2994 | if test "${enable_maintainer_mode+set}" = set; then : | |
2995 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2996 | else | |
2997 | USE_MAINTAINER_MODE=no | |
2998 | fi | |
2999 | ||
3000 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
3001 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
3002 | if test $USE_MAINTAINER_MODE = yes; then | |
3003 | MAINTAINER_MODE_TRUE= | |
3004 | MAINTAINER_MODE_FALSE='#' | |
3005 | else | |
3006 | MAINTAINER_MODE_TRUE='#' | |
3007 | MAINTAINER_MODE_FALSE= | |
3008 | fi | |
3009 | ||
3010 | MAINT=$MAINTAINER_MODE_TRUE | |
3011 | ||
3012 | ||
3013 | ||
3014 | ac_ext=c | |
3015 | ac_cpp='$CPP $CPPFLAGS' | |
3016 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3017 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3018 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3019 | if test -n "$ac_tool_prefix"; then | |
3020 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3021 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3023 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3024 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3025 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3026 | else |
3027 | if test -n "$CC"; then | |
3028 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3029 | else | |
bec39cab AC |
3030 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3031 | for as_dir in $PATH | |
3032 | do | |
3033 | IFS=$as_save_IFS | |
3034 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3035 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3036 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3037 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
3038 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3039 | break 2 |
3040 | fi | |
3041 | done | |
81ecdfbb RW |
3042 | done |
3043 | IFS=$as_save_IFS | |
bec39cab | 3044 | |
c906108c SS |
3045 | fi |
3046 | fi | |
bec39cab | 3047 | CC=$ac_cv_prog_CC |
c906108c | 3048 | if test -n "$CC"; then |
81ecdfbb RW |
3049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3050 | $as_echo "$CC" >&6; } | |
c906108c | 3051 | else |
81ecdfbb RW |
3052 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3053 | $as_echo "no" >&6; } | |
c906108c SS |
3054 | fi |
3055 | ||
81ecdfbb | 3056 | |
b4e70030 JB |
3057 | fi |
3058 | if test -z "$ac_cv_prog_CC"; then | |
3059 | ac_ct_CC=$CC | |
81ecdfbb RW |
3060 | # Extract the first word of "gcc", so it can be a program name with args. |
3061 | set dummy gcc; ac_word=$2 | |
3062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3063 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3064 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3065 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
3066 | else |
3067 | if test -n "$ac_ct_CC"; then | |
3068 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3069 | else | |
3070 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3071 | for as_dir in $PATH | |
3072 | do | |
3073 | IFS=$as_save_IFS | |
3074 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3075 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3076 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3077 | ac_cv_prog_ac_ct_CC="gcc" |
3078 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 3079 | break 2 |
4e8d927d | 3080 | fi |
b4e70030 | 3081 | done |
81ecdfbb RW |
3082 | done |
3083 | IFS=$as_save_IFS | |
b4e70030 JB |
3084 | |
3085 | fi | |
3086 | fi | |
3087 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3088 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3090 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 3091 | else |
81ecdfbb RW |
3092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3093 | $as_echo "no" >&6; } | |
b4e70030 JB |
3094 | fi |
3095 | ||
81ecdfbb RW |
3096 | if test "x$ac_ct_CC" = x; then |
3097 | CC="" | |
3098 | else | |
3099 | case $cross_compiling:$ac_tool_warned in | |
3100 | yes:) | |
3101 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3102 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3103 | ac_tool_warned=yes ;; | |
3104 | esac | |
3105 | CC=$ac_ct_CC | |
3106 | fi | |
b4e70030 JB |
3107 | else |
3108 | CC="$ac_cv_prog_CC" | |
3109 | fi | |
3110 | ||
c906108c | 3111 | if test -z "$CC"; then |
81ecdfbb RW |
3112 | if test -n "$ac_tool_prefix"; then |
3113 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3114 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3116 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3117 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3118 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3119 | else |
3120 | if test -n "$CC"; then | |
3121 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3122 | else | |
bec39cab AC |
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=. | |
81ecdfbb | 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 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
3131 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3132 | break 2 |
3133 | fi | |
3134 | done | |
81ecdfbb RW |
3135 | done |
3136 | IFS=$as_save_IFS | |
3137 | ||
3138 | fi | |
3139 | fi | |
3140 | CC=$ac_cv_prog_CC | |
3141 | if test -n "$CC"; then | |
3142 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3143 | $as_echo "$CC" >&6; } | |
3144 | else | |
3145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3146 | $as_echo "no" >&6; } | |
3147 | fi | |
3148 | ||
3149 | ||
3150 | fi | |
3151 | fi | |
3152 | if test -z "$CC"; then | |
3153 | # Extract the first word of "cc", so it can be a program name with args. | |
3154 | set dummy cc; ac_word=$2 | |
3155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3156 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3157 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb RW |
3158 | $as_echo_n "(cached) " >&6 |
3159 | else | |
3160 | if test -n "$CC"; then | |
3161 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3162 | else | |
3163 | ac_prog_rejected=no | |
3164 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3165 | for as_dir in $PATH | |
3166 | do | |
3167 | IFS=$as_save_IFS | |
3168 | test -z "$as_dir" && as_dir=. | |
3169 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3170 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3171 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3172 | ac_prog_rejected=yes | |
3173 | continue | |
3174 | fi | |
3175 | ac_cv_prog_CC="cc" | |
3176 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3177 | break 2 | |
3178 | fi | |
3179 | done | |
3180 | done | |
3181 | IFS=$as_save_IFS | |
bec39cab | 3182 | |
c906108c SS |
3183 | if test $ac_prog_rejected = yes; then |
3184 | # We found a bogon in the path, so make sure we never use it. | |
3185 | set dummy $ac_cv_prog_CC | |
3186 | shift | |
bec39cab | 3187 | if test $# != 0; then |
c906108c SS |
3188 | # We chose a different compiler from the bogus one. |
3189 | # However, it has the same basename, so the bogon will be chosen | |
3190 | # first if we set CC to just the basename; use the full file name. | |
3191 | shift | |
bec39cab | 3192 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3193 | fi |
3194 | fi | |
3195 | fi | |
3196 | fi | |
bec39cab | 3197 | CC=$ac_cv_prog_CC |
c906108c | 3198 | if test -n "$CC"; then |
81ecdfbb RW |
3199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3200 | $as_echo "$CC" >&6; } | |
c906108c | 3201 | else |
81ecdfbb RW |
3202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3203 | $as_echo "no" >&6; } | |
c906108c SS |
3204 | fi |
3205 | ||
81ecdfbb | 3206 | |
bec39cab AC |
3207 | fi |
3208 | if test -z "$CC"; then | |
3209 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3210 | for ac_prog in cl.exe |
bec39cab AC |
3211 | do |
3212 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3213 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3215 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3216 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3217 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3218 | else |
3219 | if test -n "$CC"; then | |
3220 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3221 | else | |
bec39cab AC |
3222 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3223 | for as_dir in $PATH | |
3224 | do | |
3225 | IFS=$as_save_IFS | |
3226 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3227 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3228 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3229 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3230 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3231 | break 2 |
3232 | fi | |
3233 | done | |
81ecdfbb RW |
3234 | done |
3235 | IFS=$as_save_IFS | |
bec39cab | 3236 | |
c906108c SS |
3237 | fi |
3238 | fi | |
bec39cab | 3239 | CC=$ac_cv_prog_CC |
c906108c | 3240 | if test -n "$CC"; then |
81ecdfbb RW |
3241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3242 | $as_echo "$CC" >&6; } | |
c906108c | 3243 | else |
81ecdfbb RW |
3244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3245 | $as_echo "no" >&6; } | |
c906108c | 3246 | fi |
bec39cab | 3247 | |
81ecdfbb | 3248 | |
bec39cab AC |
3249 | test -n "$CC" && break |
3250 | done | |
3251 | fi | |
3252 | if test -z "$CC"; then | |
3253 | ac_ct_CC=$CC | |
81ecdfbb | 3254 | for ac_prog in cl.exe |
bec39cab AC |
3255 | do |
3256 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3257 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3259 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3260 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3261 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3262 | else |
3263 | if test -n "$ac_ct_CC"; then | |
3264 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3265 | else | |
3266 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3267 | for as_dir in $PATH | |
3268 | do | |
3269 | IFS=$as_save_IFS | |
3270 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3271 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3272 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3273 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3274 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3275 | break 2 |
c906108c | 3276 | fi |
bec39cab | 3277 | done |
81ecdfbb RW |
3278 | done |
3279 | IFS=$as_save_IFS | |
bec39cab AC |
3280 | |
3281 | fi | |
3282 | fi | |
3283 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3284 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3286 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3287 | else |
81ecdfbb RW |
3288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3289 | $as_echo "no" >&6; } | |
c906108c SS |
3290 | fi |
3291 | ||
81ecdfbb | 3292 | |
bec39cab AC |
3293 | test -n "$ac_ct_CC" && break |
3294 | done | |
c906108c | 3295 | |
81ecdfbb RW |
3296 | if test "x$ac_ct_CC" = x; then |
3297 | CC="" | |
3298 | else | |
3299 | case $cross_compiling:$ac_tool_warned in | |
3300 | yes:) | |
3301 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3302 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3303 | ac_tool_warned=yes ;; | |
3304 | esac | |
3305 | CC=$ac_ct_CC | |
3306 | fi | |
bec39cab AC |
3307 | fi |
3308 | ||
3309 | fi | |
3310 | ||
3311 | ||
81ecdfbb RW |
3312 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3313 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3314 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3315 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3316 | |
3317 | # Provide some information about the compiler. | |
81ecdfbb RW |
3318 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3319 | set X $ac_compile | |
3320 | ac_compiler=$2 | |
3321 | for ac_option in --version -v -V -qversion; do | |
3322 | { { ac_try="$ac_compiler $ac_option >&5" | |
3323 | case "(($ac_try" in | |
3324 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3325 | *) ac_try_echo=$ac_try;; | |
3326 | esac | |
3327 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3328 | $as_echo "$ac_try_echo"; } >&5 | |
3329 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3330 | ac_status=$? |
81ecdfbb RW |
3331 | if test -s conftest.err; then |
3332 | sed '10a\ | |
3333 | ... rest of stderr output deleted ... | |
3334 | 10q' conftest.err >conftest.er1 | |
3335 | cat conftest.er1 >&5 | |
81ecdfbb | 3336 | fi |
d0ac1c44 | 3337 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3338 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3339 | test $ac_status = 0; } | |
3340 | done | |
bec39cab | 3341 | |
81ecdfbb | 3342 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3343 | /* end confdefs.h. */ |
3344 | ||
3345 | int | |
3346 | main () | |
3347 | { | |
3348 | ||
3349 | ; | |
3350 | return 0; | |
3351 | } | |
3352 | _ACEOF | |
3353 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3354 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3355 | # Try to create an executable without -o first, disregard a.out. |
3356 | # It will help us diagnose broken compilers, and finding out an intuition | |
3357 | # of exeext. | |
d0ac1c44 SM |
3358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3359 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3360 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3361 | ||
3362 | # The possible output files: | |
3363 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3364 | ||
3365 | ac_rmfiles= | |
3366 | for ac_file in $ac_files | |
3367 | do | |
3368 | case $ac_file in | |
3369 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3370 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3371 | esac | |
3372 | done | |
3373 | rm -f $ac_rmfiles | |
3374 | ||
3375 | if { { ac_try="$ac_link_default" | |
3376 | case "(($ac_try" in | |
3377 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3378 | *) ac_try_echo=$ac_try;; | |
3379 | esac | |
3380 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3381 | $as_echo "$ac_try_echo"; } >&5 | |
3382 | (eval "$ac_link_default") 2>&5 | |
3383 | ac_status=$? | |
3384 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3385 | test $ac_status = 0; }; then : | |
3386 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3387 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3388 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3389 | # so that the user can short-circuit this test for compilers unknown to | |
3390 | # Autoconf. | |
3391 | for ac_file in $ac_files '' | |
bec39cab AC |
3392 | do |
3393 | test -f "$ac_file" || continue | |
3394 | case $ac_file in | |
81ecdfbb | 3395 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3396 | ;; |
3397 | [ab].out ) | |
3398 | # We found the default executable, but exeext='' is most | |
3399 | # certainly right. | |
3400 | break;; | |
3401 | *.* ) | |
81ecdfbb RW |
3402 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3403 | then :; else | |
3404 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3405 | fi | |
3406 | # We set ac_cv_exeext here because the later test for it is not | |
3407 | # safe: cross compilers may not add the suffix if given an `-o' | |
3408 | # argument, so we may need to know it at that point already. | |
3409 | # Even if this section looks crufty: it has the advantage of | |
3410 | # actually working. | |
b4e70030 JB |
3411 | break;; |
3412 | * ) | |
3413 | break;; | |
bec39cab AC |
3414 | esac |
3415 | done | |
81ecdfbb RW |
3416 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3417 | ||
bec39cab | 3418 | else |
81ecdfbb RW |
3419 | ac_file='' |
3420 | fi | |
81ecdfbb | 3421 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3423 | $as_echo "no" >&6; } | |
3424 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3425 | sed 's/^/| /' conftest.$ac_ext >&5 |
3426 | ||
81ecdfbb RW |
3427 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3428 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3429 | as_fn_error 77 "C compiler cannot create executables |
3430 | See \`config.log' for more details" "$LINENO" 5; } | |
3431 | else | |
3432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3433 | $as_echo "yes" >&6; } | |
bec39cab | 3434 | fi |
d0ac1c44 SM |
3435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3436 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3438 | $as_echo "$ac_file" >&6; } | |
b4e70030 | 3439 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3440 | |
d0ac1c44 | 3441 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
b4e70030 | 3442 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3444 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3445 | if { { ac_try="$ac_link" | |
3446 | case "(($ac_try" in | |
3447 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3448 | *) ac_try_echo=$ac_try;; | |
3449 | esac | |
3450 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3451 | $as_echo "$ac_try_echo"; } >&5 | |
3452 | (eval "$ac_link") 2>&5 | |
bec39cab | 3453 | ac_status=$? |
81ecdfbb RW |
3454 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3455 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3456 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3457 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3458 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3459 | # `rm'. | |
3460 | for ac_file in conftest.exe conftest conftest.*; do | |
3461 | test -f "$ac_file" || continue | |
3462 | case $ac_file in | |
81ecdfbb | 3463 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3464 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3465 | break;; |
3466 | * ) break;; | |
3467 | esac | |
3468 | done | |
c906108c | 3469 | else |
81ecdfbb RW |
3470 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3471 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3472 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3473 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3474 | fi |
d0ac1c44 | 3475 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3477 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3478 | |
b4e70030 | 3479 | rm -f conftest.$ac_ext |
bec39cab AC |
3480 | EXEEXT=$ac_cv_exeext |
3481 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3482 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3483 | /* end confdefs.h. */ | |
3484 | #include <stdio.h> | |
3485 | int | |
3486 | main () | |
3487 | { | |
3488 | FILE *f = fopen ("conftest.out", "w"); | |
3489 | return ferror (f) || fclose (f) != 0; | |
3490 | ||
3491 | ; | |
3492 | return 0; | |
3493 | } | |
3494 | _ACEOF | |
3495 | ac_clean_files="$ac_clean_files conftest.out" | |
3496 | # Check that the compiler produces executables we can run. If not, either | |
3497 | # the compiler is broken, or we cross compile. | |
3498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3499 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3500 | if test "$cross_compiling" != yes; then | |
3501 | { { ac_try="$ac_link" | |
3502 | case "(($ac_try" in | |
3503 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3504 | *) ac_try_echo=$ac_try;; | |
3505 | esac | |
3506 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3507 | $as_echo "$ac_try_echo"; } >&5 | |
3508 | (eval "$ac_link") 2>&5 | |
3509 | ac_status=$? | |
3510 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3511 | test $ac_status = 0; } | |
3512 | if { ac_try='./conftest$ac_cv_exeext' | |
3513 | { { case "(($ac_try" in | |
3514 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3515 | *) ac_try_echo=$ac_try;; | |
3516 | esac | |
3517 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3518 | $as_echo "$ac_try_echo"; } >&5 | |
3519 | (eval "$ac_try") 2>&5 | |
3520 | ac_status=$? | |
3521 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3522 | test $ac_status = 0; }; }; then | |
3523 | cross_compiling=no | |
3524 | else | |
3525 | if test "$cross_compiling" = maybe; then | |
3526 | cross_compiling=yes | |
3527 | else | |
3528 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3529 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3530 | as_fn_error $? "cannot run C compiled programs. | |
3531 | If you meant to cross compile, use \`--host'. | |
3532 | See \`config.log' for more details" "$LINENO" 5; } | |
3533 | fi | |
3534 | fi | |
3535 | fi | |
3536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3537 | $as_echo "$cross_compiling" >&6; } | |
3538 | ||
3539 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3540 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3541 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3542 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3543 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3544 | $as_echo_n "(cached) " >&6 |
bec39cab | 3545 | else |
81ecdfbb | 3546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3547 | /* end confdefs.h. */ |
3548 | ||
3549 | int | |
3550 | main () | |
3551 | { | |
3552 | ||
3553 | ; | |
3554 | return 0; | |
3555 | } | |
3556 | _ACEOF | |
3557 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3558 | if { { ac_try="$ac_compile" |
3559 | case "(($ac_try" in | |
3560 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3561 | *) ac_try_echo=$ac_try;; | |
3562 | esac | |
3563 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3564 | $as_echo "$ac_try_echo"; } >&5 | |
3565 | (eval "$ac_compile") 2>&5 | |
3566 | ac_status=$? | |
3567 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3568 | test $ac_status = 0; }; then : | |
3569 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3570 | test -f "$ac_file" || continue; | |
bec39cab | 3571 | case $ac_file in |
81ecdfbb | 3572 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3573 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3574 | break;; | |
3575 | esac | |
3576 | done | |
c906108c | 3577 | else |
81ecdfbb | 3578 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3579 | sed 's/^/| /' conftest.$ac_ext >&5 |
3580 | ||
81ecdfbb RW |
3581 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3582 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3583 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3584 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3585 | fi |
b4e70030 | 3586 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3587 | fi |
81ecdfbb RW |
3588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3589 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3590 | OBJEXT=$ac_cv_objext |
3591 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3593 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3594 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3595 | $as_echo_n "(cached) " >&6 |
c906108c | 3596 | else |
81ecdfbb | 3597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3598 | /* end confdefs.h. */ |
3599 | ||
3600 | int | |
3601 | main () | |
3602 | { | |
3603 | #ifndef __GNUC__ | |
3604 | choke me | |
3605 | #endif | |
3606 | ||
3607 | ; | |
3608 | return 0; | |
3609 | } | |
3610 | _ACEOF | |
81ecdfbb | 3611 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3612 | ac_compiler_gnu=yes |
3613 | else | |
81ecdfbb | 3614 | ac_compiler_gnu=no |
bec39cab | 3615 | fi |
81ecdfbb | 3616 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3617 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3618 | ||
3619 | fi | |
81ecdfbb RW |
3620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3621 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3622 | if test $ac_compiler_gnu = yes; then | |
3623 | GCC=yes | |
3624 | else | |
3625 | GCC= | |
3626 | fi | |
bec39cab AC |
3627 | ac_test_CFLAGS=${CFLAGS+set} |
3628 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3630 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3631 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb | 3632 | $as_echo_n "(cached) " >&6 |
bec39cab | 3633 | else |
81ecdfbb RW |
3634 | ac_save_c_werror_flag=$ac_c_werror_flag |
3635 | ac_c_werror_flag=yes | |
3636 | ac_cv_prog_cc_g=no | |
3637 | CFLAGS="-g" | |
3638 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3639 | /* end confdefs.h. */ |
3640 | ||
3641 | int | |
3642 | main () | |
3643 | { | |
3644 | ||
3645 | ; | |
3646 | return 0; | |
3647 | } | |
3648 | _ACEOF | |
81ecdfbb | 3649 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3650 | ac_cv_prog_cc_g=yes |
3651 | else | |
81ecdfbb RW |
3652 | CFLAGS="" |
3653 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3654 | /* end confdefs.h. */ | |
3655 | ||
3656 | int | |
3657 | main () | |
3658 | { | |
3659 | ||
3660 | ; | |
3661 | return 0; | |
3662 | } | |
3663 | _ACEOF | |
3664 | if ac_fn_c_try_compile "$LINENO"; then : | |
3665 | ||
3666 | else | |
3667 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3668 | CFLAGS="-g" | |
3669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3670 | /* end confdefs.h. */ | |
3671 | ||
3672 | int | |
3673 | main () | |
3674 | { | |
c906108c | 3675 | |
81ecdfbb RW |
3676 | ; |
3677 | return 0; | |
3678 | } | |
3679 | _ACEOF | |
3680 | if ac_fn_c_try_compile "$LINENO"; then : | |
3681 | ac_cv_prog_cc_g=yes | |
3682 | fi | |
3683 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3684 | fi | |
3685 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3686 | fi |
81ecdfbb RW |
3687 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3688 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3689 | fi |
81ecdfbb RW |
3690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3691 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3692 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3693 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3694 | elif test $ac_cv_prog_cc_g = yes; then |
3695 | if test "$GCC" = yes; then | |
3696 | CFLAGS="-g -O2" | |
3697 | else | |
3698 | CFLAGS="-g" | |
3699 | fi | |
3700 | else | |
3701 | if test "$GCC" = yes; then | |
3702 | CFLAGS="-O2" | |
3703 | else | |
3704 | CFLAGS= | |
3705 | fi | |
3706 | fi | |
81ecdfbb RW |
3707 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3708 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3709 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3710 | $as_echo_n "(cached) " >&6 |
bec39cab | 3711 | else |
81ecdfbb | 3712 | ac_cv_prog_cc_c89=no |
bec39cab | 3713 | ac_save_CC=$CC |
81ecdfbb | 3714 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3715 | /* end confdefs.h. */ |
c906108c SS |
3716 | #include <stdarg.h> |
3717 | #include <stdio.h> | |
d0ac1c44 | 3718 | struct stat; |
c906108c SS |
3719 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3720 | struct buf { int x; }; | |
3721 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3722 | static char *e (p, i) | |
3723 | char **p; | |
3724 | int i; | |
3725 | { | |
3726 | return p[i]; | |
3727 | } | |
3728 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3729 | { | |
3730 | char *s; | |
3731 | va_list v; | |
3732 | va_start (v,p); | |
3733 | s = g (p, va_arg (v,int)); | |
3734 | va_end (v); | |
3735 | return s; | |
3736 | } | |
bec39cab AC |
3737 | |
3738 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3739 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3740 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3741 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3742 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3743 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3744 | that's true only with -std. */ |
bec39cab AC |
3745 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3746 | ||
81ecdfbb RW |
3747 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3748 | inside strings and character constants. */ | |
3749 | #define FOO(x) 'x' | |
3750 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3751 | ||
c906108c SS |
3752 | int test (int i, double x); |
3753 | struct s1 {int (*f) (int a);}; | |
3754 | struct s2 {int (*f) (double a);}; | |
3755 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3756 | int argc; | |
3757 | char **argv; | |
bec39cab AC |
3758 | int |
3759 | main () | |
3760 | { | |
c906108c | 3761 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3762 | ; |
3763 | return 0; | |
3764 | } | |
3765 | _ACEOF | |
81ecdfbb RW |
3766 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3767 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3768 | do |
3769 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3770 | if ac_fn_c_try_compile "$LINENO"; then : |
3771 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3772 | fi |
81ecdfbb RW |
3773 | rm -f core conftest.err conftest.$ac_objext |
3774 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3775 | done |
81ecdfbb | 3776 | rm -f conftest.$ac_ext |
bec39cab | 3777 | CC=$ac_save_CC |
c906108c SS |
3778 | |
3779 | fi | |
81ecdfbb RW |
3780 | # AC_CACHE_VAL |
3781 | case "x$ac_cv_prog_cc_c89" in | |
3782 | x) | |
3783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3784 | $as_echo "none needed" >&6; } ;; | |
3785 | xno) | |
3786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3787 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3788 | *) |
81ecdfbb RW |
3789 | CC="$CC $ac_cv_prog_cc_c89" |
3790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3791 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3792 | esac |
81ecdfbb | 3793 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3794 | |
b4e70030 JB |
3795 | fi |
3796 | ||
bec39cab AC |
3797 | ac_ext=c |
3798 | ac_cpp='$CPP $CPPFLAGS' | |
3799 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3800 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3801 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3802 | |
3bc3d82a PA |
3803 | ac_ext=cpp |
3804 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3805 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3806 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3807 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3808 | if test -z "$CXX"; then | |
3809 | if test -n "$CCC"; then | |
3810 | CXX=$CCC | |
3811 | else | |
3812 | if test -n "$ac_tool_prefix"; then | |
3813 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3814 | do | |
3815 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3816 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3818 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3819 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3820 | $as_echo_n "(cached) " >&6 |
3821 | else | |
3822 | if test -n "$CXX"; then | |
3823 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3824 | else | |
3825 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3826 | for as_dir in $PATH | |
3827 | do | |
3828 | IFS=$as_save_IFS | |
3829 | test -z "$as_dir" && as_dir=. | |
3830 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3831 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3832 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3833 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3834 | break 2 | |
3835 | fi | |
3836 | done | |
3837 | done | |
3838 | IFS=$as_save_IFS | |
3839 | ||
3840 | fi | |
3841 | fi | |
3842 | CXX=$ac_cv_prog_CXX | |
3843 | if test -n "$CXX"; then | |
3844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3845 | $as_echo "$CXX" >&6; } | |
3846 | else | |
3847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3848 | $as_echo "no" >&6; } | |
3849 | fi | |
3850 | ||
3851 | ||
3852 | test -n "$CXX" && break | |
3853 | done | |
3854 | fi | |
3855 | if test -z "$CXX"; then | |
3856 | ac_ct_CXX=$CXX | |
3857 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3858 | do | |
3859 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3860 | set dummy $ac_prog; ac_word=$2 | |
3861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3862 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3863 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3864 | $as_echo_n "(cached) " >&6 |
3865 | else | |
3866 | if test -n "$ac_ct_CXX"; then | |
3867 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3868 | else | |
3869 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3870 | for as_dir in $PATH | |
3871 | do | |
3872 | IFS=$as_save_IFS | |
3873 | test -z "$as_dir" && as_dir=. | |
3874 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3875 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3876 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3877 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3878 | break 2 | |
3879 | fi | |
3880 | done | |
3881 | done | |
3882 | IFS=$as_save_IFS | |
3883 | ||
3884 | fi | |
3885 | fi | |
3886 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3887 | if test -n "$ac_ct_CXX"; then | |
3888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3889 | $as_echo "$ac_ct_CXX" >&6; } | |
3890 | else | |
3891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3892 | $as_echo "no" >&6; } | |
3893 | fi | |
3894 | ||
3895 | ||
3896 | test -n "$ac_ct_CXX" && break | |
3897 | done | |
3898 | ||
3899 | if test "x$ac_ct_CXX" = x; then | |
3900 | CXX="g++" | |
3901 | else | |
3902 | case $cross_compiling:$ac_tool_warned in | |
3903 | yes:) | |
3904 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3905 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3906 | ac_tool_warned=yes ;; | |
3907 | esac | |
3908 | CXX=$ac_ct_CXX | |
3909 | fi | |
3910 | fi | |
3911 | ||
3912 | fi | |
3913 | fi | |
3914 | # Provide some information about the compiler. | |
3915 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3916 | set X $ac_compile | |
3917 | ac_compiler=$2 | |
3918 | for ac_option in --version -v -V -qversion; do | |
3919 | { { ac_try="$ac_compiler $ac_option >&5" | |
3920 | case "(($ac_try" in | |
3921 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3922 | *) ac_try_echo=$ac_try;; | |
3923 | esac | |
3924 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3925 | $as_echo "$ac_try_echo"; } >&5 | |
3926 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3927 | ac_status=$? | |
3928 | if test -s conftest.err; then | |
3929 | sed '10a\ | |
3930 | ... rest of stderr output deleted ... | |
3931 | 10q' conftest.err >conftest.er1 | |
3932 | cat conftest.er1 >&5 | |
3bc3d82a | 3933 | fi |
d0ac1c44 | 3934 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3935 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3936 | test $ac_status = 0; } | |
3937 | done | |
3938 | ||
3939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3940 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3941 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3942 | $as_echo_n "(cached) " >&6 |
3943 | else | |
3944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3945 | /* end confdefs.h. */ | |
3946 | ||
3947 | int | |
3948 | main () | |
3949 | { | |
3950 | #ifndef __GNUC__ | |
3951 | choke me | |
3952 | #endif | |
3953 | ||
3954 | ; | |
3955 | return 0; | |
3956 | } | |
3957 | _ACEOF | |
3958 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3959 | ac_compiler_gnu=yes | |
3960 | else | |
3961 | ac_compiler_gnu=no | |
3962 | fi | |
3963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3964 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3965 | ||
3966 | fi | |
3967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3968 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3969 | if test $ac_compiler_gnu = yes; then | |
3970 | GXX=yes | |
3971 | else | |
3972 | GXX= | |
3973 | fi | |
3974 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3975 | ac_save_CXXFLAGS=$CXXFLAGS | |
3976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3977 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3978 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3979 | $as_echo_n "(cached) " >&6 |
3980 | else | |
3981 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3982 | ac_cxx_werror_flag=yes | |
3983 | ac_cv_prog_cxx_g=no | |
3984 | CXXFLAGS="-g" | |
3985 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3986 | /* end confdefs.h. */ | |
3987 | ||
3988 | int | |
3989 | main () | |
3990 | { | |
3991 | ||
3992 | ; | |
3993 | return 0; | |
3994 | } | |
3995 | _ACEOF | |
3996 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3997 | ac_cv_prog_cxx_g=yes | |
3998 | else | |
3999 | CXXFLAGS="" | |
4000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4001 | /* end confdefs.h. */ | |
4002 | ||
4003 | int | |
4004 | main () | |
4005 | { | |
4006 | ||
4007 | ; | |
4008 | return 0; | |
4009 | } | |
4010 | _ACEOF | |
4011 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4012 | ||
4013 | else | |
4014 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4015 | CXXFLAGS="-g" | |
4016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4017 | /* end confdefs.h. */ | |
4018 | ||
4019 | int | |
4020 | main () | |
4021 | { | |
4022 | ||
4023 | ; | |
4024 | return 0; | |
4025 | } | |
4026 | _ACEOF | |
4027 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4028 | ac_cv_prog_cxx_g=yes | |
4029 | fi | |
4030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4031 | fi | |
4032 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4033 | fi | |
4034 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4035 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4036 | fi | |
4037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
4038 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
4039 | if test "$ac_test_CXXFLAGS" = set; then | |
4040 | CXXFLAGS=$ac_save_CXXFLAGS | |
4041 | elif test $ac_cv_prog_cxx_g = yes; then | |
4042 | if test "$GXX" = yes; then | |
4043 | CXXFLAGS="-g -O2" | |
4044 | else | |
4045 | CXXFLAGS="-g" | |
4046 | fi | |
4047 | else | |
4048 | if test "$GXX" = yes; then | |
4049 | CXXFLAGS="-O2" | |
4050 | else | |
4051 | CXXFLAGS= | |
4052 | fi | |
4053 | fi | |
4054 | ac_ext=c | |
4055 | ac_cpp='$CPP $CPPFLAGS' | |
4056 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4057 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4058 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4059 | ||
4060 | ||
60ca704f | 4061 | |
bec39cab AC |
4062 | ac_ext=c |
4063 | ac_cpp='$CPP $CPPFLAGS' | |
4064 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4065 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4066 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
4067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
4068 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
4069 | # On Suns, sometimes $CPP names a directory. |
4070 | if test -n "$CPP" && test -d "$CPP"; then | |
4071 | CPP= | |
8bb2c122 | 4072 | fi |
bec39cab | 4073 | if test -z "$CPP"; then |
d0ac1c44 | 4074 | if ${ac_cv_prog_CPP+:} false; then : |
81ecdfbb | 4075 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
4076 | else |
4077 | # Double quotes because CPP needs to be expanded | |
4078 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4079 | do | |
4080 | ac_preproc_ok=false | |
4081 | for ac_c_preproc_warn_flag in '' yes | |
4082 | do | |
4083 | # Use a header file that comes with gcc, so configuring glibc | |
4084 | # with a fresh cross-compiler works. | |
4085 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4086 | # <limits.h> exists even on freestanding compilers. | |
4087 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4088 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4089 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4090 | /* end confdefs.h. */ |
4091 | #ifdef __STDC__ | |
4092 | # include <limits.h> | |
4093 | #else | |
4094 | # include <assert.h> | |
4095 | #endif | |
4096 | Syntax error | |
4097 | _ACEOF | |
81ecdfbb | 4098 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4099 | |
81ecdfbb | 4100 | else |
bec39cab AC |
4101 | # Broken: fails on valid input. |
4102 | continue | |
4103 | fi | |
d0ac1c44 | 4104 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4105 | |
81ecdfbb | 4106 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4107 | # can be detected and how. |
81ecdfbb | 4108 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4109 | /* end confdefs.h. */ |
4110 | #include <ac_nonexistent.h> | |
4111 | _ACEOF | |
81ecdfbb | 4112 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4113 | # Broken: success on invalid input. |
4114 | continue | |
8bb2c122 | 4115 | else |
bec39cab AC |
4116 | # Passes both tests. |
4117 | ac_preproc_ok=: | |
4118 | break | |
8bb2c122 | 4119 | fi |
d0ac1c44 | 4120 | rm -f conftest.err conftest.i conftest.$ac_ext |
8bb2c122 | 4121 | |
bec39cab AC |
4122 | done |
4123 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4124 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb | 4125 | if $ac_preproc_ok; then : |
bec39cab AC |
4126 | break |
4127 | fi | |
8bb2c122 | 4128 | |
bec39cab AC |
4129 | done |
4130 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 4131 | |
c906108c | 4132 | fi |
bec39cab AC |
4133 | CPP=$ac_cv_prog_CPP |
4134 | else | |
4135 | ac_cv_prog_CPP=$CPP | |
c906108c | 4136 | fi |
81ecdfbb RW |
4137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
4138 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
4139 | ac_preproc_ok=false |
4140 | for ac_c_preproc_warn_flag in '' yes | |
4141 | do | |
4142 | # Use a header file that comes with gcc, so configuring glibc | |
4143 | # with a fresh cross-compiler works. | |
4144 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4145 | # <limits.h> exists even on freestanding compilers. | |
4146 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4147 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4149 | /* end confdefs.h. */ |
4150 | #ifdef __STDC__ | |
4151 | # include <limits.h> | |
4152 | #else | |
4153 | # include <assert.h> | |
4154 | #endif | |
4155 | Syntax error | |
4156 | _ACEOF | |
81ecdfbb | 4157 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4158 | |
81ecdfbb | 4159 | else |
bec39cab AC |
4160 | # Broken: fails on valid input. |
4161 | continue | |
4162 | fi | |
d0ac1c44 | 4163 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4164 | |
81ecdfbb | 4165 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4166 | # can be detected and how. |
81ecdfbb | 4167 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4168 | /* end confdefs.h. */ |
4169 | #include <ac_nonexistent.h> | |
4170 | _ACEOF | |
81ecdfbb | 4171 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4172 | # Broken: success on invalid input. |
4173 | continue | |
c906108c | 4174 | else |
bec39cab AC |
4175 | # Passes both tests. |
4176 | ac_preproc_ok=: | |
4177 | break | |
c906108c | 4178 | fi |
d0ac1c44 | 4179 | rm -f conftest.err conftest.i conftest.$ac_ext |
c906108c | 4180 | |
bec39cab AC |
4181 | done |
4182 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4183 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
4184 | if $ac_preproc_ok; then : |
4185 | ||
c906108c | 4186 | else |
81ecdfbb RW |
4187 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4188 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4189 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4190 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 4191 | fi |
c906108c | 4192 | |
bec39cab AC |
4193 | ac_ext=c |
4194 | ac_cpp='$CPP $CPPFLAGS' | |
4195 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4196 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4197 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4198 | ||
4199 | ||
81ecdfbb RW |
4200 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4201 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 4202 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 4203 | $as_echo_n "(cached) " >&6 |
4e8d927d | 4204 | else |
81ecdfbb RW |
4205 | if test -z "$GREP"; then |
4206 | ac_path_GREP_found=false | |
4207 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4208 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4209 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4210 | do | |
4211 | IFS=$as_save_IFS | |
4212 | test -z "$as_dir" && as_dir=. | |
4213 | for ac_prog in grep ggrep; do | |
4214 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4215 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4216 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
4217 | # Check for GNU ac_path_GREP and select it if it is found. |
4218 | # Check for GNU $ac_path_GREP | |
4219 | case `"$ac_path_GREP" --version 2>&1` in | |
4220 | *GNU*) | |
4221 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4222 | *) | |
4223 | ac_count=0 | |
4224 | $as_echo_n 0123456789 >"conftest.in" | |
4225 | while : | |
4226 | do | |
4227 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4228 | mv "conftest.tmp" "conftest.in" | |
4229 | cp "conftest.in" "conftest.nl" | |
4230 | $as_echo 'GREP' >> "conftest.nl" | |
4231 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4232 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4233 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4234 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4235 | # Best one so far, save it but keep looking for a better one | |
4236 | ac_cv_path_GREP="$ac_path_GREP" | |
4237 | ac_path_GREP_max=$ac_count | |
bec39cab | 4238 | fi |
81ecdfbb RW |
4239 | # 10*(2^10) chars as input seems more than enough |
4240 | test $ac_count -gt 10 && break | |
4241 | done | |
4242 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4243 | esac | |
bec39cab | 4244 | |
81ecdfbb RW |
4245 | $ac_path_GREP_found && break 3 |
4246 | done | |
4247 | done | |
4248 | done | |
4249 | IFS=$as_save_IFS | |
4250 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 4251 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4252 | fi |
c906108c | 4253 | else |
81ecdfbb | 4254 | ac_cv_path_GREP=$GREP |
c906108c | 4255 | fi |
c906108c | 4256 | |
81ecdfbb RW |
4257 | fi |
4258 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4259 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4260 | GREP="$ac_cv_path_GREP" | |
c906108c | 4261 | |
c906108c | 4262 | |
81ecdfbb RW |
4263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4264 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 4265 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb | 4266 | $as_echo_n "(cached) " >&6 |
783e057b | 4267 | else |
81ecdfbb RW |
4268 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4269 | then ac_cv_path_EGREP="$GREP -E" | |
4270 | else | |
4271 | if test -z "$EGREP"; then | |
4272 | ac_path_EGREP_found=false | |
4273 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4274 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4275 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4276 | do |
4277 | IFS=$as_save_IFS | |
4278 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4279 | for ac_prog in egrep; do |
4280 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4281 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4282 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4283 | # Check for GNU ac_path_EGREP and select it if it is found. |
4284 | # Check for GNU $ac_path_EGREP | |
4285 | case `"$ac_path_EGREP" --version 2>&1` in | |
4286 | *GNU*) | |
4287 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4288 | *) | |
4289 | ac_count=0 | |
4290 | $as_echo_n 0123456789 >"conftest.in" | |
4291 | while : | |
4292 | do | |
4293 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4294 | mv "conftest.tmp" "conftest.in" | |
4295 | cp "conftest.in" "conftest.nl" | |
4296 | $as_echo 'EGREP' >> "conftest.nl" | |
4297 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4298 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4299 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4300 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4301 | # Best one so far, save it but keep looking for a better one | |
4302 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4303 | ac_path_EGREP_max=$ac_count | |
4304 | fi | |
4305 | # 10*(2^10) chars as input seems more than enough | |
4306 | test $ac_count -gt 10 && break | |
4307 | done | |
4308 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4309 | esac | |
bec39cab | 4310 | |
81ecdfbb RW |
4311 | $ac_path_EGREP_found && break 3 |
4312 | done | |
4313 | done | |
4314 | done | |
4315 | IFS=$as_save_IFS | |
4316 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4317 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
783e057b | 4318 | fi |
783e057b | 4319 | else |
81ecdfbb | 4320 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4321 | fi |
4322 | ||
81ecdfbb | 4323 | fi |
783e057b | 4324 | fi |
81ecdfbb RW |
4325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4326 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4327 | EGREP="$ac_cv_path_EGREP" | |
4328 | ||
783e057b | 4329 | |
81ecdfbb RW |
4330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4331 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4332 | if ${ac_cv_header_stdc+:} false; then : |
81ecdfbb | 4333 | $as_echo_n "(cached) " >&6 |
783e057b | 4334 | else |
81ecdfbb | 4335 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4336 | /* end confdefs.h. */ |
783e057b | 4337 | #include <stdlib.h> |
bec39cab | 4338 | #include <stdarg.h> |
783e057b DJ |
4339 | #include <string.h> |
4340 | #include <float.h> | |
c906108c | 4341 | |
bec39cab AC |
4342 | int |
4343 | main () | |
4344 | { | |
c906108c | 4345 | |
bec39cab AC |
4346 | ; |
4347 | return 0; | |
4348 | } | |
4349 | _ACEOF | |
81ecdfbb | 4350 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4351 | ac_cv_header_stdc=yes |
c906108c | 4352 | else |
81ecdfbb | 4353 | ac_cv_header_stdc=no |
c906108c | 4354 | fi |
81ecdfbb | 4355 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4356 | |
783e057b DJ |
4357 | if test $ac_cv_header_stdc = yes; then |
4358 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4360 | /* end confdefs.h. */ |
4361 | #include <string.h> | |
c906108c | 4362 | |
783e057b DJ |
4363 | _ACEOF |
4364 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4365 | $EGREP "memchr" >/dev/null 2>&1; then : |
4366 | ||
c906108c | 4367 | else |
783e057b | 4368 | ac_cv_header_stdc=no |
c906108c | 4369 | fi |
783e057b | 4370 | rm -f conftest* |
c906108c SS |
4371 | |
4372 | fi | |
4373 | ||
783e057b DJ |
4374 | if test $ac_cv_header_stdc = yes; then |
4375 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4377 | /* end confdefs.h. */ |
4378 | #include <stdlib.h> | |
bec39cab | 4379 | |
783e057b DJ |
4380 | _ACEOF |
4381 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4382 | $EGREP "free" >/dev/null 2>&1; then : |
4383 | ||
bec39cab | 4384 | else |
783e057b | 4385 | ac_cv_header_stdc=no |
bec39cab | 4386 | fi |
783e057b | 4387 | rm -f conftest* |
bec39cab AC |
4388 | |
4389 | fi | |
bec39cab | 4390 | |
783e057b DJ |
4391 | if test $ac_cv_header_stdc = yes; then |
4392 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4393 | if test "$cross_compiling" = yes; then : |
783e057b | 4394 | : |
bec39cab | 4395 | else |
81ecdfbb | 4396 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4397 | /* end confdefs.h. */ |
4398 | #include <ctype.h> | |
81ecdfbb | 4399 | #include <stdlib.h> |
783e057b DJ |
4400 | #if ((' ' & 0x0FF) == 0x020) |
4401 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4402 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4403 | #else | |
4404 | # define ISLOWER(c) \ | |
4405 | (('a' <= (c) && (c) <= 'i') \ | |
4406 | || ('j' <= (c) && (c) <= 'r') \ | |
4407 | || ('s' <= (c) && (c) <= 'z')) | |
4408 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4409 | #endif | |
4410 | ||
4411 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4412 | int | |
4413 | main () | |
4414 | { | |
4415 | int i; | |
4416 | for (i = 0; i < 256; i++) | |
4417 | if (XOR (islower (i), ISLOWER (i)) | |
4418 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4419 | return 2; |
4420 | return 0; | |
783e057b DJ |
4421 | } |
4422 | _ACEOF | |
81ecdfbb | 4423 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4424 | |
81ecdfbb RW |
4425 | else |
4426 | ac_cv_header_stdc=no | |
783e057b | 4427 | fi |
81ecdfbb RW |
4428 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4429 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4430 | fi |
81ecdfbb | 4431 | |
783e057b DJ |
4432 | fi |
4433 | fi | |
81ecdfbb RW |
4434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4435 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4436 | if test $ac_cv_header_stdc = yes; then |
4437 | ||
81ecdfbb | 4438 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4439 | |
4440 | fi | |
4441 | ||
4442 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4443 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4444 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4445 | do : |
4446 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4447 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4448 | " | |
d0ac1c44 | 4449 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
783e057b | 4450 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4451 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4452 | _ACEOF |
4453 | ||
4454 | fi | |
4455 | ||
4456 | done | |
4457 | ||
4458 | ||
4459 | ||
81ecdfbb | 4460 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4461 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
783e057b DJ |
4462 | MINIX=yes |
4463 | else | |
4464 | MINIX= | |
4465 | fi | |
4466 | ||
4467 | ||
4468 | if test "$MINIX" = yes; then | |
4469 | ||
81ecdfbb | 4470 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4471 | |
4472 | ||
81ecdfbb | 4473 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4474 | |
4475 | ||
81ecdfbb | 4476 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4477 | |
4478 | fi | |
4479 | ||
4480 | ||
81ecdfbb RW |
4481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4482 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4483 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
81ecdfbb | 4484 | $as_echo_n "(cached) " >&6 |
783e057b | 4485 | else |
81ecdfbb | 4486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4487 | /* end confdefs.h. */ |
4488 | ||
d0ac1c44 SM |
4489 | # define __EXTENSIONS__ 1 |
4490 | $ac_includes_default | |
783e057b DJ |
4491 | int |
4492 | main () | |
4493 | { | |
4494 | ||
4495 | ; | |
4496 | return 0; | |
4497 | } | |
4498 | _ACEOF | |
81ecdfbb | 4499 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4500 | ac_cv_safe_to_define___extensions__=yes |
4501 | else | |
81ecdfbb | 4502 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4503 | fi |
81ecdfbb | 4504 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4505 | fi |
81ecdfbb RW |
4506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4507 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4508 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4509 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4510 | |
81ecdfbb | 4511 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4512 | |
81ecdfbb | 4513 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4514 | |
81ecdfbb | 4515 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4516 | |
81ecdfbb | 4517 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4518 | |
4519 | ||
c971b7fa PA |
4520 | ac_aux_dir= |
4521 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4522 | if test -f "$ac_dir/install-sh"; then |
4523 | ac_aux_dir=$ac_dir | |
4524 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4525 | break | |
4526 | elif test -f "$ac_dir/install.sh"; then | |
4527 | ac_aux_dir=$ac_dir | |
4528 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4529 | break | |
4530 | elif test -f "$ac_dir/shtool"; then | |
4531 | ac_aux_dir=$ac_dir | |
4532 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4533 | break | |
4534 | fi | |
c971b7fa PA |
4535 | done |
4536 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4537 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
c971b7fa | 4538 | fi |
770d76d7 | 4539 | |
c971b7fa PA |
4540 | # These three variables are undocumented and unsupported, |
4541 | # and are intended to be withdrawn in a future Autoconf release. | |
4542 | # They can cause serious problems if a builder's source tree is in a directory | |
4543 | # whose full name contains unusual characters. | |
4544 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4545 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4546 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4547 | |
770d76d7 | 4548 | |
c971b7fa PA |
4549 | # Make sure we can run config.sub. |
4550 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4551 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 | 4552 | |
c971b7fa PA |
4553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4554 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4555 | if ${ac_cv_build+:} false; then : |
c971b7fa | 4556 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4557 | else |
c971b7fa PA |
4558 | ac_build_alias=$build_alias |
4559 | test "x$ac_build_alias" = x && | |
4560 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4561 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4562 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
c971b7fa | 4563 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4564 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
c971b7fa | 4565 | |
770d76d7 | 4566 | fi |
c971b7fa PA |
4567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4568 | $as_echo "$ac_cv_build" >&6; } | |
4569 | case $ac_cv_build in | |
4570 | *-*-*) ;; | |
d0ac1c44 | 4571 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 | 4572 | esac |
c971b7fa PA |
4573 | build=$ac_cv_build |
4574 | ac_save_IFS=$IFS; IFS='-' | |
4575 | set x $ac_cv_build | |
4576 | shift | |
4577 | build_cpu=$1 | |
4578 | build_vendor=$2 | |
4579 | shift; shift | |
4580 | # Remember, the first character of IFS is used to create $*, | |
4581 | # except with old shells: | |
4582 | build_os=$* | |
4583 | IFS=$ac_save_IFS | |
4584 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4585 | |
4586 | ||
c971b7fa PA |
4587 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4588 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4589 | if ${ac_cv_host+:} false; then : |
81ecdfbb RW |
4590 | $as_echo_n "(cached) " >&6 |
4591 | else | |
c971b7fa PA |
4592 | if test "x$host_alias" = x; then |
4593 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4594 | else |
c971b7fa | 4595 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
d0ac1c44 | 4596 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
81ecdfbb | 4597 | fi |
81ecdfbb RW |
4598 | |
4599 | fi | |
c971b7fa PA |
4600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4601 | $as_echo "$ac_cv_host" >&6; } | |
4602 | case $ac_cv_host in | |
4603 | *-*-*) ;; | |
d0ac1c44 | 4604 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
81ecdfbb | 4605 | esac |
c971b7fa PA |
4606 | host=$ac_cv_host |
4607 | ac_save_IFS=$IFS; IFS='-' | |
4608 | set x $ac_cv_host | |
4609 | shift | |
4610 | host_cpu=$1 | |
4611 | host_vendor=$2 | |
4612 | shift; shift | |
4613 | # Remember, the first character of IFS is used to create $*, | |
4614 | # except with old shells: | |
4615 | host_os=$* | |
4616 | IFS=$ac_save_IFS | |
4617 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4618 | |
4619 | ||
4620 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4621 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4622 | if ${ac_cv_target+:} false; then : |
3388710e JM |
4623 | $as_echo_n "(cached) " >&6 |
4624 | else | |
4625 | if test "x$target_alias" = x; then | |
4626 | ac_cv_target=$ac_cv_host | |
4627 | else | |
4628 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
d0ac1c44 | 4629 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
3388710e JM |
4630 | fi |
4631 | ||
4632 | fi | |
4633 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4634 | $as_echo "$ac_cv_target" >&6; } | |
4635 | case $ac_cv_target in | |
4636 | *-*-*) ;; | |
d0ac1c44 | 4637 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
3388710e JM |
4638 | esac |
4639 | target=$ac_cv_target | |
4640 | ac_save_IFS=$IFS; IFS='-' | |
4641 | set x $ac_cv_target | |
4642 | shift | |
4643 | target_cpu=$1 | |
4644 | target_vendor=$2 | |
4645 | shift; shift | |
4646 | # Remember, the first character of IFS is used to create $*, | |
4647 | # except with old shells: | |
4648 | target_os=$* | |
4649 | IFS=$ac_save_IFS | |
4650 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4651 | ||
4652 | ||
4653 | # The aliases save the names the user supplied, while $host etc. | |
4654 | # will get canonicalized. | |
4655 | test -n "$target_alias" && | |
4656 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4657 | NONENONEs,x,x, && | |
4658 | program_prefix=${target_alias}- | |
4659 | ||
4660 | # The tests for host and target for $enable_largefile require | |
4661 | # canonical names. | |
4662 | ||
4663 | ||
81ecdfbb | 4664 | |
da2f07f1 JK |
4665 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4666 | # even in directories otherwise not depending on the $plugins option. | |
4667 | ||
4668 | ||
2974be62 AM |
4669 | maybe_plugins=no |
4670 | for ac_header in dlfcn.h | |
4671 | do : | |
4672 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4673 | " | |
d0ac1c44 | 4674 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : |
2974be62 AM |
4675 | cat >>confdefs.h <<_ACEOF |
4676 | #define HAVE_DLFCN_H 1 | |
4677 | _ACEOF | |
4678 | maybe_plugins=yes | |
4679 | fi | |
4680 | ||
4681 | done | |
4682 | ||
4683 | for ac_header in windows.h | |
4684 | do : | |
4685 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4686 | " | |
d0ac1c44 | 4687 | if test "x$ac_cv_header_windows_h" = xyes; then : |
2974be62 AM |
4688 | cat >>confdefs.h <<_ACEOF |
4689 | #define HAVE_WINDOWS_H 1 | |
4690 | _ACEOF | |
4691 | maybe_plugins=yes | |
4692 | fi | |
4693 | ||
4694 | done | |
4695 | ||
4696 | ||
4697 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4698 | if test "${enable_plugins+set}" = set; then : |
4699 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4700 | no) plugins=no ;; |
4701 | *) plugins=yes | |
4702 | if test "$maybe_plugins" != "yes" ; then | |
d0ac1c44 | 4703 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 |
2974be62 AM |
4704 | fi ;; |
4705 | esac | |
da2f07f1 | 4706 | else |
2974be62 AM |
4707 | plugins=$maybe_plugins |
4708 | ||
da2f07f1 JK |
4709 | fi |
4710 | ||
2974be62 | 4711 | if test "$plugins" = "yes"; then |
458412c3 TT |
4712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
4713 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
d0ac1c44 | 4714 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4715 | $as_echo_n "(cached) " >&6 |
4716 | else | |
4717 | ac_func_search_save_LIBS=$LIBS | |
4718 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4719 | /* end confdefs.h. */ | |
4720 | ||
4721 | /* Override any GCC internal prototype to avoid an error. | |
4722 | Use char because int might match the return type of a GCC | |
4723 | builtin and then its argument prototype would still apply. */ | |
4724 | #ifdef __cplusplus | |
4725 | extern "C" | |
4726 | #endif | |
458412c3 | 4727 | char dlsym (); |
2974be62 AM |
4728 | int |
4729 | main () | |
4730 | { | |
458412c3 | 4731 | return dlsym (); |
2974be62 AM |
4732 | ; |
4733 | return 0; | |
4734 | } | |
4735 | _ACEOF | |
4736 | for ac_lib in '' dl; do | |
4737 | if test -z "$ac_lib"; then | |
4738 | ac_res="none required" | |
4739 | else | |
4740 | ac_res=-l$ac_lib | |
4741 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4742 | fi | |
4743 | if ac_fn_c_try_link "$LINENO"; then : | |
458412c3 | 4744 | ac_cv_search_dlsym=$ac_res |
2974be62 AM |
4745 | fi |
4746 | rm -f core conftest.err conftest.$ac_objext \ | |
4747 | conftest$ac_exeext | |
d0ac1c44 | 4748 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4749 | break |
4750 | fi | |
4751 | done | |
d0ac1c44 | 4752 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4753 | |
4754 | else | |
458412c3 | 4755 | ac_cv_search_dlsym=no |
2974be62 AM |
4756 | fi |
4757 | rm conftest.$ac_ext | |
4758 | LIBS=$ac_func_search_save_LIBS | |
4759 | fi | |
458412c3 TT |
4760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
4761 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
4762 | ac_res=$ac_cv_search_dlsym | |
2974be62 AM |
4763 | if test "$ac_res" != no; then : |
4764 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4765 | ||
4766 | fi | |
4767 | ||
4768 | fi | |
da2f07f1 JK |
4769 | |
4770 | ||
4771 | case "${host}" in | |
4772 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4773 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4774 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4775 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4776 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4777 | # large-file support through the --enable-largefile switch, disable | |
4778 | # large-file support in favor of procfs support. | |
4779 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4780 | && : ${enable_largefile="no"} | |
4781 | ;; | |
4782 | esac | |
4783 | ||
4784 | # Check whether --enable-largefile was given. | |
4785 | if test "${enable_largefile+set}" = set; then : | |
4786 | enableval=$enable_largefile; | |
4787 | fi | |
4788 | ||
4789 | if test "$enable_largefile" != no; then | |
4790 | ||
4791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4792 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4793 | if ${ac_cv_sys_largefile_CC+:} false; then : |
da2f07f1 JK |
4794 | $as_echo_n "(cached) " >&6 |
4795 | else | |
4796 | ac_cv_sys_largefile_CC=no | |
4797 | if test "$GCC" != yes; then | |
4798 | ac_save_CC=$CC | |
4799 | while :; do | |
4800 | # IRIX 6.2 and later do not support large files by default, | |
4801 | # so use the C compiler's -n32 option if that helps. | |
4802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4803 | /* end confdefs.h. */ | |
4804 | #include <sys/types.h> | |
4805 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4806 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4807 | since some C++ compilers masquerading as C compilers | |
4808 | incorrectly reject 9223372036854775807. */ | |
4809 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4810 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4811 | && LARGE_OFF_T % 2147483647 == 1) | |
4812 | ? 1 : -1]; | |
4813 | int | |
4814 | main () | |
4815 | { | |
4816 | ||
4817 | ; | |
4818 | return 0; | |
4819 | } | |
4820 | _ACEOF | |
4821 | if ac_fn_c_try_compile "$LINENO"; then : | |
4822 | break | |
4823 | fi | |
4824 | rm -f core conftest.err conftest.$ac_objext | |
4825 | CC="$CC -n32" | |
4826 | if ac_fn_c_try_compile "$LINENO"; then : | |
4827 | ac_cv_sys_largefile_CC=' -n32'; break | |
4828 | fi | |
4829 | rm -f core conftest.err conftest.$ac_objext | |
4830 | break | |
4831 | done | |
4832 | CC=$ac_save_CC | |
4833 | rm -f conftest.$ac_ext | |
4834 | fi | |
4835 | fi | |
4836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4837 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4838 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4839 | CC=$CC$ac_cv_sys_largefile_CC | |
4840 | fi | |
4841 | ||
4842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4843 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4844 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
da2f07f1 JK |
4845 | $as_echo_n "(cached) " >&6 |
4846 | else | |
4847 | while :; do | |
4848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4849 | /* end confdefs.h. */ | |
4850 | #include <sys/types.h> | |
4851 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4852 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4853 | since some C++ compilers masquerading as C compilers | |
4854 | incorrectly reject 9223372036854775807. */ | |
4855 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4856 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4857 | && LARGE_OFF_T % 2147483647 == 1) | |
4858 | ? 1 : -1]; | |
4859 | int | |
4860 | main () | |
4861 | { | |
4862 | ||
4863 | ; | |
4864 | return 0; | |
4865 | } | |
4866 | _ACEOF | |
4867 | if ac_fn_c_try_compile "$LINENO"; then : | |
4868 | ac_cv_sys_file_offset_bits=no; break | |
4869 | fi | |
4870 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4872 | /* end confdefs.h. */ | |
4873 | #define _FILE_OFFSET_BITS 64 | |
4874 | #include <sys/types.h> | |
4875 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4876 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4877 | since some C++ compilers masquerading as C compilers | |
4878 | incorrectly reject 9223372036854775807. */ | |
4879 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4880 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4881 | && LARGE_OFF_T % 2147483647 == 1) | |
4882 | ? 1 : -1]; | |
4883 | int | |
4884 | main () | |
4885 | { | |
4886 | ||
4887 | ; | |
4888 | return 0; | |
4889 | } | |
4890 | _ACEOF | |
4891 | if ac_fn_c_try_compile "$LINENO"; then : | |
4892 | ac_cv_sys_file_offset_bits=64; break | |
4893 | fi | |
4894 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4895 | ac_cv_sys_file_offset_bits=unknown | |
4896 | break | |
4897 | done | |
4898 | fi | |
4899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4900 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4901 | case $ac_cv_sys_file_offset_bits in #( | |
4902 | no | unknown) ;; | |
4903 | *) | |
4904 | cat >>confdefs.h <<_ACEOF | |
4905 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4906 | _ACEOF | |
4907 | ;; | |
4908 | esac | |
4909 | rm -rf conftest* | |
4910 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4912 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4913 | if ${ac_cv_sys_large_files+:} false; then : |
da2f07f1 JK |
4914 | $as_echo_n "(cached) " >&6 |
4915 | else | |
4916 | while :; do | |
4917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4918 | /* end confdefs.h. */ | |
4919 | #include <sys/types.h> | |
4920 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4921 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4922 | since some C++ compilers masquerading as C compilers | |
4923 | incorrectly reject 9223372036854775807. */ | |
4924 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4925 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4926 | && LARGE_OFF_T % 2147483647 == 1) | |
4927 | ? 1 : -1]; | |
4928 | int | |
4929 | main () | |
4930 | { | |
4931 | ||
4932 | ; | |
4933 | return 0; | |
4934 | } | |
4935 | _ACEOF | |
4936 | if ac_fn_c_try_compile "$LINENO"; then : | |
4937 | ac_cv_sys_large_files=no; break | |
4938 | fi | |
4939 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4941 | /* end confdefs.h. */ | |
4942 | #define _LARGE_FILES 1 | |
4943 | #include <sys/types.h> | |
4944 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4945 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4946 | since some C++ compilers masquerading as C compilers | |
4947 | incorrectly reject 9223372036854775807. */ | |
4948 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4949 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4950 | && LARGE_OFF_T % 2147483647 == 1) | |
4951 | ? 1 : -1]; | |
4952 | int | |
4953 | main () | |
4954 | { | |
4955 | ||
4956 | ; | |
4957 | return 0; | |
4958 | } | |
4959 | _ACEOF | |
4960 | if ac_fn_c_try_compile "$LINENO"; then : | |
4961 | ac_cv_sys_large_files=1; break | |
4962 | fi | |
4963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4964 | ac_cv_sys_large_files=unknown | |
4965 | break | |
4966 | done | |
4967 | fi | |
4968 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4969 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4970 | case $ac_cv_sys_large_files in #( | |
4971 | no | unknown) ;; | |
4972 | *) | |
4973 | cat >>confdefs.h <<_ACEOF | |
4974 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4975 | _ACEOF | |
4976 | ;; | |
4977 | esac | |
4978 | rm -rf conftest* | |
4979 | fi | |
d0ac1c44 SM |
4980 | |
4981 | ||
da2f07f1 JK |
4982 | fi |
4983 | ||
4984 | ||
4985 | ||
81ecdfbb RW |
4986 | |
4987 | ||
4988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4989 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
d0ac1c44 | 4990 | if ${am_cv_prog_cc_stdc+:} false; then : |
81ecdfbb RW |
4991 | $as_echo_n "(cached) " >&6 |
4992 | else | |
4993 | am_cv_prog_cc_stdc=no | |
4994 | ac_save_CC="$CC" | |
4995 | # Don't try gcc -ansi; that turns off useful extensions and | |
4996 | # breaks some systems' header files. | |
4997 | # AIX -qlanglvl=ansi | |
4998 | # Ultrix and OSF/1 -std1 | |
4999 | # HP-UX 10.20 and later -Ae | |
5000 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
5001 | # SVR4 -Xc -D__EXTENSIONS__ | |
5002 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
5003 | do | |
783e057b | 5004 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 5005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
5006 | /* end confdefs.h. */ |
5007 | #include <stdarg.h> | |
5008 | #include <stdio.h> | |
5009 | #include <sys/types.h> | |
5010 | #include <sys/stat.h> | |
5011 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
5012 | struct buf { int x; }; | |
5013 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
5014 | static char *e (p, i) | |
5015 | char **p; | |
5016 | int i; | |
5017 | { | |
5018 | return p[i]; | |
5019 | } | |
5020 | static char *f (char * (*g) (char **, int), char **p, ...) | |
5021 | { | |
5022 | char *s; | |
5023 | va_list v; | |
5024 | va_start (v,p); | |
5025 | s = g (p, va_arg (v,int)); | |
5026 | va_end (v); | |
5027 | return s; | |
5028 | } | |
5029 | int test (int i, double x); | |
5030 | struct s1 {int (*f) (int a);}; | |
5031 | struct s2 {int (*f) (double a);}; | |
5032 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
5033 | int argc; | |
5034 | char **argv; | |
5035 | ||
5036 | int | |
5037 | main () | |
5038 | { | |
5039 | ||
5040 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
5041 | ||
5042 | ; | |
5043 | return 0; | |
5044 | } | |
5045 | _ACEOF | |
81ecdfbb | 5046 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 5047 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 5048 | fi |
81ecdfbb | 5049 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
5050 | done |
5051 | CC="$ac_save_CC" | |
5052 | ||
5053 | fi | |
5054 | ||
5055 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
5056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
5057 | $as_echo "none needed" >&6; } | |
783e057b | 5058 | else |
81ecdfbb RW |
5059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
5060 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
5061 | fi |
5062 | case "x$am_cv_prog_cc_stdc" in | |
5063 | x|xno) ;; | |
5064 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
5065 | esac | |
5066 | ||
d0ac1c44 SM |
5067 | # Expand $ac_aux_dir to an absolute path. |
5068 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4869db5e | 5069 | |
d0ac1c44 | 5070 | if test x"${install_sh+set}" != xset; then |
4869db5e RM |
5071 | case $am_aux_dir in |
5072 | *\ * | *\ *) | |
5073 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
5074 | *) | |
5075 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
5076 | esac | |
5077 | fi | |
5078 | ||
d0ac1c44 SM |
5079 | # Installed binaries are usually stripped using 'strip' when the user |
5080 | # run "make install-strip". However 'strip' might not be the right | |
4869db5e | 5081 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 5082 | # will honor the 'STRIP' environment variable to overrule this program. |
4869db5e RM |
5083 | if test "$cross_compiling" != no; then |
5084 | if test -n "$ac_tool_prefix"; then | |
5085 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
5086 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
5087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5088 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5089 | if ${ac_cv_prog_STRIP+:} false; then : |
4869db5e RM |
5090 | $as_echo_n "(cached) " >&6 |
5091 | else | |
5092 | if test -n "$STRIP"; then | |
5093 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
5094 | else | |
5095 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5096 | for as_dir in $PATH | |
5097 | do | |
5098 | IFS=$as_save_IFS | |
5099 | test -z "$as_dir" && as_dir=. | |
5100 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5101 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5102 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
5103 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5104 | break 2 | |
5105 | fi | |
5106 | done | |
5107 | done | |
5108 | IFS=$as_save_IFS | |
5109 | ||
5110 | fi | |
5111 | fi | |
5112 | STRIP=$ac_cv_prog_STRIP | |
5113 | if test -n "$STRIP"; then | |
5114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
5115 | $as_echo "$STRIP" >&6; } | |
5116 | else | |
5117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5118 | $as_echo "no" >&6; } | |
5119 | fi | |
5120 | ||
5121 | ||
5122 | fi | |
5123 | if test -z "$ac_cv_prog_STRIP"; then | |
5124 | ac_ct_STRIP=$STRIP | |
5125 | # Extract the first word of "strip", so it can be a program name with args. | |
5126 | set dummy strip; ac_word=$2 | |
5127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5128 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5129 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
4869db5e RM |
5130 | $as_echo_n "(cached) " >&6 |
5131 | else | |
5132 | if test -n "$ac_ct_STRIP"; then | |
5133 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
5134 | else | |
5135 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5136 | for as_dir in $PATH | |
5137 | do | |
5138 | IFS=$as_save_IFS | |
5139 | test -z "$as_dir" && as_dir=. | |
5140 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5141 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5142 | ac_cv_prog_ac_ct_STRIP="strip" |
5143 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5144 | break 2 | |
5145 | fi | |
5146 | done | |
5147 | done | |
5148 | IFS=$as_save_IFS | |
5149 | ||
5150 | fi | |
5151 | fi | |
5152 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
5153 | if test -n "$ac_ct_STRIP"; then | |
5154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
5155 | $as_echo "$ac_ct_STRIP" >&6; } | |
5156 | else | |
5157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5158 | $as_echo "no" >&6; } | |
5159 | fi | |
5160 | ||
5161 | if test "x$ac_ct_STRIP" = x; then | |
5162 | STRIP=":" | |
5163 | else | |
5164 | case $cross_compiling:$ac_tool_warned in | |
5165 | yes:) | |
5166 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5167 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5168 | ac_tool_warned=yes ;; | |
5169 | esac | |
5170 | STRIP=$ac_ct_STRIP | |
5171 | fi | |
5172 | else | |
5173 | STRIP="$ac_cv_prog_STRIP" | |
5174 | fi | |
5175 | ||
5176 | fi | |
5177 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
5178 | ||
783e057b DJ |
5179 | |
5180 | ac_aux_dir= | |
81ecdfbb | 5181 | for ac_dir in .. "$srcdir"/..; do |
d0ac1c44 SM |
5182 | if test -f "$ac_dir/install-sh"; then |
5183 | ac_aux_dir=$ac_dir | |
5184 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5185 | break | |
5186 | elif test -f "$ac_dir/install.sh"; then | |
5187 | ac_aux_dir=$ac_dir | |
5188 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
5189 | break | |
5190 | elif test -f "$ac_dir/shtool"; then | |
5191 | ac_aux_dir=$ac_dir | |
5192 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5193 | break | |
5194 | fi | |
783e057b DJ |
5195 | done |
5196 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 5197 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 5198 | fi |
81ecdfbb RW |
5199 | |
5200 | # These three variables are undocumented and unsupported, | |
5201 | # and are intended to be withdrawn in a future Autoconf release. | |
5202 | # They can cause serious problems if a builder's source tree is in a directory | |
5203 | # whose full name contains unusual characters. | |
5204 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5205 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5206 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5207 | ||
783e057b | 5208 | |
783e057b | 5209 | |
9009e1ae MR |
5210 | test "$program_prefix" != NONE && |
5211 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
5212 | # Use a double $ so make ignores it. | |
5213 | test "$program_suffix" != NONE && | |
5214 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
5215 | # Double any \ or $. | |
5216 | # By default was `s,x,x', remove it if useless. | |
5217 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
5218 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
5219 | ||
81ecdfbb | 5220 | |
0bcda685 PA |
5221 | # We require a C++11 compiler. Check if one is available, and if |
5222 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5223 | ||
41260ac2 | 5224 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
5225 | ac_ext=cpp |
5226 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5227 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5228 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5229 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5230 | CXX_DIALECT="" | |
5231 | ac_success=no | |
5232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5233 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5234 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5235 | $as_echo_n "(cached) " >&6 |
5236 | else | |
5237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5238 | /* end confdefs.h. */ | |
5239 | ||
5240 | ||
5241 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5242 | // Hopefully, this will speed up the test. | |
5243 | ||
5244 | #ifndef __cplusplus | |
5245 | ||
5246 | #error "This is not a C++ compiler" | |
5247 | ||
5248 | #elif __cplusplus < 201103L | |
5249 | ||
5250 | #error "This is not a C++11 compiler" | |
5251 | ||
5252 | #else | |
5253 | ||
5254 | namespace cxx11 | |
5255 | { | |
5256 | ||
5257 | namespace test_static_assert | |
5258 | { | |
5259 | ||
5260 | template <typename T> | |
5261 | struct check | |
5262 | { | |
5263 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5264 | }; | |
5265 | ||
5266 | } | |
5267 | ||
5268 | namespace test_final_override | |
5269 | { | |
5270 | ||
5271 | struct Base | |
5272 | { | |
5273 | virtual void f() {} | |
5274 | }; | |
5275 | ||
5276 | struct Derived : public Base | |
5277 | { | |
5278 | virtual void f() override {} | |
5279 | }; | |
5280 | ||
5281 | } | |
5282 | ||
5283 | namespace test_double_right_angle_brackets | |
5284 | { | |
5285 | ||
5286 | template < typename T > | |
5287 | struct check {}; | |
5288 | ||
5289 | typedef check<void> single_type; | |
5290 | typedef check<check<void>> double_type; | |
5291 | typedef check<check<check<void>>> triple_type; | |
5292 | typedef check<check<check<check<void>>>> quadruple_type; | |
5293 | ||
5294 | } | |
5295 | ||
5296 | namespace test_decltype | |
5297 | { | |
5298 | ||
5299 | int | |
5300 | f() | |
5301 | { | |
5302 | int a = 1; | |
5303 | decltype(a) b = 2; | |
5304 | return a + b; | |
5305 | } | |
5306 | ||
5307 | } | |
5308 | ||
5309 | namespace test_type_deduction | |
5310 | { | |
5311 | ||
5312 | template < typename T1, typename T2 > | |
5313 | struct is_same | |
5314 | { | |
5315 | static const bool value = false; | |
5316 | }; | |
5317 | ||
5318 | template < typename T > | |
5319 | struct is_same<T, T> | |
5320 | { | |
5321 | static const bool value = true; | |
5322 | }; | |
5323 | ||
5324 | template < typename T1, typename T2 > | |
5325 | auto | |
5326 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5327 | { | |
5328 | return a1 + a2; | |
5329 | } | |
5330 | ||
5331 | int | |
5332 | test(const int c, volatile int v) | |
5333 | { | |
5334 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5335 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5336 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5337 | auto ac = c; | |
5338 | auto av = v; | |
5339 | auto sumi = ac + av + 'x'; | |
5340 | auto sumf = ac + av + 1.0; | |
5341 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5342 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5343 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5344 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5345 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5346 | return (sumf > 0.0) ? sumi : add(c, v); | |
5347 | } | |
5348 | ||
5349 | } | |
5350 | ||
5351 | namespace test_noexcept | |
5352 | { | |
5353 | ||
5354 | int f() { return 0; } | |
5355 | int g() noexcept { return 0; } | |
5356 | ||
5357 | static_assert(noexcept(f()) == false, ""); | |
5358 | static_assert(noexcept(g()) == true, ""); | |
5359 | ||
5360 | } | |
5361 | ||
5362 | namespace test_constexpr | |
5363 | { | |
5364 | ||
5365 | template < typename CharT > | |
5366 | unsigned long constexpr | |
5367 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5368 | { | |
5369 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5370 | } | |
5371 | ||
5372 | template < typename CharT > | |
5373 | unsigned long constexpr | |
5374 | strlen_c(const CharT *const s) noexcept | |
5375 | { | |
5376 | return strlen_c_r(s, 0UL); | |
5377 | } | |
5378 | ||
5379 | static_assert(strlen_c("") == 0UL, ""); | |
5380 | static_assert(strlen_c("1") == 1UL, ""); | |
5381 | static_assert(strlen_c("example") == 7UL, ""); | |
5382 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5383 | ||
5384 | } | |
5385 | ||
5386 | namespace test_rvalue_references | |
5387 | { | |
5388 | ||
5389 | template < int N > | |
5390 | struct answer | |
5391 | { | |
5392 | static constexpr int value = N; | |
5393 | }; | |
5394 | ||
5395 | answer<1> f(int&) { return answer<1>(); } | |
5396 | answer<2> f(const int&) { return answer<2>(); } | |
5397 | answer<3> f(int&&) { return answer<3>(); } | |
5398 | ||
5399 | void | |
5400 | test() | |
5401 | { | |
5402 | int i = 0; | |
5403 | const int c = 0; | |
5404 | static_assert(decltype(f(i))::value == 1, ""); | |
5405 | static_assert(decltype(f(c))::value == 2, ""); | |
5406 | static_assert(decltype(f(0))::value == 3, ""); | |
5407 | } | |
5408 | ||
5409 | } | |
5410 | ||
5411 | namespace test_uniform_initialization | |
5412 | { | |
5413 | ||
5414 | struct test | |
5415 | { | |
5416 | static const int zero {}; | |
5417 | static const int one {1}; | |
5418 | }; | |
5419 | ||
5420 | static_assert(test::zero == 0, ""); | |
5421 | static_assert(test::one == 1, ""); | |
5422 | ||
5423 | } | |
5424 | ||
5425 | namespace test_lambdas | |
5426 | { | |
5427 | ||
5428 | void | |
5429 | test1() | |
5430 | { | |
5431 | auto lambda1 = [](){}; | |
5432 | auto lambda2 = lambda1; | |
5433 | lambda1(); | |
5434 | lambda2(); | |
5435 | } | |
5436 | ||
5437 | int | |
5438 | test2() | |
5439 | { | |
5440 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5441 | auto b = []() -> int { return '0'; }(); | |
5442 | auto c = [=](){ return a + b; }(); | |
5443 | auto d = [&](){ return c; }(); | |
5444 | auto e = [a, &b](int x) mutable { | |
5445 | const auto identity = [](int y){ return y; }; | |
5446 | for (auto i = 0; i < a; ++i) | |
5447 | a += b--; | |
5448 | return x + identity(a + b); | |
5449 | }(0); | |
5450 | return a + b + c + d + e; | |
5451 | } | |
5452 | ||
5453 | int | |
5454 | test3() | |
5455 | { | |
5456 | const auto nullary = [](){ return 0; }; | |
5457 | const auto unary = [](int x){ return x; }; | |
5458 | using nullary_t = decltype(nullary); | |
5459 | using unary_t = decltype(unary); | |
5460 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5461 | const auto higher2nd = [unary](nullary_t f1){ | |
5462 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5463 | }; | |
5464 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5465 | } | |
5466 | ||
5467 | } | |
5468 | ||
5469 | namespace test_variadic_templates | |
5470 | { | |
5471 | ||
5472 | template <int...> | |
5473 | struct sum; | |
5474 | ||
5475 | template <int N0, int... N1toN> | |
5476 | struct sum<N0, N1toN...> | |
5477 | { | |
5478 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5479 | }; | |
5480 | ||
5481 | template <> | |
5482 | struct sum<> | |
5483 | { | |
5484 | static constexpr auto value = 0; | |
5485 | }; | |
5486 | ||
5487 | static_assert(sum<>::value == 0, ""); | |
5488 | static_assert(sum<1>::value == 1, ""); | |
5489 | static_assert(sum<23>::value == 23, ""); | |
5490 | static_assert(sum<1, 2>::value == 3, ""); | |
5491 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5492 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5493 | ||
5494 | } | |
5495 | ||
5496 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5497 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5498 | // because of this. | |
5499 | namespace test_template_alias_sfinae | |
5500 | { | |
5501 | ||
5502 | struct foo {}; | |
5503 | ||
5504 | template<typename T> | |
5505 | using member = typename T::member_type; | |
5506 | ||
5507 | template<typename T> | |
5508 | void func(...) {} | |
5509 | ||
5510 | template<typename T> | |
5511 | void func(member<T>*) {} | |
5512 | ||
5513 | void test(); | |
5514 | ||
5515 | void test() { func<foo>(0); } | |
5516 | ||
5517 | } | |
5518 | ||
5519 | } // namespace cxx11 | |
5520 | ||
5521 | #endif // __cplusplus >= 201103L | |
5522 | ||
5523 | ||
5524 | ||
5525 | _ACEOF | |
5526 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5527 | ax_cv_cxx_compile_cxx11=yes | |
5528 | else | |
5529 | ax_cv_cxx_compile_cxx11=no | |
5530 | fi | |
5531 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5532 | fi | |
5533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5534 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5535 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5536 | ac_success=yes | |
5537 | fi | |
5538 | ||
5539 | if test x$ac_success = xno; then | |
41260ac2 SM |
5540 | for alternative in ${ax_cxx_compile_alternatives}; do |
5541 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5542 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5543 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5544 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5545 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5546 | $as_echo_n "(cached) " >&6 |
5547 | else | |
5548 | ac_save_CXX="$CXX" | |
5549 | CXX="$CXX $switch" | |
5550 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5551 | /* end confdefs.h. */ | |
5552 | ||
5553 | ||
5554 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5555 | // Hopefully, this will speed up the test. | |
5556 | ||
5557 | #ifndef __cplusplus | |
5558 | ||
5559 | #error "This is not a C++ compiler" | |
5560 | ||
5561 | #elif __cplusplus < 201103L | |
5562 | ||
5563 | #error "This is not a C++11 compiler" | |
5564 | ||
5565 | #else | |
5566 | ||
5567 | namespace cxx11 | |
5568 | { | |
5569 | ||
5570 | namespace test_static_assert | |
5571 | { | |
5572 | ||
5573 | template <typename T> | |
5574 | struct check | |
5575 | { | |
5576 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5577 | }; | |
5578 | ||
5579 | } | |
5580 | ||
5581 | namespace test_final_override | |
5582 | { | |
5583 | ||
5584 | struct Base | |
5585 | { | |
5586 | virtual void f() {} | |
5587 | }; | |
5588 | ||
5589 | struct Derived : public Base | |
5590 | { | |
5591 | virtual void f() override {} | |
5592 | }; | |
5593 | ||
5594 | } | |
5595 | ||
5596 | namespace test_double_right_angle_brackets | |
5597 | { | |
5598 | ||
5599 | template < typename T > | |
5600 | struct check {}; | |
5601 | ||
5602 | typedef check<void> single_type; | |
5603 | typedef check<check<void>> double_type; | |
5604 | typedef check<check<check<void>>> triple_type; | |
5605 | typedef check<check<check<check<void>>>> quadruple_type; | |
5606 | ||
5607 | } | |
5608 | ||
5609 | namespace test_decltype | |
5610 | { | |
5611 | ||
5612 | int | |
5613 | f() | |
5614 | { | |
5615 | int a = 1; | |
5616 | decltype(a) b = 2; | |
5617 | return a + b; | |
5618 | } | |
5619 | ||
5620 | } | |
5621 | ||
5622 | namespace test_type_deduction | |
5623 | { | |
5624 | ||
5625 | template < typename T1, typename T2 > | |
5626 | struct is_same | |
5627 | { | |
5628 | static const bool value = false; | |
5629 | }; | |
5630 | ||
5631 | template < typename T > | |
5632 | struct is_same<T, T> | |
5633 | { | |
5634 | static const bool value = true; | |
5635 | }; | |
5636 | ||
5637 | template < typename T1, typename T2 > | |
5638 | auto | |
5639 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5640 | { | |
5641 | return a1 + a2; | |
5642 | } | |
5643 | ||
5644 | int | |
5645 | test(const int c, volatile int v) | |
5646 | { | |
5647 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5648 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5649 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5650 | auto ac = c; | |
5651 | auto av = v; | |
5652 | auto sumi = ac + av + 'x'; | |
5653 | auto sumf = ac + av + 1.0; | |
5654 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5655 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5656 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5657 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5658 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5659 | return (sumf > 0.0) ? sumi : add(c, v); | |
5660 | } | |
5661 | ||
5662 | } | |
5663 | ||
5664 | namespace test_noexcept | |
5665 | { | |
5666 | ||
5667 | int f() { return 0; } | |
5668 | int g() noexcept { return 0; } | |
5669 | ||
5670 | static_assert(noexcept(f()) == false, ""); | |
5671 | static_assert(noexcept(g()) == true, ""); | |
5672 | ||
5673 | } | |
5674 | ||
5675 | namespace test_constexpr | |
5676 | { | |
5677 | ||
5678 | template < typename CharT > | |
5679 | unsigned long constexpr | |
5680 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5681 | { | |
5682 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5683 | } | |
5684 | ||
5685 | template < typename CharT > | |
5686 | unsigned long constexpr | |
5687 | strlen_c(const CharT *const s) noexcept | |
5688 | { | |
5689 | return strlen_c_r(s, 0UL); | |
5690 | } | |
5691 | ||
5692 | static_assert(strlen_c("") == 0UL, ""); | |
5693 | static_assert(strlen_c("1") == 1UL, ""); | |
5694 | static_assert(strlen_c("example") == 7UL, ""); | |
5695 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5696 | ||
5697 | } | |
5698 | ||
5699 | namespace test_rvalue_references | |
5700 | { | |
5701 | ||
5702 | template < int N > | |
5703 | struct answer | |
5704 | { | |
5705 | static constexpr int value = N; | |
5706 | }; | |
5707 | ||
5708 | answer<1> f(int&) { return answer<1>(); } | |
5709 | answer<2> f(const int&) { return answer<2>(); } | |
5710 | answer<3> f(int&&) { return answer<3>(); } | |
5711 | ||
5712 | void | |
5713 | test() | |
5714 | { | |
5715 | int i = 0; | |
5716 | const int c = 0; | |
5717 | static_assert(decltype(f(i))::value == 1, ""); | |
5718 | static_assert(decltype(f(c))::value == 2, ""); | |
5719 | static_assert(decltype(f(0))::value == 3, ""); | |
5720 | } | |
5721 | ||
5722 | } | |
5723 | ||
5724 | namespace test_uniform_initialization | |
5725 | { | |
5726 | ||
5727 | struct test | |
5728 | { | |
5729 | static const int zero {}; | |
5730 | static const int one {1}; | |
5731 | }; | |
5732 | ||
5733 | static_assert(test::zero == 0, ""); | |
5734 | static_assert(test::one == 1, ""); | |
5735 | ||
5736 | } | |
5737 | ||
5738 | namespace test_lambdas | |
5739 | { | |
5740 | ||
5741 | void | |
5742 | test1() | |
5743 | { | |
5744 | auto lambda1 = [](){}; | |
5745 | auto lambda2 = lambda1; | |
5746 | lambda1(); | |
5747 | lambda2(); | |
5748 | } | |
5749 | ||
5750 | int | |
5751 | test2() | |
5752 | { | |
5753 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5754 | auto b = []() -> int { return '0'; }(); | |
5755 | auto c = [=](){ return a + b; }(); | |
5756 | auto d = [&](){ return c; }(); | |
5757 | auto e = [a, &b](int x) mutable { | |
5758 | const auto identity = [](int y){ return y; }; | |
5759 | for (auto i = 0; i < a; ++i) | |
5760 | a += b--; | |
5761 | return x + identity(a + b); | |
5762 | }(0); | |
5763 | return a + b + c + d + e; | |
5764 | } | |
5765 | ||
5766 | int | |
5767 | test3() | |
5768 | { | |
5769 | const auto nullary = [](){ return 0; }; | |
5770 | const auto unary = [](int x){ return x; }; | |
5771 | using nullary_t = decltype(nullary); | |
5772 | using unary_t = decltype(unary); | |
5773 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5774 | const auto higher2nd = [unary](nullary_t f1){ | |
5775 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5776 | }; | |
5777 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5778 | } | |
5779 | ||
5780 | } | |
5781 | ||
5782 | namespace test_variadic_templates | |
5783 | { | |
5784 | ||
5785 | template <int...> | |
5786 | struct sum; | |
5787 | ||
5788 | template <int N0, int... N1toN> | |
5789 | struct sum<N0, N1toN...> | |
5790 | { | |
5791 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5792 | }; | |
5793 | ||
5794 | template <> | |
5795 | struct sum<> | |
5796 | { | |
5797 | static constexpr auto value = 0; | |
5798 | }; | |
5799 | ||
5800 | static_assert(sum<>::value == 0, ""); | |
5801 | static_assert(sum<1>::value == 1, ""); | |
5802 | static_assert(sum<23>::value == 23, ""); | |
5803 | static_assert(sum<1, 2>::value == 3, ""); | |
5804 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5805 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5806 | ||
5807 | } | |
5808 | ||
5809 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5810 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5811 | // because of this. | |
5812 | namespace test_template_alias_sfinae | |
5813 | { | |
5814 | ||
5815 | struct foo {}; | |
5816 | ||
5817 | template<typename T> | |
5818 | using member = typename T::member_type; | |
5819 | ||
5820 | template<typename T> | |
5821 | void func(...) {} | |
5822 | ||
5823 | template<typename T> | |
5824 | void func(member<T>*) {} | |
5825 | ||
5826 | void test(); | |
5827 | ||
5828 | void test() { func<foo>(0); } | |
5829 | ||
5830 | } | |
5831 | ||
5832 | } // namespace cxx11 | |
5833 | ||
5834 | #endif // __cplusplus >= 201103L | |
5835 | ||
5836 | ||
5837 | ||
5838 | _ACEOF | |
5839 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5840 | eval $cachevar=yes | |
5841 | else | |
5842 | eval $cachevar=no | |
5843 | fi | |
5844 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5845 | CXX="$ac_save_CXX" | |
5846 | fi | |
5847 | eval ac_res=\$$cachevar | |
5848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5849 | $as_echo "$ac_res" >&6; } | |
5850 | if eval test x\$$cachevar = xyes; then | |
5851 | CXX_DIALECT="$switch" | |
5852 | ac_success=yes | |
5853 | break | |
5854 | fi | |
5855 | done | |
5856 | fi | |
5857 | ||
5858 | if test x$ac_success = xno; then | |
41260ac2 SM |
5859 | for alternative in ${ax_cxx_compile_alternatives}; do |
5860 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5861 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5863 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5864 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5865 | $as_echo_n "(cached) " >&6 |
5866 | else | |
5867 | ac_save_CXX="$CXX" | |
41260ac2 SM |
5868 | CXX="$CXX $switch" |
5869 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5870 | /* end confdefs.h. */ |
5871 | ||
5872 | ||
5873 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5874 | // Hopefully, this will speed up the test. | |
5875 | ||
5876 | #ifndef __cplusplus | |
5877 | ||
5878 | #error "This is not a C++ compiler" | |
5879 | ||
5880 | #elif __cplusplus < 201103L | |
5881 | ||
5882 | #error "This is not a C++11 compiler" | |
5883 | ||
5884 | #else | |
5885 | ||
5886 | namespace cxx11 | |
5887 | { | |
5888 | ||
5889 | namespace test_static_assert | |
5890 | { | |
5891 | ||
5892 | template <typename T> | |
5893 | struct check | |
5894 | { | |
5895 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5896 | }; | |
5897 | ||
5898 | } | |
5899 | ||
5900 | namespace test_final_override | |
5901 | { | |
5902 | ||
5903 | struct Base | |
5904 | { | |
5905 | virtual void f() {} | |
5906 | }; | |
5907 | ||
5908 | struct Derived : public Base | |
5909 | { | |
5910 | virtual void f() override {} | |
5911 | }; | |
5912 | ||
5913 | } | |
5914 | ||
5915 | namespace test_double_right_angle_brackets | |
5916 | { | |
5917 | ||
5918 | template < typename T > | |
5919 | struct check {}; | |
5920 | ||
5921 | typedef check<void> single_type; | |
5922 | typedef check<check<void>> double_type; | |
5923 | typedef check<check<check<void>>> triple_type; | |
5924 | typedef check<check<check<check<void>>>> quadruple_type; | |
5925 | ||
5926 | } | |
5927 | ||
5928 | namespace test_decltype | |
5929 | { | |
5930 | ||
5931 | int | |
5932 | f() | |
5933 | { | |
5934 | int a = 1; | |
5935 | decltype(a) b = 2; | |
5936 | return a + b; | |
5937 | } | |
5938 | ||
5939 | } | |
5940 | ||
5941 | namespace test_type_deduction | |
5942 | { | |
5943 | ||
5944 | template < typename T1, typename T2 > | |
5945 | struct is_same | |
5946 | { | |
5947 | static const bool value = false; | |
5948 | }; | |
5949 | ||
5950 | template < typename T > | |
5951 | struct is_same<T, T> | |
5952 | { | |
5953 | static const bool value = true; | |
5954 | }; | |
5955 | ||
5956 | template < typename T1, typename T2 > | |
5957 | auto | |
5958 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5959 | { | |
5960 | return a1 + a2; | |
5961 | } | |
5962 | ||
5963 | int | |
5964 | test(const int c, volatile int v) | |
5965 | { | |
5966 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5967 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5968 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5969 | auto ac = c; | |
5970 | auto av = v; | |
5971 | auto sumi = ac + av + 'x'; | |
5972 | auto sumf = ac + av + 1.0; | |
5973 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5974 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5975 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5976 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5977 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5978 | return (sumf > 0.0) ? sumi : add(c, v); | |
5979 | } | |
5980 | ||
5981 | } | |
5982 | ||
5983 | namespace test_noexcept | |
5984 | { | |
5985 | ||
5986 | int f() { return 0; } | |
5987 | int g() noexcept { return 0; } | |
5988 | ||
5989 | static_assert(noexcept(f()) == false, ""); | |
5990 | static_assert(noexcept(g()) == true, ""); | |
5991 | ||
5992 | } | |
5993 | ||
5994 | namespace test_constexpr | |
5995 | { | |
5996 | ||
5997 | template < typename CharT > | |
5998 | unsigned long constexpr | |
5999 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
6000 | { | |
6001 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
6002 | } | |
6003 | ||
6004 | template < typename CharT > | |
6005 | unsigned long constexpr | |
6006 | strlen_c(const CharT *const s) noexcept | |
6007 | { | |
6008 | return strlen_c_r(s, 0UL); | |
6009 | } | |
6010 | ||
6011 | static_assert(strlen_c("") == 0UL, ""); | |
6012 | static_assert(strlen_c("1") == 1UL, ""); | |
6013 | static_assert(strlen_c("example") == 7UL, ""); | |
6014 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
6015 | ||
6016 | } | |
6017 | ||
6018 | namespace test_rvalue_references | |
6019 | { | |
6020 | ||
6021 | template < int N > | |
6022 | struct answer | |
6023 | { | |
6024 | static constexpr int value = N; | |
6025 | }; | |
6026 | ||
6027 | answer<1> f(int&) { return answer<1>(); } | |
6028 | answer<2> f(const int&) { return answer<2>(); } | |
6029 | answer<3> f(int&&) { return answer<3>(); } | |
6030 | ||
6031 | void | |
6032 | test() | |
6033 | { | |
6034 | int i = 0; | |
6035 | const int c = 0; | |
6036 | static_assert(decltype(f(i))::value == 1, ""); | |
6037 | static_assert(decltype(f(c))::value == 2, ""); | |
6038 | static_assert(decltype(f(0))::value == 3, ""); | |
6039 | } | |
6040 | ||
6041 | } | |
6042 | ||
6043 | namespace test_uniform_initialization | |
6044 | { | |
6045 | ||
6046 | struct test | |
6047 | { | |
6048 | static const int zero {}; | |
6049 | static const int one {1}; | |
6050 | }; | |
6051 | ||
6052 | static_assert(test::zero == 0, ""); | |
6053 | static_assert(test::one == 1, ""); | |
6054 | ||
6055 | } | |
6056 | ||
6057 | namespace test_lambdas | |
6058 | { | |
6059 | ||
6060 | void | |
6061 | test1() | |
6062 | { | |
6063 | auto lambda1 = [](){}; | |
6064 | auto lambda2 = lambda1; | |
6065 | lambda1(); | |
6066 | lambda2(); | |
6067 | } | |
6068 | ||
6069 | int | |
6070 | test2() | |
6071 | { | |
6072 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6073 | auto b = []() -> int { return '0'; }(); | |
6074 | auto c = [=](){ return a + b; }(); | |
6075 | auto d = [&](){ return c; }(); | |
6076 | auto e = [a, &b](int x) mutable { | |
6077 | const auto identity = [](int y){ return y; }; | |
6078 | for (auto i = 0; i < a; ++i) | |
6079 | a += b--; | |
6080 | return x + identity(a + b); | |
6081 | }(0); | |
6082 | return a + b + c + d + e; | |
6083 | } | |
6084 | ||
6085 | int | |
6086 | test3() | |
6087 | { | |
6088 | const auto nullary = [](){ return 0; }; | |
6089 | const auto unary = [](int x){ return x; }; | |
6090 | using nullary_t = decltype(nullary); | |
6091 | using unary_t = decltype(unary); | |
6092 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6093 | const auto higher2nd = [unary](nullary_t f1){ | |
6094 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6095 | }; | |
6096 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6097 | } | |
6098 | ||
6099 | } | |
6100 | ||
6101 | namespace test_variadic_templates | |
6102 | { | |
6103 | ||
6104 | template <int...> | |
6105 | struct sum; | |
6106 | ||
6107 | template <int N0, int... N1toN> | |
6108 | struct sum<N0, N1toN...> | |
6109 | { | |
6110 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6111 | }; | |
6112 | ||
6113 | template <> | |
6114 | struct sum<> | |
6115 | { | |
6116 | static constexpr auto value = 0; | |
6117 | }; | |
6118 | ||
6119 | static_assert(sum<>::value == 0, ""); | |
6120 | static_assert(sum<1>::value == 1, ""); | |
6121 | static_assert(sum<23>::value == 23, ""); | |
6122 | static_assert(sum<1, 2>::value == 3, ""); | |
6123 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6124 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6125 | ||
6126 | } | |
6127 | ||
6128 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6129 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6130 | // because of this. | |
6131 | namespace test_template_alias_sfinae | |
6132 | { | |
6133 | ||
6134 | struct foo {}; | |
6135 | ||
6136 | template<typename T> | |
6137 | using member = typename T::member_type; | |
6138 | ||
6139 | template<typename T> | |
6140 | void func(...) {} | |
6141 | ||
6142 | template<typename T> | |
6143 | void func(member<T>*) {} | |
6144 | ||
6145 | void test(); | |
6146 | ||
6147 | void test() { func<foo>(0); } | |
6148 | ||
6149 | } | |
6150 | ||
6151 | } // namespace cxx11 | |
6152 | ||
6153 | #endif // __cplusplus >= 201103L | |
6154 | ||
6155 | ||
6156 | ||
6157 | _ACEOF | |
6158 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6159 | eval $cachevar=yes | |
6160 | else | |
6161 | eval $cachevar=no | |
6162 | fi | |
6163 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
41260ac2 | 6164 | CXX="$ac_save_CXX" |
0bcda685 PA |
6165 | fi |
6166 | eval ac_res=\$$cachevar | |
6167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6168 | $as_echo "$ac_res" >&6; } | |
41260ac2 SM |
6169 | if eval test x\$$cachevar = xyes; then |
6170 | CXX_DIALECT="$switch" | |
6171 | ac_success=yes | |
6172 | break | |
6173 | fi | |
6174 | done | |
6175 | if test x$ac_success = xyes; then | |
0bcda685 PA |
6176 | break |
6177 | fi | |
6178 | done | |
6179 | fi | |
6180 | ac_ext=c | |
6181 | ac_cpp='$CPP $CPPFLAGS' | |
6182 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6183 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6184 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6185 | ||
6186 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
6187 | if test x$ac_success = xno; then | |
d0ac1c44 | 6188 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
6189 | fi |
6190 | fi | |
6191 | if test x$ac_success = xno; then | |
6192 | HAVE_CXX11=0 | |
6193 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
6194 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
6195 | else | |
6196 | HAVE_CXX11=1 | |
6197 | ||
6198 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
6199 | ||
6200 | fi | |
6201 | ||
6202 | ||
6203 | ||
6204 | ||
a417dc56 RW |
6205 | # Dependency checking. |
6206 | rm -rf .tst 2>/dev/null | |
6207 | mkdir .tst 2>/dev/null | |
6208 | if test -d .tst; then | |
6209 | am__leading_dot=. | |
6210 | else | |
6211 | am__leading_dot=_ | |
6212 | fi | |
6213 | rmdir .tst 2>/dev/null | |
6214 | ||
6215 | DEPDIR="${am__leading_dot}deps" | |
6216 | ||
81ecdfbb | 6217 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
6218 | |
6219 | ||
6220 | depcc="$CC" am_compiler_list= | |
6221 | ||
6222 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
6223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
6224 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 6225 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
81ecdfbb | 6226 | $as_echo_n "(cached) " >&6 |
a417dc56 RW |
6227 | else |
6228 | if test -f "$am_depcomp"; then | |
6229 | # We make a subdir and do the tests there. Otherwise we can end up | |
6230 | # making bogus files that we don't know about and never remove. For | |
6231 | # instance it was reported that on HP-UX the gcc test will end up | |
6232 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6233 | # in D'. | |
6234 | mkdir conftest.dir | |
6235 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6236 | # using a relative directory. | |
6237 | cp "$am_depcomp" conftest.dir | |
6238 | cd conftest.dir | |
6239 | # We will build objects and dependencies in a subdirectory because | |
6240 | # it helps to detect inapplicable dependency modes. For instance | |
6241 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6242 | # side effect of compilation, but ICC will put the dependencies in | |
6243 | # the current directory while Tru64 will put them in the object | |
6244 | # directory. | |
6245 | mkdir sub | |
6246 | ||
6247 | am_cv_CC_dependencies_compiler_type=none | |
6248 | if test "$am_compiler_list" = ""; then | |
6249 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6250 | fi | |
6251 | for depmode in $am_compiler_list; do | |
6252 | if test $depmode = none; then break; fi | |
6253 | ||
81ecdfbb | 6254 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
6255 | # Setup a source with many dependencies, because some compilers |
6256 | # like to wrap large dependency lists on column 80 (with \), and | |
6257 | # we should not choose a depcomp mode which is confused by this. | |
6258 | # | |
6259 | # We need to recreate these files for each test, as the compiler may | |
6260 | # overwrite some of them when testing with obscure command lines. | |
6261 | # This happens at least with the AIX C compiler. | |
6262 | : > sub/conftest.c | |
6263 | for i in 1 2 3 4 5 6; do | |
6264 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6265 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6266 | # Solaris 8's {/usr,}/bin/sh. | |
6267 | touch sub/conftst$i.h | |
6268 | done | |
6269 | echo "include sub/conftest.Po" > confmf | |
6270 | ||
6271 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6272 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6273 | # handle `-M -o', and we need to detect this. | |
6274 | depcmd="depmode=$depmode \ | |
6275 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6276 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6277 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6278 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6279 | if env $depcmd > conftest.err 2>&1 && | |
6280 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6281 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6282 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6283 | # icc doesn't choke on unknown options, it will just issue warnings | |
6284 | # or remarks (even with -Werror). So we grep stderr for any message | |
6285 | # that says an option was ignored or not supported. | |
6286 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6287 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6288 | # The diagnosis changed in icc 8.0: | |
6289 | # icc: Command line remark: option '-MP' not supported | |
6290 | if (grep 'ignoring option' conftest.err || | |
6291 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6292 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6293 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6294 | break |
6295 | fi | |
6296 | fi | |
81ecdfbb | 6297 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6298 | sed -e 's/^/| /' < conftest.err >&5 |
6299 | done | |
6300 | ||
6301 | cd .. | |
6302 | rm -rf conftest.dir | |
6303 | else | |
6304 | am_cv_CC_dependencies_compiler_type=none | |
6305 | fi | |
6306 | ||
6307 | fi | |
81ecdfbb RW |
6308 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6309 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6310 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
d0ac1c44 | 6311 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6312 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6313 | ||
6314 | fi | |
6315 | ||
6316 | ||
c971b7fa PA |
6317 | |
6318 | CONFIG_OBS= | |
6319 | CONFIG_DEPS= | |
6320 | CONFIG_SRCS= | |
6321 | ENABLE_CFLAGS= | |
6322 | ||
6323 | CONFIG_ALL= | |
6324 | CONFIG_CLEAN= | |
6325 | CONFIG_INSTALL= | |
6326 | CONFIG_UNINSTALL= | |
6327 | ||
6328 | # If we haven't got the data from the intl directory, | |
6329 | # assume NLS is disabled. | |
6330 | USE_NLS=no | |
6331 | LIBINTL= | |
6332 | LIBINTL_DEP= | |
6333 | INCINTL= | |
6334 | XGETTEXT= | |
6335 | GMSGFMT= | |
6336 | POSUB= | |
783e057b DJ |
6337 | |
6338 | if test -f ../intl/config.intl; then | |
6339 | . ../intl/config.intl | |
6340 | fi | |
81ecdfbb RW |
6341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6342 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6343 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6345 | $as_echo "no" >&6; } | |
783e057b | 6346 | else |
81ecdfbb RW |
6347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6348 | $as_echo "yes" >&6; } | |
783e057b | 6349 | |
81ecdfbb | 6350 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6351 | |
6352 | ||
81ecdfbb RW |
6353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6354 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6355 | # Look for .po and .gmo files in the source directory. |
6356 | CATALOGS= | |
6357 | XLINGUAS= | |
6358 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6359 | # If there aren't any .gmo files the shell will give us the | |
6360 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6361 | # weeded out. | |
6362 | case "$cat" in *\**) | |
6363 | continue;; | |
6364 | esac | |
6365 | # The quadruple backslash is collapsed to a double backslash | |
6366 | # by the backticks, then collapsed again by the double quotes, | |
6367 | # leaving us with one backslash in the sed expression (right | |
6368 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6369 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6370 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6371 | # The user is allowed to set LINGUAS to a list of languages to | |
6372 | # install catalogs for. If it's empty that means "all of them." | |
6373 | if test "x$LINGUAS" = x; then | |
6374 | CATALOGS="$CATALOGS $cat" | |
6375 | XLINGUAS="$XLINGUAS $lang" | |
6376 | else | |
6377 | case "$LINGUAS" in *$lang*) | |
6378 | CATALOGS="$CATALOGS $cat" | |
6379 | XLINGUAS="$XLINGUAS $lang" | |
6380 | ;; | |
6381 | esac | |
e28b3332 DJ |
6382 | fi |
6383 | done | |
c971b7fa PA |
6384 | LINGUAS="$XLINGUAS" |
6385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6386 | $as_echo "$LINGUAS" >&6; } | |
6387 | ||
6388 | ||
6389 | DATADIRNAME=share | |
6390 | ||
6391 | INSTOBJEXT=.mo | |
6392 | ||
6393 | GENCAT=gencat | |
6394 | ||
6395 | CATOBJEXT=.gmo | |
e28b3332 | 6396 | |
e28b3332 DJ |
6397 | fi |
6398 | ||
c971b7fa PA |
6399 | localedir='${datadir}/locale' |
6400 | ||
6401 | ||
6402 | if test x"$USE_NLS" = xyes; then | |
6403 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6404 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6405 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6406 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6407 | fi |
e28b3332 | 6408 | |
c971b7fa PA |
6409 | PACKAGE=gdb |
6410 | ||
6411 | cat >>confdefs.h <<_ACEOF | |
6412 | #define PACKAGE "$PACKAGE" | |
6413 | _ACEOF | |
6414 | ||
6415 | ||
6416 | ||
6417 | # We never need to detect it in this sub-configure. | |
6418 | # But preserve it for config.status --recheck. | |
6419 | ||
6420 | ||
6421 | ||
6422 | MAKEINFO_EXTRA_FLAGS="" | |
6423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6424 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
d0ac1c44 | 6425 | if ${gdb_cv_have_makeinfo_click+:} false; then : |
c971b7fa PA |
6426 | $as_echo_n "(cached) " >&6 |
6427 | else | |
6428 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6429 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6430 | gdb_cv_have_makeinfo_click=yes | |
6431 | else | |
6432 | gdb_cv_have_makeinfo_click=no | |
6433 | fi | |
6434 | fi | |
6435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6436 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6437 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6438 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6439 | fi | |
e28b3332 DJ |
6440 | |
6441 | ||
bec39cab AC |
6442 | |
6443 | ||
81ecdfbb RW |
6444 | # Check whether --with-separate-debug-dir was given. |
6445 | if test "${with_separate_debug_dir+set}" = set; then : | |
6446 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6447 | DEBUGDIR=$withval |
6448 | else | |
6449 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6450 | fi |
6451 | ||
20e95c23 | 6452 | |
783e057b DJ |
6453 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6454 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6455 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6456 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6457 | |
783e057b DJ |
6458 | cat >>confdefs.h <<_ACEOF |
6459 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6460 | _ACEOF |
20e95c23 | 6461 | |
20e95c23 | 6462 | |
20e95c23 | 6463 | |
0c4a4063 | 6464 | |
b14b1491 TT |
6465 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6466 | if test "x$prefix" = xNONE; then | |
6467 | test_prefix=/usr/local | |
6468 | else | |
6469 | test_prefix=$prefix | |
6470 | fi | |
783e057b | 6471 | else |
b14b1491 | 6472 | test_prefix=$exec_prefix |
783e057b | 6473 | fi |
b14b1491 TT |
6474 | value=0 |
6475 | case ${ac_define_dir} in | |
6476 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6477 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6478 | value=1 | |
6479 | ;; | |
6480 | esac | |
6481 | ||
6482 | cat >>confdefs.h <<_ACEOF | |
6483 | #define DEBUGDIR_RELOCATABLE $value | |
6484 | _ACEOF | |
6485 | ||
6486 | ||
6487 | ||
0c4a4063 | 6488 | |
f83d8a90 DE |
6489 | # We can't pass paths as command line arguments. |
6490 | # Mingw32 tries to be clever and will convert the paths for us. | |
6491 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6492 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6493 | # This breaks GDB's relocatable path conversions since paths passed in | |
6494 | # config.h would not get so translated, the path prefixes no longer match. | |
6495 | ||
6496 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6497 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6498 | ac_define_dir=`eval echo $bindir` | |
6499 | ac_define_dir=`eval echo $ac_define_dir` | |
6500 | ||
6501 | cat >>confdefs.h <<_ACEOF | |
6502 | #define BINDIR "$ac_define_dir" | |
6503 | _ACEOF | |
6504 | ||
6505 | ||
6506 | ||
b14b1491 TT |
6507 | # GDB's datadir relocation |
6508 | ||
6509 | ||
6510 | ||
81ecdfbb RW |
6511 | # Check whether --with-gdb-datadir was given. |
6512 | if test "${with_gdb_datadir+set}" = set; then : | |
6513 | withval=$with_gdb_datadir; | |
b14b1491 | 6514 | GDB_DATADIR=$withval |
20e95c23 | 6515 | else |
b14b1491 | 6516 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6517 | fi |
6518 | ||
20e95c23 | 6519 | |
b14b1491 TT |
6520 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6521 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6522 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6523 | ac_define_dir=`eval echo $ac_define_dir` | |
6524 | ||
6525 | cat >>confdefs.h <<_ACEOF | |
6526 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6527 | _ACEOF |
6528 | ||
b14b1491 TT |
6529 | |
6530 | ||
0c4a4063 | 6531 | |
b14b1491 TT |
6532 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6533 | if test "x$prefix" = xNONE; then | |
6534 | test_prefix=/usr/local | |
6535 | else | |
6536 | test_prefix=$prefix | |
6537 | fi | |
6538 | else | |
6539 | test_prefix=$exec_prefix | |
6540 | fi | |
6541 | value=0 | |
6542 | case ${ac_define_dir} in | |
6543 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6544 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6545 | value=1 | |
6546 | ;; | |
6547 | esac | |
6548 | ||
6549 | cat >>confdefs.h <<_ACEOF | |
6550 | #define GDB_DATADIR_RELOCATABLE $value | |
6551 | _ACEOF | |
6552 | ||
6553 | ||
783e057b | 6554 | |
20e95c23 | 6555 | |
0c4a4063 | 6556 | |
81ecdfbb RW |
6557 | # Check whether --with-relocated-sources was given. |
6558 | if test "${with_relocated_sources+set}" = set; then : | |
6559 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6560 | |
6561 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6562 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6563 | ac_define_dir=`eval echo $reloc_srcdir` | |
6564 | ac_define_dir=`eval echo $ac_define_dir` | |
6565 | ||
6566 | cat >>confdefs.h <<_ACEOF | |
6567 | #define RELOC_SRCDIR "$ac_define_dir" | |
6568 | _ACEOF | |
6569 | ||
6570 | ||
6571 | ||
81ecdfbb RW |
6572 | fi |
6573 | ||
29b0e8a2 | 6574 | |
7349ff92 JK |
6575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6576 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6577 | ||
6578 | # Check whether --with-auto-load-dir was given. | |
6579 | if test "${with_auto_load_dir+set}" = set; then : | |
6580 | withval=$with_auto_load_dir; | |
6581 | else | |
1564a261 | 6582 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6583 | fi |
6584 | ||
2861ee4f | 6585 | escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6586 | |
6587 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6588 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6589 | ac_define_dir=`eval echo $escape_dir` | |
6590 | ac_define_dir=`eval echo $ac_define_dir` | |
6591 | ||
6592 | cat >>confdefs.h <<_ACEOF | |
6593 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6594 | _ACEOF | |
6595 | ||
6596 | ||
6597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6598 | $as_echo "$with_auto_load_dir" >&6; } | |
6599 | ||
bccbefd2 JK |
6600 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6601 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6602 | ||
6603 | # Check whether --with-auto-load-safe-path was given. | |
6604 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6605 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6606 | with_auto_load_safe_path="/" |
6607 | fi | |
bccbefd2 | 6608 | else |
7349ff92 | 6609 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6610 | fi |
6611 | ||
2861ee4f | 6612 | escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6613 | |
6614 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6615 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6616 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6617 | ac_define_dir=`eval echo $ac_define_dir` |
6618 | ||
6619 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6620 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6621 | _ACEOF |
6622 | ||
6623 | ||
6624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6625 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6626 | ||
29b0e8a2 | 6627 | |
20e95c23 | 6628 | |
5ae98d25 | 6629 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
6630 | |
6631 | ||
783e057b | 6632 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6633 | # Check whether --enable-targets was given. |
6634 | if test "${enable_targets+set}" = set; then : | |
6635 | enableval=$enable_targets; case "${enableval}" in | |
d0ac1c44 | 6636 | yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 |
783e057b DJ |
6637 | ;; |
6638 | no) enable_targets= ;; | |
6639 | *) enable_targets=$enableval ;; | |
6640 | esac | |
81ecdfbb RW |
6641 | fi |
6642 | ||
20e95c23 | 6643 | |
783e057b | 6644 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6645 | # Check whether --enable-64-bit-bfd was given. |
6646 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6647 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6648 | yes) want64=true ;; |
6649 | no) want64=false ;; | |
d0ac1c44 | 6650 | *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6651 | esac |
6652 | else | |
6653 | want64=false | |
81ecdfbb RW |
6654 | fi |
6655 | ||
783e057b DJ |
6656 | # Provide defaults for some variables set by the per-host and per-target |
6657 | # configuration. | |
6658 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6659 | |
783e057b DJ |
6660 | if test "${target}" = "${host}"; then |
6661 | gdb_native=yes | |
6662 | else | |
6663 | gdb_native=no | |
6664 | fi | |
20e95c23 | 6665 | |
783e057b | 6666 | . $srcdir/configure.host |
20e95c23 | 6667 | |
783e057b | 6668 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6669 | |
783e057b DJ |
6670 | TARGET_OBS= |
6671 | all_targets= | |
b292c783 | 6672 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6673 | |
783e057b | 6674 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6675 | do |
783e057b DJ |
6676 | if test "$targ_alias" = "all"; then |
6677 | all_targets=true | |
6678 | else | |
6679 | # Canonicalize the secondary target names. | |
6680 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6681 | if test -n "$result"; then | |
6682 | targ=$result | |
6683 | else | |
6684 | targ=$targ_alias | |
6685 | fi | |
20e95c23 | 6686 | |
783e057b | 6687 | . ${srcdir}/configure.tgt |
20e95c23 | 6688 | |
bf307134 | 6689 | if test -z "${gdb_target_obs}"; then : |
d0ac1c44 | 6690 | as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 |
bf307134 JB |
6691 | fi |
6692 | ||
783e057b DJ |
6693 | # Target-specific object files |
6694 | for i in ${gdb_target_obs}; do | |
6695 | case " $TARGET_OBS " in | |
6696 | *" ${i} "*) ;; | |
6697 | *) | |
6698 | TARGET_OBS="$TARGET_OBS ${i}" | |
6699 | ;; | |
6700 | esac | |
6701 | done | |
20e95c23 | 6702 | |
783e057b DJ |
6703 | # Check whether this target needs 64-bit CORE_ADDR |
6704 | if test x${want64} = xfalse; then | |
6705 | . ${srcdir}/../bfd/config.bfd | |
6706 | fi | |
b292c783 JK |
6707 | |
6708 | # Check whether this target is native and supports gcore. | |
6709 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6710 | && $gdb_have_gcore; then | |
6711 | HAVE_NATIVE_GCORE_TARGET=1 | |
6712 | fi | |
783e057b | 6713 | fi |
20e95c23 DJ |
6714 | done |
6715 | ||
783e057b DJ |
6716 | if test x${all_targets} = xtrue; then |
6717 | ||
6718 | # We want all 64-bit targets if we either: | |
6719 | # - run on a 64-bit host or | |
6720 | # - already require 64-bit support for some other target or | |
6721 | # - the --enable-64-bit-bfd option was supplied | |
6722 | # Otherwise we only support all 32-bit targets. | |
6723 | # | |
6724 | # NOTE: This test must be in sync with the corresponding | |
6725 | # tests in BFD! | |
20e95c23 | 6726 | |
783e057b | 6727 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6728 | # The cast to long int works around a bug in the HP C Compiler |
6729 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6730 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6731 | # This bug is HP SR number 8606223364. | |
6732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6733 | $as_echo_n "checking size of long... " >&6; } | |
d0ac1c44 | 6734 | if ${ac_cv_sizeof_long+:} false; then : |
81ecdfbb | 6735 | $as_echo_n "(cached) " >&6 |
c0993dbe | 6736 | else |
81ecdfbb | 6737 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6738 | |
81ecdfbb RW |
6739 | else |
6740 | if test "$ac_cv_type_long" = yes; then | |
6741 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6742 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
6743 | as_fn_error 77 "cannot compute sizeof (long) |
6744 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
6745 | else |
6746 | ac_cv_sizeof_long=0 | |
6747 | fi | |
c0993dbe | 6748 | fi |
81ecdfbb | 6749 | |
c0993dbe | 6750 | fi |
81ecdfbb RW |
6751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6752 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6753 | |
c0993dbe | 6754 | |
c0993dbe | 6755 | |
c0993dbe UW |
6756 | cat >>confdefs.h <<_ACEOF |
6757 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6758 | _ACEOF | |
6759 | ||
6760 | ||
6761 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6762 | want64=true | |
6763 | fi | |
6764 | fi | |
6765 | if test x${want64} = xtrue; then | |
6766 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6767 | else | |
6768 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6769 | fi | |
6770 | fi | |
6771 | ||
6772 | ||
6773 | ||
b292c783 | 6774 | |
c0993dbe UW |
6775 | # For other settings, only the main target counts. |
6776 | gdb_sim= | |
6777 | gdb_osabi= | |
c0993dbe UW |
6778 | targ=$target; . ${srcdir}/configure.tgt |
6779 | ||
6780 | # Fetch the default architecture and default target vector from BFD. | |
6781 | targ=$target; . $srcdir/../bfd/config.bfd | |
6782 | ||
6783 | # We only want the first architecture, so strip off the others if | |
6784 | # there is more than one. | |
6785 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6786 | ||
6787 | if test "x$targ_archs" != x; then | |
6788 | ||
6789 | cat >>confdefs.h <<_ACEOF | |
6790 | #define DEFAULT_BFD_ARCH $targ_archs | |
6791 | _ACEOF | |
6792 | ||
6793 | fi | |
6794 | if test "x$targ_defvec" != x; then | |
6795 | ||
6796 | cat >>confdefs.h <<_ACEOF | |
6797 | #define DEFAULT_BFD_VEC $targ_defvec | |
6798 | _ACEOF | |
6799 | ||
6800 | fi | |
6801 | ||
c0993dbe | 6802 | # Enable MI. |
81ecdfbb RW |
6803 | # Check whether --enable-gdbmi was given. |
6804 | if test "${enable_gdbmi+set}" = set; then : | |
6805 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6806 | yes | no) |
6807 | ;; | |
6808 | *) | |
d0ac1c44 | 6809 | as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6810 | esac |
6811 | else | |
6812 | enable_gdbmi=yes | |
81ecdfbb RW |
6813 | fi |
6814 | ||
c0993dbe | 6815 | if test x"$enable_gdbmi" = xyes; then |
0ad6b8ee | 6816 | if test -d "$srcdir/mi"; then |
c0993dbe UW |
6817 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" |
6818 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6819 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6820 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6821 | fi | |
6822 | fi | |
6823 | ||
6824 | # Enable TUI. | |
81ecdfbb RW |
6825 | # Check whether --enable-tui was given. |
6826 | if test "${enable_tui+set}" = set; then : | |
6827 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6828 | yes | no | auto) |
c0993dbe UW |
6829 | ;; |
6830 | *) | |
d0ac1c44 | 6831 | as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6832 | esac |
6833 | else | |
3ca64bd3 | 6834 | enable_tui=auto |
81ecdfbb RW |
6835 | fi |
6836 | ||
c0993dbe UW |
6837 | |
6838 | # Enable gdbtk. | |
81ecdfbb RW |
6839 | # Check whether --enable-gdbtk was given. |
6840 | if test "${enable_gdbtk+set}" = set; then : | |
6841 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6842 | yes | no) |
6843 | ;; | |
6844 | *) | |
d0ac1c44 | 6845 | as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6846 | esac |
6847 | else | |
0ad6b8ee | 6848 | if test -d "$srcdir/gdbtk"; then |
c0993dbe UW |
6849 | enable_gdbtk=yes |
6850 | else | |
6851 | enable_gdbtk=no | |
6852 | fi | |
81ecdfbb RW |
6853 | fi |
6854 | ||
c0993dbe UW |
6855 | # We unconditionally disable gdbtk tests on selected platforms. |
6856 | case $host_os in | |
6857 | go32* | windows*) | |
81ecdfbb RW |
6858 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6859 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6860 | enable_gdbtk=no ;; |
6861 | esac | |
6862 | ||
0d79cdc4 AM |
6863 | # Handle optional debuginfod support |
6864 | ||
f6720b1c AM |
6865 | |
6866 | ||
6867 | ||
6868 | ||
6869 | ||
6870 | ||
6871 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
6872 | if test -n "$ac_tool_prefix"; then | |
6873 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
6874 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
6875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6876 | $as_echo_n "checking for $ac_word... " >&6; } | |
6877 | if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
6878 | $as_echo_n "(cached) " >&6 | |
6879 | else | |
6880 | case $PKG_CONFIG in | |
6881 | [\\/]* | ?:[\\/]*) | |
6882 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
6883 | ;; | |
6884 | *) | |
6885 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6886 | for as_dir in $PATH | |
6887 | do | |
6888 | IFS=$as_save_IFS | |
6889 | test -z "$as_dir" && as_dir=. | |
6890 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6891 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6892 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6893 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6894 | break 2 | |
6895 | fi | |
6896 | done | |
6897 | done | |
6898 | IFS=$as_save_IFS | |
6899 | ||
6900 | ;; | |
6901 | esac | |
6902 | fi | |
6903 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
6904 | if test -n "$PKG_CONFIG"; then | |
6905 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
6906 | $as_echo "$PKG_CONFIG" >&6; } | |
6907 | else | |
6908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6909 | $as_echo "no" >&6; } | |
6910 | fi | |
6911 | ||
6912 | ||
6913 | fi | |
6914 | if test -z "$ac_cv_path_PKG_CONFIG"; then | |
6915 | ac_pt_PKG_CONFIG=$PKG_CONFIG | |
6916 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
6917 | set dummy pkg-config; ac_word=$2 | |
6918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6919 | $as_echo_n "checking for $ac_word... " >&6; } | |
6920 | if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
6921 | $as_echo_n "(cached) " >&6 | |
6922 | else | |
6923 | case $ac_pt_PKG_CONFIG in | |
6924 | [\\/]* | ?:[\\/]*) | |
6925 | ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
6926 | ;; | |
6927 | *) | |
6928 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6929 | for as_dir in $PATH | |
6930 | do | |
6931 | IFS=$as_save_IFS | |
6932 | test -z "$as_dir" && as_dir=. | |
6933 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6934 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6935 | ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6936 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6937 | break 2 | |
6938 | fi | |
6939 | done | |
6940 | done | |
6941 | IFS=$as_save_IFS | |
6942 | ||
6943 | ;; | |
6944 | esac | |
6945 | fi | |
6946 | ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
6947 | if test -n "$ac_pt_PKG_CONFIG"; then | |
6948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
6949 | $as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
6950 | else | |
6951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6952 | $as_echo "no" >&6; } | |
6953 | fi | |
6954 | ||
6955 | if test "x$ac_pt_PKG_CONFIG" = x; then | |
6956 | PKG_CONFIG="" | |
6957 | else | |
6958 | case $cross_compiling:$ac_tool_warned in | |
6959 | yes:) | |
6960 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6961 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6962 | ac_tool_warned=yes ;; | |
6963 | esac | |
6964 | PKG_CONFIG=$ac_pt_PKG_CONFIG | |
6965 | fi | |
6966 | else | |
6967 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
6968 | fi | |
6969 | ||
6970 | fi | |
6971 | if test -n "$PKG_CONFIG"; then | |
6972 | _pkg_min_version=0.9.0 | |
6973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
6974 | $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
6975 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
6976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6977 | $as_echo "yes" >&6; } | |
6978 | else | |
6979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6980 | $as_echo "no" >&6; } | |
6981 | PKG_CONFIG="" | |
6982 | fi | |
6983 | fi | |
6984 | ||
6985 | # Handle optional debuginfod support | |
0d79cdc4 AM |
6986 | |
6987 | # Check whether --with-debuginfod was given. | |
6988 | if test "${with_debuginfod+set}" = set; then : | |
6989 | withval=$with_debuginfod; | |
6990 | else | |
6991 | with_debuginfod=auto | |
6992 | fi | |
6993 | ||
6994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5 | |
6995 | $as_echo_n "checking whether to use debuginfod... " >&6; } | |
6996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5 | |
6997 | $as_echo "$with_debuginfod" >&6; } | |
6998 | ||
f6720b1c | 6999 | if test "x$with_debuginfod" != xno; then |
0d79cdc4 | 7000 | |
f6720b1c AM |
7001 | pkg_failed=no |
7002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5 | |
7003 | $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; } | |
7004 | ||
7005 | if test -n "$DEBUGINFOD_CFLAGS"; then | |
7006 | pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS" | |
7007 | elif test -n "$PKG_CONFIG"; then | |
7008 | if test -n "$PKG_CONFIG" && \ | |
7009 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7010 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7011 | ac_status=$? | |
7012 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7013 | test $ac_status = 0; }; then | |
7014 | pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null` | |
7015 | test "x$?" != "x0" && pkg_failed=yes | |
0d79cdc4 | 7016 | else |
f6720b1c | 7017 | pkg_failed=yes |
0d79cdc4 | 7018 | fi |
f6720b1c AM |
7019 | else |
7020 | pkg_failed=untried | |
0d79cdc4 | 7021 | fi |
f6720b1c AM |
7022 | if test -n "$DEBUGINFOD_LIBS"; then |
7023 | pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS" | |
7024 | elif test -n "$PKG_CONFIG"; then | |
7025 | if test -n "$PKG_CONFIG" && \ | |
7026 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7027 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7028 | ac_status=$? | |
7029 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7030 | test $ac_status = 0; }; then | |
7031 | pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null` | |
7032 | test "x$?" != "x0" && pkg_failed=yes | |
7033 | else | |
7034 | pkg_failed=yes | |
0d79cdc4 | 7035 | fi |
f6720b1c AM |
7036 | else |
7037 | pkg_failed=untried | |
0d79cdc4 | 7038 | fi |
bec39cab | 7039 | |
d70f978b L |
7040 | pkg_save_LDFLAGS="$LDFLAGS" |
7041 | LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS" | |
7042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7043 | /* end confdefs.h. */ | |
7044 | ||
7045 | int | |
7046 | main () | |
7047 | { | |
7048 | return 0; | |
7049 | ; | |
7050 | return 0; | |
7051 | } | |
7052 | _ACEOF | |
7053 | if ac_fn_c_try_link "$LINENO"; then : | |
7054 | pkg_failed=no | |
7055 | else | |
7056 | pkg_failed=yes | |
7057 | fi | |
7058 | rm -f core conftest.err conftest.$ac_objext \ | |
7059 | conftest$ac_exeext conftest.$ac_ext | |
7060 | LDFLAGS=$pkg_save_LDFLAGS | |
7061 | ||
0d79cdc4 | 7062 | |
0d79cdc4 | 7063 | |
f6720b1c AM |
7064 | if test $pkg_failed = yes; then |
7065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7066 | $as_echo "no" >&6; } | |
0d79cdc4 | 7067 | |
f6720b1c AM |
7068 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
7069 | _pkg_short_errors_supported=yes | |
7070 | else | |
7071 | _pkg_short_errors_supported=no | |
7072 | fi | |
7073 | if test $_pkg_short_errors_supported = yes; then | |
7074 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7075 | else | |
7076 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7077 | fi | |
7078 | # Put the nasty error message in config.log where it belongs | |
7079 | echo "$DEBUGINFOD_PKG_ERRORS" >&5 | |
0d79cdc4 | 7080 | |
f6720b1c AM |
7081 | if test "x$with_debuginfod" = xyes; then |
7082 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7083 | else | |
7084 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7085 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7086 | fi | |
7087 | elif test $pkg_failed = untried; then | |
7088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7089 | $as_echo "no" >&6; } | |
7090 | if test "x$with_debuginfod" = xyes; then | |
7091 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7092 | else | |
7093 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7094 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7095 | fi | |
7096 | else | |
7097 | DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS | |
7098 | DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS | |
7099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7100 | $as_echo "yes" >&6; } | |
7101 | ||
7102 | $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h | |
7103 | ||
7104 | fi | |
7105 | else | |
7106 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5 | |
7107 | $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;} | |
0d79cdc4 AM |
7108 | fi |
7109 | ||
7110 | ||
7111 | # Libunwind support for ia64. | |
05e7c244 JK |
7112 | |
7113 | # Check whether --with-libunwind-ia64 was given. | |
7114 | if test "${with_libunwind_ia64+set}" = set; then : | |
7115 | withval=$with_libunwind_ia64; | |
bec39cab | 7116 | else |
05e7c244 JK |
7117 | with_libunwind_ia64=auto |
7118 | fi | |
bec39cab | 7119 | |
05e7c244 JK |
7120 | |
7121 | # Backward compatibility option. | |
7122 | if test "${with_libunwind+set}" = set; then | |
7123 | if test x"$with_libunwind_ia64" != xauto; then | |
d0ac1c44 | 7124 | as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 |
05e7c244 JK |
7125 | fi |
7126 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
7127 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
7128 | with_libunwind_ia64="$with_libunwind" | |
7129 | fi | |
7130 | ||
7131 | case "$with_libunwind_ia64" in | |
7132 | yes | no) | |
7133 | ;; | |
7134 | auto) | |
7135 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 7136 | do : |
b54a8fd7 | 7137 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7138 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7139 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7140 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7141 | _ACEOF |
7142 | ||
7143 | fi | |
7144 | ||
7145 | done | |
7146 | ||
05e7c244 JK |
7147 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
7148 | ;; | |
7149 | *) | |
d0ac1c44 | 7150 | as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 |
05e7c244 JK |
7151 | ;; |
7152 | esac | |
bec39cab | 7153 | |
05e7c244 | 7154 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 7155 | for ac_header in libunwind-ia64.h |
81ecdfbb | 7156 | do : |
b54a8fd7 | 7157 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7158 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7159 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7160 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7161 | _ACEOF |
7162 | ||
7163 | fi | |
7164 | ||
7165 | done | |
7166 | ||
05e7c244 | 7167 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
d0ac1c44 | 7168 | as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 |
05e7c244 JK |
7169 | fi |
7170 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
7171 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
7172 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
7173 | fi |
7174 | ||
cb01cfba JB |
7175 | opt_curses=no |
7176 | ||
81ecdfbb RW |
7177 | # Check whether --with-curses was given. |
7178 | if test "${with_curses+set}" = set; then : | |
7179 | withval=$with_curses; opt_curses=$withval | |
7180 | fi | |
7181 | ||
cb01cfba | 7182 | |
76a39ba7 | 7183 | prefer_curses=no |
cb01cfba | 7184 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 7185 | prefer_curses=yes |
cb01cfba JB |
7186 | fi |
7187 | ||
a9322a30 | 7188 | # Profiling support. |
81ecdfbb RW |
7189 | # Check whether --enable-profiling was given. |
7190 | if test "${enable_profiling+set}" = set; then : | |
7191 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
7192 | yes | no) |
7193 | ;; | |
7194 | *) | |
d0ac1c44 | 7195 | as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
7196 | esac |
7197 | else | |
7198 | enable_profiling=no | |
81ecdfbb | 7199 | fi |
bec39cab | 7200 | |
a9322a30 TT |
7201 | |
7202 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
7203 | do : |
7204 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7205 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 7206 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
7207 | cat >>confdefs.h <<_ACEOF |
7208 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 7209 | _ACEOF |
a9322a30 | 7210 | |
81ecdfbb RW |
7211 | fi |
7212 | done | |
a9322a30 | 7213 | |
81ecdfbb RW |
7214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
7215 | $as_echo_n "checking for _etext... " >&6; } | |
d0ac1c44 | 7216 | if ${ac_cv_var__etext+:} false; then : |
81ecdfbb RW |
7217 | $as_echo_n "(cached) " >&6 |
7218 | else | |
7219 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7220 | /* end confdefs.h. */ | |
7221 | #include <stdlib.h> | |
7222 | extern char _etext; | |
a9322a30 TT |
7223 | |
7224 | int | |
7225 | main () | |
7226 | { | |
7227 | free (&_etext); | |
7228 | ; | |
7229 | return 0; | |
7230 | } | |
bec39cab | 7231 | _ACEOF |
81ecdfbb | 7232 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7233 | ac_cv_var__etext=yes |
bec39cab | 7234 | else |
81ecdfbb | 7235 | ac_cv_var__etext=no |
bec39cab | 7236 | fi |
81ecdfbb RW |
7237 | rm -f core conftest.err conftest.$ac_objext \ |
7238 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 7239 | fi |
81ecdfbb RW |
7240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
7241 | $as_echo "$ac_cv_var__etext" >&6; } | |
0ad6b8ee | 7242 | if test "$ac_cv_var__etext" = yes; then |
60ca704f | 7243 | |
81ecdfbb | 7244 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 7245 | |
bec39cab | 7246 | fi |
81ecdfbb RW |
7247 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
7248 | $as_echo_n "checking for etext... " >&6; } | |
d0ac1c44 | 7249 | if ${ac_cv_var_etext+:} false; then : |
81ecdfbb | 7250 | $as_echo_n "(cached) " >&6 |
bec39cab | 7251 | else |
81ecdfbb | 7252 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7253 | /* end confdefs.h. */ |
a9322a30 TT |
7254 | #include <stdlib.h> |
7255 | extern char etext; | |
bec39cab AC |
7256 | |
7257 | int | |
7258 | main () | |
7259 | { | |
a9322a30 | 7260 | free (&etext); |
bec39cab AC |
7261 | ; |
7262 | return 0; | |
7263 | } | |
7264 | _ACEOF | |
81ecdfbb | 7265 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7266 | ac_cv_var_etext=yes |
bec39cab | 7267 | else |
81ecdfbb | 7268 | ac_cv_var_etext=no |
bec39cab | 7269 | fi |
81ecdfbb RW |
7270 | rm -f core conftest.err conftest.$ac_objext \ |
7271 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 7272 | fi |
81ecdfbb RW |
7273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
7274 | $as_echo "$ac_cv_var_etext" >&6; } | |
0ad6b8ee | 7275 | if test "$ac_cv_var_etext" = yes; then |
a9322a30 | 7276 | |
81ecdfbb | 7277 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
7278 | |
7279 | fi | |
a9322a30 | 7280 | if test "$enable_profiling" = yes ; then |
0ad6b8ee | 7281 | if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then |
d0ac1c44 | 7282 | as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
7283 | fi |
7284 | PROFILE_CFLAGS=-pg | |
7285 | OLD_CFLAGS="$CFLAGS" | |
7286 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 7287 | |
81ecdfbb RW |
7288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
7289 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
d0ac1c44 | 7290 | if ${ac_cv_cc_supports_pg+:} false; then : |
81ecdfbb | 7291 | $as_echo_n "(cached) " >&6 |
bec39cab | 7292 | else |
81ecdfbb | 7293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7294 | /* end confdefs.h. */ |
bec39cab AC |
7295 | |
7296 | int | |
7297 | main () | |
7298 | { | |
a9322a30 | 7299 | int x; |
bec39cab AC |
7300 | ; |
7301 | return 0; | |
7302 | } | |
7303 | _ACEOF | |
81ecdfbb | 7304 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7305 | ac_cv_cc_supports_pg=yes |
bec39cab | 7306 | else |
81ecdfbb | 7307 | ac_cv_cc_supports_pg=no |
bec39cab | 7308 | fi |
81ecdfbb | 7309 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 7310 | fi |
81ecdfbb RW |
7311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7312 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7313 | |
0ad6b8ee | 7314 | if test "$ac_cv_cc_supports_pg" = no; then |
d0ac1c44 | 7315 | as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7316 | fi |
bec39cab | 7317 | |
a9322a30 | 7318 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7319 | fi |
7320 | ||
44cee4fd TT |
7321 | CODESIGN_CERT= |
7322 | # Check whether --enable-codesign was given. | |
7323 | if test "${enable_codesign+set}" = set; then : | |
7324 | enableval=$enable_codesign; CODESIGN_CERT=$enableval | |
7325 | fi | |
7326 | ||
7327 | ||
7328 | ||
c16158bc JM |
7329 | |
7330 | ||
81ecdfbb RW |
7331 | # Check whether --with-pkgversion was given. |
7332 | if test "${with_pkgversion+set}" = set; then : | |
7333 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 7334 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
7335 | no) PKGVERSION= ;; |
7336 | *) PKGVERSION="($withval) " ;; | |
7337 | esac | |
7338 | else | |
7339 | PKGVERSION="(GDB) " | |
7340 | ||
81ecdfbb | 7341 | fi |
c16158bc JM |
7342 | |
7343 | ||
7344 | ||
7345 | ||
81ecdfbb RW |
7346 | |
7347 | # Check whether --with-bugurl was given. | |
7348 | if test "${with_bugurl+set}" = set; then : | |
7349 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 7350 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
7351 | no) BUGURL= |
7352 | ;; | |
7353 | *) BUGURL="$withval" | |
7354 | ;; | |
7355 | esac | |
7356 | else | |
112c22ed | 7357 | BUGURL="https://www.gnu.org/software/gdb/bugs/" |
c16158bc | 7358 | |
81ecdfbb RW |
7359 | fi |
7360 | ||
c16158bc JM |
7361 | case ${BUGURL} in |
7362 | "") | |
7363 | REPORT_BUGS_TO= | |
7364 | REPORT_BUGS_TEXI= | |
7365 | ;; | |
7366 | *) | |
7367 | REPORT_BUGS_TO="<$BUGURL>" | |
7368 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7369 | ;; | |
7370 | esac; | |
7371 | ||
7372 | ||
7373 | ||
7374 | ||
7375 | cat >>confdefs.h <<_ACEOF | |
7376 | #define PKGVERSION "$PKGVERSION" | |
7377 | _ACEOF | |
7378 | ||
7379 | ||
7380 | cat >>confdefs.h <<_ACEOF | |
7381 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7382 | _ACEOF | |
7383 | ||
7384 | ||
bec39cab AC |
7385 | # --------------------- # |
7386 | # Checks for programs. # | |
7387 | # --------------------- # | |
7388 | ||
7389 | for ac_prog in gawk mawk nawk awk | |
7390 | do | |
7391 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7392 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7394 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7395 | if ${ac_cv_prog_AWK+:} false; then : |
81ecdfbb | 7396 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7397 | else |
7398 | if test -n "$AWK"; then | |
7399 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7400 | else | |
7401 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7402 | for as_dir in $PATH | |
7403 | do | |
7404 | IFS=$as_save_IFS | |
7405 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7406 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7407 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7408 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7409 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7410 | break 2 |
7411 | fi | |
7412 | done | |
81ecdfbb RW |
7413 | done |
7414 | IFS=$as_save_IFS | |
bec39cab AC |
7415 | |
7416 | fi | |
7417 | fi | |
7418 | AWK=$ac_cv_prog_AWK | |
7419 | if test -n "$AWK"; then | |
81ecdfbb RW |
7420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7421 | $as_echo "$AWK" >&6; } | |
bec39cab | 7422 | else |
81ecdfbb RW |
7423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7424 | $as_echo "no" >&6; } | |
bec39cab AC |
7425 | fi |
7426 | ||
bec39cab | 7427 | |
81ecdfbb | 7428 | test -n "$AWK" && break |
bec39cab AC |
7429 | done |
7430 | ||
c971b7fa PA |
7431 | # Find a good install program. We prefer a C program (faster), |
7432 | # so one script is as good as another. But avoid the broken or | |
7433 | # incompatible versions: | |
7434 | # SysV /etc/install, /usr/sbin/install | |
7435 | # SunOS /usr/etc/install | |
7436 | # IRIX /sbin/install | |
7437 | # AIX /bin/install | |
7438 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7439 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7440 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7441 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7442 | # OS/2's system install, which has a completely different semantic | |
7443 | # ./install, which can be erroneously created by make from ./install.sh. | |
7444 | # Reject install programs that cannot install multiple files. | |
7445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7446 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7447 | if test -z "$INSTALL"; then | |
d0ac1c44 | 7448 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
7449 | $as_echo_n "(cached) " >&6 |
7450 | else | |
7451 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7452 | for as_dir in $PATH | |
7453 | do | |
7454 | IFS=$as_save_IFS | |
7455 | test -z "$as_dir" && as_dir=. | |
7456 | # Account for people who put trailing slashes in PATH elements. | |
7457 | case $as_dir/ in #(( | |
7458 | ./ | .// | /[cC]/* | \ | |
7459 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7460 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7461 | /usr/ucb/* ) ;; | |
7462 | *) | |
7463 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7464 | # Don't use installbsd from OSF since it installs stuff as root | |
7465 | # by default. | |
7466 | for ac_prog in ginstall scoinst install; do | |
7467 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 7468 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
7469 | if test $ac_prog = install && |
7470 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7471 | # AIX install. It has an incompatible calling convention. | |
7472 | : | |
7473 | elif test $ac_prog = install && | |
7474 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7475 | # program-specific install script used by HP pwplus--don't use. | |
7476 | : | |
7477 | else | |
7478 | rm -rf conftest.one conftest.two conftest.dir | |
7479 | echo one > conftest.one | |
7480 | echo two > conftest.two | |
7481 | mkdir conftest.dir | |
7482 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7483 | test -s conftest.one && test -s conftest.two && | |
7484 | test -s conftest.dir/conftest.one && | |
7485 | test -s conftest.dir/conftest.two | |
7486 | then | |
7487 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7488 | break 3 | |
7489 | fi | |
7490 | fi | |
7491 | fi | |
7492 | done | |
7493 | done | |
7494 | ;; | |
7495 | esac | |
7496 | ||
7497 | done | |
7498 | IFS=$as_save_IFS | |
7499 | ||
7500 | rm -rf conftest.one conftest.two conftest.dir | |
7501 | ||
7502 | fi | |
7503 | if test "${ac_cv_path_install+set}" = set; then | |
7504 | INSTALL=$ac_cv_path_install | |
7505 | else | |
7506 | # As a last resort, use the slow shell script. Don't cache a | |
7507 | # value for INSTALL within a source directory, because that will | |
7508 | # break other packages using the cache if that directory is | |
7509 | # removed, or if the value is a relative name. | |
7510 | INSTALL=$ac_install_sh | |
7511 | fi | |
7512 | fi | |
7513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7514 | $as_echo "$INSTALL" >&6; } | |
7515 | ||
7516 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7517 | # It thinks the first close brace ends the variable substitution. | |
7518 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7519 | ||
7520 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7521 | ||
7522 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7523 | |
81ecdfbb RW |
7524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7525 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7526 | LN_S=$as_ln_s |
7527 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7529 | $as_echo "yes" >&6; } | |
bec39cab | 7530 | else |
81ecdfbb RW |
7531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7532 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7533 | fi |
7534 | ||
7535 | if test -n "$ac_tool_prefix"; then | |
7536 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7537 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7539 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7540 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb | 7541 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7542 | else |
7543 | if test -n "$RANLIB"; then | |
7544 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7545 | else | |
7546 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7547 | for as_dir in $PATH | |
7548 | do | |
7549 | IFS=$as_save_IFS | |
7550 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7551 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7552 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7553 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7554 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7555 | break 2 |
7556 | fi | |
7557 | done | |
81ecdfbb RW |
7558 | done |
7559 | IFS=$as_save_IFS | |
bec39cab AC |
7560 | |
7561 | fi | |
7562 | fi | |
7563 | RANLIB=$ac_cv_prog_RANLIB | |
7564 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7566 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7567 | else |
81ecdfbb RW |
7568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7569 | $as_echo "no" >&6; } | |
bec39cab AC |
7570 | fi |
7571 | ||
81ecdfbb | 7572 | |
bec39cab AC |
7573 | fi |
7574 | if test -z "$ac_cv_prog_RANLIB"; then | |
7575 | ac_ct_RANLIB=$RANLIB | |
7576 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7577 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7579 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7580 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
81ecdfbb | 7581 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7582 | else |
7583 | if test -n "$ac_ct_RANLIB"; then | |
7584 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7585 | else | |
7586 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7587 | for as_dir in $PATH | |
7588 | do | |
7589 | IFS=$as_save_IFS | |
7590 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7591 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7592 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7593 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7594 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7595 | break 2 |
7596 | fi | |
7597 | done | |
81ecdfbb RW |
7598 | done |
7599 | IFS=$as_save_IFS | |
bec39cab | 7600 | |
bec39cab AC |
7601 | fi |
7602 | fi | |
7603 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7604 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7605 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7606 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7607 | else |
81ecdfbb RW |
7608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7609 | $as_echo "no" >&6; } | |
bec39cab AC |
7610 | fi |
7611 | ||
81ecdfbb RW |
7612 | if test "x$ac_ct_RANLIB" = x; then |
7613 | RANLIB=":" | |
7614 | else | |
7615 | case $cross_compiling:$ac_tool_warned in | |
7616 | yes:) | |
7617 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7618 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7619 | ac_tool_warned=yes ;; | |
7620 | esac | |
7621 | RANLIB=$ac_ct_RANLIB | |
7622 | fi | |
bec39cab AC |
7623 | else |
7624 | RANLIB="$ac_cv_prog_RANLIB" | |
7625 | fi | |
7626 | ||
7627 | for ac_prog in 'bison -y' byacc | |
7628 | do | |
7629 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7630 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7632 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7633 | if ${ac_cv_prog_YACC+:} false; then : |
81ecdfbb | 7634 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7635 | else |
7636 | if test -n "$YACC"; then | |
7637 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7638 | else | |
7639 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7640 | for as_dir in $PATH | |
7641 | do | |
7642 | IFS=$as_save_IFS | |
7643 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7644 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7645 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7646 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7647 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7648 | break 2 |
7649 | fi | |
7650 | done | |
81ecdfbb RW |
7651 | done |
7652 | IFS=$as_save_IFS | |
bec39cab AC |
7653 | |
7654 | fi | |
7655 | fi | |
7656 | YACC=$ac_cv_prog_YACC | |
7657 | if test -n "$YACC"; then | |
81ecdfbb RW |
7658 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7659 | $as_echo "$YACC" >&6; } | |
bec39cab | 7660 | else |
81ecdfbb RW |
7661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7662 | $as_echo "no" >&6; } | |
bec39cab AC |
7663 | fi |
7664 | ||
81ecdfbb | 7665 | |
bec39cab AC |
7666 | test -n "$YACC" && break |
7667 | done | |
7668 | test -n "$YACC" || YACC="yacc" | |
7669 | ||
7670 | ||
7671 | if test -n "$ac_tool_prefix"; then | |
7672 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7673 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7675 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7676 | if ${ac_cv_prog_AR+:} false; then : |
81ecdfbb | 7677 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7678 | else |
7679 | if test -n "$AR"; then | |
7680 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7681 | else | |
7682 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7683 | for as_dir in $PATH | |
7684 | do | |
7685 | IFS=$as_save_IFS | |
7686 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7687 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7688 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7689 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7690 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7691 | break 2 |
7692 | fi | |
7693 | done | |
81ecdfbb RW |
7694 | done |
7695 | IFS=$as_save_IFS | |
bec39cab AC |
7696 | |
7697 | fi | |
7698 | fi | |
7699 | AR=$ac_cv_prog_AR | |
7700 | if test -n "$AR"; then | |
81ecdfbb RW |
7701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7702 | $as_echo "$AR" >&6; } | |
bec39cab | 7703 | else |
81ecdfbb RW |
7704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7705 | $as_echo "no" >&6; } | |
bec39cab AC |
7706 | fi |
7707 | ||
81ecdfbb | 7708 | |
bec39cab AC |
7709 | fi |
7710 | if test -z "$ac_cv_prog_AR"; then | |
7711 | ac_ct_AR=$AR | |
7712 | # Extract the first word of "ar", so it can be a program name with args. | |
7713 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7714 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7715 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7716 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
81ecdfbb | 7717 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7718 | else |
7719 | if test -n "$ac_ct_AR"; then | |
7720 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7721 | else | |
7722 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7723 | for as_dir in $PATH | |
7724 | do | |
7725 | IFS=$as_save_IFS | |
7726 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7727 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7728 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7729 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7730 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7731 | break 2 |
7732 | fi | |
7733 | done | |
81ecdfbb RW |
7734 | done |
7735 | IFS=$as_save_IFS | |
bec39cab AC |
7736 | |
7737 | fi | |
7738 | fi | |
7739 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7740 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7742 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7743 | else |
81ecdfbb RW |
7744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7745 | $as_echo "no" >&6; } | |
bec39cab AC |
7746 | fi |
7747 | ||
81ecdfbb RW |
7748 | if test "x$ac_ct_AR" = x; then |
7749 | AR="" | |
7750 | else | |
7751 | case $cross_compiling:$ac_tool_warned in | |
7752 | yes:) | |
7753 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7754 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7755 | ac_tool_warned=yes ;; | |
7756 | esac | |
7757 | AR=$ac_ct_AR | |
7758 | fi | |
bec39cab AC |
7759 | else |
7760 | AR="$ac_cv_prog_AR" | |
7761 | fi | |
7762 | ||
7763 | if test -n "$ac_tool_prefix"; then | |
7764 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7765 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7767 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7768 | if ${ac_cv_prog_DLLTOOL+:} false; then : |
81ecdfbb | 7769 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7770 | else |
7771 | if test -n "$DLLTOOL"; then | |
7772 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7773 | else | |
7774 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7775 | for as_dir in $PATH | |
7776 | do | |
7777 | IFS=$as_save_IFS | |
7778 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7779 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7780 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7781 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7782 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7783 | break 2 |
7784 | fi | |
7785 | done | |
81ecdfbb RW |
7786 | done |
7787 | IFS=$as_save_IFS | |
bec39cab AC |
7788 | |
7789 | fi | |
7790 | fi | |
7791 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7792 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7794 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7795 | else |
81ecdfbb RW |
7796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7797 | $as_echo "no" >&6; } | |
bec39cab AC |
7798 | fi |
7799 | ||
81ecdfbb | 7800 | |
bec39cab AC |
7801 | fi |
7802 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7803 | ac_ct_DLLTOOL=$DLLTOOL | |
7804 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7805 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7807 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7808 | if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : |
81ecdfbb | 7809 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7810 | else |
7811 | if test -n "$ac_ct_DLLTOOL"; then | |
7812 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7813 | else | |
7814 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7815 | for as_dir in $PATH | |
7816 | do | |
7817 | IFS=$as_save_IFS | |
7818 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7819 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7820 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7821 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7822 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7823 | break 2 |
7824 | fi | |
7825 | done | |
81ecdfbb RW |
7826 | done |
7827 | IFS=$as_save_IFS | |
bec39cab AC |
7828 | |
7829 | fi | |
7830 | fi | |
7831 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7832 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7834 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7835 | else |
81ecdfbb RW |
7836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7837 | $as_echo "no" >&6; } | |
bec39cab AC |
7838 | fi |
7839 | ||
81ecdfbb RW |
7840 | if test "x$ac_ct_DLLTOOL" = x; then |
7841 | DLLTOOL="" | |
7842 | else | |
7843 | case $cross_compiling:$ac_tool_warned in | |
7844 | yes:) | |
7845 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7846 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7847 | ac_tool_warned=yes ;; | |
7848 | esac | |
7849 | DLLTOOL=$ac_ct_DLLTOOL | |
7850 | fi | |
bec39cab AC |
7851 | else |
7852 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7853 | fi | |
7854 | ||
7855 | if test -n "$ac_tool_prefix"; then | |
7856 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7857 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7858 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7859 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7860 | if ${ac_cv_prog_WINDRES+:} false; then : |
81ecdfbb | 7861 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7862 | else |
7863 | if test -n "$WINDRES"; then | |
7864 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7865 | else | |
7866 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7867 | for as_dir in $PATH | |
7868 | do | |
7869 | IFS=$as_save_IFS | |
7870 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7871 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7872 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7873 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7874 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7875 | break 2 |
7876 | fi | |
7877 | done | |
81ecdfbb RW |
7878 | done |
7879 | IFS=$as_save_IFS | |
bec39cab AC |
7880 | |
7881 | fi | |
7882 | fi | |
7883 | WINDRES=$ac_cv_prog_WINDRES | |
7884 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7886 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7887 | else |
81ecdfbb RW |
7888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7889 | $as_echo "no" >&6; } | |
bec39cab AC |
7890 | fi |
7891 | ||
81ecdfbb | 7892 | |
bec39cab AC |
7893 | fi |
7894 | if test -z "$ac_cv_prog_WINDRES"; then | |
7895 | ac_ct_WINDRES=$WINDRES | |
7896 | # Extract the first word of "windres", so it can be a program name with args. | |
7897 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7899 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7900 | if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : |
81ecdfbb | 7901 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7902 | else |
7903 | if test -n "$ac_ct_WINDRES"; then | |
7904 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7905 | else | |
7906 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7907 | for as_dir in $PATH | |
7908 | do | |
7909 | IFS=$as_save_IFS | |
7910 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7911 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7912 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7913 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7914 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7915 | break 2 |
7916 | fi | |
7917 | done | |
81ecdfbb RW |
7918 | done |
7919 | IFS=$as_save_IFS | |
bec39cab AC |
7920 | |
7921 | fi | |
7922 | fi | |
7923 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7924 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7926 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7927 | else |
81ecdfbb RW |
7928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7929 | $as_echo "no" >&6; } | |
c906108c | 7930 | fi |
bec39cab | 7931 | |
81ecdfbb RW |
7932 | if test "x$ac_ct_WINDRES" = x; then |
7933 | WINDRES="" | |
7934 | else | |
7935 | case $cross_compiling:$ac_tool_warned in | |
7936 | yes:) | |
7937 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7938 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7939 | ac_tool_warned=yes ;; | |
7940 | esac | |
7941 | WINDRES=$ac_ct_WINDRES | |
7942 | fi | |
c906108c | 7943 | else |
bec39cab | 7944 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7945 | fi |
7946 | ||
bec39cab | 7947 | |
036c3acb TS |
7948 | case $host_os in |
7949 | gnu*) | |
7950 | # Needed for GNU Hurd hosts. | |
7951 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7952 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7953 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7955 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7956 | if ${ac_cv_prog_MIG+:} false; then : |
81ecdfbb | 7957 | $as_echo_n "(cached) " >&6 |
c906108c | 7958 | else |
bec39cab AC |
7959 | if test -n "$MIG"; then |
7960 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7961 | else | |
7962 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7963 | for as_dir in $PATH | |
7964 | do | |
7965 | IFS=$as_save_IFS | |
7966 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7967 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7968 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7969 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7970 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7971 | break 2 |
7972 | fi | |
7973 | done | |
81ecdfbb RW |
7974 | done |
7975 | IFS=$as_save_IFS | |
bec39cab | 7976 | |
c906108c | 7977 | fi |
bec39cab AC |
7978 | fi |
7979 | MIG=$ac_cv_prog_MIG | |
7980 | if test -n "$MIG"; then | |
81ecdfbb RW |
7981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7982 | $as_echo "$MIG" >&6; } | |
c906108c | 7983 | else |
81ecdfbb RW |
7984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7985 | $as_echo "no" >&6; } | |
c906108c SS |
7986 | fi |
7987 | ||
81ecdfbb | 7988 | |
bec39cab AC |
7989 | fi |
7990 | if test -z "$ac_cv_prog_MIG"; then | |
7991 | ac_ct_MIG=$MIG | |
7992 | # Extract the first word of "mig", so it can be a program name with args. | |
7993 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
7994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7995 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7996 | if ${ac_cv_prog_ac_ct_MIG+:} false; then : |
81ecdfbb | 7997 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7998 | else |
7999 | if test -n "$ac_ct_MIG"; then | |
8000 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
8001 | else | |
8002 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8003 | for as_dir in $PATH | |
8004 | do | |
8005 | IFS=$as_save_IFS | |
8006 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 8007 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 8008 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 8009 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 8010 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8011 | break 2 |
8012 | fi | |
8013 | done | |
81ecdfbb RW |
8014 | done |
8015 | IFS=$as_save_IFS | |
c906108c | 8016 | |
bec39cab AC |
8017 | fi |
8018 | fi | |
8019 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
8020 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
8021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
8022 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 8023 | else |
81ecdfbb RW |
8024 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8025 | $as_echo "no" >&6; } | |
bec39cab | 8026 | fi |
c906108c | 8027 | |
81ecdfbb RW |
8028 | if test "x$ac_ct_MIG" = x; then |
8029 | MIG="" | |
8030 | else | |
8031 | case $cross_compiling:$ac_tool_warned in | |
8032 | yes:) | |
8033 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8034 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8035 | ac_tool_warned=yes ;; | |
8036 | esac | |
8037 | MIG=$ac_ct_MIG | |
8038 | fi | |
bec39cab AC |
8039 | else |
8040 | MIG="$ac_cv_prog_MIG" | |
8041 | fi | |
c906108c | 8042 | |
036c3acb | 8043 | if test x"$MIG" = x; then |
d0ac1c44 | 8044 | as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 |
036c3acb TS |
8045 | fi |
8046 | ;; | |
8047 | esac | |
c906108c | 8048 | |
bec39cab AC |
8049 | # ---------------------- # |
8050 | # Checks for libraries. # | |
8051 | # ---------------------- # | |
c906108c | 8052 | |
bec39cab | 8053 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
8054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
8055 | $as_echo_n "checking for main in -lm... " >&6; } | |
d0ac1c44 | 8056 | if ${ac_cv_lib_m_main+:} false; then : |
81ecdfbb | 8057 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8058 | else |
8059 | ac_check_lib_save_LIBS=$LIBS | |
8060 | LIBS="-lm $LIBS" | |
81ecdfbb | 8061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8062 | /* end confdefs.h. */ |
c906108c | 8063 | |
c906108c | 8064 | |
bec39cab AC |
8065 | int |
8066 | main () | |
8067 | { | |
81ecdfbb | 8068 | return main (); |
bec39cab AC |
8069 | ; |
8070 | return 0; | |
8071 | } | |
8072 | _ACEOF | |
81ecdfbb | 8073 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
8074 | ac_cv_lib_m_main=yes |
8075 | else | |
81ecdfbb | 8076 | ac_cv_lib_m_main=no |
bec39cab | 8077 | fi |
81ecdfbb RW |
8078 | rm -f core conftest.err conftest.$ac_objext \ |
8079 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
8080 | LIBS=$ac_check_lib_save_LIBS |
8081 | fi | |
81ecdfbb RW |
8082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
8083 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
d0ac1c44 | 8084 | if test "x$ac_cv_lib_m_main" = xyes; then : |
bec39cab AC |
8085 | cat >>confdefs.h <<_ACEOF |
8086 | #define HAVE_LIBM 1 | |
8087 | _ACEOF | |
8088 | ||
8089 | LIBS="-lm $LIBS" | |
c906108c | 8090 | |
c906108c | 8091 | fi |
bec39cab AC |
8092 | |
8093 | ||
bec39cab | 8094 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
8095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
8096 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
d0ac1c44 | 8097 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb | 8098 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8099 | else |
8100 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8102 | /* end confdefs.h. */ |
ddc9cd0f | 8103 | |
81ecdfbb RW |
8104 | /* Override any GCC internal prototype to avoid an error. |
8105 | Use char because int might match the return type of a GCC | |
8106 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
8107 | #ifdef __cplusplus |
8108 | extern "C" | |
8109 | #endif | |
bec39cab AC |
8110 | char gethostbyname (); |
8111 | int | |
8112 | main () | |
8113 | { | |
81ecdfbb | 8114 | return gethostbyname (); |
bec39cab AC |
8115 | ; |
8116 | return 0; | |
8117 | } | |
8118 | _ACEOF | |
81ecdfbb RW |
8119 | for ac_lib in '' nsl; do |
8120 | if test -z "$ac_lib"; then | |
8121 | ac_res="none required" | |
8122 | else | |
8123 | ac_res=-l$ac_lib | |
b4e70030 | 8124 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8125 | fi |
8126 | if ac_fn_c_try_link "$LINENO"; then : | |
8127 | ac_cv_search_gethostbyname=$ac_res | |
8128 | fi | |
8129 | rm -f core conftest.err conftest.$ac_objext \ | |
8130 | conftest$ac_exeext | |
d0ac1c44 | 8131 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb RW |
8132 | break |
8133 | fi | |
8134 | done | |
d0ac1c44 | 8135 | if ${ac_cv_search_gethostbyname+:} false; then : |
ddc9cd0f | 8136 | |
bec39cab | 8137 | else |
81ecdfbb | 8138 | ac_cv_search_gethostbyname=no |
bec39cab | 8139 | fi |
81ecdfbb | 8140 | rm conftest.$ac_ext |
bec39cab AC |
8141 | LIBS=$ac_func_search_save_LIBS |
8142 | fi | |
81ecdfbb RW |
8143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
8144 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
8145 | ac_res=$ac_cv_search_gethostbyname | |
8146 | if test "$ac_res" != no; then : | |
8147 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 8148 | |
bec39cab | 8149 | fi |
96baa820 | 8150 | |
c906108c | 8151 | |
b4e70030 | 8152 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
8153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
8154 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
d0ac1c44 | 8155 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb | 8156 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
8157 | else |
8158 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8160 | /* end confdefs.h. */ |
8161 | ||
81ecdfbb RW |
8162 | /* Override any GCC internal prototype to avoid an error. |
8163 | Use char because int might match the return type of a GCC | |
8164 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
8165 | #ifdef __cplusplus |
8166 | extern "C" | |
8167 | #endif | |
b4e70030 JB |
8168 | char socketpair (); |
8169 | int | |
8170 | main () | |
8171 | { | |
81ecdfbb | 8172 | return socketpair (); |
b4e70030 JB |
8173 | ; |
8174 | return 0; | |
8175 | } | |
8176 | _ACEOF | |
81ecdfbb RW |
8177 | for ac_lib in '' socket; do |
8178 | if test -z "$ac_lib"; then | |
8179 | ac_res="none required" | |
8180 | else | |
8181 | ac_res=-l$ac_lib | |
b4e70030 | 8182 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8183 | fi |
8184 | if ac_fn_c_try_link "$LINENO"; then : | |
8185 | ac_cv_search_socketpair=$ac_res | |
8186 | fi | |
8187 | rm -f core conftest.err conftest.$ac_objext \ | |
8188 | conftest$ac_exeext | |
d0ac1c44 | 8189 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb RW |
8190 | break |
8191 | fi | |
8192 | done | |
d0ac1c44 | 8193 | if ${ac_cv_search_socketpair+:} false; then : |
b4e70030 | 8194 | |
b4e70030 | 8195 | else |
81ecdfbb | 8196 | ac_cv_search_socketpair=no |
b4e70030 | 8197 | fi |
81ecdfbb | 8198 | rm conftest.$ac_ext |
b4e70030 JB |
8199 | LIBS=$ac_func_search_save_LIBS |
8200 | fi | |
81ecdfbb RW |
8201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
8202 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
8203 | ac_res=$ac_cv_search_socketpair | |
8204 | if test "$ac_res" != no; then : | |
8205 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
8206 | |
8207 | fi | |
8208 | ||
8209 | ||
233a11ab | 8210 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 8211 | |
711a72d3 | 8212 | # Use the system's zlib library. |
39f3de7c L |
8213 | zlibdir="-L\$(top_builddir)/../zlib" |
8214 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 8215 | |
711a72d3 L |
8216 | # Check whether --with-system-zlib was given. |
8217 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
8218 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
8219 | zlibdir= | |
8220 | zlibinc= | |
8221 | fi | |
b040ad30 | 8222 | |
233a11ab | 8223 | fi |
233a11ab | 8224 | |
233a11ab | 8225 | |
233a11ab | 8226 | |
b040ad30 | 8227 | |
233a11ab | 8228 | |
25268153 | 8229 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
37773e78 | 8230 | # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. |
25268153 JB |
8231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 |
8232 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } | |
d0ac1c44 | 8233 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
8234 | $as_echo_n "(cached) " >&6 |
8235 | else | |
8236 | ac_func_search_save_LIBS=$LIBS | |
8237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8238 | /* end confdefs.h. */ | |
8239 | ||
8240 | /* Override any GCC internal prototype to avoid an error. | |
8241 | Use char because int might match the return type of a GCC | |
8242 | builtin and then its argument prototype would still apply. */ | |
8243 | #ifdef __cplusplus | |
8244 | extern "C" | |
8245 | #endif | |
8246 | char kinfo_getvmmap (); | |
8247 | int | |
8248 | main () | |
8249 | { | |
8250 | return kinfo_getvmmap (); | |
8251 | ; | |
8252 | return 0; | |
8253 | } | |
8254 | _ACEOF | |
37773e78 | 8255 | for ac_lib in '' util util-freebsd; do |
25268153 JB |
8256 | if test -z "$ac_lib"; then |
8257 | ac_res="none required" | |
8258 | else | |
8259 | ac_res=-l$ac_lib | |
8260 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8261 | fi | |
8262 | if ac_fn_c_try_link "$LINENO"; then : | |
8263 | ac_cv_search_kinfo_getvmmap=$ac_res | |
8264 | fi | |
8265 | rm -f core conftest.err conftest.$ac_objext \ | |
8266 | conftest$ac_exeext | |
d0ac1c44 | 8267 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
8268 | break |
8269 | fi | |
8270 | done | |
d0ac1c44 | 8271 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
25268153 JB |
8272 | |
8273 | else | |
8274 | ac_cv_search_kinfo_getvmmap=no | |
8275 | fi | |
8276 | rm conftest.$ac_ext | |
8277 | LIBS=$ac_func_search_save_LIBS | |
8278 | fi | |
8279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 | |
8280 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } | |
8281 | ac_res=$ac_cv_search_kinfo_getvmmap | |
8282 | if test "$ac_res" != no; then : | |
8283 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
8284 | ||
8285 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h | |
8286 | ||
8287 | fi | |
8288 | ||
8289 | ||
77f120bf | 8290 | |
016a3251 DD |
8291 | if test "X$prefix" = "XNONE"; then |
8292 | acl_final_prefix="$ac_default_prefix" | |
8293 | else | |
8294 | acl_final_prefix="$prefix" | |
8295 | fi | |
8296 | if test "X$exec_prefix" = "XNONE"; then | |
8297 | acl_final_exec_prefix='${prefix}' | |
8298 | else | |
8299 | acl_final_exec_prefix="$exec_prefix" | |
8300 | fi | |
8301 | acl_save_prefix="$prefix" | |
8302 | prefix="$acl_final_prefix" | |
8303 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8304 | prefix="$acl_save_prefix" | |
8305 | ||
8306 | ||
8307 | # Check whether --with-gnu-ld was given. | |
8308 | if test "${with_gnu_ld+set}" = set; then : | |
8309 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8310 | else | |
8311 | with_gnu_ld=no | |
8312 | fi | |
8313 | ||
8314 | # Prepare PATH_SEPARATOR. | |
8315 | # The user is always right. | |
8316 | if test "${PATH_SEPARATOR+set}" != set; then | |
8317 | echo "#! /bin/sh" >conf$$.sh | |
8318 | echo "exit 0" >>conf$$.sh | |
8319 | chmod +x conf$$.sh | |
8320 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8321 | PATH_SEPARATOR=';' | |
8322 | else | |
8323 | PATH_SEPARATOR=: | |
8324 | fi | |
8325 | rm -f conf$$.sh | |
8326 | fi | |
8327 | ac_prog=ld | |
8328 | if test "$GCC" = yes; then | |
8329 | # Check if gcc -print-prog-name=ld gives a path. | |
8330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8331 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8332 | case $host in | |
8333 | *-*-mingw*) | |
8334 | # gcc leaves a trailing carriage return which upsets mingw | |
8335 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8336 | *) | |
8337 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8338 | esac | |
8339 | case $ac_prog in | |
8340 | # Accept absolute paths. | |
8341 | [\\/]* | [A-Za-z]:[\\/]*) | |
8342 | re_direlt='/[^/][^/]*/\.\./' | |
8343 | # Canonicalize the path of ld | |
8344 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8345 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8346 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8347 | done | |
8348 | test -z "$LD" && LD="$ac_prog" | |
8349 | ;; | |
8350 | "") | |
8351 | # If it fails, then pretend we aren't using GCC. | |
8352 | ac_prog=ld | |
8353 | ;; | |
8354 | *) | |
8355 | # If it is relative, then search for the first ld in PATH. | |
8356 | with_gnu_ld=unknown | |
8357 | ;; | |
8358 | esac | |
8359 | elif test "$with_gnu_ld" = yes; then | |
8360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8361 | $as_echo_n "checking for GNU ld... " >&6; } | |
8362 | else | |
8363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8364 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8365 | fi | |
d0ac1c44 | 8366 | if ${acl_cv_path_LD+:} false; then : |
016a3251 DD |
8367 | $as_echo_n "(cached) " >&6 |
8368 | else | |
8369 | if test -z "$LD"; then | |
8370 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8371 | for ac_dir in $PATH; do | |
8372 | test -z "$ac_dir" && ac_dir=. | |
8373 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8374 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8375 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8376 | # but apparently some GNU ld's only accept -v. | |
8377 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8378 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8379 | test "$with_gnu_ld" != no && break | |
8380 | else | |
8381 | test "$with_gnu_ld" != yes && break | |
8382 | fi | |
8383 | fi | |
8384 | done | |
8385 | IFS="$ac_save_ifs" | |
8386 | else | |
8387 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8388 | fi | |
8389 | fi | |
8390 | ||
8391 | LD="$acl_cv_path_LD" | |
8392 | if test -n "$LD"; then | |
8393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8394 | $as_echo "$LD" >&6; } | |
8395 | else | |
8396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8397 | $as_echo "no" >&6; } | |
8398 | fi | |
d0ac1c44 | 8399 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
016a3251 DD |
8400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
8401 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
d0ac1c44 | 8402 | if ${acl_cv_prog_gnu_ld+:} false; then : |
016a3251 DD |
8403 | $as_echo_n "(cached) " >&6 |
8404 | else | |
8405 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8406 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8407 | acl_cv_prog_gnu_ld=yes | |
8408 | else | |
8409 | acl_cv_prog_gnu_ld=no | |
8410 | fi | |
8411 | fi | |
8412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8413 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8414 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8415 | ||
8416 | ||
8417 | ||
8418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8419 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
d0ac1c44 | 8420 | if ${acl_cv_rpath+:} false; then : |
016a3251 DD |
8421 | $as_echo_n "(cached) " >&6 |
8422 | else | |
8423 | ||
8424 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8425 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8426 | . ./conftest.sh | |
8427 | rm -f ./conftest.sh | |
8428 | acl_cv_rpath=done | |
8429 | ||
8430 | fi | |
8431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8432 | $as_echo "$acl_cv_rpath" >&6; } | |
8433 | wl="$acl_cv_wl" | |
8434 | libext="$acl_cv_libext" | |
8435 | shlibext="$acl_cv_shlibext" | |
8436 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8437 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8438 | hardcode_direct="$acl_cv_hardcode_direct" | |
8439 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8440 | # Check whether --enable-rpath was given. | |
8441 | if test "${enable_rpath+set}" = set; then : | |
8442 | enableval=$enable_rpath; : | |
8443 | else | |
8444 | enable_rpath=yes | |
8445 | fi | |
8446 | ||
8447 | ||
8448 | ||
8449 | ||
8450 | ||
8451 | ||
8452 | ||
8453 | ||
8454 | use_additional=yes | |
8455 | ||
8456 | acl_save_prefix="$prefix" | |
8457 | prefix="$acl_final_prefix" | |
8458 | acl_save_exec_prefix="$exec_prefix" | |
8459 | exec_prefix="$acl_final_exec_prefix" | |
8460 | ||
8461 | eval additional_includedir=\"$includedir\" | |
8462 | eval additional_libdir=\"$libdir\" | |
8463 | ||
8464 | exec_prefix="$acl_save_exec_prefix" | |
8465 | prefix="$acl_save_prefix" | |
77f120bf | 8466 | |
6c7a06a3 | 8467 | |
81ecdfbb RW |
8468 | # Check whether --with-libiconv-prefix was given. |
8469 | if test "${with_libiconv_prefix+set}" = set; then : | |
8470 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8471 | if test "X$withval" = "Xno"; then |
8472 | use_additional=no | |
8473 | else | |
8474 | if test "X$withval" = "X"; then | |
8475 | ||
8476 | acl_save_prefix="$prefix" | |
8477 | prefix="$acl_final_prefix" | |
8478 | acl_save_exec_prefix="$exec_prefix" | |
8479 | exec_prefix="$acl_final_exec_prefix" | |
8480 | ||
8481 | eval additional_includedir=\"$includedir\" | |
8482 | eval additional_libdir=\"$libdir\" | |
8483 | ||
8484 | exec_prefix="$acl_save_exec_prefix" | |
8485 | prefix="$acl_save_prefix" | |
8486 | ||
8487 | else | |
8488 | additional_includedir="$withval/include" | |
8489 | additional_libdir="$withval/lib" | |
8490 | fi | |
8491 | fi | |
6c7a06a3 | 8492 | |
81ecdfbb RW |
8493 | fi |
8494 | ||
9f1528a1 AB |
8495 | |
8496 | # Check whether --with-libiconv-type was given. | |
8497 | if test "${with_libiconv_type+set}" = set; then : | |
8498 | withval=$with_libiconv_type; with_libiconv_type=$withval | |
8499 | else | |
8500 | with_libiconv_type=auto | |
8501 | fi | |
8502 | ||
8503 | lib_type=`eval echo \$with_libiconv_type` | |
8504 | ||
016a3251 DD |
8505 | LIBICONV= |
8506 | LTLIBICONV= | |
8507 | INCICONV= | |
8508 | rpathdirs= | |
8509 | ltrpathdirs= | |
8510 | names_already_handled= | |
8511 | names_next_round='iconv ' | |
8512 | while test -n "$names_next_round"; do | |
8513 | names_this_round="$names_next_round" | |
8514 | names_next_round= | |
8515 | for name in $names_this_round; do | |
8516 | already_handled= | |
8517 | for n in $names_already_handled; do | |
8518 | if test "$n" = "$name"; then | |
8519 | already_handled=yes | |
8520 | break | |
8521 | fi | |
8522 | done | |
8523 | if test -z "$already_handled"; then | |
8524 | names_already_handled="$names_already_handled $name" | |
8525 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8526 | eval value=\"\$HAVE_LIB$uppername\" | |
8527 | if test -n "$value"; then | |
8528 | if test "$value" = yes; then | |
8529 | eval value=\"\$LIB$uppername\" | |
8530 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8531 | eval value=\"\$LTLIB$uppername\" | |
8532 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8533 | else | |
8534 | : | |
8535 | fi | |
8536 | else | |
8537 | found_dir= | |
8538 | found_la= | |
8539 | found_so= | |
8540 | found_a= | |
8541 | if test $use_additional = yes; then | |
9f1528a1 | 8542 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8543 | found_dir="$additional_libdir" |
8544 | found_so="$additional_libdir/lib$name.$shlibext" | |
8545 | if test -f "$additional_libdir/lib$name.la"; then | |
8546 | found_la="$additional_libdir/lib$name.la" | |
8547 | fi | |
9f1528a1 | 8548 | elif test x$lib_type != xshared; then |
016a3251 DD |
8549 | if test -f "$additional_libdir/lib$name.$libext"; then |
8550 | found_dir="$additional_libdir" | |
8551 | found_a="$additional_libdir/lib$name.$libext" | |
8552 | if test -f "$additional_libdir/lib$name.la"; then | |
8553 | found_la="$additional_libdir/lib$name.la" | |
8554 | fi | |
8555 | fi | |
8556 | fi | |
8557 | fi | |
8558 | if test "X$found_dir" = "X"; then | |
8559 | for x in $LDFLAGS $LTLIBICONV; do | |
8560 | ||
8561 | acl_save_prefix="$prefix" | |
8562 | prefix="$acl_final_prefix" | |
8563 | acl_save_exec_prefix="$exec_prefix" | |
8564 | exec_prefix="$acl_final_exec_prefix" | |
8565 | eval x=\"$x\" | |
8566 | exec_prefix="$acl_save_exec_prefix" | |
8567 | prefix="$acl_save_prefix" | |
8568 | ||
8569 | case "$x" in | |
8570 | -L*) | |
8571 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 8572 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8573 | found_dir="$dir" |
8574 | found_so="$dir/lib$name.$shlibext" | |
8575 | if test -f "$dir/lib$name.la"; then | |
8576 | found_la="$dir/lib$name.la" | |
8577 | fi | |
9f1528a1 | 8578 | elif test x$lib_type != xshared; then |
016a3251 DD |
8579 | if test -f "$dir/lib$name.$libext"; then |
8580 | found_dir="$dir" | |
8581 | found_a="$dir/lib$name.$libext" | |
8582 | if test -f "$dir/lib$name.la"; then | |
8583 | found_la="$dir/lib$name.la" | |
8584 | fi | |
8585 | fi | |
8586 | fi | |
8587 | ;; | |
8588 | esac | |
8589 | if test "X$found_dir" != "X"; then | |
8590 | break | |
8591 | fi | |
8592 | done | |
8593 | fi | |
8594 | if test "X$found_dir" != "X"; then | |
8595 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8596 | if test "X$found_so" != "X"; then | |
8597 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8598 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8599 | else | |
8600 | haveit= | |
8601 | for x in $ltrpathdirs; do | |
8602 | if test "X$x" = "X$found_dir"; then | |
8603 | haveit=yes | |
8604 | break | |
8605 | fi | |
8606 | done | |
8607 | if test -z "$haveit"; then | |
8608 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8609 | fi | |
8610 | if test "$hardcode_direct" = yes; then | |
8611 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8612 | else | |
8613 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8614 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8615 | haveit= | |
8616 | for x in $rpathdirs; do | |
8617 | if test "X$x" = "X$found_dir"; then | |
8618 | haveit=yes | |
8619 | break | |
8620 | fi | |
8621 | done | |
8622 | if test -z "$haveit"; then | |
8623 | rpathdirs="$rpathdirs $found_dir" | |
8624 | fi | |
8625 | else | |
8626 | haveit= | |
8627 | for x in $LDFLAGS $LIBICONV; do | |
8628 | ||
8629 | acl_save_prefix="$prefix" | |
8630 | prefix="$acl_final_prefix" | |
8631 | acl_save_exec_prefix="$exec_prefix" | |
8632 | exec_prefix="$acl_final_exec_prefix" | |
8633 | eval x=\"$x\" | |
8634 | exec_prefix="$acl_save_exec_prefix" | |
8635 | prefix="$acl_save_prefix" | |
8636 | ||
8637 | if test "X$x" = "X-L$found_dir"; then | |
8638 | haveit=yes | |
8639 | break | |
8640 | fi | |
8641 | done | |
8642 | if test -z "$haveit"; then | |
8643 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8644 | fi | |
8645 | if test "$hardcode_minus_L" != no; then | |
8646 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8647 | else | |
8648 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8649 | fi | |
8650 | fi | |
8651 | fi | |
8652 | fi | |
8653 | else | |
8654 | if test "X$found_a" != "X"; then | |
8655 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8656 | else | |
8657 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8658 | fi | |
8659 | fi | |
8660 | additional_includedir= | |
8661 | case "$found_dir" in | |
8662 | */lib | */lib/) | |
8663 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8664 | additional_includedir="$basedir/include" | |
8665 | ;; | |
8666 | esac | |
8667 | if test "X$additional_includedir" != "X"; then | |
8668 | if test "X$additional_includedir" != "X/usr/include"; then | |
8669 | haveit= | |
8670 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8671 | if test -n "$GCC"; then | |
8672 | case $host_os in | |
8673 | linux*) haveit=yes;; | |
8674 | esac | |
8675 | fi | |
8676 | fi | |
8677 | if test -z "$haveit"; then | |
8678 | for x in $CPPFLAGS $INCICONV; do | |
8679 | ||
8680 | acl_save_prefix="$prefix" | |
8681 | prefix="$acl_final_prefix" | |
8682 | acl_save_exec_prefix="$exec_prefix" | |
8683 | exec_prefix="$acl_final_exec_prefix" | |
8684 | eval x=\"$x\" | |
8685 | exec_prefix="$acl_save_exec_prefix" | |
8686 | prefix="$acl_save_prefix" | |
8687 | ||
8688 | if test "X$x" = "X-I$additional_includedir"; then | |
8689 | haveit=yes | |
8690 | break | |
8691 | fi | |
8692 | done | |
8693 | if test -z "$haveit"; then | |
8694 | if test -d "$additional_includedir"; then | |
8695 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8696 | fi | |
8697 | fi | |
8698 | fi | |
8699 | fi | |
8700 | fi | |
8701 | if test -n "$found_la"; then | |
8702 | save_libdir="$libdir" | |
8703 | case "$found_la" in | |
8704 | */* | *\\*) . "$found_la" ;; | |
8705 | *) . "./$found_la" ;; | |
8706 | esac | |
8707 | libdir="$save_libdir" | |
8708 | for dep in $dependency_libs; do | |
8709 | case "$dep" in | |
8710 | -L*) | |
8711 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8712 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8713 | haveit= | |
8714 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8715 | if test -n "$GCC"; then | |
8716 | case $host_os in | |
8717 | linux*) haveit=yes;; | |
8718 | esac | |
8719 | fi | |
8720 | fi | |
8721 | if test -z "$haveit"; then | |
8722 | haveit= | |
8723 | for x in $LDFLAGS $LIBICONV; do | |
8724 | ||
8725 | acl_save_prefix="$prefix" | |
8726 | prefix="$acl_final_prefix" | |
8727 | acl_save_exec_prefix="$exec_prefix" | |
8728 | exec_prefix="$acl_final_exec_prefix" | |
8729 | eval x=\"$x\" | |
8730 | exec_prefix="$acl_save_exec_prefix" | |
8731 | prefix="$acl_save_prefix" | |
8732 | ||
8733 | if test "X$x" = "X-L$additional_libdir"; then | |
8734 | haveit=yes | |
8735 | break | |
8736 | fi | |
8737 | done | |
8738 | if test -z "$haveit"; then | |
8739 | if test -d "$additional_libdir"; then | |
8740 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8741 | fi | |
8742 | fi | |
8743 | haveit= | |
8744 | for x in $LDFLAGS $LTLIBICONV; do | |
8745 | ||
8746 | acl_save_prefix="$prefix" | |
8747 | prefix="$acl_final_prefix" | |
8748 | acl_save_exec_prefix="$exec_prefix" | |
8749 | exec_prefix="$acl_final_exec_prefix" | |
8750 | eval x=\"$x\" | |
8751 | exec_prefix="$acl_save_exec_prefix" | |
8752 | prefix="$acl_save_prefix" | |
8753 | ||
8754 | if test "X$x" = "X-L$additional_libdir"; then | |
8755 | haveit=yes | |
8756 | break | |
8757 | fi | |
8758 | done | |
8759 | if test -z "$haveit"; then | |
8760 | if test -d "$additional_libdir"; then | |
8761 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8762 | fi | |
8763 | fi | |
8764 | fi | |
8765 | fi | |
8766 | ;; | |
8767 | -R*) | |
8768 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8769 | if test "$enable_rpath" != no; then | |
8770 | haveit= | |
8771 | for x in $rpathdirs; do | |
8772 | if test "X$x" = "X$dir"; then | |
8773 | haveit=yes | |
8774 | break | |
8775 | fi | |
8776 | done | |
8777 | if test -z "$haveit"; then | |
8778 | rpathdirs="$rpathdirs $dir" | |
8779 | fi | |
8780 | haveit= | |
8781 | for x in $ltrpathdirs; do | |
8782 | if test "X$x" = "X$dir"; then | |
8783 | haveit=yes | |
8784 | break | |
8785 | fi | |
8786 | done | |
8787 | if test -z "$haveit"; then | |
8788 | ltrpathdirs="$ltrpathdirs $dir" | |
8789 | fi | |
8790 | fi | |
8791 | ;; | |
8792 | -l*) | |
8793 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8794 | ;; | |
8795 | *.la) | |
8796 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8797 | ;; | |
8798 | *) | |
8799 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8800 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8801 | ;; | |
8802 | esac | |
8803 | done | |
8804 | fi | |
8805 | else | |
9f1528a1 AB |
8806 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
8807 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8808 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8809 | else | |
8810 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext" | |
8811 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext" | |
8812 | fi | |
016a3251 DD |
8813 | fi |
8814 | fi | |
8815 | fi | |
8816 | done | |
8817 | done | |
8818 | if test "X$rpathdirs" != "X"; then | |
8819 | if test -n "$hardcode_libdir_separator"; then | |
8820 | alldirs= | |
8821 | for found_dir in $rpathdirs; do | |
8822 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8823 | done | |
8824 | acl_save_libdir="$libdir" | |
8825 | libdir="$alldirs" | |
8826 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8827 | libdir="$acl_save_libdir" | |
8828 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8829 | else | |
8830 | for found_dir in $rpathdirs; do | |
8831 | acl_save_libdir="$libdir" | |
8832 | libdir="$found_dir" | |
8833 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8834 | libdir="$acl_save_libdir" | |
8835 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8836 | done | |
8837 | fi | |
8838 | fi | |
8839 | if test "X$ltrpathdirs" != "X"; then | |
8840 | for found_dir in $ltrpathdirs; do | |
8841 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8842 | done | |
8843 | fi | |
8844 | ||
8845 | ||
8846 | ||
8847 | ||
8848 | ||
6c7a06a3 | 8849 | |
6c7a06a3 | 8850 | |
81ecdfbb RW |
8851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8852 | $as_echo_n "checking for iconv... " >&6; } | |
d0ac1c44 | 8853 | if ${am_cv_func_iconv+:} false; then : |
81ecdfbb | 8854 | $as_echo_n "(cached) " >&6 |
d542061a | 8855 | else |
6c7a06a3 TT |
8856 | |
8857 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8858 | am_cv_lib_iconv=no | |
016a3251 DD |
8859 | am_save_CPPFLAGS="$CPPFLAGS" |
8860 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8861 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8862 | /* end confdefs.h. */ |
6c7a06a3 TT |
8863 | #include <stdlib.h> |
8864 | #include <iconv.h> | |
d542061a UW |
8865 | int |
8866 | main () | |
8867 | { | |
6c7a06a3 | 8868 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8869 | iconv(cd,NULL,NULL,NULL,NULL); |
8870 | iconv_close(cd); | |
d542061a UW |
8871 | ; |
8872 | return 0; | |
8873 | } | |
8874 | _ACEOF | |
81ecdfbb | 8875 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8876 | am_cv_func_iconv=yes |
d542061a | 8877 | fi |
81ecdfbb RW |
8878 | rm -f core conftest.err conftest.$ac_objext \ |
8879 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8880 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8881 | |
016a3251 DD |
8882 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8883 | for _libs in .libs _libs; do | |
8884 | am_save_CPPFLAGS="$CPPFLAGS" | |
8885 | am_save_LIBS="$LIBS" | |
8886 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8887 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8889 | /* end confdefs.h. */ |
6c7a06a3 TT |
8890 | #include <stdlib.h> |
8891 | #include <iconv.h> | |
d542061a UW |
8892 | int |
8893 | main () | |
8894 | { | |
6c7a06a3 | 8895 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8896 | iconv(cd,NULL,NULL,NULL,NULL); |
8897 | iconv_close(cd); | |
d542061a UW |
8898 | ; |
8899 | return 0; | |
8900 | } | |
8901 | _ACEOF | |
81ecdfbb | 8902 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8903 | INCICONV="-I../libiconv/include" |
8904 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8905 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8906 | am_cv_lib_iconv=yes | |
8907 | am_cv_func_iconv=yes | |
d542061a | 8908 | fi |
81ecdfbb RW |
8909 | rm -f core conftest.err conftest.$ac_objext \ |
8910 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8911 | CPPFLAGS="$am_save_CPPFLAGS" |
8912 | LIBS="$am_save_LIBS" | |
8913 | if test "$am_cv_func_iconv" = "yes"; then | |
8914 | break | |
8915 | fi | |
8916 | done | |
77f120bf | 8917 | fi |
94ae1714 | 8918 | |
4edb1e84 | 8919 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8920 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8921 | am_save_LIBS="$LIBS" |
5d762de0 | 8922 | CPPFLAGS="$CPPFLAGS $INCICONV" |
016a3251 | 8923 | LIBS="$LIBS $LIBICONV" |
81ecdfbb | 8924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8925 | /* end confdefs.h. */ |
6c7a06a3 TT |
8926 | #include <stdlib.h> |
8927 | #include <iconv.h> | |
bec39cab AC |
8928 | int |
8929 | main () | |
8930 | { | |
6c7a06a3 TT |
8931 | iconv_t cd = iconv_open("",""); |
8932 | iconv(cd,NULL,NULL,NULL,NULL); | |
8933 | iconv_close(cd); | |
bec39cab AC |
8934 | ; |
8935 | return 0; | |
8936 | } | |
8937 | _ACEOF | |
81ecdfbb | 8938 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8939 | am_cv_lib_iconv=yes |
6c7a06a3 | 8940 | am_cv_func_iconv=yes |
627af7ea | 8941 | fi |
81ecdfbb RW |
8942 | rm -f core conftest.err conftest.$ac_objext \ |
8943 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8944 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8945 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8946 | fi |
8947 | ||
8948 | fi | |
81ecdfbb RW |
8949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8950 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8951 | if test "$am_cv_func_iconv" = yes; then |
8952 | ||
8953 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8954 | |
016a3251 | 8955 | fi |
fc3b640d | 8956 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8957 | |
8958 | for element in $INCICONV; do | |
8959 | haveit= | |
8960 | for x in $CPPFLAGS; do | |
8961 | ||
8962 | acl_save_prefix="$prefix" | |
8963 | prefix="$acl_final_prefix" | |
8964 | acl_save_exec_prefix="$exec_prefix" | |
8965 | exec_prefix="$acl_final_exec_prefix" | |
8966 | eval x=\"$x\" | |
8967 | exec_prefix="$acl_save_exec_prefix" | |
8968 | prefix="$acl_save_prefix" | |
8969 | ||
8970 | if test "X$x" = "X$element"; then | |
8971 | haveit=yes | |
8972 | break | |
8973 | fi | |
8974 | done | |
8975 | if test -z "$haveit"; then | |
8976 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8977 | fi | |
8978 | done | |
8979 | ||
8980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8981 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8983 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8984 | else |
016a3251 DD |
8985 | LIBICONV= |
8986 | LTLIBICONV= | |
fc3b640d | 8987 | fi |
94ae1714 | 8988 | |
6c7a06a3 | 8989 | |
6c7a06a3 | 8990 | |
016a3251 | 8991 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8993 | $as_echo_n "checking for iconv declaration... " >&6; } | |
d0ac1c44 | 8994 | if ${am_cv_proto_iconv+:} false; then : |
81ecdfbb | 8995 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8996 | else |
8997 | ||
81ecdfbb | 8998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8999 | /* end confdefs.h. */ |
9000 | ||
6c7a06a3 TT |
9001 | #include <stdlib.h> |
9002 | #include <iconv.h> | |
9003 | extern | |
b4e70030 | 9004 | #ifdef __cplusplus |
6c7a06a3 | 9005 | "C" |
b4e70030 | 9006 | #endif |
6c7a06a3 TT |
9007 | #if defined(__STDC__) || defined(__cplusplus) |
9008 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
9009 | #else | |
9010 | size_t iconv(); | |
9011 | #endif | |
9012 | ||
b4e70030 JB |
9013 | int |
9014 | main () | |
9015 | { | |
6c7a06a3 | 9016 | |
b4e70030 JB |
9017 | ; |
9018 | return 0; | |
9019 | } | |
9020 | _ACEOF | |
81ecdfbb | 9021 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 9022 | am_cv_proto_iconv_arg1="" |
4e8d927d | 9023 | else |
81ecdfbb | 9024 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 9025 | fi |
81ecdfbb | 9026 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
9027 | 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);" |
9028 | fi | |
9029 | ||
9030 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 9031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 9032 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
9033 | $as_echo "${ac_t:- |
9034 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
9035 | |
9036 | cat >>confdefs.h <<_ACEOF | |
9037 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
9038 | _ACEOF | |
9039 | ||
9040 | fi | |
6c7a06a3 TT |
9041 | |
9042 | ||
478aac75 DE |
9043 | # GDB may fork/exec the iconv program to get the list of supported character |
9044 | # sets. Allow the user to specify where to find it. | |
9045 | # There are several factors affecting the choice of option name: | |
9046 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
9047 | # the build-time location of libiconv files. | |
9048 | # - The program we need to find is iconv, which comes with glibc. The user | |
9049 | # doesn't necessarily have libiconv installed. Therefore naming this | |
9050 | # --with-libiconv-foo feels wrong. | |
9051 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
9052 | # defined to work on directories not files (though it really doesn't know | |
9053 | # the difference). | |
9054 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
9055 | # with --with-libiconv-prefix. | |
9056 | # Putting these together is why the option name is --with-iconv-bin. | |
9057 | ||
9058 | ||
9059 | # Check whether --with-iconv-bin was given. | |
9060 | if test "${with_iconv_bin+set}" = set; then : | |
9061 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
9062 | ||
9063 | cat >>confdefs.h <<_ACEOF | |
9064 | #define ICONV_BIN "${iconv_bin}" | |
9065 | _ACEOF | |
9066 | ||
9067 | ||
9068 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9069 | if test "x$prefix" = xNONE; then | |
9070 | test_prefix=/usr/local | |
9071 | else | |
9072 | test_prefix=$prefix | |
9073 | fi | |
9074 | else | |
9075 | test_prefix=$exec_prefix | |
9076 | fi | |
9077 | value=0 | |
9078 | case ${iconv_bin} in | |
9079 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9080 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9081 | value=1 | |
9082 | ;; | |
9083 | esac | |
9084 | ||
9085 | cat >>confdefs.h <<_ACEOF | |
9086 | #define ICONV_BIN_RELOCATABLE $value | |
9087 | _ACEOF | |
9088 | ||
9089 | ||
9090 | ||
9091 | fi | |
9092 | ||
9093 | ||
cb01cfba | 9094 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9095 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9096 | prefer_curses=yes |
9097 | fi | |
9098 | ||
9099 | curses_found=no | |
9100 | if test x"$prefer_curses" = xyes; then | |
9101 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9102 | # curses library because the latter might not provide all the | |
9103 | # functionality we need. However, this leads to problems on systems | |
9104 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9105 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9106 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9107 | # a situation. | |
81ecdfbb RW |
9108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9109 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
d0ac1c44 | 9110 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9111 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9112 | else |
9113 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9115 | /* end confdefs.h. */ |
9116 | ||
81ecdfbb RW |
9117 | /* Override any GCC internal prototype to avoid an error. |
9118 | Use char because int might match the return type of a GCC | |
9119 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9120 | #ifdef __cplusplus |
9121 | extern "C" | |
9122 | #endif | |
6c7a06a3 TT |
9123 | char waddstr (); |
9124 | int | |
9125 | main () | |
9126 | { | |
81ecdfbb | 9127 | return waddstr (); |
6c7a06a3 TT |
9128 | ; |
9129 | return 0; | |
9130 | } | |
9131 | _ACEOF | |
5007d765 | 9132 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
9133 | if test -z "$ac_lib"; then |
9134 | ac_res="none required" | |
9135 | else | |
9136 | ac_res=-l$ac_lib | |
9137 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9138 | fi | |
9139 | if ac_fn_c_try_link "$LINENO"; then : | |
9140 | ac_cv_search_waddstr=$ac_res | |
9141 | fi | |
9142 | rm -f core conftest.err conftest.$ac_objext \ | |
9143 | conftest$ac_exeext | |
d0ac1c44 | 9144 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb RW |
9145 | break |
9146 | fi | |
9147 | done | |
d0ac1c44 | 9148 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9149 | |
6c7a06a3 | 9150 | else |
81ecdfbb RW |
9151 | ac_cv_search_waddstr=no |
9152 | fi | |
9153 | rm conftest.$ac_ext | |
9154 | LIBS=$ac_func_search_save_LIBS | |
9155 | fi | |
9156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9157 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9158 | ac_res=$ac_cv_search_waddstr | |
9159 | if test "$ac_res" != no; then : | |
9160 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9161 | |
9162 | fi | |
9163 | ||
9164 | ||
cb01cfba JB |
9165 | if test "$ac_cv_search_waddstr" != no; then |
9166 | curses_found=yes | |
9167 | fi | |
9168 | fi | |
9169 | ||
9170 | # Check whether we should enable the TUI, but only do so if we really | |
9171 | # can. | |
9172 | if test x"$enable_tui" != xno; then | |
0ad6b8ee | 9173 | if test -d "$srcdir/tui"; then |
cb01cfba | 9174 | if test "$curses_found" != no; then |
6c7a06a3 TT |
9175 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9176 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9177 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9178 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
9179 | else |
9180 | if test x"$enable_tui" = xyes; then | |
d0ac1c44 | 9181 | as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9182 | else |
81ecdfbb RW |
9183 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9184 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9185 | fi |
9186 | fi | |
9187 | fi | |
9188 | fi | |
9189 | ||
9190 | # Since GDB uses Readline, we need termcap functionality. In many | |
9191 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 9192 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
9193 | |
9194 | case $host_os in | |
9195 | cygwin*) | |
0ad6b8ee | 9196 | if test -d "$srcdir/libtermcap"; then |
6c7a06a3 TT |
9197 | LIBS="../libtermcap/libtermcap.a $LIBS" |
9198 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9199 | fi ;; | |
9200 | go32* | *djgpp*) | |
9201 | ac_cv_search_tgetent="none required" | |
9202 | ;; | |
6c7a06a3 TT |
9203 | esac |
9204 | ||
9205 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9207 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
d0ac1c44 | 9208 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb | 9209 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9210 | else |
9211 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9213 | /* end confdefs.h. */ |
9214 | ||
81ecdfbb RW |
9215 | /* Override any GCC internal prototype to avoid an error. |
9216 | Use char because int might match the return type of a GCC | |
9217 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9218 | #ifdef __cplusplus |
9219 | extern "C" | |
9220 | #endif | |
6c7a06a3 TT |
9221 | char tgetent (); |
9222 | int | |
9223 | main () | |
9224 | { | |
81ecdfbb | 9225 | return tgetent (); |
6c7a06a3 TT |
9226 | ; |
9227 | return 0; | |
9228 | } | |
9229 | _ACEOF | |
2578ecb1 | 9230 | for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
9231 | if test -z "$ac_lib"; then |
9232 | ac_res="none required" | |
9233 | else | |
9234 | ac_res=-l$ac_lib | |
6c7a06a3 | 9235 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9236 | fi |
9237 | if ac_fn_c_try_link "$LINENO"; then : | |
9238 | ac_cv_search_tgetent=$ac_res | |
9239 | fi | |
9240 | rm -f core conftest.err conftest.$ac_objext \ | |
9241 | conftest$ac_exeext | |
d0ac1c44 | 9242 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb RW |
9243 | break |
9244 | fi | |
9245 | done | |
d0ac1c44 | 9246 | if ${ac_cv_search_tgetent+:} false; then : |
6c7a06a3 | 9247 | |
6c7a06a3 | 9248 | else |
81ecdfbb | 9249 | ac_cv_search_tgetent=no |
6c7a06a3 | 9250 | fi |
81ecdfbb | 9251 | rm conftest.$ac_ext |
6c7a06a3 TT |
9252 | LIBS=$ac_func_search_save_LIBS |
9253 | fi | |
81ecdfbb RW |
9254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9255 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9256 | ac_res=$ac_cv_search_tgetent | |
9257 | if test "$ac_res" != no; then : | |
9258 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9259 | |
06825bd1 MK |
9260 | fi |
9261 | ||
06825bd1 | 9262 | |
bec39cab | 9263 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 9264 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
9265 | fi |
9266 | ||
3841debe | 9267 | |
81ecdfbb RW |
9268 | # Check whether --with-system-readline was given. |
9269 | if test "${with_system_readline+set}" = set; then : | |
9270 | withval=$with_system_readline; | |
9271 | fi | |
6a30b0a5 | 9272 | |
6a30b0a5 AS |
9273 | |
9274 | if test "$with_system_readline" = yes; then | |
86c6b807 TT |
9275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 |
9276 | $as_echo_n "checking whether system readline is new enough... " >&6; } | |
9277 | if ${gdb_cv_readline_ok+:} false; then : | |
9278 | $as_echo_n "(cached) " >&6 | |
9279 | else | |
9280 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9281 | /* end confdefs.h. */ | |
9282 | #include <stdio.h> | |
9283 | #include <readline/readline.h> | |
9284 | int | |
9285 | main () | |
9286 | { | |
9287 | #if RL_VERSION_MAJOR < 7 | |
9288 | # error "readline version 7 required" | |
9289 | #endif | |
9290 | ; | |
9291 | return 0; | |
9292 | } | |
9293 | _ACEOF | |
9294 | if ac_fn_c_try_compile "$LINENO"; then : | |
9295 | gdb_cv_readline_ok=yes | |
9296 | else | |
9297 | gdb_cv_readline_ok=no | |
9298 | fi | |
9299 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9300 | fi | |
9301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 | |
9302 | $as_echo "$gdb_cv_readline_ok" >&6; } | |
9303 | if test "$gdb_cv_readline_ok" != yes; then | |
9304 | as_fn_error $? "system readline is not new enough" "$LINENO" 5 | |
9305 | fi | |
9306 | ||
6a30b0a5 AS |
9307 | READLINE=-lreadline |
9308 | READLINE_DEPS= | |
9309 | READLINE_CFLAGS= | |
39037522 | 9310 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9311 | else |
9312 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9313 | READLINE_DEPS='$(READLINE)' | |
9314 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9315 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9316 | fi |
9317 | ||
9318 | ||
9319 | ||
9320 | ||
9321 | ||
f997c383 SD |
9322 | # Generate jit-reader.h |
9323 | ||
9324 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9325 | TARGET_PTR= | |
9326 | ||
9327 | # The cast to long int works around a bug in the HP C Compiler | |
9328 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9329 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9330 | # This bug is HP SR number 8606223364. | |
9331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
9332 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
d0ac1c44 | 9333 | if ${ac_cv_sizeof_unsigned_long_long+:} false; then : |
f997c383 SD |
9334 | $as_echo_n "(cached) " >&6 |
9335 | else | |
9336 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9337 | ||
9338 | else | |
9339 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
9340 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9341 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9342 | as_fn_error 77 "cannot compute sizeof (unsigned long long) |
9343 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9344 | else |
9345 | ac_cv_sizeof_unsigned_long_long=0 | |
9346 | fi | |
9347 | fi | |
9348 | ||
9349 | fi | |
9350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9351 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9352 | ||
9353 | ||
9354 | ||
9355 | cat >>confdefs.h <<_ACEOF | |
9356 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9357 | _ACEOF | |
9358 | ||
9359 | ||
9360 | # The cast to long int works around a bug in the HP C Compiler | |
9361 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9362 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9363 | # This bug is HP SR number 8606223364. | |
9364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9365 | $as_echo_n "checking size of unsigned long... " >&6; } | |
d0ac1c44 | 9366 | if ${ac_cv_sizeof_unsigned_long+:} false; then : |
f997c383 SD |
9367 | $as_echo_n "(cached) " >&6 |
9368 | else | |
9369 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9370 | ||
9371 | else | |
9372 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9373 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9374 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9375 | as_fn_error 77 "cannot compute sizeof (unsigned long) |
9376 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9377 | else |
9378 | ac_cv_sizeof_unsigned_long=0 | |
9379 | fi | |
9380 | fi | |
9381 | ||
9382 | fi | |
9383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9384 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9385 | ||
9386 | ||
9387 | ||
9388 | cat >>confdefs.h <<_ACEOF | |
9389 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9390 | _ACEOF | |
9391 | ||
9392 | ||
9393 | # The cast to long int works around a bug in the HP C Compiler | |
9394 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9395 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9396 | # This bug is HP SR number 8606223364. | |
9397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9398 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
d0ac1c44 | 9399 | if ${ac_cv_sizeof_unsigned___int128+:} false; then : |
f997c383 SD |
9400 | $as_echo_n "(cached) " >&6 |
9401 | else | |
9402 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9403 | ||
9404 | else | |
9405 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9406 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9407 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9408 | as_fn_error 77 "cannot compute sizeof (unsigned __int128) |
9409 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9410 | else |
9411 | ac_cv_sizeof_unsigned___int128=0 | |
9412 | fi | |
9413 | fi | |
9414 | ||
9415 | fi | |
9416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9417 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9418 | ||
9419 | ||
9420 | ||
9421 | cat >>confdefs.h <<_ACEOF | |
9422 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9423 | _ACEOF | |
9424 | ||
9425 | ||
9426 | ||
9427 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9428 | TARGET_PTR="unsigned long" | |
9429 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9430 | TARGET_PTR="unsigned long long" | |
9431 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9432 | TARGET_PTR="unsigned __int128" | |
9433 | else | |
9434 | TARGET_PTR="unsigned long" | |
9435 | fi | |
9436 | ||
9437 | ||
9438 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9439 | ||
9440 | ||
a2d08b9e SD |
9441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9442 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 9443 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9444 | $as_echo_n "(cached) " >&6 |
9445 | else | |
9446 | ac_func_search_save_LIBS=$LIBS | |
9447 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9448 | /* end confdefs.h. */ | |
9449 | ||
9450 | /* Override any GCC internal prototype to avoid an error. | |
9451 | Use char because int might match the return type of a GCC | |
9452 | builtin and then its argument prototype would still apply. */ | |
9453 | #ifdef __cplusplus | |
9454 | extern "C" | |
9455 | #endif | |
9456 | char dlopen (); | |
9457 | int | |
9458 | main () | |
9459 | { | |
9460 | return dlopen (); | |
9461 | ; | |
9462 | return 0; | |
9463 | } | |
9464 | _ACEOF | |
9465 | for ac_lib in '' dl; do | |
9466 | if test -z "$ac_lib"; then | |
9467 | ac_res="none required" | |
9468 | else | |
9469 | ac_res=-l$ac_lib | |
9470 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9471 | fi | |
9472 | if ac_fn_c_try_link "$LINENO"; then : | |
9473 | ac_cv_search_dlopen=$ac_res | |
9474 | fi | |
9475 | rm -f core conftest.err conftest.$ac_objext \ | |
9476 | conftest$ac_exeext | |
d0ac1c44 | 9477 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9478 | break |
9479 | fi | |
9480 | done | |
d0ac1c44 | 9481 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9482 | |
9483 | else | |
9484 | ac_cv_search_dlopen=no | |
9485 | fi | |
9486 | rm conftest.$ac_ext | |
9487 | LIBS=$ac_func_search_save_LIBS | |
9488 | fi | |
9489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9490 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9491 | ac_res=$ac_cv_search_dlopen | |
9492 | if test "$ac_res" != no; then : | |
9493 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9494 | ||
9495 | fi | |
9496 | ||
9497 | ||
39037522 | 9498 | |
b8e0a31c SD |
9499 | |
9500 | # Check whether --with-jit-reader-dir was given. | |
9501 | if test "${with_jit_reader_dir+set}" = set; then : | |
9502 | withval=$with_jit_reader_dir; | |
9503 | JIT_READER_DIR=$withval | |
9504 | else | |
9505 | JIT_READER_DIR=${libdir}/gdb | |
9506 | fi | |
9507 | ||
9508 | ||
9509 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9510 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9511 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9512 | ac_define_dir=`eval echo $ac_define_dir` | |
9513 | ||
9514 | cat >>confdefs.h <<_ACEOF | |
9515 | #define JIT_READER_DIR "$ac_define_dir" | |
9516 | _ACEOF | |
9517 | ||
9518 | ||
9519 | ||
9520 | ||
9521 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9522 | if test "x$prefix" = xNONE; then | |
9523 | test_prefix=/usr/local | |
9524 | else | |
9525 | test_prefix=$prefix | |
9526 | fi | |
9527 | else | |
9528 | test_prefix=$exec_prefix | |
9529 | fi | |
9530 | value=0 | |
9531 | case ${ac_define_dir} in | |
9532 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9533 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9534 | value=1 | |
9535 | ;; | |
9536 | esac | |
9537 | ||
9538 | cat >>confdefs.h <<_ACEOF | |
9539 | #define JIT_READER_DIR_RELOCATABLE $value | |
9540 | _ACEOF | |
9541 | ||
9542 | ||
9543 | ||
9544 | ||
9545 | ||
81ecdfbb RW |
9546 | # Check whether --with-expat was given. |
9547 | if test "${with_expat+set}" = set; then : | |
9548 | withval=$with_expat; | |
5c39566f DJ |
9549 | else |
9550 | with_expat=auto | |
81ecdfbb RW |
9551 | fi |
9552 | ||
9553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9554 | $as_echo_n "checking whether to use expat... " >&6; } | |
9555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9556 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9557 | |
9558 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9559 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9560 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9561 | HAVE_LIBEXPAT=no |
9562 | else | |
9563 | ||
3841debe DJ |
9564 | |
9565 | ||
9566 | ||
9567 | ||
9568 | ||
9569 | ||
9570 | ||
9571 | use_additional=yes | |
9572 | ||
9573 | acl_save_prefix="$prefix" | |
9574 | prefix="$acl_final_prefix" | |
9575 | acl_save_exec_prefix="$exec_prefix" | |
9576 | exec_prefix="$acl_final_exec_prefix" | |
9577 | ||
9578 | eval additional_includedir=\"$includedir\" | |
9579 | eval additional_libdir=\"$libdir\" | |
9580 | ||
9581 | exec_prefix="$acl_save_exec_prefix" | |
9582 | prefix="$acl_save_prefix" | |
9583 | ||
9584 | ||
81ecdfbb RW |
9585 | # Check whether --with-libexpat-prefix was given. |
9586 | if test "${with_libexpat_prefix+set}" = set; then : | |
9587 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9588 | if test "X$withval" = "Xno"; then |
9589 | use_additional=no | |
9590 | else | |
9591 | if test "X$withval" = "X"; then | |
9592 | ||
9593 | acl_save_prefix="$prefix" | |
9594 | prefix="$acl_final_prefix" | |
9595 | acl_save_exec_prefix="$exec_prefix" | |
9596 | exec_prefix="$acl_final_exec_prefix" | |
9597 | ||
9598 | eval additional_includedir=\"$includedir\" | |
9599 | eval additional_libdir=\"$libdir\" | |
9600 | ||
9601 | exec_prefix="$acl_save_exec_prefix" | |
9602 | prefix="$acl_save_prefix" | |
9603 | ||
9604 | else | |
9605 | additional_includedir="$withval/include" | |
9606 | additional_libdir="$withval/lib" | |
9607 | fi | |
9608 | fi | |
9609 | ||
81ecdfbb RW |
9610 | fi |
9611 | ||
9f1528a1 AB |
9612 | |
9613 | # Check whether --with-libexpat-type was given. | |
9614 | if test "${with_libexpat_type+set}" = set; then : | |
9615 | withval=$with_libexpat_type; with_libexpat_type=$withval | |
9616 | else | |
9617 | with_libexpat_type=auto | |
9618 | fi | |
9619 | ||
9620 | lib_type=`eval echo \$with_libexpat_type` | |
9621 | ||
3841debe DJ |
9622 | LIBEXPAT= |
9623 | LTLIBEXPAT= | |
9624 | INCEXPAT= | |
9625 | rpathdirs= | |
9626 | ltrpathdirs= | |
9627 | names_already_handled= | |
9628 | names_next_round='expat ' | |
9629 | while test -n "$names_next_round"; do | |
9630 | names_this_round="$names_next_round" | |
9631 | names_next_round= | |
9632 | for name in $names_this_round; do | |
9633 | already_handled= | |
9634 | for n in $names_already_handled; do | |
9635 | if test "$n" = "$name"; then | |
9636 | already_handled=yes | |
9637 | break | |
9638 | fi | |
9639 | done | |
9640 | if test -z "$already_handled"; then | |
9641 | names_already_handled="$names_already_handled $name" | |
9642 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9643 | eval value=\"\$HAVE_LIB$uppername\" | |
9644 | if test -n "$value"; then | |
9645 | if test "$value" = yes; then | |
9646 | eval value=\"\$LIB$uppername\" | |
9647 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9648 | eval value=\"\$LTLIB$uppername\" | |
9649 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9650 | else | |
9651 | : | |
9652 | fi | |
9653 | else | |
9654 | found_dir= | |
9655 | found_la= | |
9656 | found_so= | |
9657 | found_a= | |
9658 | if test $use_additional = yes; then | |
9f1528a1 | 9659 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9660 | found_dir="$additional_libdir" |
9661 | found_so="$additional_libdir/lib$name.$shlibext" | |
9662 | if test -f "$additional_libdir/lib$name.la"; then | |
9663 | found_la="$additional_libdir/lib$name.la" | |
9664 | fi | |
9f1528a1 | 9665 | elif test x$lib_type != xshared; then |
3841debe DJ |
9666 | if test -f "$additional_libdir/lib$name.$libext"; then |
9667 | found_dir="$additional_libdir" | |
9668 | found_a="$additional_libdir/lib$name.$libext" | |
9669 | if test -f "$additional_libdir/lib$name.la"; then | |
9670 | found_la="$additional_libdir/lib$name.la" | |
9671 | fi | |
9672 | fi | |
9673 | fi | |
9674 | fi | |
9675 | if test "X$found_dir" = "X"; then | |
9676 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9677 | ||
9678 | acl_save_prefix="$prefix" | |
9679 | prefix="$acl_final_prefix" | |
9680 | acl_save_exec_prefix="$exec_prefix" | |
9681 | exec_prefix="$acl_final_exec_prefix" | |
9682 | eval x=\"$x\" | |
9683 | exec_prefix="$acl_save_exec_prefix" | |
9684 | prefix="$acl_save_prefix" | |
9685 | ||
9686 | case "$x" in | |
9687 | -L*) | |
9688 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 9689 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9690 | found_dir="$dir" |
9691 | found_so="$dir/lib$name.$shlibext" | |
9692 | if test -f "$dir/lib$name.la"; then | |
9693 | found_la="$dir/lib$name.la" | |
9694 | fi | |
9f1528a1 | 9695 | elif test x$lib_type != xshared; then |
3841debe DJ |
9696 | if test -f "$dir/lib$name.$libext"; then |
9697 | found_dir="$dir" | |
9698 | found_a="$dir/lib$name.$libext" | |
9699 | if test -f "$dir/lib$name.la"; then | |
9700 | found_la="$dir/lib$name.la" | |
9701 | fi | |
9702 | fi | |
9703 | fi | |
9704 | ;; | |
9705 | esac | |
9706 | if test "X$found_dir" != "X"; then | |
9707 | break | |
9708 | fi | |
9709 | done | |
9710 | fi | |
9711 | if test "X$found_dir" != "X"; then | |
9712 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9713 | if test "X$found_so" != "X"; then | |
9714 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9715 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9716 | else | |
9717 | haveit= | |
9718 | for x in $ltrpathdirs; do | |
9719 | if test "X$x" = "X$found_dir"; then | |
9720 | haveit=yes | |
9721 | break | |
9722 | fi | |
9723 | done | |
9724 | if test -z "$haveit"; then | |
9725 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9726 | fi | |
9727 | if test "$hardcode_direct" = yes; then | |
9728 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9729 | else | |
9730 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9731 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9732 | haveit= | |
9733 | for x in $rpathdirs; do | |
9734 | if test "X$x" = "X$found_dir"; then | |
9735 | haveit=yes | |
9736 | break | |
9737 | fi | |
9738 | done | |
9739 | if test -z "$haveit"; then | |
9740 | rpathdirs="$rpathdirs $found_dir" | |
9741 | fi | |
9742 | else | |
9743 | haveit= | |
9744 | for x in $LDFLAGS $LIBEXPAT; do | |
9745 | ||
9746 | acl_save_prefix="$prefix" | |
9747 | prefix="$acl_final_prefix" | |
9748 | acl_save_exec_prefix="$exec_prefix" | |
9749 | exec_prefix="$acl_final_exec_prefix" | |
9750 | eval x=\"$x\" | |
9751 | exec_prefix="$acl_save_exec_prefix" | |
9752 | prefix="$acl_save_prefix" | |
9753 | ||
9754 | if test "X$x" = "X-L$found_dir"; then | |
9755 | haveit=yes | |
9756 | break | |
9757 | fi | |
9758 | done | |
9759 | if test -z "$haveit"; then | |
9760 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9761 | fi | |
9762 | if test "$hardcode_minus_L" != no; then | |
9763 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9764 | else | |
9765 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9766 | fi | |
9767 | fi | |
9768 | fi | |
9769 | fi | |
9770 | else | |
9771 | if test "X$found_a" != "X"; then | |
9772 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9773 | else | |
9774 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9775 | fi | |
9776 | fi | |
9777 | additional_includedir= | |
9778 | case "$found_dir" in | |
9779 | */lib | */lib/) | |
9780 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9781 | additional_includedir="$basedir/include" | |
9782 | ;; | |
9783 | esac | |
9784 | if test "X$additional_includedir" != "X"; then | |
9785 | if test "X$additional_includedir" != "X/usr/include"; then | |
9786 | haveit= | |
9787 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9788 | if test -n "$GCC"; then | |
9789 | case $host_os in | |
9790 | linux*) haveit=yes;; | |
9791 | esac | |
9792 | fi | |
9793 | fi | |
9794 | if test -z "$haveit"; then | |
9795 | for x in $CPPFLAGS $INCEXPAT; do | |
9796 | ||
9797 | acl_save_prefix="$prefix" | |
9798 | prefix="$acl_final_prefix" | |
9799 | acl_save_exec_prefix="$exec_prefix" | |
9800 | exec_prefix="$acl_final_exec_prefix" | |
9801 | eval x=\"$x\" | |
9802 | exec_prefix="$acl_save_exec_prefix" | |
9803 | prefix="$acl_save_prefix" | |
9804 | ||
9805 | if test "X$x" = "X-I$additional_includedir"; then | |
9806 | haveit=yes | |
9807 | break | |
9808 | fi | |
9809 | done | |
9810 | if test -z "$haveit"; then | |
9811 | if test -d "$additional_includedir"; then | |
9812 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9813 | fi | |
9814 | fi | |
9815 | fi | |
9816 | fi | |
9817 | fi | |
9818 | if test -n "$found_la"; then | |
9819 | save_libdir="$libdir" | |
9820 | case "$found_la" in | |
9821 | */* | *\\*) . "$found_la" ;; | |
9822 | *) . "./$found_la" ;; | |
9823 | esac | |
9824 | libdir="$save_libdir" | |
9825 | for dep in $dependency_libs; do | |
9826 | case "$dep" in | |
9827 | -L*) | |
9828 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9829 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9830 | haveit= | |
9831 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9832 | if test -n "$GCC"; then | |
9833 | case $host_os in | |
9834 | linux*) haveit=yes;; | |
9835 | esac | |
9836 | fi | |
9837 | fi | |
9838 | if test -z "$haveit"; then | |
9839 | haveit= | |
9840 | for x in $LDFLAGS $LIBEXPAT; do | |
9841 | ||
9842 | acl_save_prefix="$prefix" | |
9843 | prefix="$acl_final_prefix" | |
9844 | acl_save_exec_prefix="$exec_prefix" | |
9845 | exec_prefix="$acl_final_exec_prefix" | |
9846 | eval x=\"$x\" | |
9847 | exec_prefix="$acl_save_exec_prefix" | |
9848 | prefix="$acl_save_prefix" | |
9849 | ||
9850 | if test "X$x" = "X-L$additional_libdir"; then | |
9851 | haveit=yes | |
9852 | break | |
9853 | fi | |
9854 | done | |
9855 | if test -z "$haveit"; then | |
9856 | if test -d "$additional_libdir"; then | |
9857 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9858 | fi | |
9859 | fi | |
9860 | haveit= | |
9861 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9862 | ||
9863 | acl_save_prefix="$prefix" | |
9864 | prefix="$acl_final_prefix" | |
9865 | acl_save_exec_prefix="$exec_prefix" | |
9866 | exec_prefix="$acl_final_exec_prefix" | |
9867 | eval x=\"$x\" | |
9868 | exec_prefix="$acl_save_exec_prefix" | |
9869 | prefix="$acl_save_prefix" | |
9870 | ||
9871 | if test "X$x" = "X-L$additional_libdir"; then | |
9872 | haveit=yes | |
9873 | break | |
9874 | fi | |
9875 | done | |
9876 | if test -z "$haveit"; then | |
9877 | if test -d "$additional_libdir"; then | |
9878 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9879 | fi | |
9880 | fi | |
9881 | fi | |
9882 | fi | |
9883 | ;; | |
9884 | -R*) | |
9885 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9886 | if test "$enable_rpath" != no; then | |
9887 | haveit= | |
9888 | for x in $rpathdirs; do | |
9889 | if test "X$x" = "X$dir"; then | |
9890 | haveit=yes | |
9891 | break | |
9892 | fi | |
9893 | done | |
9894 | if test -z "$haveit"; then | |
9895 | rpathdirs="$rpathdirs $dir" | |
9896 | fi | |
9897 | haveit= | |
9898 | for x in $ltrpathdirs; do | |
9899 | if test "X$x" = "X$dir"; then | |
9900 | haveit=yes | |
9901 | break | |
9902 | fi | |
9903 | done | |
9904 | if test -z "$haveit"; then | |
9905 | ltrpathdirs="$ltrpathdirs $dir" | |
9906 | fi | |
9907 | fi | |
9908 | ;; | |
9909 | -l*) | |
9910 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9911 | ;; | |
9912 | *.la) | |
9913 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9914 | ;; | |
9915 | *) | |
9916 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9917 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9918 | ;; | |
81ecdfbb RW |
9919 | esac |
9920 | done | |
9921 | fi | |
9922 | else | |
9f1528a1 AB |
9923 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
9924 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9925 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9926 | else | |
9927 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext" | |
9928 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext" | |
9929 | fi | |
81ecdfbb RW |
9930 | fi |
9931 | fi | |
9932 | fi | |
9933 | done | |
9934 | done | |
9935 | if test "X$rpathdirs" != "X"; then | |
9936 | if test -n "$hardcode_libdir_separator"; then | |
9937 | alldirs= | |
9938 | for found_dir in $rpathdirs; do | |
9939 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9940 | done | |
9941 | acl_save_libdir="$libdir" | |
9942 | libdir="$alldirs" | |
9943 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9944 | libdir="$acl_save_libdir" | |
9945 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9946 | else | |
9947 | for found_dir in $rpathdirs; do | |
9948 | acl_save_libdir="$libdir" | |
9949 | libdir="$found_dir" | |
9950 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9951 | libdir="$acl_save_libdir" | |
9952 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9953 | done | |
9954 | fi | |
9955 | fi | |
9956 | if test "X$ltrpathdirs" != "X"; then | |
9957 | for found_dir in $ltrpathdirs; do | |
9958 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9959 | done | |
9960 | fi | |
a9322a30 TT |
9961 | |
9962 | ||
81ecdfbb | 9963 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9964 | |
81ecdfbb RW |
9965 | for element in $INCEXPAT; do |
9966 | haveit= | |
9967 | for x in $CPPFLAGS; do | |
a9322a30 | 9968 | |
81ecdfbb RW |
9969 | acl_save_prefix="$prefix" |
9970 | prefix="$acl_final_prefix" | |
9971 | acl_save_exec_prefix="$exec_prefix" | |
9972 | exec_prefix="$acl_final_exec_prefix" | |
9973 | eval x=\"$x\" | |
9974 | exec_prefix="$acl_save_exec_prefix" | |
9975 | prefix="$acl_save_prefix" | |
a8111142 | 9976 | |
81ecdfbb RW |
9977 | if test "X$x" = "X$element"; then |
9978 | haveit=yes | |
9979 | break | |
9980 | fi | |
9981 | done | |
9982 | if test -z "$haveit"; then | |
9983 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9984 | fi | |
9985 | done | |
a9322a30 TT |
9986 | |
9987 | ||
81ecdfbb RW |
9988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9989 | $as_echo_n "checking for libexpat... " >&6; } | |
d0ac1c44 | 9990 | if ${ac_cv_libexpat+:} false; then : |
81ecdfbb | 9991 | $as_echo_n "(cached) " >&6 |
bec39cab | 9992 | else |
bec39cab | 9993 | |
81ecdfbb RW |
9994 | ac_save_LIBS="$LIBS" |
9995 | LIBS="$LIBS $LIBEXPAT" | |
9996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9997 | /* end confdefs.h. */ |
81ecdfbb RW |
9998 | #include "expat.h" |
9999 | int | |
10000 | main () | |
10001 | { | |
10002 | XML_Parser p = XML_ParserCreate (0); | |
10003 | ; | |
10004 | return 0; | |
10005 | } | |
bec39cab | 10006 | _ACEOF |
81ecdfbb RW |
10007 | if ac_fn_c_try_link "$LINENO"; then : |
10008 | ac_cv_libexpat=yes | |
c906108c | 10009 | else |
81ecdfbb | 10010 | ac_cv_libexpat=no |
bec39cab | 10011 | fi |
81ecdfbb RW |
10012 | rm -f core conftest.err conftest.$ac_objext \ |
10013 | conftest$ac_exeext conftest.$ac_ext | |
10014 | LIBS="$ac_save_LIBS" | |
c906108c | 10015 | |
95ca63c4 | 10016 | fi |
81ecdfbb RW |
10017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
10018 | $as_echo "$ac_cv_libexpat" >&6; } | |
10019 | if test "$ac_cv_libexpat" = yes; then | |
10020 | HAVE_LIBEXPAT=yes | |
bec39cab | 10021 | |
81ecdfbb | 10022 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 10023 | |
81ecdfbb RW |
10024 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
10025 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
10026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
10027 | $as_echo "$LIBEXPAT" >&6; } | |
10028 | else | |
10029 | HAVE_LIBEXPAT=no | |
10030 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10031 | LIBEXPAT= | |
10032 | LTLIBEXPAT= | |
10033 | fi | |
95ca63c4 CF |
10034 | |
10035 | ||
10036 | ||
7cb9022a MK |
10037 | |
10038 | ||
bec39cab | 10039 | |
81ecdfbb RW |
10040 | if test "$HAVE_LIBEXPAT" != yes; then |
10041 | if test "$with_expat" = yes; then | |
d0ac1c44 | 10042 | as_fn_error $? "expat is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
10043 | else |
10044 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
10045 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
10046 | fi | |
10047 | else | |
10048 | save_LIBS=$LIBS | |
10049 | LIBS="$LIBS $LIBEXPAT" | |
10050 | for ac_func in XML_StopParser | |
10051 | do : | |
10052 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
d0ac1c44 | 10053 | if test "x$ac_cv_func_XML_StopParser" = xyes; then : |
bec39cab | 10054 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10055 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10056 | _ACEOF |
95ca63c4 | 10057 | |
bec39cab | 10058 | fi |
bec39cab | 10059 | done |
95ca63c4 | 10060 | |
81ecdfbb RW |
10061 | LIBS=$save_LIBS |
10062 | fi | |
a9322a30 TT |
10063 | fi |
10064 | ||
2400729e UW |
10065 | |
10066 | # Check whether --with-mpfr was given. | |
10067 | if test "${with_mpfr+set}" = set; then : | |
10068 | withval=$with_mpfr; | |
10069 | else | |
10070 | with_mpfr=auto | |
10071 | fi | |
10072 | ||
10073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
10074 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
10075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
10076 | $as_echo "$with_mpfr" >&6; } | |
10077 | ||
10078 | if test "${with_mpfr}" = no; then | |
10079 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
10080 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
10081 | HAVE_LIBMPFR=no | |
10082 | else | |
10083 | ||
10084 | ||
10085 | ||
10086 | ||
10087 | ||
10088 | ||
10089 | ||
10090 | ||
10091 | use_additional=yes | |
10092 | ||
10093 | acl_save_prefix="$prefix" | |
10094 | prefix="$acl_final_prefix" | |
10095 | acl_save_exec_prefix="$exec_prefix" | |
10096 | exec_prefix="$acl_final_exec_prefix" | |
10097 | ||
10098 | eval additional_includedir=\"$includedir\" | |
10099 | eval additional_libdir=\"$libdir\" | |
10100 | ||
10101 | exec_prefix="$acl_save_exec_prefix" | |
10102 | prefix="$acl_save_prefix" | |
10103 | ||
10104 | ||
10105 | # Check whether --with-libmpfr-prefix was given. | |
10106 | if test "${with_libmpfr_prefix+set}" = set; then : | |
10107 | withval=$with_libmpfr_prefix; | |
10108 | if test "X$withval" = "Xno"; then | |
10109 | use_additional=no | |
10110 | else | |
10111 | if test "X$withval" = "X"; then | |
10112 | ||
10113 | acl_save_prefix="$prefix" | |
10114 | prefix="$acl_final_prefix" | |
10115 | acl_save_exec_prefix="$exec_prefix" | |
10116 | exec_prefix="$acl_final_exec_prefix" | |
10117 | ||
10118 | eval additional_includedir=\"$includedir\" | |
10119 | eval additional_libdir=\"$libdir\" | |
10120 | ||
10121 | exec_prefix="$acl_save_exec_prefix" | |
10122 | prefix="$acl_save_prefix" | |
10123 | ||
10124 | else | |
10125 | additional_includedir="$withval/include" | |
10126 | additional_libdir="$withval/lib" | |
10127 | fi | |
10128 | fi | |
10129 | ||
10130 | fi | |
10131 | ||
9f1528a1 AB |
10132 | |
10133 | # Check whether --with-libmpfr-type was given. | |
10134 | if test "${with_libmpfr_type+set}" = set; then : | |
10135 | withval=$with_libmpfr_type; with_libmpfr_type=$withval | |
10136 | else | |
10137 | with_libmpfr_type=auto | |
10138 | fi | |
10139 | ||
10140 | lib_type=`eval echo \$with_libmpfr_type` | |
10141 | ||
2400729e UW |
10142 | LIBMPFR= |
10143 | LTLIBMPFR= | |
10144 | INCMPFR= | |
10145 | rpathdirs= | |
10146 | ltrpathdirs= | |
10147 | names_already_handled= | |
da658607 | 10148 | names_next_round='mpfr gmp' |
2400729e UW |
10149 | while test -n "$names_next_round"; do |
10150 | names_this_round="$names_next_round" | |
10151 | names_next_round= | |
10152 | for name in $names_this_round; do | |
10153 | already_handled= | |
10154 | for n in $names_already_handled; do | |
10155 | if test "$n" = "$name"; then | |
10156 | already_handled=yes | |
10157 | break | |
10158 | fi | |
10159 | done | |
10160 | if test -z "$already_handled"; then | |
10161 | names_already_handled="$names_already_handled $name" | |
10162 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10163 | eval value=\"\$HAVE_LIB$uppername\" | |
10164 | if test -n "$value"; then | |
10165 | if test "$value" = yes; then | |
10166 | eval value=\"\$LIB$uppername\" | |
10167 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
10168 | eval value=\"\$LTLIB$uppername\" | |
10169 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
10170 | else | |
10171 | : | |
10172 | fi | |
10173 | else | |
10174 | found_dir= | |
10175 | found_la= | |
10176 | found_so= | |
10177 | found_a= | |
10178 | if test $use_additional = yes; then | |
9f1528a1 | 10179 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10180 | found_dir="$additional_libdir" |
10181 | found_so="$additional_libdir/lib$name.$shlibext" | |
10182 | if test -f "$additional_libdir/lib$name.la"; then | |
10183 | found_la="$additional_libdir/lib$name.la" | |
10184 | fi | |
9f1528a1 | 10185 | elif test x$lib_type != xshared; then |
2400729e UW |
10186 | if test -f "$additional_libdir/lib$name.$libext"; then |
10187 | found_dir="$additional_libdir" | |
10188 | found_a="$additional_libdir/lib$name.$libext" | |
10189 | if test -f "$additional_libdir/lib$name.la"; then | |
10190 | found_la="$additional_libdir/lib$name.la" | |
10191 | fi | |
10192 | fi | |
10193 | fi | |
10194 | fi | |
10195 | if test "X$found_dir" = "X"; then | |
10196 | for x in $LDFLAGS $LTLIBMPFR; do | |
10197 | ||
10198 | acl_save_prefix="$prefix" | |
10199 | prefix="$acl_final_prefix" | |
10200 | acl_save_exec_prefix="$exec_prefix" | |
10201 | exec_prefix="$acl_final_exec_prefix" | |
10202 | eval x=\"$x\" | |
10203 | exec_prefix="$acl_save_exec_prefix" | |
10204 | prefix="$acl_save_prefix" | |
10205 | ||
10206 | case "$x" in | |
10207 | -L*) | |
10208 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 10209 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10210 | found_dir="$dir" |
10211 | found_so="$dir/lib$name.$shlibext" | |
10212 | if test -f "$dir/lib$name.la"; then | |
10213 | found_la="$dir/lib$name.la" | |
10214 | fi | |
9f1528a1 | 10215 | elif test x$lib_type != xshared; then |
2400729e UW |
10216 | if test -f "$dir/lib$name.$libext"; then |
10217 | found_dir="$dir" | |
10218 | found_a="$dir/lib$name.$libext" | |
10219 | if test -f "$dir/lib$name.la"; then | |
10220 | found_la="$dir/lib$name.la" | |
10221 | fi | |
10222 | fi | |
10223 | fi | |
10224 | ;; | |
10225 | esac | |
10226 | if test "X$found_dir" != "X"; then | |
10227 | break | |
10228 | fi | |
10229 | done | |
10230 | fi | |
10231 | if test "X$found_dir" != "X"; then | |
10232 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
10233 | if test "X$found_so" != "X"; then | |
10234 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10235 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10236 | else | |
10237 | haveit= | |
10238 | for x in $ltrpathdirs; do | |
10239 | if test "X$x" = "X$found_dir"; then | |
10240 | haveit=yes | |
10241 | break | |
10242 | fi | |
10243 | done | |
10244 | if test -z "$haveit"; then | |
10245 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10246 | fi | |
10247 | if test "$hardcode_direct" = yes; then | |
10248 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10249 | else | |
10250 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10251 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10252 | haveit= | |
10253 | for x in $rpathdirs; do | |
10254 | if test "X$x" = "X$found_dir"; then | |
10255 | haveit=yes | |
10256 | break | |
10257 | fi | |
10258 | done | |
10259 | if test -z "$haveit"; then | |
10260 | rpathdirs="$rpathdirs $found_dir" | |
10261 | fi | |
10262 | else | |
10263 | haveit= | |
10264 | for x in $LDFLAGS $LIBMPFR; do | |
10265 | ||
10266 | acl_save_prefix="$prefix" | |
10267 | prefix="$acl_final_prefix" | |
10268 | acl_save_exec_prefix="$exec_prefix" | |
10269 | exec_prefix="$acl_final_exec_prefix" | |
10270 | eval x=\"$x\" | |
10271 | exec_prefix="$acl_save_exec_prefix" | |
10272 | prefix="$acl_save_prefix" | |
10273 | ||
10274 | if test "X$x" = "X-L$found_dir"; then | |
10275 | haveit=yes | |
10276 | break | |
10277 | fi | |
10278 | done | |
10279 | if test -z "$haveit"; then | |
10280 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
10281 | fi | |
10282 | if test "$hardcode_minus_L" != no; then | |
10283 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10284 | else | |
10285 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10286 | fi | |
10287 | fi | |
10288 | fi | |
10289 | fi | |
10290 | else | |
10291 | if test "X$found_a" != "X"; then | |
10292 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
10293 | else | |
10294 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
10295 | fi | |
10296 | fi | |
10297 | additional_includedir= | |
10298 | case "$found_dir" in | |
10299 | */lib | */lib/) | |
10300 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10301 | additional_includedir="$basedir/include" | |
10302 | ;; | |
10303 | esac | |
10304 | if test "X$additional_includedir" != "X"; then | |
10305 | if test "X$additional_includedir" != "X/usr/include"; then | |
10306 | haveit= | |
10307 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10308 | if test -n "$GCC"; then | |
10309 | case $host_os in | |
10310 | linux*) haveit=yes;; | |
10311 | esac | |
10312 | fi | |
10313 | fi | |
10314 | if test -z "$haveit"; then | |
10315 | for x in $CPPFLAGS $INCMPFR; do | |
10316 | ||
10317 | acl_save_prefix="$prefix" | |
10318 | prefix="$acl_final_prefix" | |
10319 | acl_save_exec_prefix="$exec_prefix" | |
10320 | exec_prefix="$acl_final_exec_prefix" | |
10321 | eval x=\"$x\" | |
10322 | exec_prefix="$acl_save_exec_prefix" | |
10323 | prefix="$acl_save_prefix" | |
10324 | ||
10325 | if test "X$x" = "X-I$additional_includedir"; then | |
10326 | haveit=yes | |
10327 | break | |
10328 | fi | |
10329 | done | |
10330 | if test -z "$haveit"; then | |
10331 | if test -d "$additional_includedir"; then | |
10332 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
10333 | fi | |
10334 | fi | |
10335 | fi | |
10336 | fi | |
10337 | fi | |
10338 | if test -n "$found_la"; then | |
10339 | save_libdir="$libdir" | |
10340 | case "$found_la" in | |
10341 | */* | *\\*) . "$found_la" ;; | |
10342 | *) . "./$found_la" ;; | |
10343 | esac | |
10344 | libdir="$save_libdir" | |
10345 | for dep in $dependency_libs; do | |
10346 | case "$dep" in | |
10347 | -L*) | |
10348 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10349 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10350 | haveit= | |
10351 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10352 | if test -n "$GCC"; then | |
10353 | case $host_os in | |
10354 | linux*) haveit=yes;; | |
10355 | esac | |
10356 | fi | |
10357 | fi | |
10358 | if test -z "$haveit"; then | |
10359 | haveit= | |
10360 | for x in $LDFLAGS $LIBMPFR; do | |
10361 | ||
10362 | acl_save_prefix="$prefix" | |
10363 | prefix="$acl_final_prefix" | |
10364 | acl_save_exec_prefix="$exec_prefix" | |
10365 | exec_prefix="$acl_final_exec_prefix" | |
10366 | eval x=\"$x\" | |
10367 | exec_prefix="$acl_save_exec_prefix" | |
10368 | prefix="$acl_save_prefix" | |
10369 | ||
10370 | if test "X$x" = "X-L$additional_libdir"; then | |
10371 | haveit=yes | |
10372 | break | |
10373 | fi | |
10374 | done | |
10375 | if test -z "$haveit"; then | |
10376 | if test -d "$additional_libdir"; then | |
10377 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
10378 | fi | |
10379 | fi | |
10380 | haveit= | |
10381 | for x in $LDFLAGS $LTLIBMPFR; do | |
10382 | ||
10383 | acl_save_prefix="$prefix" | |
10384 | prefix="$acl_final_prefix" | |
10385 | acl_save_exec_prefix="$exec_prefix" | |
10386 | exec_prefix="$acl_final_exec_prefix" | |
10387 | eval x=\"$x\" | |
10388 | exec_prefix="$acl_save_exec_prefix" | |
10389 | prefix="$acl_save_prefix" | |
10390 | ||
10391 | if test "X$x" = "X-L$additional_libdir"; then | |
10392 | haveit=yes | |
10393 | break | |
10394 | fi | |
10395 | done | |
10396 | if test -z "$haveit"; then | |
10397 | if test -d "$additional_libdir"; then | |
10398 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
10399 | fi | |
10400 | fi | |
10401 | fi | |
10402 | fi | |
10403 | ;; | |
10404 | -R*) | |
10405 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10406 | if test "$enable_rpath" != no; then | |
10407 | haveit= | |
10408 | for x in $rpathdirs; do | |
10409 | if test "X$x" = "X$dir"; then | |
10410 | haveit=yes | |
10411 | break | |
10412 | fi | |
10413 | done | |
10414 | if test -z "$haveit"; then | |
10415 | rpathdirs="$rpathdirs $dir" | |
10416 | fi | |
10417 | haveit= | |
10418 | for x in $ltrpathdirs; do | |
10419 | if test "X$x" = "X$dir"; then | |
10420 | haveit=yes | |
10421 | break | |
10422 | fi | |
10423 | done | |
10424 | if test -z "$haveit"; then | |
10425 | ltrpathdirs="$ltrpathdirs $dir" | |
10426 | fi | |
10427 | fi | |
10428 | ;; | |
10429 | -l*) | |
10430 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10431 | ;; | |
10432 | *.la) | |
10433 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10434 | ;; | |
10435 | *) | |
10436 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10437 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10438 | ;; | |
10439 | esac | |
10440 | done | |
10441 | fi | |
10442 | else | |
9f1528a1 AB |
10443 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
10444 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10445 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10446 | else | |
10447 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext" | |
10448 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext" | |
10449 | fi | |
2400729e UW |
10450 | fi |
10451 | fi | |
10452 | fi | |
10453 | done | |
10454 | done | |
10455 | if test "X$rpathdirs" != "X"; then | |
10456 | if test -n "$hardcode_libdir_separator"; then | |
10457 | alldirs= | |
10458 | for found_dir in $rpathdirs; do | |
10459 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10460 | done | |
10461 | acl_save_libdir="$libdir" | |
10462 | libdir="$alldirs" | |
10463 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10464 | libdir="$acl_save_libdir" | |
10465 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10466 | else | |
10467 | for found_dir in $rpathdirs; do | |
10468 | acl_save_libdir="$libdir" | |
10469 | libdir="$found_dir" | |
10470 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10471 | libdir="$acl_save_libdir" | |
10472 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10473 | done | |
10474 | fi | |
10475 | fi | |
10476 | if test "X$ltrpathdirs" != "X"; then | |
10477 | for found_dir in $ltrpathdirs; do | |
10478 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10479 | done | |
10480 | fi | |
10481 | ||
10482 | ||
10483 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10484 | ||
10485 | for element in $INCMPFR; do | |
10486 | haveit= | |
10487 | for x in $CPPFLAGS; do | |
10488 | ||
10489 | acl_save_prefix="$prefix" | |
10490 | prefix="$acl_final_prefix" | |
10491 | acl_save_exec_prefix="$exec_prefix" | |
10492 | exec_prefix="$acl_final_exec_prefix" | |
10493 | eval x=\"$x\" | |
10494 | exec_prefix="$acl_save_exec_prefix" | |
10495 | prefix="$acl_save_prefix" | |
10496 | ||
10497 | if test "X$x" = "X$element"; then | |
10498 | haveit=yes | |
10499 | break | |
10500 | fi | |
10501 | done | |
10502 | if test -z "$haveit"; then | |
10503 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10504 | fi | |
10505 | done | |
10506 | ||
10507 | ||
10508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10509 | $as_echo_n "checking for libmpfr... " >&6; } | |
d0ac1c44 | 10510 | if ${ac_cv_libmpfr+:} false; then : |
2400729e UW |
10511 | $as_echo_n "(cached) " >&6 |
10512 | else | |
10513 | ||
10514 | ac_save_LIBS="$LIBS" | |
10515 | LIBS="$LIBS $LIBMPFR" | |
10516 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10517 | /* end confdefs.h. */ | |
10518 | #include <mpfr.h> | |
10519 | int | |
10520 | main () | |
10521 | { | |
10522 | mpfr_exp_t exp; mpfr_t x; | |
10523 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10524 | ; | |
10525 | return 0; | |
10526 | } | |
10527 | _ACEOF | |
10528 | if ac_fn_c_try_link "$LINENO"; then : | |
10529 | ac_cv_libmpfr=yes | |
10530 | else | |
10531 | ac_cv_libmpfr=no | |
10532 | fi | |
10533 | rm -f core conftest.err conftest.$ac_objext \ | |
10534 | conftest$ac_exeext conftest.$ac_ext | |
10535 | LIBS="$ac_save_LIBS" | |
10536 | ||
10537 | fi | |
10538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
10539 | $as_echo "$ac_cv_libmpfr" >&6; } | |
10540 | if test "$ac_cv_libmpfr" = yes; then | |
10541 | HAVE_LIBMPFR=yes | |
10542 | ||
10543 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
10544 | ||
10545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
10546 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
10547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
10548 | $as_echo "$LIBMPFR" >&6; } | |
10549 | else | |
10550 | HAVE_LIBMPFR=no | |
10551 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10552 | LIBMPFR= | |
10553 | LTLIBMPFR= | |
10554 | fi | |
10555 | ||
10556 | ||
10557 | ||
10558 | ||
10559 | ||
10560 | ||
10561 | if test "$HAVE_LIBMPFR" != yes; then | |
10562 | if test "$with_mpfr" = yes; then | |
d0ac1c44 | 10563 | as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 |
2400729e UW |
10564 | else |
10565 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
10566 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
10567 | fi | |
10568 | fi | |
10569 | fi | |
10570 | ||
d344e670 DE |
10571 | # --------------------- # |
10572 | # Check for libpython. # | |
10573 | # --------------------- # | |
10574 | ||
a9322a30 | 10575 | |
a9322a30 TT |
10576 | |
10577 | ||
ec685c5e | 10578 | |
0c4a4063 | 10579 | |
81ecdfbb RW |
10580 | # Check whether --with-python was given. |
10581 | if test "${with_python+set}" = set; then : | |
10582 | withval=$with_python; | |
bec39cab | 10583 | else |
81ecdfbb | 10584 | with_python=auto |
bec39cab | 10585 | fi |
bec39cab | 10586 | |
81ecdfbb RW |
10587 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
10588 | $as_echo_n "checking whether to use python... " >&6; } | |
10589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
10590 | $as_echo "$with_python" >&6; } | |
9a156167 | 10591 | |
81ecdfbb RW |
10592 | if test "${with_python}" = no; then |
10593 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
10594 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
10595 | have_libpython=no | |
bec39cab | 10596 | else |
81ecdfbb | 10597 | case "${with_python}" in |
8c85a4e2 | 10598 | [\\/]* | ?:[\\/]*) |
0ad6b8ee | 10599 | if test -d "${with_python}"; then |
ec685c5e | 10600 | # Assume the python binary is ${with_python}/bin/python. |
ec685c5e | 10601 | python_prog="${with_python}/bin/python" |
0c4a4063 | 10602 | python_prefix= |
9c4ea6c5 JB |
10603 | # If python does not exit ${with_python}/bin, then try in |
10604 | # ${with_python}. On Windows/MinGW, this is where the Python | |
10605 | # executable is. | |
10606 | if test ! -x "${python_prog}"; then | |
10607 | python_prog="${with_python}/python" | |
10608 | python_prefix= | |
10609 | fi | |
e7a30f46 | 10610 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
10611 | # Fall back to gdb 7.0/7.1 behaviour. |
10612 | python_prog=missing | |
0c4a4063 | 10613 | python_prefix=${with_python} |
ec685c5e | 10614 | fi |
e7a30f46 | 10615 | elif test -x "${with_python}"; then |
ec685c5e DE |
10616 | # While we can't run python compiled for $host (unless host == build), |
10617 | # the user could write a script that provides the needed information, | |
10618 | # so we support that. | |
ec685c5e | 10619 | python_prog=${with_python} |
0c4a4063 | 10620 | python_prefix= |
ec685c5e | 10621 | else |
d0ac1c44 | 10622 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
ec685c5e | 10623 | fi |
81ecdfbb | 10624 | ;; |
ec685c5e DE |
10625 | */*) |
10626 | # Disallow --with-python=foo/bar. | |
d0ac1c44 | 10627 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
81ecdfbb | 10628 | ;; |
ec685c5e DE |
10629 | *) |
10630 | # The user has either specified auto, yes, or the name of the python | |
10631 | # program assumed to be in $PATH. | |
10632 | python_prefix= | |
10633 | case "${with_python}" in | |
10634 | yes | auto) | |
0ad6b8ee | 10635 | if test "${build}" = "${host}"; then |
ec685c5e DE |
10636 | # Extract the first word of "python", so it can be a program name with args. |
10637 | set dummy python; ac_word=$2 | |
10638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10639 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 10640 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
10641 | $as_echo_n "(cached) " >&6 |
10642 | else | |
10643 | case $python_prog_path in | |
10644 | [\\/]* | ?:[\\/]*) | |
10645 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10646 | ;; | |
10647 | *) | |
10648 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10649 | for as_dir in $PATH | |
10650 | do | |
10651 | IFS=$as_save_IFS | |
10652 | test -z "$as_dir" && as_dir=. | |
10653 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 10654 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
10655 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
10656 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10657 | break 2 | |
10658 | fi | |
10659 | done | |
10660 | done | |
10661 | IFS=$as_save_IFS | |
10662 | ||
10663 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10664 | ;; | |
10665 | esac | |
10666 | fi | |
10667 | python_prog_path=$ac_cv_path_python_prog_path | |
10668 | if test -n "$python_prog_path"; then | |
10669 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10670 | $as_echo "$python_prog_path" >&6; } | |
10671 | else | |
10672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10673 | $as_echo "no" >&6; } | |
10674 | fi | |
10675 | ||
10676 | ||
10677 | if test "${python_prog_path}" = missing; then | |
10678 | python_prog=missing | |
10679 | else | |
10680 | python_prog=${python_prog_path} | |
10681 | fi | |
10682 | else | |
10683 | # Not much we can do except assume the cross-compiler will find the | |
10684 | # right files. | |
10685 | python_prog=missing | |
10686 | fi | |
10687 | ;; | |
10688 | *) | |
10689 | # While we can't run python compiled for $host (unless host == build), | |
10690 | # the user could write a script that provides the needed information, | |
10691 | # so we support that. | |
10692 | python_prog="${with_python}" | |
10693 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
10694 | set dummy ${python_prog}; ac_word=$2 | |
10695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
10696 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 10697 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
10698 | $as_echo_n "(cached) " >&6 |
10699 | else | |
10700 | case $python_prog_path in | |
10701 | [\\/]* | ?:[\\/]*) | |
10702 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
10703 | ;; | |
10704 | *) | |
10705 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10706 | for as_dir in $PATH | |
10707 | do | |
10708 | IFS=$as_save_IFS | |
10709 | test -z "$as_dir" && as_dir=. | |
10710 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 10711 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
10712 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
10713 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
10714 | break 2 | |
10715 | fi | |
10716 | done | |
10717 | done | |
10718 | IFS=$as_save_IFS | |
10719 | ||
10720 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
10721 | ;; | |
10722 | esac | |
10723 | fi | |
10724 | python_prog_path=$ac_cv_path_python_prog_path | |
10725 | if test -n "$python_prog_path"; then | |
10726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
10727 | $as_echo "$python_prog_path" >&6; } | |
10728 | else | |
10729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
10730 | $as_echo "no" >&6; } | |
10731 | fi | |
10732 | ||
10733 | ||
10734 | if test "${python_prog_path}" = missing; then | |
d0ac1c44 | 10735 | as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 |
ec685c5e DE |
10736 | fi |
10737 | ;; | |
10738 | esac | |
81ecdfbb RW |
10739 | esac |
10740 | ||
ec685c5e | 10741 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
10742 | # We have a python program to use, but it may be too old. |
10743 | # Don't flag an error for --with-python=auto (the default). | |
10744 | have_python_config=yes | |
ec685c5e DE |
10745 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
10746 | if test $? != 0; then | |
e7a30f46 DE |
10747 | have_python_config=failed |
10748 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10749 | as_fn_error $? "failure running python-config --includes" "$LINENO" 5 |
e7a30f46 | 10750 | fi |
ec685c5e DE |
10751 | fi |
10752 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
10753 | if test $? != 0; then | |
e7a30f46 DE |
10754 | have_python_config=failed |
10755 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10756 | as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 |
e7a30f46 | 10757 | fi |
ec685c5e | 10758 | fi |
0c4a4063 DE |
10759 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
10760 | if test $? != 0; then | |
e7a30f46 DE |
10761 | have_python_config=failed |
10762 | if test "${with_python}" != auto; then | |
d0ac1c44 | 10763 | as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 |
e7a30f46 | 10764 | fi |
0c4a4063 | 10765 | fi |
ec685c5e | 10766 | else |
ac534cba JB |
10767 | # We do not have a python executable we can use to determine where |
10768 | # to find the Python headers and libs. We cannot guess the include | |
10769 | # path from the python_prefix either, because that include path | |
10770 | # depends on the Python version. So, there is nothing much we can | |
10771 | # do except assume that the compiler will be able to find those files. | |
10772 | python_includes= | |
10773 | python_libs= | |
0c4a4063 | 10774 | have_python_config=no |
ec685c5e | 10775 | fi |
bec39cab | 10776 | |
ec685c5e DE |
10777 | # If we have python-config, only try the configuration it provides. |
10778 | # Otherwise fallback on the old way of trying different versions of | |
10779 | # python in turn. | |
81ecdfbb | 10780 | |
ec685c5e DE |
10781 | have_libpython=no |
10782 | if test "${have_python_config}" = yes; then | |
71737c43 | 10783 | |
ec685c5e DE |
10784 | |
10785 | new_CPPFLAGS=${python_includes} | |
10786 | new_LIBS=${python_libs} | |
71737c43 CB |
10787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
10788 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e | 10789 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 10790 | save_LIBS=$LIBS |
ec685c5e | 10791 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 10792 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 10793 | found_usable_python=no |
81ecdfbb | 10794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10795 | /* end confdefs.h. */ |
ac534cba | 10796 | #include "Python.h" |
81ecdfbb RW |
10797 | int |
10798 | main () | |
10799 | { | |
10800 | Py_Initialize (); | |
10801 | ; | |
10802 | return 0; | |
10803 | } | |
bec39cab | 10804 | _ACEOF |
81ecdfbb | 10805 | if ac_fn_c_try_link "$LINENO"; then : |
71737c43 | 10806 | have_libpython=yes |
ec685c5e | 10807 | found_usable_python=yes |
ac534cba JB |
10808 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10809 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 10810 | fi |
81ecdfbb RW |
10811 | rm -f core conftest.err conftest.$ac_objext \ |
10812 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10813 | CPPFLAGS=$save_CPPFLAGS |
10814 | LIBS=$save_LIBS | |
ec685c5e DE |
10815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10816 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 10817 | |
e7a30f46 | 10818 | elif test "${have_python_config}" != failed; then |
ec685c5e | 10819 | if test "${have_libpython}" = no; then |
9a156167 | 10820 | |
420697bb TT |
10821 | |
10822 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 10823 | new_LIBS="-lpython2.7 ${python_libs}" |
71737c43 CB |
10824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
10825 | $as_echo_n "checking for python... " >&6; } | |
420697bb TT |
10826 | save_CPPFLAGS=$CPPFLAGS |
10827 | save_LIBS=$LIBS | |
10828 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 10829 | LIBS="$new_LIBS $LIBS" |
420697bb TT |
10830 | found_usable_python=no |
10831 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10832 | /* end confdefs.h. */ | |
ac534cba | 10833 | #include "Python.h" |
420697bb TT |
10834 | int |
10835 | main () | |
10836 | { | |
10837 | Py_Initialize (); | |
10838 | ; | |
10839 | return 0; | |
10840 | } | |
10841 | _ACEOF | |
10842 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 10843 | have_libpython=yes |
420697bb | 10844 | found_usable_python=yes |
ac534cba JB |
10845 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10846 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
10847 | fi |
10848 | rm -f core conftest.err conftest.$ac_objext \ | |
10849 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10850 | CPPFLAGS=$save_CPPFLAGS |
10851 | LIBS=$save_LIBS | |
420697bb TT |
10852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10853 | $as_echo "${found_usable_python}" >&6; } | |
10854 | ||
10855 | fi | |
10856 | if test "${have_libpython}" = no; then | |
10857 | ||
ec685c5e DE |
10858 | |
10859 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 10860 | new_LIBS="-lpython2.6 ${python_libs}" |
71737c43 CB |
10861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
10862 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e DE |
10863 | save_CPPFLAGS=$CPPFLAGS |
10864 | save_LIBS=$LIBS | |
10865 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 10866 | LIBS="$new_LIBS $LIBS" |
ec685c5e DE |
10867 | found_usable_python=no |
10868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10869 | /* end confdefs.h. */ | |
ac534cba | 10870 | #include "Python.h" |
ec685c5e DE |
10871 | int |
10872 | main () | |
10873 | { | |
10874 | Py_Initialize (); | |
10875 | ; | |
10876 | return 0; | |
10877 | } | |
10878 | _ACEOF | |
10879 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 10880 | have_libpython=yes |
ec685c5e | 10881 | found_usable_python=yes |
ac534cba JB |
10882 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
10883 | PYTHON_LIBS=$new_LIBS | |
ec685c5e | 10884 | fi |
81ecdfbb RW |
10885 | rm -f core conftest.err conftest.$ac_objext \ |
10886 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
10887 | CPPFLAGS=$save_CPPFLAGS |
10888 | LIBS=$save_LIBS | |
ec685c5e DE |
10889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
10890 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 10891 | |
ec685c5e DE |
10892 | fi |
10893 | fi | |
ec685c5e DE |
10894 | |
10895 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
10896 | case "${with_python}" in |
10897 | yes) | |
d0ac1c44 | 10898 | as_fn_error $? "python is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
10899 | ;; |
10900 | auto) | |
10901 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
10902 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
10903 | ;; | |
10904 | *) | |
d0ac1c44 | 10905 | as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 |
81ecdfbb RW |
10906 | ;; |
10907 | esac | |
0c4a4063 DE |
10908 | else |
10909 | if test -n "${python_prefix}"; then | |
10910 | ||
10911 | cat >>confdefs.h <<_ACEOF | |
10912 | #define WITH_PYTHON_PATH "${python_prefix}" | |
10913 | _ACEOF | |
10914 | ||
10915 | ||
10916 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10917 | if test "x$prefix" = xNONE; then | |
10918 | test_prefix=/usr/local | |
10919 | else | |
10920 | test_prefix=$prefix | |
10921 | fi | |
10922 | else | |
10923 | test_prefix=$exec_prefix | |
10924 | fi | |
10925 | value=0 | |
10926 | case ${python_prefix} in | |
10927 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10928 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10929 | value=1 | |
10930 | ;; | |
10931 | esac | |
10932 | ||
10933 | cat >>confdefs.h <<_ACEOF | |
10934 | #define PYTHON_PATH_RELOCATABLE $value | |
10935 | _ACEOF | |
10936 | ||
10937 | ||
10938 | fi | |
81ecdfbb | 10939 | fi |
436868fb | 10940 | fi |
436868fb | 10941 | |
d13c7322 AB |
10942 | |
10943 | # Check whether --with-python-libdir was given. | |
10944 | if test "${with_python_libdir+set}" = set; then : | |
10945 | withval=$with_python_libdir; | |
10946 | else | |
10947 | ||
10948 | # If no python libdir is specified then select one based on | |
10949 | # python's prefix path. | |
10950 | if test -n "${python_prefix}"; then | |
10951 | with_python_libdir=${python_prefix}/lib | |
10952 | fi | |
10953 | ||
10954 | fi | |
10955 | ||
10956 | ||
ec685c5e | 10957 | if test "${have_libpython}" != no; then |
436868fb | 10958 | |
81ecdfbb | 10959 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 10960 | |
81ecdfbb RW |
10961 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
10962 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
10963 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 10964 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 10965 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 10966 | |
d13c7322 AB |
10967 | if test -n "${with_python_libdir}"; then |
10968 | ||
10969 | cat >>confdefs.h <<_ACEOF | |
10970 | #define WITH_PYTHON_LIBDIR "${with_python_libdir}" | |
10971 | _ACEOF | |
10972 | ||
10973 | ||
10974 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
10975 | if test "x$prefix" = xNONE; then | |
10976 | test_prefix=/usr/local | |
10977 | else | |
10978 | test_prefix=$prefix | |
10979 | fi | |
10980 | else | |
10981 | test_prefix=$exec_prefix | |
10982 | fi | |
10983 | value=0 | |
10984 | case ${with_python_libdir} in | |
10985 | "${test_prefix}"|"${test_prefix}/"*|\ | |
10986 | '${exec_prefix}'|'${exec_prefix}/'*) | |
10987 | value=1 | |
10988 | ;; | |
10989 | esac | |
10990 | ||
10991 | cat >>confdefs.h <<_ACEOF | |
10992 | #define PYTHON_LIBDIR_RELOCATABLE $value | |
10993 | _ACEOF | |
10994 | ||
10995 | ||
10996 | fi | |
10997 | ||
81ecdfbb RW |
10998 | # Flags needed to compile Python code (taken from python-config --cflags). |
10999 | # We cannot call python-config directly because it will output whatever was | |
11000 | # used when compiling the Python interpreter itself, including flags which | |
11001 | # would make the python-related objects be compiled differently from the | |
11002 | # rest of GDB (e.g., -O2 and -fPIC). | |
11003 | if test "${GCC}" = yes; then | |
ae292b3a TT |
11004 | tentative_python_cflags="-fno-strict-aliasing -fwrapv" |
11005 | # Python headers recommend -DNDEBUG, but it's unclear if that just | |
11006 | # refers to building Python itself. In release mode, though, it | |
11007 | # doesn't hurt for the Python code in gdb to follow. | |
11008 | $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG" | |
81ecdfbb | 11009 | fi |
436868fb | 11010 | |
81ecdfbb RW |
11011 | if test "x${tentative_python_cflags}" != x; then |
11012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
11013 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
11014 | for flag in ${tentative_python_cflags}; do | |
11015 | # Check that the compiler accepts it | |
11016 | saved_CFLAGS="$CFLAGS" | |
11017 | CFLAGS="$CFLAGS $flag" | |
11018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11019 | /* end confdefs.h. */ |
81ecdfbb | 11020 | |
a9322a30 TT |
11021 | int |
11022 | main () | |
11023 | { | |
a9322a30 TT |
11024 | |
11025 | ; | |
11026 | return 0; | |
11027 | } | |
bec39cab | 11028 | _ACEOF |
81ecdfbb RW |
11029 | if ac_fn_c_try_compile "$LINENO"; then : |
11030 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 11031 | fi |
81ecdfbb RW |
11032 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11033 | CFLAGS="$saved_CFLAGS" | |
11034 | done | |
11035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
11036 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
11037 | fi | |
043b6510 | 11038 | |
c83393b9 JB |
11039 | # On x64 Windows, Python's include headers, and pyconfig.h in |
11040 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
11041 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
11042 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
11043 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
11044 | # The issue was reported to the Python community, but still isn't | |
11045 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
11046 | ||
043b6510 | 11047 | case "$gdb_host" in |
c83393b9 JB |
11048 | mingw64) |
11049 | if test "${GCC}" = yes; then | |
11050 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
11051 | fi | |
11052 | ;; | |
043b6510 | 11053 | esac |
81ecdfbb | 11054 | else |
6dddc817 DE |
11055 | # Even if Python support is not compiled in, we need to have this file |
11056 | # included so that the "python" command, et.al., still exists. | |
8fd8d003 | 11057 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
6dddc817 | 11058 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
a9322a30 | 11059 | fi |
9a156167 | 11060 | |
a4a1c157 PA |
11061 | # Work around Python http://bugs.python.org/issue10112. See also |
11062 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
11063 | # no effect. Note that the only test after this that uses Python is | |
11064 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
11065 | # run without -export-dynamic too. | |
11066 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
11067 | ||
11068 | ||
ed3ef339 DE |
11069 | |
11070 | ||
4df42755 DE |
11071 | if test "${have_libpython}" != no; then |
11072 | HAVE_PYTHON_TRUE= | |
11073 | HAVE_PYTHON_FALSE='#' | |
11074 | else | |
11075 | HAVE_PYTHON_TRUE='#' | |
11076 | HAVE_PYTHON_FALSE= | |
11077 | fi | |
11078 | ||
ed3ef339 DE |
11079 | |
11080 | # -------------------- # | |
11081 | # Check for libguile. # | |
11082 | # -------------------- # | |
11083 | ||
11084 | ||
e1402065 DE |
11085 | |
11086 | ||
11087 | ||
11088 | ||
11089 | # Check whether --with-guile was given. | |
11090 | if test "${with_guile+set}" = set; then : | |
11091 | withval=$with_guile; | |
11092 | else | |
11093 | with_guile=auto | |
11094 | fi | |
11095 | ||
11096 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
11097 | $as_echo_n "checking whether to use guile... " >&6; } | |
11098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
11099 | $as_echo "$with_guile" >&6; } | |
11100 | ||
ed3ef339 DE |
11101 | # Extract the first word of "pkg-config", so it can be a program name with args. |
11102 | set dummy pkg-config; ac_word=$2 | |
11103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11104 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11105 | if ${ac_cv_path_pkg_config_prog_path+:} false; then : |
ed3ef339 DE |
11106 | $as_echo_n "(cached) " >&6 |
11107 | else | |
11108 | case $pkg_config_prog_path in | |
11109 | [\\/]* | ?:[\\/]*) | |
11110 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
11111 | ;; | |
11112 | *) | |
11113 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11114 | for as_dir in $PATH | |
11115 | do | |
11116 | IFS=$as_save_IFS | |
11117 | test -z "$as_dir" && as_dir=. | |
11118 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11119 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ed3ef339 DE |
11120 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11121 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11122 | break 2 | |
11123 | fi | |
11124 | done | |
11125 | done | |
11126 | IFS=$as_save_IFS | |
11127 | ||
11128 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
11129 | ;; | |
11130 | esac | |
11131 | fi | |
11132 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
11133 | if test -n "$pkg_config_prog_path"; then | |
11134 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
11135 | $as_echo "$pkg_config_prog_path" >&6; } | |
11136 | else | |
11137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11138 | $as_echo "no" >&6; } | |
11139 | fi | |
11140 | ||
11141 | ||
11142 | ||
ae5369e7 | 11143 | try_guile_versions="guile-3.0 guile-2.2 guile-2.0" |
ed3ef339 DE |
11144 | have_libguile=no |
11145 | case "${with_guile}" in | |
11146 | no) | |
11147 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
11148 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
11149 | ;; | |
11150 | auto) | |
e1402065 DE |
11151 | if test "${pkg_config_prog_path}" = "missing"; then |
11152 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
11153 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
11154 | else | |
ed3ef339 DE |
11155 | |
11156 | pkg_config=${pkg_config_prog_path} | |
11157 | guile_version_list=${try_guile_versions} | |
11158 | flag_errors=no | |
11159 | ||
ed3ef339 DE |
11160 | found_usable_guile=checking |
11161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11162 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11163 | for guile_version in ${guile_version_list}; do | |
11164 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11165 | if test $? != 0; then | |
11166 | continue | |
11167 | fi | |
11168 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11169 | if test $? != 0; then | |
d0ac1c44 | 11170 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11171 | fi |
11172 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11173 | if test $? != 0; then | |
d0ac1c44 | 11174 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11175 | fi |
11176 | found_usable_guile=${guile_version} | |
11177 | break | |
11178 | done | |
11179 | if test "${found_usable_guile}" = "checking"; then | |
11180 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11181 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11182 | else |
11183 | found_usable_guile=no | |
11184 | fi | |
11185 | fi | |
11186 | if test "${found_usable_guile}" != no; then | |
11187 | save_CPPFLAGS=$CPPFLAGS | |
11188 | save_LIBS=$LIBS | |
11189 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11190 | LIBS="$LIBS $new_LIBS" | |
11191 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11192 | /* end confdefs.h. */ | |
11193 | #include "libguile.h" | |
11194 | int | |
11195 | main () | |
11196 | { | |
11197 | scm_init_guile (); | |
11198 | ; | |
11199 | return 0; | |
11200 | } | |
11201 | _ACEOF | |
11202 | if ac_fn_c_try_link "$LINENO"; then : | |
11203 | have_libguile=yes | |
11204 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11205 | GUILE_LIBS=$new_LIBS | |
11206 | else | |
11207 | found_usable_guile=no | |
11208 | fi | |
11209 | rm -f core conftest.err conftest.$ac_objext \ | |
11210 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11211 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11212 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11213 | |
11214 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11215 | ||
11216 | ||
11217 | fi | |
11218 | ||
ed3ef339 DE |
11219 | CPPFLAGS=$save_CPPFLAGS |
11220 | LIBS=$save_LIBS | |
11221 | if test "${found_usable_guile}" = no; then | |
11222 | if test "${flag_errors}" = yes; then | |
11223 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11224 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11225 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11226 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11227 | fi |
11228 | fi | |
11229 | fi | |
11230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11231 | $as_echo "${found_usable_guile}" >&6; } | |
11232 | ||
e1402065 | 11233 | fi |
ed3ef339 DE |
11234 | ;; |
11235 | yes) | |
e1402065 | 11236 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11237 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11238 | fi |
ed3ef339 DE |
11239 | |
11240 | pkg_config=${pkg_config_prog_path} | |
11241 | guile_version_list=${try_guile_versions} | |
11242 | flag_errors=yes | |
11243 | ||
ed3ef339 DE |
11244 | found_usable_guile=checking |
11245 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11246 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11247 | for guile_version in ${guile_version_list}; do | |
11248 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11249 | if test $? != 0; then | |
11250 | continue | |
11251 | fi | |
11252 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11253 | if test $? != 0; then | |
d0ac1c44 | 11254 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11255 | fi |
11256 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11257 | if test $? != 0; then | |
d0ac1c44 | 11258 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11259 | fi |
11260 | found_usable_guile=${guile_version} | |
11261 | break | |
11262 | done | |
11263 | if test "${found_usable_guile}" = "checking"; then | |
11264 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11265 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11266 | else |
11267 | found_usable_guile=no | |
11268 | fi | |
11269 | fi | |
11270 | if test "${found_usable_guile}" != no; then | |
11271 | save_CPPFLAGS=$CPPFLAGS | |
11272 | save_LIBS=$LIBS | |
11273 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11274 | LIBS="$LIBS $new_LIBS" | |
11275 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11276 | /* end confdefs.h. */ | |
11277 | #include "libguile.h" | |
11278 | int | |
11279 | main () | |
11280 | { | |
11281 | scm_init_guile (); | |
11282 | ; | |
11283 | return 0; | |
11284 | } | |
11285 | _ACEOF | |
11286 | if ac_fn_c_try_link "$LINENO"; then : | |
11287 | have_libguile=yes | |
11288 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11289 | GUILE_LIBS=$new_LIBS | |
11290 | else | |
11291 | found_usable_guile=no | |
11292 | fi | |
11293 | rm -f core conftest.err conftest.$ac_objext \ | |
11294 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11295 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11296 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11297 | |
11298 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11299 | ||
11300 | ||
11301 | fi | |
11302 | ||
ed3ef339 DE |
11303 | CPPFLAGS=$save_CPPFLAGS |
11304 | LIBS=$save_LIBS | |
11305 | if test "${found_usable_guile}" = no; then | |
11306 | if test "${flag_errors}" = yes; then | |
11307 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11308 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11309 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11310 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11311 | fi |
11312 | fi | |
11313 | fi | |
11314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11315 | $as_echo "${found_usable_guile}" >&6; } | |
11316 | ||
11317 | ;; | |
11318 | [\\/]* | ?:[\\/]*) | |
e1402065 | 11319 | if test -x "${with_guile}"; then |
ed3ef339 DE |
11320 | |
11321 | pkg_config=${with_guile} | |
11322 | guile_version_list=${try_guile_versions} | |
11323 | flag_errors=yes | |
11324 | ||
ed3ef339 DE |
11325 | found_usable_guile=checking |
11326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11327 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11328 | for guile_version in ${guile_version_list}; do | |
11329 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11330 | if test $? != 0; then | |
11331 | continue | |
11332 | fi | |
11333 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11334 | if test $? != 0; then | |
d0ac1c44 | 11335 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11336 | fi |
11337 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11338 | if test $? != 0; then | |
d0ac1c44 | 11339 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11340 | fi |
11341 | found_usable_guile=${guile_version} | |
11342 | break | |
11343 | done | |
11344 | if test "${found_usable_guile}" = "checking"; then | |
11345 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11346 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11347 | else |
11348 | found_usable_guile=no | |
11349 | fi | |
11350 | fi | |
11351 | if test "${found_usable_guile}" != no; then | |
11352 | save_CPPFLAGS=$CPPFLAGS | |
11353 | save_LIBS=$LIBS | |
11354 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11355 | LIBS="$LIBS $new_LIBS" | |
11356 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11357 | /* end confdefs.h. */ | |
11358 | #include "libguile.h" | |
11359 | int | |
11360 | main () | |
11361 | { | |
11362 | scm_init_guile (); | |
11363 | ; | |
11364 | return 0; | |
11365 | } | |
11366 | _ACEOF | |
11367 | if ac_fn_c_try_link "$LINENO"; then : | |
11368 | have_libguile=yes | |
11369 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11370 | GUILE_LIBS=$new_LIBS | |
11371 | else | |
11372 | found_usable_guile=no | |
11373 | fi | |
11374 | rm -f core conftest.err conftest.$ac_objext \ | |
11375 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11376 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11377 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11378 | |
11379 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11380 | ||
11381 | ||
11382 | fi | |
11383 | ||
ed3ef339 DE |
11384 | CPPFLAGS=$save_CPPFLAGS |
11385 | LIBS=$save_LIBS | |
11386 | if test "${found_usable_guile}" = no; then | |
11387 | if test "${flag_errors}" = yes; then | |
11388 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11389 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11390 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11391 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11392 | fi |
11393 | fi | |
11394 | fi | |
11395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11396 | $as_echo "${found_usable_guile}" >&6; } | |
11397 | ||
e1402065 | 11398 | else |
d0ac1c44 | 11399 | as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 |
e1402065 | 11400 | fi |
ed3ef339 DE |
11401 | ;; |
11402 | "" | */*) | |
11403 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
d0ac1c44 | 11404 | as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 |
ed3ef339 DE |
11405 | ;; |
11406 | *) | |
11407 | # A space separate list of guile versions to try, in order. | |
e1402065 | 11408 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11409 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11410 | fi |
ed3ef339 DE |
11411 | |
11412 | pkg_config=${pkg_config_prog_path} | |
11413 | guile_version_list=${with_guile} | |
11414 | flag_errors=yes | |
11415 | ||
ed3ef339 DE |
11416 | found_usable_guile=checking |
11417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11418 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11419 | for guile_version in ${guile_version_list}; do | |
11420 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11421 | if test $? != 0; then | |
11422 | continue | |
11423 | fi | |
11424 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11425 | if test $? != 0; then | |
d0ac1c44 | 11426 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11427 | fi |
11428 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11429 | if test $? != 0; then | |
d0ac1c44 | 11430 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11431 | fi |
11432 | found_usable_guile=${guile_version} | |
11433 | break | |
11434 | done | |
11435 | if test "${found_usable_guile}" = "checking"; then | |
11436 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11437 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11438 | else |
11439 | found_usable_guile=no | |
11440 | fi | |
11441 | fi | |
11442 | if test "${found_usable_guile}" != no; then | |
11443 | save_CPPFLAGS=$CPPFLAGS | |
11444 | save_LIBS=$LIBS | |
11445 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11446 | LIBS="$LIBS $new_LIBS" | |
11447 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11448 | /* end confdefs.h. */ | |
11449 | #include "libguile.h" | |
11450 | int | |
11451 | main () | |
11452 | { | |
11453 | scm_init_guile (); | |
11454 | ; | |
11455 | return 0; | |
11456 | } | |
11457 | _ACEOF | |
11458 | if ac_fn_c_try_link "$LINENO"; then : | |
11459 | have_libguile=yes | |
11460 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11461 | GUILE_LIBS=$new_LIBS | |
11462 | else | |
11463 | found_usable_guile=no | |
11464 | fi | |
11465 | rm -f core conftest.err conftest.$ac_objext \ | |
11466 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11467 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11468 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11469 | |
11470 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11471 | ||
11472 | ||
11473 | fi | |
11474 | ||
ed3ef339 DE |
11475 | CPPFLAGS=$save_CPPFLAGS |
11476 | LIBS=$save_LIBS | |
11477 | if test "${found_usable_guile}" = no; then | |
11478 | if test "${flag_errors}" = yes; then | |
11479 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11480 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11481 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11482 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11483 | fi |
11484 | fi | |
11485 | fi | |
11486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11487 | $as_echo "${found_usable_guile}" >&6; } | |
11488 | ||
11489 | ;; | |
11490 | esac | |
11491 | ||
e76c5d17 | 11492 | if test "${have_libguile}" != no; then |
d342a0da DE |
11493 | case "${with_guile}" in |
11494 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11495 | |
11496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11497 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11498 | if ${ac_cv_guild_program_name+:} false; then : |
e76c5d17 DE |
11499 | $as_echo_n "(cached) " >&6 |
11500 | else | |
d342a0da | 11501 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11502 | |
11503 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11504 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11505 | # what the program name is, at the risk of getting it wrong if | |
11506 | # Guile was configured with '--program-suffix' or similar. | |
11507 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11508 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11509 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11510 | fi | |
11511 | ||
11512 | fi | |
11513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11514 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11515 | ||
11516 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11517 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
e76c5d17 DE |
11518 | fi |
11519 | ||
11520 | GUILD="$ac_cv_guild_program_name" | |
11521 | ||
11522 | ||
d342a0da DE |
11523 | ;; |
11524 | *) | |
11525 | ||
11526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11527 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11528 | if ${ac_cv_guild_program_name+:} false; then : |
d342a0da DE |
11529 | $as_echo_n "(cached) " >&6 |
11530 | else | |
11531 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11532 | ||
11533 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11534 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11535 | # what the program name is, at the risk of getting it wrong if | |
11536 | # Guile was configured with '--program-suffix' or similar. | |
11537 | if test "x$ac_cv_guild_program_name" = "x"; then | |
11538 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
11539 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
11540 | fi | |
11541 | ||
11542 | fi | |
11543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11544 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11545 | ||
11546 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11547 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
d342a0da DE |
11548 | fi |
11549 | ||
11550 | GUILD="$ac_cv_guild_program_name" | |
11551 | ||
11552 | ||
11553 | ;; | |
11554 | esac | |
e76c5d17 DE |
11555 | |
11556 | ||
11557 | if test "$cross_compiling" = no; then | |
11558 | GUILD_TARGET_FLAG= | |
11559 | else | |
11560 | GUILD_TARGET_FLAG="--target=$host" | |
11561 | fi | |
11562 | ||
11563 | ||
11564 | ||
11565 | ||
11566 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
11567 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
d0ac1c44 | 11568 | if ${ac_cv_guild_ok+:} false; then : |
e76c5d17 DE |
11569 | $as_echo_n "(cached) " >&6 |
11570 | else | |
11571 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
11572 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
11573 | ac_cv_guild_ok=yes | |
11574 | else | |
11575 | ac_cv_guild_ok=no | |
11576 | fi | |
11577 | fi | |
11578 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
11579 | $as_echo "$ac_cv_guild_ok" >&6; } | |
11580 | ||
11581 | if test "$ac_cv_guild_ok" = no; then | |
11582 | have_libguile=no | |
11583 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
11584 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
11585 | fi | |
11586 | fi | |
11587 | ||
ed3ef339 DE |
11588 | if test "${have_libguile}" != no; then |
11589 | ||
11590 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
11591 | ||
11592 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
11593 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
11594 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
11595 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
11596 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
11597 | |
11598 | save_LIBS="$LIBS" | |
11599 | save_CPPFLAGS="$CPPFLAGS" | |
11600 | LIBS="$GUILE_LIBS" | |
11601 | CPPFLAGS="$GUILE_CPPFLAGS" | |
11602 | for ac_func in scm_new_smob | |
11603 | do : | |
11604 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
d0ac1c44 | 11605 | if test "x$ac_cv_func_scm_new_smob" = xyes; then : |
16954d5d LC |
11606 | cat >>confdefs.h <<_ACEOF |
11607 | #define HAVE_SCM_NEW_SMOB 1 | |
11608 | _ACEOF | |
11609 | ||
11610 | fi | |
11611 | done | |
11612 | ||
11613 | LIBS="$save_LIBS" | |
11614 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
11615 | else |
11616 | # Even if Guile support is not compiled in, we need to have these files | |
11617 | # included. | |
bd810fff | 11618 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
ed3ef339 DE |
11619 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
11620 | fi | |
9a156167 | 11621 | |
ac534cba | 11622 | |
4df42755 DE |
11623 | if test "${have_libguile}" != no; then |
11624 | HAVE_GUILE_TRUE= | |
11625 | HAVE_GUILE_FALSE='#' | |
11626 | else | |
11627 | HAVE_GUILE_TRUE='#' | |
11628 | HAVE_GUILE_FALSE= | |
11629 | fi | |
11630 | ||
ac534cba | 11631 | |
62f29fda TT |
11632 | # ---------------------------- # |
11633 | # Check for source highlight. # | |
11634 | # ---------------------------- # | |
11635 | ||
11636 | SRCHIGH_LIBS= | |
11637 | SRCHIGH_CFLAGS= | |
189b8c2e ST |
11638 | |
11639 | # Check whether --enable-source-highlight was given. | |
11640 | if test "${enable_source_highlight+set}" = set; then : | |
11641 | enableval=$enable_source_highlight; case "${enableval}" in | |
11642 | yes) enable_source_highlight=yes ;; | |
11643 | no) enable_source_highlight=no ;; | |
11644 | *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; | |
11645 | esac | |
11646 | else | |
11647 | enable_source_highlight=auto | |
11648 | fi | |
11649 | ||
11650 | ||
11651 | if test "${enable_source_highlight}" != "no"; then | |
11652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 | |
6c28e44a | 11653 | $as_echo_n "checking for the source-highlight library... " >&6; } |
189b8c2e ST |
11654 | if test "${pkg_config_prog_path}" = "missing"; then |
11655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 | |
62f29fda | 11656 | $as_echo "no - pkg-config not found" >&6; } |
189b8c2e ST |
11657 | if test "${enable_source_highlight}" = "yes"; then |
11658 | as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 | |
11659 | fi | |
11660 | else | |
d806ea2d TT |
11661 | case "$LDFLAGS" in |
11662 | *static-libstdc*) | |
11663 | as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 | |
11664 | ;; | |
11665 | esac | |
11666 | ||
189b8c2e | 11667 | if ${pkg_config_prog_path} --exists source-highlight; then |
62f29fda TT |
11668 | SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` |
11669 | SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` | |
11670 | ||
11671 | $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h | |
11672 | ||
11673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
11674 | $as_echo "yes" >&6; } | |
189b8c2e | 11675 | else |
62f29fda TT |
11676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11677 | $as_echo "no" >&6; } | |
189b8c2e ST |
11678 | if test "${enable_source_highlight}" = "yes"; then |
11679 | as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 | |
11680 | fi | |
11681 | fi | |
11682 | fi | |
62f29fda TT |
11683 | fi |
11684 | ||
11685 | ||
11686 | ||
05ea2a05 TT |
11687 | # ------------------------- # |
11688 | # Checks for header files. # | |
11689 | # ------------------------- # | |
58bfce93 | 11690 | |
05ea2a05 TT |
11691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
11692 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
11693 | if ${ac_cv_header_stdc+:} false; then : | |
11694 | $as_echo_n "(cached) " >&6 | |
58bfce93 | 11695 | else |
5599c404 MM |
11696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11697 | /* end confdefs.h. */ | |
05ea2a05 TT |
11698 | #include <stdlib.h> |
11699 | #include <stdarg.h> | |
11700 | #include <string.h> | |
11701 | #include <float.h> | |
5599c404 | 11702 | |
05ea2a05 TT |
11703 | int |
11704 | main () | |
11705 | { | |
5599c404 | 11706 | |
05ea2a05 TT |
11707 | ; |
11708 | return 0; | |
11709 | } | |
5599c404 | 11710 | _ACEOF |
05ea2a05 TT |
11711 | if ac_fn_c_try_compile "$LINENO"; then : |
11712 | ac_cv_header_stdc=yes | |
5599c404 | 11713 | else |
05ea2a05 | 11714 | ac_cv_header_stdc=no |
5599c404 | 11715 | fi |
05ea2a05 | 11716 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58bfce93 | 11717 | |
05ea2a05 TT |
11718 | if test $ac_cv_header_stdc = yes; then |
11719 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
11720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11721 | /* end confdefs.h. */ | |
11722 | #include <string.h> | |
58bfce93 | 11723 | |
05ea2a05 TT |
11724 | _ACEOF |
11725 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11726 | $EGREP "memchr" >/dev/null 2>&1; then : | |
58bfce93 | 11727 | |
05ea2a05 TT |
11728 | else |
11729 | ac_cv_header_stdc=no | |
11730 | fi | |
11731 | rm -f conftest* | |
58bfce93 | 11732 | |
05ea2a05 | 11733 | fi |
58bfce93 | 11734 | |
05ea2a05 TT |
11735 | if test $ac_cv_header_stdc = yes; then |
11736 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
11737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11738 | /* end confdefs.h. */ | |
11739 | #include <stdlib.h> | |
58bfce93 | 11740 | |
05ea2a05 TT |
11741 | _ACEOF |
11742 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
11743 | $EGREP "free" >/dev/null 2>&1; then : | |
58bfce93 | 11744 | |
05ea2a05 TT |
11745 | else |
11746 | ac_cv_header_stdc=no | |
11747 | fi | |
11748 | rm -f conftest* | |
58bfce93 | 11749 | |
05ea2a05 | 11750 | fi |
58bfce93 | 11751 | |
05ea2a05 TT |
11752 | if test $ac_cv_header_stdc = yes; then |
11753 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
11754 | if test "$cross_compiling" = yes; then : | |
11755 | : | |
11756 | else | |
11757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11758 | /* end confdefs.h. */ | |
11759 | #include <ctype.h> | |
11760 | #include <stdlib.h> | |
11761 | #if ((' ' & 0x0FF) == 0x020) | |
11762 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
11763 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
11764 | #else | |
11765 | # define ISLOWER(c) \ | |
11766 | (('a' <= (c) && (c) <= 'i') \ | |
11767 | || ('j' <= (c) && (c) <= 'r') \ | |
11768 | || ('s' <= (c) && (c) <= 'z')) | |
11769 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
11770 | #endif | |
58bfce93 | 11771 | |
05ea2a05 TT |
11772 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
11773 | int | |
11774 | main () | |
11775 | { | |
11776 | int i; | |
11777 | for (i = 0; i < 256; i++) | |
11778 | if (XOR (islower (i), ISLOWER (i)) | |
11779 | || toupper (i) != TOUPPER (i)) | |
11780 | return 2; | |
11781 | return 0; | |
11782 | } | |
11783 | _ACEOF | |
11784 | if ac_fn_c_try_run "$LINENO"; then : | |
58bfce93 | 11785 | |
05ea2a05 TT |
11786 | else |
11787 | ac_cv_header_stdc=no | |
11788 | fi | |
11789 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11790 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11791 | fi | |
58bfce93 | 11792 | |
05ea2a05 TT |
11793 | fi |
11794 | fi | |
11795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
11796 | $as_echo "$ac_cv_header_stdc" >&6; } | |
11797 | if test $ac_cv_header_stdc = yes; then | |
58bfce93 | 11798 | |
05ea2a05 | 11799 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
58bfce93 | 11800 | |
05ea2a05 | 11801 | fi |
58bfce93 | 11802 | |
05ea2a05 | 11803 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8ae8e197 | 11804 | for ac_header in nlist.h machine/reg.h \ |
05ea2a05 TT |
11805 | thread_db.h \ |
11806 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
11807 | sys/resource.h sys/ptrace.h ptrace.h \ | |
8ae8e197 | 11808 | sys/reg.h sys/debugreg.h \ |
05ea2a05 TT |
11809 | termios.h elf_hp.h |
11810 | do : | |
11811 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11812 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11813 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
11814 | cat >>confdefs.h <<_ACEOF | |
11815 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
11816 | _ACEOF | |
58bfce93 MM |
11817 | |
11818 | fi | |
11819 | ||
05ea2a05 | 11820 | done |
58bfce93 | 11821 | |
05ea2a05 TT |
11822 | for ac_header in sys/user.h |
11823 | do : | |
11824 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
11825 | # include <sys/param.h> | |
11826 | #endif | |
58bfce93 | 11827 | |
05ea2a05 TT |
11828 | " |
11829 | if test "x$ac_cv_header_sys_user_h" = xyes; then : | |
11830 | cat >>confdefs.h <<_ACEOF | |
11831 | #define HAVE_SYS_USER_H 1 | |
11832 | _ACEOF | |
58bfce93 | 11833 | |
05ea2a05 | 11834 | fi |
58bfce93 | 11835 | |
05ea2a05 | 11836 | done |
58bfce93 | 11837 | |
58bfce93 | 11838 | |
05ea2a05 TT |
11839 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
11840 | do : | |
11841 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
11842 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
11843 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
11844 | cat >>confdefs.h <<_ACEOF | |
11845 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
11846 | _ACEOF | |
58bfce93 | 11847 | |
05ea2a05 | 11848 | fi |
58bfce93 | 11849 | |
05ea2a05 | 11850 | done |
58bfce93 | 11851 | |
05ea2a05 TT |
11852 | for ac_header in term.h |
11853 | do : | |
11854 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
11855 | # include <curses.h> | |
11856 | #endif | |
58bfce93 | 11857 | |
05ea2a05 TT |
11858 | " |
11859 | if test "x$ac_cv_header_term_h" = xyes; then : | |
11860 | cat >>confdefs.h <<_ACEOF | |
11861 | #define HAVE_TERM_H 1 | |
11862 | _ACEOF | |
58bfce93 | 11863 | |
05ea2a05 | 11864 | fi |
58bfce93 | 11865 | |
05ea2a05 | 11866 | done |
58bfce93 | 11867 | |
58bfce93 | 11868 | |
95420d30 | 11869 | for ac_header in sys/socket.h |
05a6b8c2 | 11870 | do : |
95420d30 TV |
11871 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" |
11872 | if test "x$ac_cv_header_sys_socket_h" = xyes; then : | |
05a6b8c2 | 11873 | cat >>confdefs.h <<_ACEOF |
95420d30 | 11874 | #define HAVE_SYS_SOCKET_H 1 |
05a6b8c2 EZ |
11875 | _ACEOF |
11876 | ||
11877 | fi | |
11878 | ||
11879 | done | |
11880 | ||
11881 | for ac_header in ws2tcpip.h | |
11882 | do : | |
11883 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
11884 | if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : | |
11885 | cat >>confdefs.h <<_ACEOF | |
11886 | #define HAVE_WS2TCPIP_H 1 | |
11887 | _ACEOF | |
11888 | ||
11889 | fi | |
11890 | ||
11891 | done | |
11892 | ||
11893 | ||
05ea2a05 TT |
11894 | # ------------------------- # |
11895 | # Checks for declarations. # | |
11896 | # ------------------------- # | |
58bfce93 | 11897 | |
58bfce93 | 11898 | |
05ea2a05 TT |
11899 | # Check for presence and size of long long. |
11900 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
11901 | if test "x$ac_cv_type_long_long" = xyes; then : | |
58bfce93 | 11902 | |
05ea2a05 TT |
11903 | cat >>confdefs.h <<_ACEOF |
11904 | #define HAVE_LONG_LONG 1 | |
11905 | _ACEOF | |
11906 | ||
11907 | # The cast to long int works around a bug in the HP C Compiler | |
11908 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11909 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11910 | # This bug is HP SR number 8606223364. | |
11911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
11912 | $as_echo_n "checking size of long long... " >&6; } | |
11913 | if ${ac_cv_sizeof_long_long+:} false; then : | |
58bfce93 MM |
11914 | $as_echo_n "(cached) " >&6 |
11915 | else | |
05ea2a05 | 11916 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
58bfce93 | 11917 | |
58bfce93 | 11918 | else |
05ea2a05 TT |
11919 | if test "$ac_cv_type_long_long" = yes; then |
11920 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11921 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11922 | as_fn_error 77 "cannot compute sizeof (long long) | |
11923 | See \`config.log' for more details" "$LINENO" 5; } | |
11924 | else | |
11925 | ac_cv_sizeof_long_long=0 | |
11926 | fi | |
58bfce93 | 11927 | fi |
58bfce93 MM |
11928 | |
11929 | fi | |
05ea2a05 TT |
11930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
11931 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
58bfce93 | 11932 | |
58bfce93 | 11933 | |
58bfce93 | 11934 | |
05ea2a05 TT |
11935 | cat >>confdefs.h <<_ACEOF |
11936 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
11937 | _ACEOF | |
58bfce93 MM |
11938 | |
11939 | ||
05ea2a05 | 11940 | fi |
58bfce93 MM |
11941 | |
11942 | ||
05ea2a05 TT |
11943 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
11944 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
11945 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
11946 | ac_have_decl=1 | |
11947 | else | |
11948 | ac_have_decl=0 | |
11949 | fi | |
58bfce93 | 11950 | |
05ea2a05 TT |
11951 | cat >>confdefs.h <<_ACEOF |
11952 | #define HAVE_DECL_BASENAME $ac_have_decl | |
c56ccc05 | 11953 | _ACEOF |
05ea2a05 TT |
11954 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
11955 | if test "x$ac_cv_have_decl_ffs" = xyes; then : | |
11956 | ac_have_decl=1 | |
11957 | else | |
11958 | ac_have_decl=0 | |
c56ccc05 | 11959 | fi |
c56ccc05 MM |
11960 | |
11961 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 11962 | #define HAVE_DECL_FFS $ac_have_decl |
c56ccc05 | 11963 | _ACEOF |
05ea2a05 TT |
11964 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" |
11965 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : | |
11966 | ac_have_decl=1 | |
11967 | else | |
11968 | ac_have_decl=0 | |
c56ccc05 | 11969 | fi |
c56ccc05 MM |
11970 | |
11971 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 11972 | #define HAVE_DECL_ASPRINTF $ac_have_decl |
c56ccc05 | 11973 | _ACEOF |
05ea2a05 TT |
11974 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
11975 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : | |
11976 | ac_have_decl=1 | |
11977 | else | |
11978 | ac_have_decl=0 | |
11979 | fi | |
c56ccc05 | 11980 | |
05ea2a05 TT |
11981 | cat >>confdefs.h <<_ACEOF |
11982 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
11983 | _ACEOF | |
11984 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
11985 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
11986 | ac_have_decl=1 | |
11987 | else | |
11988 | ac_have_decl=0 | |
c56ccc05 MM |
11989 | fi |
11990 | ||
05ea2a05 TT |
11991 | cat >>confdefs.h <<_ACEOF |
11992 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
11993 | _ACEOF | |
11994 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
11995 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : | |
11996 | ac_have_decl=1 | |
11997 | else | |
11998 | ac_have_decl=0 | |
58bfce93 MM |
11999 | fi |
12000 | ||
05ea2a05 TT |
12001 | cat >>confdefs.h <<_ACEOF |
12002 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
12003 | _ACEOF | |
c890192f | 12004 | |
05ea2a05 TT |
12005 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
12006 | if test "x$ac_cv_have_decl_strtol" = xyes; then : | |
12007 | ac_have_decl=1 | |
bec39cab | 12008 | else |
05ea2a05 TT |
12009 | ac_have_decl=0 |
12010 | fi | |
81ecdfbb | 12011 | |
05ea2a05 TT |
12012 | cat >>confdefs.h <<_ACEOF |
12013 | #define HAVE_DECL_STRTOL $ac_have_decl | |
12014 | _ACEOF | |
12015 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
12016 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : | |
12017 | ac_have_decl=1 | |
12018 | else | |
12019 | ac_have_decl=0 | |
12020 | fi | |
a9322a30 | 12021 | |
05ea2a05 TT |
12022 | cat >>confdefs.h <<_ACEOF |
12023 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
bec39cab | 12024 | _ACEOF |
05ea2a05 TT |
12025 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
12026 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : | |
12027 | ac_have_decl=1 | |
bec39cab | 12028 | else |
05ea2a05 | 12029 | ac_have_decl=0 |
a9322a30 | 12030 | fi |
bec39cab | 12031 | |
05ea2a05 TT |
12032 | cat >>confdefs.h <<_ACEOF |
12033 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
12034 | _ACEOF | |
12035 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
12036 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : | |
12037 | ac_have_decl=1 | |
12038 | else | |
12039 | ac_have_decl=0 | |
12040 | fi | |
bec39cab | 12041 | |
05ea2a05 TT |
12042 | cat >>confdefs.h <<_ACEOF |
12043 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
81ecdfbb | 12044 | _ACEOF |
bec39cab | 12045 | |
05ea2a05 TT |
12046 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" |
12047 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : | |
12048 | ac_have_decl=1 | |
bec39cab | 12049 | else |
05ea2a05 | 12050 | ac_have_decl=0 |
81ecdfbb | 12051 | fi |
81ecdfbb | 12052 | |
05ea2a05 TT |
12053 | cat >>confdefs.h <<_ACEOF |
12054 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
12055 | _ACEOF | |
81ecdfbb | 12056 | |
81ecdfbb | 12057 | |
06825bd1 | 12058 | |
05ea2a05 TT |
12059 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
12060 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12061 | ac_have_decl=1 | |
81ecdfbb | 12062 | else |
05ea2a05 | 12063 | ac_have_decl=0 |
81ecdfbb | 12064 | fi |
bec39cab | 12065 | |
05ea2a05 TT |
12066 | cat >>confdefs.h <<_ACEOF |
12067 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12068 | _ACEOF | |
81ecdfbb | 12069 | |
05ea2a05 TT |
12070 | |
12071 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 | |
12072 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
12073 | if ${am_cv_val_LC_MESSAGES+:} false; then : | |
12074 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12075 | else |
81ecdfbb | 12076 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12077 | /* end confdefs.h. */ |
05ea2a05 | 12078 | #include <locale.h> |
a9322a30 TT |
12079 | int |
12080 | main () | |
12081 | { | |
05ea2a05 TT |
12082 | return LC_MESSAGES |
12083 | ; | |
a9322a30 TT |
12084 | return 0; |
12085 | } | |
bec39cab | 12086 | _ACEOF |
05ea2a05 TT |
12087 | if ac_fn_c_try_link "$LINENO"; then : |
12088 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 12089 | else |
05ea2a05 | 12090 | am_cv_val_LC_MESSAGES=no |
81ecdfbb | 12091 | fi |
05ea2a05 TT |
12092 | rm -f core conftest.err conftest.$ac_objext \ |
12093 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 12094 | fi |
05ea2a05 TT |
12095 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
12096 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
12097 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 12098 | |
05ea2a05 | 12099 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
bec39cab | 12100 | |
05ea2a05 | 12101 | fi |
5ee754fc | 12102 | |
bec39cab | 12103 | |
05ea2a05 TT |
12104 | # ------------------ # |
12105 | # Checks for types. # | |
12106 | # ------------------ # | |
12107 | ||
12108 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | |
05a6b8c2 EZ |
12109 | #if HAVE_SYS_SOCKET_H |
12110 | # include <sys/socket.h> | |
12111 | #elif HAVE_WS2TCPIP_H | |
12112 | # include <ws2tcpip.h> | |
12113 | #endif | |
05ea2a05 TT |
12114 | |
12115 | " | |
12116 | if test "x$ac_cv_type_socklen_t" = xyes; then : | |
12117 | ||
12118 | cat >>confdefs.h <<_ACEOF | |
12119 | #define HAVE_SOCKLEN_T 1 | |
bec39cab | 12120 | _ACEOF |
c906108c | 12121 | |
05ea2a05 | 12122 | |
bec39cab | 12123 | fi |
81ecdfbb | 12124 | |
81ecdfbb | 12125 | |
05ea2a05 TT |
12126 | # ------------------------------------- # |
12127 | # Checks for compiler characteristics. # | |
12128 | # ------------------------------------- # | |
a9322a30 | 12129 | |
05ea2a05 TT |
12130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12131 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
12132 | if ${ac_cv_c_const+:} false; then : | |
12133 | $as_echo_n "(cached) " >&6 | |
12134 | else | |
12135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12136 | /* end confdefs.h. */ | |
bec39cab | 12137 | |
05ea2a05 TT |
12138 | int |
12139 | main () | |
12140 | { | |
bec39cab | 12141 | |
05ea2a05 TT |
12142 | #ifndef __cplusplus |
12143 | /* Ultrix mips cc rejects this sort of thing. */ | |
12144 | typedef int charset[2]; | |
12145 | const charset cs = { 0, 0 }; | |
12146 | /* SunOS 4.1.1 cc rejects this. */ | |
12147 | char const *const *pcpcc; | |
12148 | char **ppc; | |
12149 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
12150 | struct point {int x, y;}; | |
12151 | static struct point const zero = {0,0}; | |
12152 | /* AIX XL C 1.02.0.0 rejects this. | |
12153 | It does not let you subtract one const X* pointer from another in | |
12154 | an arm of an if-expression whose if-part is not a constant | |
12155 | expression */ | |
12156 | const char *g = "string"; | |
12157 | pcpcc = &g + (g ? g-g : 0); | |
12158 | /* HPUX 7.0 cc rejects these. */ | |
12159 | ++pcpcc; | |
12160 | ppc = (char**) pcpcc; | |
12161 | pcpcc = (char const *const *) ppc; | |
12162 | { /* SCO 3.2v4 cc rejects this sort of thing. */ | |
12163 | char tx; | |
12164 | char *t = &tx; | |
12165 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5ee754fc | 12166 | |
05ea2a05 TT |
12167 | *t++ = 0; |
12168 | if (s) return 0; | |
12169 | } | |
12170 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12171 | int x[] = {25, 17}; | |
12172 | const int *foo = &x[0]; | |
12173 | ++foo; | |
12174 | } | |
12175 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12176 | typedef const int *iptr; | |
12177 | iptr p = 0; | |
12178 | ++p; | |
12179 | } | |
12180 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying | |
12181 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12182 | struct s { int j; const int *ap[3]; } bx; | |
12183 | struct s *b = &bx; b->j = 5; | |
12184 | } | |
12185 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12186 | const int foo = 10; | |
12187 | if (!foo) return 0; | |
12188 | } | |
12189 | return !cs[0] && !zero.x; | |
12190 | #endif | |
5ee754fc | 12191 | |
05ea2a05 TT |
12192 | ; |
12193 | return 0; | |
12194 | } | |
bec39cab | 12195 | _ACEOF |
05ea2a05 TT |
12196 | if ac_fn_c_try_compile "$LINENO"; then : |
12197 | ac_cv_c_const=yes | |
12198 | else | |
12199 | ac_cv_c_const=no | |
12200 | fi | |
12201 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ee754fc | 12202 | fi |
05ea2a05 TT |
12203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12204 | $as_echo "$ac_cv_c_const" >&6; } | |
12205 | if test $ac_cv_c_const = no; then | |
5ee754fc | 12206 | |
05ea2a05 | 12207 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12208 | |
05ea2a05 TT |
12209 | fi |
12210 | ||
12211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
12212 | $as_echo_n "checking for inline... " >&6; } | |
12213 | if ${ac_cv_c_inline+:} false; then : | |
12214 | $as_echo_n "(cached) " >&6 | |
12215 | else | |
12216 | ac_cv_c_inline=no | |
12217 | for ac_kw in inline __inline__ __inline; do | |
12218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12219 | /* end confdefs.h. */ | |
12220 | #ifndef __cplusplus | |
12221 | typedef int foo_t; | |
12222 | static $ac_kw foo_t static_foo () {return 0; } | |
12223 | $ac_kw foo_t foo () {return 0; } | |
81ecdfbb | 12224 | #endif |
bec39cab | 12225 | |
a8111142 | 12226 | _ACEOF |
05ea2a05 TT |
12227 | if ac_fn_c_try_compile "$LINENO"; then : |
12228 | ac_cv_c_inline=$ac_kw | |
a8111142 | 12229 | fi |
05ea2a05 TT |
12230 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12231 | test "$ac_cv_c_inline" != no && break | |
81ecdfbb | 12232 | done |
a8111142 | 12233 | |
05ea2a05 TT |
12234 | fi |
12235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
12236 | $as_echo "$ac_cv_c_inline" >&6; } | |
a8111142 | 12237 | |
05ea2a05 TT |
12238 | case $ac_cv_c_inline in |
12239 | inline | yes) ;; | |
12240 | *) | |
12241 | case $ac_cv_c_inline in | |
12242 | no) ac_val=;; | |
12243 | *) ac_val=$ac_cv_c_inline;; | |
12244 | esac | |
12245 | cat >>confdefs.h <<_ACEOF | |
12246 | #ifndef __cplusplus | |
12247 | #define inline $ac_val | |
12248 | #endif | |
07697489 | 12249 | _ACEOF |
05ea2a05 TT |
12250 | ;; |
12251 | esac | |
07697489 | 12252 | |
05ea2a05 TT |
12253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12254 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12255 | if ${ac_cv_c_bigendian+:} false; then : | |
07697489 PA |
12256 | $as_echo_n "(cached) " >&6 |
12257 | else | |
05ea2a05 TT |
12258 | ac_cv_c_bigendian=unknown |
12259 | # See if we're dealing with a universal compiler. | |
12260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12261 | /* end confdefs.h. */ | |
12262 | #ifndef __APPLE_CC__ | |
12263 | not a universal capable compiler | |
12264 | #endif | |
12265 | typedef int dummy; | |
07697489 | 12266 | |
05ea2a05 TT |
12267 | _ACEOF |
12268 | if ac_fn_c_try_compile "$LINENO"; then : | |
07697489 | 12269 | |
05ea2a05 TT |
12270 | # Check for potential -arch flags. It is not universal unless |
12271 | # there are at least two -arch flags with different values. | |
12272 | ac_arch= | |
12273 | ac_prev= | |
12274 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12275 | if test -n "$ac_prev"; then | |
12276 | case $ac_word in | |
12277 | i?86 | x86_64 | ppc | ppc64) | |
12278 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12279 | ac_arch=$ac_word | |
12280 | else | |
12281 | ac_cv_c_bigendian=universal | |
12282 | break | |
12283 | fi | |
12284 | ;; | |
12285 | esac | |
12286 | ac_prev= | |
12287 | elif test "x$ac_word" = "x-arch"; then | |
12288 | ac_prev=arch | |
12289 | fi | |
12290 | done | |
07697489 | 12291 | fi |
05ea2a05 TT |
12292 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12293 | if test $ac_cv_c_bigendian = unknown; then | |
12294 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12296 | /* end confdefs.h. */ | |
12297 | #include <sys/types.h> | |
12298 | #include <sys/param.h> | |
07697489 | 12299 | |
05ea2a05 TT |
12300 | int |
12301 | main () | |
12302 | { | |
12303 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
12304 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12305 | && LITTLE_ENDIAN) | |
12306 | bogus endian macros | |
12307 | #endif | |
07697489 | 12308 | |
05ea2a05 TT |
12309 | ; |
12310 | return 0; | |
12311 | } | |
07697489 | 12312 | _ACEOF |
05ea2a05 TT |
12313 | if ac_fn_c_try_compile "$LINENO"; then : |
12314 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
12315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12316 | /* end confdefs.h. */ | |
12317 | #include <sys/types.h> | |
12318 | #include <sys/param.h> | |
07697489 | 12319 | |
05ea2a05 TT |
12320 | int |
12321 | main () | |
12322 | { | |
12323 | #if BYTE_ORDER != BIG_ENDIAN | |
12324 | not big endian | |
12325 | #endif | |
07697489 | 12326 | |
05ea2a05 TT |
12327 | ; |
12328 | return 0; | |
12329 | } | |
07697489 | 12330 | _ACEOF |
05ea2a05 TT |
12331 | if ac_fn_c_try_compile "$LINENO"; then : |
12332 | ac_cv_c_bigendian=yes | |
07697489 | 12333 | else |
05ea2a05 | 12334 | ac_cv_c_bigendian=no |
07697489 | 12335 | fi |
05ea2a05 | 12336 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12337 | fi |
05ea2a05 TT |
12338 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12339 | fi | |
12340 | if test $ac_cv_c_bigendian = unknown; then | |
12341 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12342 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12343 | /* end confdefs.h. */ | |
12344 | #include <limits.h> | |
07697489 | 12345 | |
05ea2a05 TT |
12346 | int |
12347 | main () | |
12348 | { | |
12349 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12350 | bogus endian macros | |
12351 | #endif | |
07697489 | 12352 | |
05ea2a05 TT |
12353 | ; |
12354 | return 0; | |
12355 | } | |
07697489 | 12356 | _ACEOF |
05ea2a05 TT |
12357 | if ac_fn_c_try_compile "$LINENO"; then : |
12358 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12360 | /* end confdefs.h. */ | |
12361 | #include <limits.h> | |
07697489 | 12362 | |
05ea2a05 TT |
12363 | int |
12364 | main () | |
12365 | { | |
12366 | #ifndef _BIG_ENDIAN | |
12367 | not big endian | |
12368 | #endif | |
07697489 | 12369 | |
05ea2a05 TT |
12370 | ; |
12371 | return 0; | |
12372 | } | |
07697489 | 12373 | _ACEOF |
05ea2a05 TT |
12374 | if ac_fn_c_try_compile "$LINENO"; then : |
12375 | ac_cv_c_bigendian=yes | |
07697489 | 12376 | else |
05ea2a05 | 12377 | ac_cv_c_bigendian=no |
07697489 | 12378 | fi |
05ea2a05 | 12379 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12380 | fi |
05ea2a05 TT |
12381 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12382 | fi | |
12383 | if test $ac_cv_c_bigendian = unknown; then | |
12384 | # Compile a test program. | |
12385 | if test "$cross_compiling" = yes; then : | |
12386 | # Try to guess by grepping values from an object file. | |
12387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12388 | /* end confdefs.h. */ | |
12389 | short int ascii_mm[] = | |
12390 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12391 | short int ascii_ii[] = | |
12392 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12393 | int use_ascii (int i) { | |
12394 | return ascii_mm[i] + ascii_ii[i]; | |
12395 | } | |
12396 | short int ebcdic_ii[] = | |
12397 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12398 | short int ebcdic_mm[] = | |
12399 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12400 | int use_ebcdic (int i) { | |
12401 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12402 | } | |
12403 | extern int foo; | |
07697489 | 12404 | |
05ea2a05 TT |
12405 | int |
12406 | main () | |
12407 | { | |
12408 | return use_ascii (foo) == use_ebcdic (foo); | |
12409 | ; | |
12410 | return 0; | |
12411 | } | |
07697489 | 12412 | _ACEOF |
05ea2a05 TT |
12413 | if ac_fn_c_try_compile "$LINENO"; then : |
12414 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12415 | ac_cv_c_bigendian=yes | |
12416 | fi | |
12417 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12418 | if test "$ac_cv_c_bigendian" = unknown; then | |
12419 | ac_cv_c_bigendian=no | |
12420 | else | |
12421 | # finding both strings is unlikely to happen, but who knows? | |
12422 | ac_cv_c_bigendian=unknown | |
12423 | fi | |
12424 | fi | |
07697489 | 12425 | fi |
05ea2a05 TT |
12426 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12427 | else | |
12428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12429 | /* end confdefs.h. */ | |
12430 | $ac_includes_default | |
12431 | int | |
12432 | main () | |
12433 | { | |
07697489 | 12434 | |
05ea2a05 TT |
12435 | /* Are we little or big endian? From Harbison&Steele. */ |
12436 | union | |
12437 | { | |
12438 | long int l; | |
12439 | char c[sizeof (long int)]; | |
12440 | } u; | |
12441 | u.l = 1; | |
12442 | return u.c[sizeof (long int) - 1] == 1; | |
12443 | ||
12444 | ; | |
12445 | return 0; | |
12446 | } | |
07697489 | 12447 | _ACEOF |
05ea2a05 TT |
12448 | if ac_fn_c_try_run "$LINENO"; then : |
12449 | ac_cv_c_bigendian=no | |
07697489 | 12450 | else |
05ea2a05 TT |
12451 | ac_cv_c_bigendian=yes |
12452 | fi | |
12453 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12454 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
07697489 PA |
12455 | fi |
12456 | ||
05ea2a05 | 12457 | fi |
07697489 | 12458 | fi |
05ea2a05 TT |
12459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
12460 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12461 | case $ac_cv_c_bigendian in #( | |
12462 | yes) | |
12463 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12464 | ;; #( | |
12465 | no) | |
12466 | ;; #( | |
12467 | universal) | |
07697489 | 12468 | |
05ea2a05 | 12469 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
07697489 | 12470 | |
05ea2a05 TT |
12471 | ;; #( |
12472 | *) | |
12473 | as_fn_error $? "unknown endianness | |
12474 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12475 | esac | |
07697489 PA |
12476 | |
12477 | ||
05ea2a05 TT |
12478 | # ------------------------------ # |
12479 | # Checks for library functions. # | |
12480 | # ------------------------------ # | |
81ecdfbb | 12481 | |
05ea2a05 | 12482 | for ac_func in getuid getgid \ |
8ae8e197 | 12483 | pipe pread pread64 pwrite resize_term \ |
05ea2a05 TT |
12484 | getpgid setsid \ |
12485 | sigaction sigsetmask socketpair \ | |
12486 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ | |
12487 | setrlimit getrlimit posix_madvise waitpid \ | |
12488 | use_default_colors | |
12489 | do : | |
12490 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12491 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12492 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
12493 | cat >>confdefs.h <<_ACEOF | |
12494 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
a9322a30 | 12495 | _ACEOF |
5ee754fc | 12496 | |
05ea2a05 TT |
12497 | fi |
12498 | done | |
5ee754fc | 12499 | |
05ea2a05 TT |
12500 | |
12501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
12502 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12503 | if ${am_cv_langinfo_codeset+:} false; then : | |
81ecdfbb | 12504 | $as_echo_n "(cached) " >&6 |
bec39cab | 12505 | else |
81ecdfbb | 12506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12507 | /* end confdefs.h. */ |
05ea2a05 | 12508 | #include <langinfo.h> |
a9322a30 TT |
12509 | int |
12510 | main () | |
12511 | { | |
05ea2a05 | 12512 | char* cs = nl_langinfo(CODESET); |
a9322a30 TT |
12513 | ; |
12514 | return 0; | |
12515 | } | |
bec39cab | 12516 | _ACEOF |
81ecdfbb | 12517 | if ac_fn_c_try_link "$LINENO"; then : |
05ea2a05 | 12518 | am_cv_langinfo_codeset=yes |
bec39cab | 12519 | else |
05ea2a05 | 12520 | am_cv_langinfo_codeset=no |
81ecdfbb RW |
12521 | fi |
12522 | rm -f core conftest.err conftest.$ac_objext \ | |
12523 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 12524 | |
81ecdfbb | 12525 | fi |
05ea2a05 TT |
12526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12527 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
12528 | if test $am_cv_langinfo_codeset = yes; then | |
bec39cab | 12529 | |
05ea2a05 | 12530 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
81ecdfbb RW |
12531 | |
12532 | fi | |
12533 | ||
05ea2a05 TT |
12534 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
12535 | if test "x$ac_cv_type_size_t" = xyes; then : | |
81ecdfbb | 12536 | |
05ea2a05 | 12537 | else |
81ecdfbb RW |
12538 | |
12539 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12540 | #define size_t unsigned int |
7eb368b3 | 12541 | _ACEOF |
7eb368b3 | 12542 | |
7eb368b3 | 12543 | fi |
7eb368b3 | 12544 | |
7eb368b3 | 12545 | |
a9322a30 | 12546 | |
7eb368b3 | 12547 | |
05ea2a05 TT |
12548 | for ac_header in $ac_header_list |
12549 | do : | |
12550 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12551 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
12552 | " | |
12553 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12554 | cat >>confdefs.h <<_ACEOF | |
12555 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12556 | _ACEOF | |
7eb368b3 | 12557 | |
05ea2a05 | 12558 | fi |
7eb368b3 | 12559 | |
05ea2a05 | 12560 | done |
a9322a30 | 12561 | |
05ea2a05 TT |
12562 | |
12563 | ||
12564 | ||
12565 | ||
12566 | ||
12567 | ||
12568 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
12569 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
12570 | ||
12571 | else | |
bec39cab | 12572 | |
a9322a30 | 12573 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 12574 | #define pid_t int |
a9322a30 TT |
12575 | _ACEOF |
12576 | ||
05ea2a05 TT |
12577 | fi |
12578 | ||
12579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
12580 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
12581 | if ${ac_cv_path_SED+:} false; then : | |
12582 | $as_echo_n "(cached) " >&6 | |
12583 | else | |
12584 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
12585 | for ac_i in 1 2 3 4 5 6 7; do | |
12586 | ac_script="$ac_script$as_nl$ac_script" | |
12587 | done | |
12588 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
12589 | { ac_script=; unset ac_script;} | |
12590 | if test -z "$SED"; then | |
12591 | ac_path_SED_found=false | |
12592 | # Loop through the user's path and test for each of PROGNAME-LIST | |
12593 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12594 | for as_dir in $PATH | |
12595 | do | |
12596 | IFS=$as_save_IFS | |
12597 | test -z "$as_dir" && as_dir=. | |
12598 | for ac_prog in sed gsed; do | |
12599 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12600 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
12601 | as_fn_executable_p "$ac_path_SED" || continue | |
12602 | # Check for GNU ac_path_SED and select it if it is found. | |
12603 | # Check for GNU $ac_path_SED | |
12604 | case `"$ac_path_SED" --version 2>&1` in | |
12605 | *GNU*) | |
12606 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
12607 | *) | |
12608 | ac_count=0 | |
12609 | $as_echo_n 0123456789 >"conftest.in" | |
12610 | while : | |
12611 | do | |
12612 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
12613 | mv "conftest.tmp" "conftest.in" | |
12614 | cp "conftest.in" "conftest.nl" | |
12615 | $as_echo '' >> "conftest.nl" | |
12616 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
12617 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
12618 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
12619 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
12620 | # Best one so far, save it but keep looking for a better one | |
12621 | ac_cv_path_SED="$ac_path_SED" | |
12622 | ac_path_SED_max=$ac_count | |
12623 | fi | |
12624 | # 10*(2^10) chars as input seems more than enough | |
12625 | test $ac_count -gt 10 && break | |
12626 | done | |
12627 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
12628 | esac | |
a9322a30 | 12629 | |
05ea2a05 TT |
12630 | $ac_path_SED_found && break 3 |
12631 | done | |
12632 | done | |
12633 | done | |
12634 | IFS=$as_save_IFS | |
12635 | if test -z "$ac_cv_path_SED"; then | |
12636 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
12637 | fi | |
12638 | else | |
12639 | ac_cv_path_SED=$SED | |
a9322a30 TT |
12640 | fi |
12641 | ||
05ea2a05 TT |
12642 | fi |
12643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
12644 | $as_echo "$ac_cv_path_SED" >&6; } | |
12645 | SED="$ac_cv_path_SED" | |
12646 | rm -f conftest.sed | |
a9322a30 | 12647 | |
a9322a30 | 12648 | |
db6878ac SM |
12649 | # Set the 'development' global. |
12650 | . $srcdir/../bfd/development.sh | |
12651 | ||
05ea2a05 TT |
12652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
12653 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
12654 | if ${ac_cv_header_stdc+:} false; then : | |
81ecdfbb | 12655 | $as_echo_n "(cached) " >&6 |
a9322a30 | 12656 | else |
81ecdfbb | 12657 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12658 | /* end confdefs.h. */ |
05ea2a05 TT |
12659 | #include <stdlib.h> |
12660 | #include <stdarg.h> | |
12661 | #include <string.h> | |
12662 | #include <float.h> | |
a9322a30 TT |
12663 | |
12664 | int | |
12665 | main () | |
12666 | { | |
d0ac1c44 | 12667 | |
a9322a30 TT |
12668 | ; |
12669 | return 0; | |
12670 | } | |
bec39cab | 12671 | _ACEOF |
81ecdfbb | 12672 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 12673 | ac_cv_header_stdc=yes |
5ee754fc | 12674 | else |
05ea2a05 | 12675 | ac_cv_header_stdc=no |
5ee754fc | 12676 | fi |
81ecdfbb | 12677 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12678 | |
05ea2a05 TT |
12679 | if test $ac_cv_header_stdc = yes; then |
12680 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12681 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12682 | /* end confdefs.h. */ | |
12683 | #include <string.h> | |
bec39cab | 12684 | |
05ea2a05 TT |
12685 | _ACEOF |
12686 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12687 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 12688 | |
bec39cab | 12689 | else |
05ea2a05 TT |
12690 | ac_cv_header_stdc=no |
12691 | fi | |
12692 | rm -f conftest* | |
12693 | ||
12694 | fi | |
12695 | ||
12696 | if test $ac_cv_header_stdc = yes; then | |
12697 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 12698 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12699 | /* end confdefs.h. */ |
05ea2a05 | 12700 | #include <stdlib.h> |
a9322a30 | 12701 | |
bec39cab | 12702 | _ACEOF |
05ea2a05 TT |
12703 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
12704 | $EGREP "free" >/dev/null 2>&1; then : | |
bec39cab | 12705 | |
05ea2a05 TT |
12706 | else |
12707 | ac_cv_header_stdc=no | |
5ee754fc | 12708 | fi |
05ea2a05 | 12709 | rm -f conftest* |
5ee754fc | 12710 | |
05ea2a05 | 12711 | fi |
bec39cab | 12712 | |
05ea2a05 TT |
12713 | if test $ac_cv_header_stdc = yes; then |
12714 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12715 | if test "$cross_compiling" = yes; then : | |
12716 | : | |
bec39cab | 12717 | else |
05ea2a05 | 12718 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
81ecdfbb | 12719 | /* end confdefs.h. */ |
05ea2a05 TT |
12720 | #include <ctype.h> |
12721 | #include <stdlib.h> | |
12722 | #if ((' ' & 0x0FF) == 0x020) | |
12723 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12724 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12725 | #else | |
12726 | # define ISLOWER(c) \ | |
12727 | (('a' <= (c) && (c) <= 'i') \ | |
12728 | || ('j' <= (c) && (c) <= 'r') \ | |
12729 | || ('s' <= (c) && (c) <= 'z')) | |
12730 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12731 | #endif | |
a9322a30 | 12732 | |
05ea2a05 | 12733 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
a9322a30 TT |
12734 | int |
12735 | main () | |
12736 | { | |
05ea2a05 TT |
12737 | int i; |
12738 | for (i = 0; i < 256; i++) | |
12739 | if (XOR (islower (i), ISLOWER (i)) | |
12740 | || toupper (i) != TOUPPER (i)) | |
12741 | return 2; | |
a9322a30 TT |
12742 | return 0; |
12743 | } | |
bec39cab | 12744 | _ACEOF |
05ea2a05 | 12745 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 12746 | |
5ee754fc | 12747 | else |
05ea2a05 | 12748 | ac_cv_header_stdc=no |
5ee754fc | 12749 | fi |
05ea2a05 TT |
12750 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12751 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
81ecdfbb | 12752 | fi |
bec39cab | 12753 | |
05ea2a05 TT |
12754 | fi |
12755 | fi | |
12756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
12757 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12758 | if test $ac_cv_header_stdc = yes; then | |
81ecdfbb | 12759 | |
05ea2a05 TT |
12760 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
12761 | ||
12762 | fi | |
81ecdfbb | 12763 | |
05ea2a05 TT |
12764 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
12765 | # for constant arguments. Useless! | |
12766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
12767 | $as_echo_n "checking for working alloca.h... " >&6; } | |
12768 | if ${ac_cv_working_alloca_h+:} false; then : | |
12769 | $as_echo_n "(cached) " >&6 | |
12770 | else | |
12771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12772 | /* end confdefs.h. */ | |
12773 | #include <alloca.h> | |
7eb368b3 NR |
12774 | int |
12775 | main () | |
12776 | { | |
05ea2a05 TT |
12777 | char *p = (char *) alloca (2 * sizeof (int)); |
12778 | if (p) return 0; | |
7eb368b3 NR |
12779 | ; |
12780 | return 0; | |
12781 | } | |
12782 | _ACEOF | |
05ea2a05 TT |
12783 | if ac_fn_c_try_link "$LINENO"; then : |
12784 | ac_cv_working_alloca_h=yes | |
81ecdfbb | 12785 | else |
05ea2a05 | 12786 | ac_cv_working_alloca_h=no |
a9322a30 | 12787 | fi |
05ea2a05 TT |
12788 | rm -f core conftest.err conftest.$ac_objext \ |
12789 | conftest$ac_exeext conftest.$ac_ext | |
a9322a30 | 12790 | fi |
05ea2a05 TT |
12791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
12792 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
12793 | if test $ac_cv_working_alloca_h = yes; then | |
12794 | ||
12795 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
7eb368b3 | 12796 | |
7eb368b3 | 12797 | fi |
05ea2a05 TT |
12798 | |
12799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
12800 | $as_echo_n "checking for alloca... " >&6; } | |
12801 | if ${ac_cv_func_alloca_works+:} false; then : | |
12802 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12803 | else |
81ecdfbb | 12804 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12805 | /* end confdefs.h. */ |
05ea2a05 TT |
12806 | #ifdef __GNUC__ |
12807 | # define alloca __builtin_alloca | |
12808 | #else | |
12809 | # ifdef _MSC_VER | |
12810 | # include <malloc.h> | |
12811 | # define alloca _alloca | |
12812 | # else | |
12813 | # ifdef HAVE_ALLOCA_H | |
12814 | # include <alloca.h> | |
12815 | # else | |
12816 | # ifdef _AIX | |
12817 | #pragma alloca | |
12818 | # else | |
12819 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
12820 | void *alloca (size_t); | |
12821 | # endif | |
12822 | # endif | |
12823 | # endif | |
12824 | # endif | |
12825 | #endif | |
12826 | ||
d3ea6809 MM |
12827 | int |
12828 | main () | |
12829 | { | |
05ea2a05 TT |
12830 | char *p = (char *) alloca (1); |
12831 | if (p) return 0; | |
81ecdfbb RW |
12832 | ; |
12833 | return 0; | |
d3ea6809 MM |
12834 | } |
12835 | _ACEOF | |
05ea2a05 TT |
12836 | if ac_fn_c_try_link "$LINENO"; then : |
12837 | ac_cv_func_alloca_works=yes | |
d3ea6809 | 12838 | else |
05ea2a05 | 12839 | ac_cv_func_alloca_works=no |
a9322a30 | 12840 | fi |
05ea2a05 TT |
12841 | rm -f core conftest.err conftest.$ac_objext \ |
12842 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 12843 | fi |
05ea2a05 TT |
12844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
12845 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
81ecdfbb | 12846 | |
05ea2a05 | 12847 | if test $ac_cv_func_alloca_works = yes; then |
d3ea6809 | 12848 | |
05ea2a05 | 12849 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
d3ea6809 | 12850 | |
05ea2a05 TT |
12851 | else |
12852 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
12853 | # that cause trouble. Some versions do not even contain alloca or | |
12854 | # contain a buggy version. If you still want to use their alloca, | |
12855 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
d3ea6809 | 12856 | |
05ea2a05 | 12857 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
d0ac1c44 | 12858 | |
05ea2a05 | 12859 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
d0ac1c44 SM |
12860 | |
12861 | ||
05ea2a05 TT |
12862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
12863 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
12864 | if ${ac_cv_os_cray+:} false; then : | |
12865 | $as_echo_n "(cached) " >&6 | |
12866 | else | |
12867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12868 | /* end confdefs.h. */ | |
12869 | #if defined CRAY && ! defined CRAY2 | |
12870 | webecray | |
12871 | #else | |
12872 | wenotbecray | |
12873 | #endif | |
12874 | ||
12875 | _ACEOF | |
12876 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12877 | $EGREP "webecray" >/dev/null 2>&1; then : | |
12878 | ac_cv_os_cray=yes | |
12879 | else | |
12880 | ac_cv_os_cray=no | |
12881 | fi | |
12882 | rm -f conftest* | |
12883 | ||
12884 | fi | |
12885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
12886 | $as_echo "$ac_cv_os_cray" >&6; } | |
12887 | if test $ac_cv_os_cray = yes; then | |
12888 | for ac_func in _getb67 GETB67 getb67; do | |
12889 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12890 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12891 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
12892 | ||
12893 | cat >>confdefs.h <<_ACEOF | |
12894 | #define CRAY_STACKSEG_END $ac_func | |
12895 | _ACEOF | |
12896 | ||
12897 | break | |
12898 | fi | |
12899 | ||
12900 | done | |
12901 | fi | |
12902 | ||
12903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
12904 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
12905 | if ${ac_cv_c_stack_direction+:} false; then : | |
12906 | $as_echo_n "(cached) " >&6 | |
12907 | else | |
12908 | if test "$cross_compiling" = yes; then : | |
12909 | ac_cv_c_stack_direction=0 | |
12910 | else | |
12911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12912 | /* end confdefs.h. */ | |
12913 | $ac_includes_default | |
12914 | int | |
12915 | find_stack_direction (int *addr, int depth) | |
12916 | { | |
12917 | int dir, dummy = 0; | |
12918 | if (! addr) | |
12919 | addr = &dummy; | |
12920 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
12921 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
12922 | return dir + dummy; | |
12923 | } | |
12924 | ||
12925 | int | |
12926 | main (int argc, char **argv) | |
12927 | { | |
12928 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
12929 | } | |
12930 | _ACEOF | |
12931 | if ac_fn_c_try_run "$LINENO"; then : | |
12932 | ac_cv_c_stack_direction=1 | |
12933 | else | |
12934 | ac_cv_c_stack_direction=-1 | |
12935 | fi | |
12936 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12937 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12938 | fi | |
12939 | ||
12940 | fi | |
12941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
12942 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
12943 | cat >>confdefs.h <<_ACEOF | |
12944 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
12945 | _ACEOF | |
12946 | ||
12947 | ||
12948 | fi | |
12949 | ||
12950 | ||
12951 | WIN32APILIBS= | |
12952 | case ${host} in | |
12953 | *mingw32*) | |
12954 | ||
12955 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
12956 | ||
12957 | WIN32APILIBS="-lws2_32" | |
12958 | ;; | |
12959 | esac | |
12960 | ||
12961 | ||
12962 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
12963 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12964 | if ${am_cv_langinfo_codeset+:} false; then : | |
12965 | $as_echo_n "(cached) " >&6 | |
12966 | else | |
12967 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12968 | /* end confdefs.h. */ | |
12969 | #include <langinfo.h> | |
12970 | int | |
12971 | main () | |
12972 | { | |
12973 | char* cs = nl_langinfo(CODESET); | |
12974 | ; | |
12975 | return 0; | |
12976 | } | |
12977 | _ACEOF | |
12978 | if ac_fn_c_try_link "$LINENO"; then : | |
12979 | am_cv_langinfo_codeset=yes | |
12980 | else | |
12981 | am_cv_langinfo_codeset=no | |
12982 | fi | |
12983 | rm -f core conftest.err conftest.$ac_objext \ | |
12984 | conftest$ac_exeext conftest.$ac_ext | |
12985 | ||
12986 | fi | |
12987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
12988 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
12989 | if test $am_cv_langinfo_codeset = yes; then | |
12990 | ||
12991 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
12992 | ||
12993 | fi | |
12994 | ||
12995 | ||
8ae8e197 | 12996 | 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 poll.h sys/poll.h sys/select.h |
81ecdfbb RW |
12997 | do : |
12998 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
05ea2a05 | 12999 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
d0ac1c44 | 13000 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
bec39cab | 13001 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13002 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 13003 | _ACEOF |
b757528f | 13004 | |
b757528f | 13005 | fi |
bec39cab | 13006 | |
a9322a30 | 13007 | done |
a3828db0 | 13008 | |
d0ac1c44 SM |
13009 | |
13010 | ||
a9322a30 | 13011 | for ac_func in getpagesize |
81ecdfbb RW |
13012 | do : |
13013 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d0ac1c44 | 13014 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
bec39cab | 13015 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13016 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 13017 | _ACEOF |
bcb3dc3d | 13018 | |
bcb3dc3d MK |
13019 | fi |
13020 | done | |
13021 | ||
81ecdfbb RW |
13022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
13023 | $as_echo_n "checking for working mmap... " >&6; } | |
d0ac1c44 | 13024 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
81ecdfbb | 13025 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13026 | else |
81ecdfbb | 13027 | if test "$cross_compiling" = yes; then : |
a9322a30 | 13028 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 13029 | else |
81ecdfbb | 13030 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13031 | /* end confdefs.h. */ |
a9322a30 TT |
13032 | $ac_includes_default |
13033 | /* malloc might have been renamed as rpl_malloc. */ | |
13034 | #undef malloc | |
bec39cab | 13035 | |
a9322a30 TT |
13036 | /* Thanks to Mike Haertel and Jim Avera for this test. |
13037 | Here is a matrix of mmap possibilities: | |
13038 | mmap private not fixed | |
13039 | mmap private fixed at somewhere currently unmapped | |
13040 | mmap private fixed at somewhere already mapped | |
13041 | mmap shared not fixed | |
13042 | mmap shared fixed at somewhere currently unmapped | |
13043 | mmap shared fixed at somewhere already mapped | |
13044 | For private mappings, we should verify that changes cannot be read() | |
13045 | back from the file, nor mmap's back from the file at a different | |
13046 | address. (There have been systems where private was not correctly | |
13047 | implemented like the infamous i386 svr4.0, and systems where the | |
13048 | VM page cache was not coherent with the file system buffer cache | |
13049 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
13050 | For shared mappings, we should conversely verify that changes get | |
13051 | propagated back to all the places they're supposed to be. | |
bec39cab | 13052 | |
a9322a30 TT |
13053 | Grep wants private fixed already mapped. |
13054 | The main things grep needs to know about mmap are: | |
13055 | * does it exist and is it safe to write into the mmap'd area | |
13056 | * how to use it (BSD variants) */ | |
8b9cf735 | 13057 | |
a9322a30 TT |
13058 | #include <fcntl.h> |
13059 | #include <sys/mman.h> | |
8b9cf735 | 13060 | |
81ecdfbb | 13061 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 13062 | char *malloc (); |
a3828db0 MK |
13063 | #endif |
13064 | ||
a9322a30 | 13065 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 13066 | #ifndef HAVE_GETPAGESIZE |
a9322a30 TT |
13067 | # ifdef _SC_PAGESIZE |
13068 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
13069 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 13070 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
13071 | # include <sys/param.h> |
13072 | # ifdef EXEC_PAGESIZE | |
13073 | # define getpagesize() EXEC_PAGESIZE | |
13074 | # else /* no EXEC_PAGESIZE */ | |
13075 | # ifdef NBPG | |
13076 | # define getpagesize() NBPG * CLSIZE | |
13077 | # ifndef CLSIZE | |
13078 | # define CLSIZE 1 | |
13079 | # endif /* no CLSIZE */ | |
13080 | # else /* no NBPG */ | |
13081 | # ifdef NBPC | |
13082 | # define getpagesize() NBPC | |
13083 | # else /* no NBPC */ | |
13084 | # ifdef PAGESIZE | |
13085 | # define getpagesize() PAGESIZE | |
13086 | # endif /* PAGESIZE */ | |
13087 | # endif /* no NBPC */ | |
13088 | # endif /* no NBPG */ | |
13089 | # endif /* no EXEC_PAGESIZE */ | |
13090 | # else /* no HAVE_SYS_PARAM_H */ | |
13091 | # define getpagesize() 8192 /* punt totally */ | |
13092 | # endif /* no HAVE_SYS_PARAM_H */ | |
13093 | # endif /* no _SC_PAGESIZE */ | |
13094 | ||
13095 | #endif /* no HAVE_GETPAGESIZE */ | |
13096 | ||
bec39cab AC |
13097 | int |
13098 | main () | |
13099 | { | |
a9322a30 | 13100 | char *data, *data2, *data3; |
d0ac1c44 | 13101 | const char *cdata2; |
a9322a30 | 13102 | int i, pagesize; |
d0ac1c44 | 13103 | int fd, fd2; |
a9322a30 TT |
13104 | |
13105 | pagesize = getpagesize (); | |
13106 | ||
13107 | /* First, make a file with some known garbage in it. */ | |
13108 | data = (char *) malloc (pagesize); | |
13109 | if (!data) | |
81ecdfbb | 13110 | return 1; |
a9322a30 TT |
13111 | for (i = 0; i < pagesize; ++i) |
13112 | *(data + i) = rand (); | |
13113 | umask (0); | |
13114 | fd = creat ("conftest.mmap", 0600); | |
13115 | if (fd < 0) | |
d0ac1c44 | 13116 | return 2; |
a9322a30 | 13117 | if (write (fd, data, pagesize) != pagesize) |
d0ac1c44 | 13118 | return 3; |
a9322a30 TT |
13119 | close (fd); |
13120 | ||
d0ac1c44 SM |
13121 | /* Next, check that the tail of a page is zero-filled. File must have |
13122 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
13123 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
13124 | if (fd2 < 0) | |
13125 | return 4; | |
13126 | cdata2 = ""; | |
13127 | if (write (fd2, cdata2, 1) != 1) | |
13128 | return 5; | |
13129 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
13130 | if (data2 == MAP_FAILED) | |
13131 | return 6; | |
13132 | for (i = 0; i < pagesize; ++i) | |
13133 | if (*(data2 + i)) | |
13134 | return 7; | |
13135 | close (fd2); | |
13136 | if (munmap (data2, pagesize)) | |
13137 | return 8; | |
13138 | ||
a9322a30 TT |
13139 | /* Next, try to mmap the file at a fixed address which already has |
13140 | something else allocated at it. If we can, also make sure that | |
13141 | we see the same garbage. */ | |
13142 | fd = open ("conftest.mmap", O_RDWR); | |
13143 | if (fd < 0) | |
d0ac1c44 | 13144 | return 9; |
a9322a30 TT |
13145 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
13146 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
d0ac1c44 | 13147 | return 10; |
a9322a30 TT |
13148 | for (i = 0; i < pagesize; ++i) |
13149 | if (*(data + i) != *(data2 + i)) | |
d0ac1c44 | 13150 | return 11; |
a9322a30 TT |
13151 | |
13152 | /* Finally, make sure that changes to the mapped area do not | |
13153 | percolate back to the file as seen by read(). (This is a bug on | |
13154 | some variants of i386 svr4.0.) */ | |
13155 | for (i = 0; i < pagesize; ++i) | |
13156 | *(data2 + i) = *(data2 + i) + 1; | |
13157 | data3 = (char *) malloc (pagesize); | |
13158 | if (!data3) | |
d0ac1c44 | 13159 | return 12; |
a9322a30 | 13160 | if (read (fd, data3, pagesize) != pagesize) |
d0ac1c44 | 13161 | return 13; |
a9322a30 TT |
13162 | for (i = 0; i < pagesize; ++i) |
13163 | if (*(data + i) != *(data3 + i)) | |
d0ac1c44 | 13164 | return 14; |
a9322a30 | 13165 | close (fd); |
81ecdfbb | 13166 | return 0; |
bec39cab AC |
13167 | } |
13168 | _ACEOF | |
81ecdfbb | 13169 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13170 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 13171 | else |
81ecdfbb | 13172 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 13173 | fi |
81ecdfbb RW |
13174 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13175 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 13176 | fi |
81ecdfbb | 13177 | |
a9322a30 | 13178 | fi |
81ecdfbb RW |
13179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
13180 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
13181 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
13182 | ||
81ecdfbb | 13183 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 13184 | |
086ec9eb | 13185 | fi |
d0ac1c44 | 13186 | rm -f conftest.mmap conftest.txt |
a3828db0 | 13187 | |
05ea2a05 | 13188 | for ac_header in vfork.h |
81ecdfbb RW |
13189 | do : |
13190 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 13191 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
a3828db0 | 13192 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13193 | #define HAVE_VFORK_H 1 |
bec39cab | 13194 | _ACEOF |
c906108c SS |
13195 | |
13196 | fi | |
a9322a30 | 13197 | |
a3828db0 | 13198 | done |
c906108c | 13199 | |
a9322a30 | 13200 | for ac_func in fork vfork |
81ecdfbb RW |
13201 | do : |
13202 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13203 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13204 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
a3828db0 | 13205 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13206 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 13207 | _ACEOF |
b83266a0 | 13208 | |
97bf5e38 | 13209 | fi |
a3828db0 | 13210 | done |
b83266a0 | 13211 | |
a9322a30 | 13212 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
13213 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
13214 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 13215 | if ${ac_cv_func_fork_works+:} false; then : |
81ecdfbb | 13216 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13217 | else |
81ecdfbb | 13218 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13219 | ac_cv_func_fork_works=cross |
13220 | else | |
81ecdfbb RW |
13221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13222 | /* end confdefs.h. */ | |
13223 | $ac_includes_default | |
13224 | int | |
13225 | main () | |
13226 | { | |
13227 | ||
13228 | /* By Ruediger Kuhlmann. */ | |
13229 | return fork () < 0; | |
13230 | ||
13231 | ; | |
13232 | return 0; | |
13233 | } | |
a9322a30 | 13234 | _ACEOF |
81ecdfbb | 13235 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13236 | ac_cv_func_fork_works=yes |
13237 | else | |
81ecdfbb | 13238 | ac_cv_func_fork_works=no |
a9322a30 | 13239 | fi |
81ecdfbb RW |
13240 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13241 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13242 | fi |
81ecdfbb | 13243 | |
a9322a30 | 13244 | fi |
81ecdfbb RW |
13245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
13246 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
13247 | |
13248 | else | |
13249 | ac_cv_func_fork_works=$ac_cv_func_fork | |
13250 | fi | |
13251 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13252 | case $host in | |
13253 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13254 | # Override, as these systems have only a dummy fork() stub | |
13255 | ac_cv_func_fork_works=no | |
13256 | ;; | |
13257 | *) | |
13258 | ac_cv_func_fork_works=yes | |
13259 | ;; | |
13260 | esac | |
81ecdfbb RW |
13261 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
13262 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13263 | fi |
13264 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
13265 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
13266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
13267 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 13268 | if ${ac_cv_func_vfork_works+:} false; then : |
81ecdfbb | 13269 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13270 | else |
81ecdfbb | 13271 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13272 | ac_cv_func_vfork_works=cross |
13273 | else | |
81ecdfbb | 13274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
13275 | /* end confdefs.h. */ |
13276 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 13277 | $ac_includes_default |
a9322a30 | 13278 | #include <sys/wait.h> |
81ecdfbb | 13279 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
13280 | # include <vfork.h> |
13281 | #endif | |
13282 | /* On some sparc systems, changes by the child to local and incoming | |
13283 | argument registers are propagated back to the parent. The compiler | |
13284 | is told about this with #include <vfork.h>, but some compilers | |
13285 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13286 | static variable whose address is put into a register that is | |
13287 | clobbered by the vfork. */ | |
13288 | static void | |
13289 | #ifdef __cplusplus | |
13290 | sparc_address_test (int arg) | |
13291 | # else | |
13292 | sparc_address_test (arg) int arg; | |
13293 | #endif | |
13294 | { | |
13295 | static pid_t child; | |
13296 | if (!child) { | |
13297 | child = vfork (); | |
13298 | if (child < 0) { | |
13299 | perror ("vfork"); | |
13300 | _exit(2); | |
13301 | } | |
13302 | if (!child) { | |
13303 | arg = getpid(); | |
13304 | write(-1, "", 0); | |
13305 | _exit (arg); | |
13306 | } | |
13307 | } | |
13308 | } | |
13309 | ||
13310 | int | |
13311 | main () | |
13312 | { | |
13313 | pid_t parent = getpid (); | |
13314 | pid_t child; | |
13315 | ||
13316 | sparc_address_test (0); | |
13317 | ||
13318 | child = vfork (); | |
13319 | ||
13320 | if (child == 0) { | |
13321 | /* Here is another test for sparc vfork register problems. This | |
13322 | test uses lots of local variables, at least as many local | |
13323 | variables as main has allocated so far including compiler | |
13324 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13325 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13326 | reuse the register of parent for one of the local variables, | |
13327 | since it will think that parent can't possibly be used any more | |
13328 | in this routine. Assigning to the local variable will thus | |
13329 | munge parent in the parent process. */ | |
13330 | pid_t | |
13331 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13332 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13333 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13334 | use the same hardware register for all 8 local variables. */ | |
13335 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13336 | || p != p5 || p != p6 || p != p7) | |
13337 | _exit(1); | |
13338 | ||
13339 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
13340 | from child file descriptors. If the child closes a descriptor | |
13341 | before it execs or exits, this munges the parent's descriptor | |
13342 | as well. Test for this by closing stdout in the child. */ | |
13343 | _exit(close(fileno(stdout)) != 0); | |
13344 | } else { | |
13345 | int status; | |
13346 | struct stat st; | |
13347 | ||
13348 | while (wait(&status) != child) | |
13349 | ; | |
81ecdfbb | 13350 | return ( |
a9322a30 TT |
13351 | /* Was there some problem with vforking? */ |
13352 | child < 0 | |
13353 | ||
13354 | /* Did the child fail? (This shouldn't happen.) */ | |
13355 | || status | |
13356 | ||
13357 | /* Did the vfork/compiler bug occur? */ | |
13358 | || parent != getpid() | |
13359 | ||
13360 | /* Did the file descriptor bug occur? */ | |
13361 | || fstat(fileno(stdout), &st) != 0 | |
13362 | ); | |
13363 | } | |
13364 | } | |
13365 | _ACEOF | |
81ecdfbb | 13366 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13367 | ac_cv_func_vfork_works=yes |
13368 | else | |
81ecdfbb | 13369 | ac_cv_func_vfork_works=no |
a9322a30 | 13370 | fi |
81ecdfbb RW |
13371 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13372 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13373 | fi |
81ecdfbb | 13374 | |
a9322a30 | 13375 | fi |
81ecdfbb RW |
13376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
13377 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
13378 | |
13379 | fi; | |
13380 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13381 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
13382 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
13383 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13384 | fi |
13385 | ||
13386 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
13387 | ||
81ecdfbb | 13388 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
13389 | |
13390 | else | |
13391 | ||
81ecdfbb | 13392 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
13393 | |
13394 | fi | |
13395 | if test "x$ac_cv_func_fork_works" = xyes; then | |
13396 | ||
81ecdfbb | 13397 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
13398 | |
13399 | fi | |
13400 | ||
8ae8e197 | 13401 | for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \ |
05ea2a05 TT |
13402 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
13403 | setpgid setpgrp getrusage getauxval | |
81ecdfbb RW |
13404 | do : |
13405 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13406 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13407 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
6c7a06a3 | 13408 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13409 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
13410 | _ACEOF |
13411 | ||
13412 | fi | |
13413 | done | |
13414 | ||
13415 | ||
05ea2a05 TT |
13416 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
13417 | " | |
13418 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : | |
13419 | ac_have_decl=1 | |
6c7a06a3 | 13420 | else |
05ea2a05 TT |
13421 | ac_have_decl=0 |
13422 | fi | |
13423 | ||
13424 | cat >>confdefs.h <<_ACEOF | |
13425 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl | |
13426 | _ACEOF | |
13427 | ||
13428 | ||
13429 | if test "$cross_compiling" = yes; then : | |
81ecdfbb | 13430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 | 13431 | /* end confdefs.h. */ |
05ea2a05 | 13432 | #include <sys/personality.h> |
6c7a06a3 TT |
13433 | int |
13434 | main () | |
13435 | { | |
05ea2a05 TT |
13436 | |
13437 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
13438 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
13439 | # endif | |
13440 | /* Test the flag could be set and stays set. */ | |
13441 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
13442 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
13443 | return 1 | |
bec39cab AC |
13444 | ; |
13445 | return 0; | |
13446 | } | |
13447 | _ACEOF | |
81ecdfbb | 13448 | if ac_fn_c_try_link "$LINENO"; then : |
05ea2a05 | 13449 | have_personality=true |
a4db0f07 | 13450 | else |
05ea2a05 | 13451 | have_personality=false |
a4db0f07 | 13452 | fi |
81ecdfbb RW |
13453 | rm -f core conftest.err conftest.$ac_objext \ |
13454 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 TT |
13455 | else |
13456 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13457 | /* end confdefs.h. */ | |
13458 | #include <sys/personality.h> | |
13459 | int | |
13460 | main () | |
13461 | { | |
6c7a06a3 | 13462 | |
05ea2a05 TT |
13463 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE |
13464 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
13465 | # endif | |
13466 | /* Test the flag could be set and stays set. */ | |
13467 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
13468 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
13469 | return 1 | |
13470 | ; | |
13471 | return 0; | |
13472 | } | |
13473 | _ACEOF | |
13474 | if ac_fn_c_try_run "$LINENO"; then : | |
13475 | have_personality=true | |
13476 | else | |
13477 | have_personality=false | |
13478 | fi | |
13479 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13480 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a4db0f07 | 13481 | fi |
6c7a06a3 | 13482 | |
05ea2a05 TT |
13483 | if $have_personality |
13484 | then | |
a4db0f07 | 13485 | |
05ea2a05 | 13486 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
c906108c | 13487 | |
05ea2a05 | 13488 | fi |
d0ac1c44 | 13489 | |
05ea2a05 TT |
13490 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
13491 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
13492 | ac_have_decl=1 | |
d0ac1c44 | 13493 | else |
05ea2a05 TT |
13494 | ac_have_decl=0 |
13495 | fi | |
d0ac1c44 SM |
13496 | |
13497 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 TT |
13498 | #define HAVE_DECL_STRSTR $ac_have_decl |
13499 | _ACEOF | |
13500 | ||
13501 | ||
13502 | # ----------------------- # | |
13503 | # Checks for structures. # | |
13504 | # ----------------------- # | |
13505 | ||
13506 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
13507 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
13508 | ||
13509 | cat >>confdefs.h <<_ACEOF | |
13510 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
d0ac1c44 SM |
13511 | _ACEOF |
13512 | ||
05ea2a05 | 13513 | |
d0ac1c44 | 13514 | fi |
05ea2a05 TT |
13515 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
13516 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
d0ac1c44 | 13517 | |
05ea2a05 TT |
13518 | cat >>confdefs.h <<_ACEOF |
13519 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
13520 | _ACEOF | |
13521 | ||
13522 | ||
13523 | fi | |
13524 | ||
13525 | ||
13526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 | |
13527 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
13528 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
5e030278 TT |
13529 | $as_echo_n "(cached) " >&6 |
13530 | else | |
05ea2a05 TT |
13531 | ac_func_search_save_LIBS=$LIBS |
13532 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13533 | /* end confdefs.h. */ |
3266f10b | 13534 | |
05ea2a05 TT |
13535 | /* Override any GCC internal prototype to avoid an error. |
13536 | Use char because int might match the return type of a GCC | |
13537 | builtin and then its argument prototype would still apply. */ | |
13538 | #ifdef __cplusplus | |
13539 | extern "C" | |
13540 | #endif | |
13541 | char kinfo_getfile (); | |
3266f10b TT |
13542 | int |
13543 | main () | |
13544 | { | |
05ea2a05 | 13545 | return kinfo_getfile (); |
3266f10b TT |
13546 | ; |
13547 | return 0; | |
13548 | } | |
13549 | _ACEOF | |
05ea2a05 TT |
13550 | for ac_lib in '' util util-freebsd; do |
13551 | if test -z "$ac_lib"; then | |
13552 | ac_res="none required" | |
13553 | else | |
13554 | ac_res=-l$ac_lib | |
13555 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13556 | fi | |
13557 | if ac_fn_c_try_link "$LINENO"; then : | |
13558 | ac_cv_search_kinfo_getfile=$ac_res | |
3266f10b | 13559 | fi |
05ea2a05 TT |
13560 | rm -f core conftest.err conftest.$ac_objext \ |
13561 | conftest$ac_exeext | |
13562 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
13563 | break | |
13564 | fi | |
13565 | done | |
13566 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
3266f10b TT |
13567 | |
13568 | else | |
05ea2a05 | 13569 | ac_cv_search_kinfo_getfile=no |
3266f10b | 13570 | fi |
05ea2a05 TT |
13571 | rm conftest.$ac_ext |
13572 | LIBS=$ac_func_search_save_LIBS | |
13573 | fi | |
13574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
13575 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
13576 | ac_res=$ac_cv_search_kinfo_getfile | |
13577 | if test "$ac_res" != no; then : | |
13578 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13579 | ||
13580 | $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h | |
3266f10b TT |
13581 | |
13582 | fi | |
13583 | ||
3266f10b | 13584 | |
05ea2a05 TT |
13585 | # Check for std::thread. This does not work on some platforms, like |
13586 | # mingw and DJGPP. | |
13587 | ac_ext=cpp | |
13588 | ac_cpp='$CXXCPP $CPPFLAGS' | |
13589 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13590 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13591 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3266f10b | 13592 | |
3266f10b | 13593 | |
3266f10b | 13594 | |
3266f10b | 13595 | |
3266f10b | 13596 | |
05ea2a05 TT |
13597 | ac_ext=c |
13598 | ac_cpp='$CPP $CPPFLAGS' | |
13599 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13600 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13601 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3266f10b | 13602 | |
05ea2a05 | 13603 | ax_pthread_ok=no |
3266f10b | 13604 | |
05ea2a05 TT |
13605 | # We used to check for pthread.h first, but this fails if pthread.h |
13606 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
13607 | # It gets checked for in the link test anyway. | |
3266f10b | 13608 | |
05ea2a05 TT |
13609 | # First of all, check if the user has set any of the PTHREAD_LIBS, |
13610 | # etcetera environment variables, and if threads linking works using | |
13611 | # them: | |
13612 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
13613 | ax_pthread_save_CC="$CC" | |
13614 | ax_pthread_save_CFLAGS="$CFLAGS" | |
13615 | ax_pthread_save_LIBS="$LIBS" | |
13616 | if test "x$PTHREAD_CC" != "x"; then : | |
13617 | CC="$PTHREAD_CC" | |
3266f10b | 13618 | fi |
05ea2a05 TT |
13619 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
13620 | LIBS="$PTHREAD_LIBS $LIBS" | |
13621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
13622 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
13623 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13624 | /* end confdefs.h. */ |
05ea2a05 TT |
13625 | |
13626 | /* Override any GCC internal prototype to avoid an error. | |
13627 | Use char because int might match the return type of a GCC | |
13628 | builtin and then its argument prototype would still apply. */ | |
13629 | #ifdef __cplusplus | |
13630 | extern "C" | |
13631 | #endif | |
13632 | char pthread_join (); | |
3266f10b TT |
13633 | int |
13634 | main () | |
13635 | { | |
05ea2a05 | 13636 | return pthread_join (); |
3266f10b TT |
13637 | ; |
13638 | return 0; | |
13639 | } | |
13640 | _ACEOF | |
13641 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 | 13642 | ax_pthread_ok=yes |
3266f10b TT |
13643 | fi |
13644 | rm -f core conftest.err conftest.$ac_objext \ | |
13645 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 TT |
13646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 |
13647 | $as_echo "$ax_pthread_ok" >&6; } | |
13648 | if test "x$ax_pthread_ok" = "xno"; then | |
13649 | PTHREAD_LIBS="" | |
13650 | PTHREAD_CFLAGS="" | |
13651 | fi | |
13652 | CC="$ax_pthread_save_CC" | |
13653 | CFLAGS="$ax_pthread_save_CFLAGS" | |
13654 | LIBS="$ax_pthread_save_LIBS" | |
3266f10b | 13655 | fi |
3266f10b | 13656 | |
05ea2a05 TT |
13657 | # We must check for the threads library under a number of different |
13658 | # names; the ordering is very important because some systems | |
13659 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
13660 | # libraries is broken (non-POSIX). | |
3266f10b | 13661 | |
05ea2a05 TT |
13662 | # Create a list of thread flags to try. Items starting with a "-" are |
13663 | # C compiler flags, and other items are library names, except for "none" | |
13664 | # which indicates that we try without any flags at all, and "pthread-config" | |
13665 | # which is a program returning the flags for the Pth emulation library. | |
3266f10b | 13666 | |
05ea2a05 | 13667 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
3266f10b | 13668 | |
05ea2a05 TT |
13669 | # The ordering *is* (sometimes) important. Some notes on the |
13670 | # individual items follow: | |
3266f10b | 13671 | |
05ea2a05 TT |
13672 | # pthreads: AIX (must check this before -lpthread) |
13673 | # none: in case threads are in libc; should be tried before -Kthread and | |
13674 | # other compiler flags to prevent continual compiler warnings | |
13675 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
13676 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
13677 | # (Note: HP C rejects this with "bad form for `-t' option") | |
13678 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
13679 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
13680 | # doesn't hurt to check since this sometimes defines pthreads and | |
13681 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
13682 | # is present but should not be used directly; and before -mthreads, | |
13683 | # because the compiler interprets this as "-mt" + "-hreads") | |
13684 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
13685 | # pthread: Linux, etcetera | |
13686 | # --thread-safe: KAI C++ | |
13687 | # pthread-config: use pthread-config program (for GNU Pth library) | |
3266f10b | 13688 | |
05ea2a05 | 13689 | case $host_os in |
3266f10b | 13690 | |
05ea2a05 | 13691 | freebsd*) |
3266f10b | 13692 | |
05ea2a05 TT |
13693 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
13694 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
3266f10b | 13695 | |
05ea2a05 TT |
13696 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" |
13697 | ;; | |
3266f10b | 13698 | |
05ea2a05 | 13699 | hpux*) |
3266f10b | 13700 | |
05ea2a05 TT |
13701 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable |
13702 | # multi-threading and also sets -lpthread." | |
13703 | ||
13704 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
13705 | ;; | |
13706 | ||
13707 | openedition*) | |
13708 | ||
13709 | # IBM z/OS requires a feature-test macro to be defined in order to | |
13710 | # enable POSIX threads at all, so give the user a hint if this is | |
13711 | # not set. (We don't define these ourselves, as they can affect | |
13712 | # other portions of the system API in unpredictable ways.) | |
13713 | ||
13714 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13715 | /* end confdefs.h. */ |
05ea2a05 TT |
13716 | |
13717 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
13718 | AX_PTHREAD_ZOS_MISSING | |
13719 | # endif | |
3266f10b TT |
13720 | |
13721 | _ACEOF | |
13722 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
05ea2a05 TT |
13723 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : |
13724 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
13725 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
3266f10b TT |
13726 | fi |
13727 | rm -f conftest* | |
13728 | ||
05ea2a05 | 13729 | ;; |
3266f10b | 13730 | |
05ea2a05 | 13731 | solaris*) |
3266f10b | 13732 | |
05ea2a05 TT |
13733 | # On Solaris (at least, for some versions), libc contains stubbed |
13734 | # (non-functional) versions of the pthreads routines, so link-based | |
13735 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
13736 | # pthread_cleanup_push, or rather a function called by this macro, | |
13737 | # so we could check for that, but who knows whether they'll stub | |
13738 | # that too in a future libc.) So we'll check first for the | |
13739 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
13740 | ||
13741 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
13742 | ;; | |
13743 | esac | |
13744 | ||
13745 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
13746 | ||
13747 | if test "x$GCC" = "xyes"; then : | |
13748 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
3266f10b TT |
13749 | fi |
13750 | ||
05ea2a05 TT |
13751 | # The presence of a feature test macro requesting re-entrant function |
13752 | # definitions is, on some systems, a strong hint that pthreads support is | |
13753 | # correctly enabled | |
13754 | ||
13755 | case $host_os in | |
13756 | darwin* | hpux* | linux* | osf* | solaris*) | |
13757 | ax_pthread_check_macro="_REENTRANT" | |
13758 | ;; | |
13759 | ||
13760 | aix*) | |
13761 | ax_pthread_check_macro="_THREAD_SAFE" | |
13762 | ;; | |
13763 | ||
13764 | *) | |
13765 | ax_pthread_check_macro="--" | |
13766 | ;; | |
13767 | esac | |
13768 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
13769 | ax_pthread_check_cond=0 | |
13770 | else | |
13771 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
3266f10b TT |
13772 | fi |
13773 | ||
05ea2a05 TT |
13774 | # Are we compiling with Clang? |
13775 | ||
13776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
13777 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
13778 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
3266f10b TT |
13779 | $as_echo_n "(cached) " >&6 |
13780 | else | |
05ea2a05 TT |
13781 | ax_cv_PTHREAD_CLANG=no |
13782 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
13783 | if test "x$GCC" = "xyes"; then | |
13784 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13785 | /* end confdefs.h. */ |
05ea2a05 TT |
13786 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ |
13787 | # if defined(__clang__) && defined(__llvm__) | |
13788 | AX_PTHREAD_CC_IS_CLANG | |
13789 | # endif | |
3266f10b | 13790 | |
3266f10b | 13791 | _ACEOF |
05ea2a05 TT |
13792 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13793 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
13794 | ax_cv_PTHREAD_CLANG=yes | |
3266f10b | 13795 | fi |
05ea2a05 TT |
13796 | rm -f conftest* |
13797 | ||
13798 | fi | |
3266f10b TT |
13799 | |
13800 | fi | |
05ea2a05 TT |
13801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 |
13802 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
13803 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
3266f10b | 13804 | |
05ea2a05 | 13805 | ax_pthread_clang_warning=no |
3266f10b | 13806 | |
05ea2a05 TT |
13807 | # Clang needs special handling, because older versions handle the -pthread |
13808 | # option in a rather... idiosyncratic way | |
3266f10b | 13809 | |
05ea2a05 | 13810 | if test "x$ax_pthread_clang" = "xyes"; then |
3266f10b | 13811 | |
05ea2a05 | 13812 | # Clang takes -pthread; it has never supported any other flag |
b2ceabe8 | 13813 | |
05ea2a05 TT |
13814 | # (Note 1: This will need to be revisited if a system that Clang |
13815 | # supports has POSIX threads in a separate library. This tends not | |
13816 | # to be the way of modern systems, but it's conceivable.) | |
b2ceabe8 | 13817 | |
05ea2a05 TT |
13818 | # (Note 2: On some systems, notably Darwin, -pthread is not needed |
13819 | # to get POSIX threads support; the API is always present and | |
13820 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
13821 | # -pthread does define _REENTRANT, and while the Darwin headers | |
13822 | # ignore this macro, third-party headers might not.) | |
b2ceabe8 | 13823 | |
05ea2a05 TT |
13824 | PTHREAD_CFLAGS="-pthread" |
13825 | PTHREAD_LIBS= | |
3266f10b | 13826 | |
05ea2a05 TT |
13827 | ax_pthread_ok=yes |
13828 | ||
13829 | # However, older versions of Clang make a point of warning the user | |
13830 | # that, in an invocation where only linking and no compilation is | |
13831 | # taking place, the -pthread option has no effect ("argument unused | |
13832 | # during compilation"). They expect -pthread to be passed in only | |
13833 | # when source code is being compiled. | |
13834 | # | |
13835 | # Problem is, this is at odds with the way Automake and most other | |
13836 | # C build frameworks function, which is that the same flags used in | |
13837 | # compilation (CFLAGS) are also used in linking. Many systems | |
13838 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
13839 | # support, and in fact it is often not straightforward to specify a | |
13840 | # flag that is used only in the compilation phase and not in | |
13841 | # linking. Such a scenario is extremely rare in practice. | |
13842 | # | |
13843 | # Even though use of the -pthread flag in linking would only print | |
13844 | # a warning, this can be a nuisance for well-run software projects | |
13845 | # that build with -Werror. So if the active version of Clang has | |
13846 | # this misfeature, we search for an option to squash it. | |
13847 | ||
13848 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
13849 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
13850 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
13851 | $as_echo_n "(cached) " >&6 | |
13852 | else | |
13853 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
13854 | # Create an alternate version of $ac_link that compiles and | |
13855 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
13856 | # (.c -> exe), because the warning occurs only in the second | |
13857 | # step | |
13858 | ax_pthread_save_ac_link="$ac_link" | |
13859 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
13860 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
13861 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
13862 | ax_pthread_save_CFLAGS="$CFLAGS" | |
13863 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
13864 | if test "x$ax_pthread_try" = "xunknown"; then : | |
13865 | break | |
13866 | fi | |
13867 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
13868 | ac_link="$ax_pthread_save_ac_link" | |
13869 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13870 | /* end confdefs.h. */ | |
13871 | int main(void){return 0;} | |
3266f10b TT |
13872 | _ACEOF |
13873 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
13874 | ac_link="$ax_pthread_2step_ac_link" |
13875 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13876 | /* end confdefs.h. */ | |
13877 | int main(void){return 0;} | |
13878 | _ACEOF | |
13879 | if ac_fn_c_try_link "$LINENO"; then : | |
13880 | break | |
3266f10b TT |
13881 | fi |
13882 | rm -f core conftest.err conftest.$ac_objext \ | |
13883 | conftest$ac_exeext conftest.$ac_ext | |
13884 | ||
13885 | fi | |
05ea2a05 TT |
13886 | rm -f core conftest.err conftest.$ac_objext \ |
13887 | conftest$ac_exeext conftest.$ac_ext | |
13888 | done | |
13889 | ac_link="$ax_pthread_save_ac_link" | |
13890 | CFLAGS="$ax_pthread_save_CFLAGS" | |
13891 | if test "x$ax_pthread_try" = "x"; then : | |
13892 | ax_pthread_try=no | |
13893 | fi | |
13894 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
3266f10b | 13895 | |
05ea2a05 TT |
13896 | fi |
13897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
13898 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
3266f10b | 13899 | |
05ea2a05 TT |
13900 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in |
13901 | no | unknown) ;; | |
13902 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
13903 | esac | |
3266f10b | 13904 | |
05ea2a05 | 13905 | fi # $ax_pthread_clang = yes |
3266f10b | 13906 | |
05ea2a05 TT |
13907 | if test "x$ax_pthread_ok" = "xno"; then |
13908 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
3266f10b | 13909 | |
05ea2a05 TT |
13910 | case $ax_pthread_try_flag in |
13911 | none) | |
13912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
13913 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
13914 | ;; | |
3266f10b | 13915 | |
05ea2a05 TT |
13916 | -mt,pthread) |
13917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
13918 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
13919 | PTHREAD_CFLAGS="-mt" | |
13920 | PTHREAD_LIBS="-lpthread" | |
13921 | ;; | |
3266f10b | 13922 | |
05ea2a05 TT |
13923 | -*) |
13924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
13925 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
13926 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
13927 | ;; | |
3266f10b | 13928 | |
05ea2a05 TT |
13929 | pthread-config) |
13930 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
13931 | set dummy pthread-config; ac_word=$2 | |
13932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
13933 | $as_echo_n "checking for $ac_word... " >&6; } | |
13934 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
13935 | $as_echo_n "(cached) " >&6 | |
13936 | else | |
13937 | if test -n "$ax_pthread_config"; then | |
13938 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
13939 | else | |
13940 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13941 | for as_dir in $PATH | |
13942 | do | |
13943 | IFS=$as_save_IFS | |
13944 | test -z "$as_dir" && as_dir=. | |
13945 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13946 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13947 | ac_cv_prog_ax_pthread_config="yes" | |
13948 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13949 | break 2 | |
13950 | fi | |
3266f10b | 13951 | done |
05ea2a05 TT |
13952 | done |
13953 | IFS=$as_save_IFS | |
3266f10b | 13954 | |
05ea2a05 TT |
13955 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" |
13956 | fi | |
13957 | fi | |
13958 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
13959 | if test -n "$ax_pthread_config"; then | |
13960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
13961 | $as_echo "$ax_pthread_config" >&6; } | |
3266f10b | 13962 | else |
05ea2a05 TT |
13963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13964 | $as_echo "no" >&6; } | |
3266f10b TT |
13965 | fi |
13966 | ||
5e030278 | 13967 | |
05ea2a05 TT |
13968 | if test "x$ax_pthread_config" = "xno"; then : |
13969 | continue | |
13970 | fi | |
13971 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
13972 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
13973 | ;; | |
5e030278 | 13974 | |
05ea2a05 TT |
13975 | *) |
13976 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
13977 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
13978 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
13979 | ;; | |
13980 | esac | |
5e030278 | 13981 | |
5e030278 TT |
13982 | ax_pthread_save_CFLAGS="$CFLAGS" |
13983 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
13984 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
13985 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
13986 | |
13987 | # Check for various functions. We must include pthread.h, | |
13988 | # since some functions may be macros. (On the Sequent, we | |
13989 | # need a special flag -Kthread to make this header compile.) | |
13990 | # We check for pthread_join because it is in -lpthread on IRIX | |
13991 | # while pthread_create is in libc. We check for pthread_attr_init | |
13992 | # due to DEC craziness with -lpthreads. We check for | |
13993 | # pthread_cleanup_push because it is one of the few pthread | |
13994 | # functions on Solaris that doesn't have a non-functional libc stub. | |
13995 | # We try pthread_create on general principles. | |
13996 | ||
5e030278 TT |
13997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13998 | /* end confdefs.h. */ | |
05ea2a05 TT |
13999 | #include <pthread.h> |
14000 | # if $ax_pthread_check_cond | |
14001 | # error "$ax_pthread_check_macro must be defined" | |
14002 | # endif | |
14003 | static void routine(void *a) { a = 0; } | |
14004 | static void *start_routine(void *a) { return a; } | |
5e030278 TT |
14005 | int |
14006 | main () | |
14007 | { | |
05ea2a05 TT |
14008 | pthread_t th; pthread_attr_t attr; |
14009 | pthread_create(&th, 0, start_routine, 0); | |
14010 | pthread_join(th, 0); | |
14011 | pthread_attr_init(&attr); | |
14012 | pthread_cleanup_push(routine, 0); | |
14013 | pthread_cleanup_pop(0) /* ; */ | |
5e030278 TT |
14014 | ; |
14015 | return 0; | |
14016 | } | |
14017 | _ACEOF | |
14018 | if ac_fn_c_try_link "$LINENO"; then : | |
14019 | ax_pthread_ok=yes | |
14020 | fi | |
14021 | rm -f core conftest.err conftest.$ac_objext \ | |
14022 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 14023 | |
5e030278 TT |
14024 | CFLAGS="$ax_pthread_save_CFLAGS" |
14025 | LIBS="$ax_pthread_save_LIBS" | |
05ea2a05 TT |
14026 | |
14027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
14028 | $as_echo "$ax_pthread_ok" >&6; } | |
14029 | if test "x$ax_pthread_ok" = "xyes"; then : | |
14030 | break | |
5e030278 TT |
14031 | fi |
14032 | ||
05ea2a05 TT |
14033 | PTHREAD_LIBS="" |
14034 | PTHREAD_CFLAGS="" | |
14035 | done | |
14036 | fi | |
5e030278 | 14037 | |
05ea2a05 TT |
14038 | # Various other checks: |
14039 | if test "x$ax_pthread_ok" = "xyes"; then | |
14040 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14041 | ax_pthread_save_LIBS="$LIBS" | |
14042 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
14043 | LIBS="$PTHREAD_LIBS $LIBS" | |
5e030278 | 14044 | |
05ea2a05 TT |
14045 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
14046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
14047 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
14048 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
14049 | $as_echo_n "(cached) " >&6 | |
14050 | else | |
14051 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
14052 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
14053 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14054 | /* end confdefs.h. */ | |
14055 | #include <pthread.h> | |
14056 | int | |
14057 | main () | |
14058 | { | |
14059 | int attr = $ax_pthread_attr; return attr /* ; */ | |
14060 | ; | |
14061 | return 0; | |
14062 | } | |
14063 | _ACEOF | |
14064 | if ac_fn_c_try_link "$LINENO"; then : | |
14065 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
14066 | fi | |
14067 | rm -f core conftest.err conftest.$ac_objext \ | |
14068 | conftest$ac_exeext conftest.$ac_ext | |
14069 | done | |
5e030278 | 14070 | |
05ea2a05 TT |
14071 | fi |
14072 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
14073 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
14074 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
14075 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
14076 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
5e030278 | 14077 | |
05ea2a05 TT |
14078 | cat >>confdefs.h <<_ACEOF |
14079 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
14080 | _ACEOF | |
5e030278 | 14081 | |
05ea2a05 | 14082 | ax_pthread_joinable_attr_defined=yes |
5e030278 | 14083 | |
05ea2a05 | 14084 | fi |
5e030278 | 14085 | |
05ea2a05 TT |
14086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 |
14087 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
14088 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
14089 | $as_echo_n "(cached) " >&6 | |
14090 | else | |
14091 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
14092 | case $host_os in | |
14093 | solaris*) | |
14094 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
14095 | ;; | |
14096 | esac | |
5e030278 | 14097 | |
05ea2a05 TT |
14098 | fi |
14099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
14100 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
14101 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
14102 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
14103 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
14104 | ax_pthread_special_flags_added=yes | |
14105 | fi | |
5e030278 | 14106 | |
05ea2a05 TT |
14107 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 |
14108 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
14109 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
14110 | $as_echo_n "(cached) " >&6 | |
14111 | else | |
14112 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14113 | /* end confdefs.h. */ | |
14114 | #include <pthread.h> | |
14115 | int | |
14116 | main () | |
14117 | { | |
14118 | int i = PTHREAD_PRIO_INHERIT; | |
14119 | ; | |
14120 | return 0; | |
14121 | } | |
14122 | _ACEOF | |
14123 | if ac_fn_c_try_link "$LINENO"; then : | |
14124 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
14125 | else | |
14126 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
14127 | fi | |
14128 | rm -f core conftest.err conftest.$ac_objext \ | |
14129 | conftest$ac_exeext conftest.$ac_ext | |
5e030278 | 14130 | |
05ea2a05 TT |
14131 | fi |
14132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
14133 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
14134 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
14135 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
5e030278 | 14136 | |
05ea2a05 | 14137 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h |
5e030278 | 14138 | |
05ea2a05 | 14139 | ax_pthread_prio_inherit_defined=yes |
5e030278 | 14140 | |
05ea2a05 | 14141 | fi |
5e030278 | 14142 | |
05ea2a05 TT |
14143 | CFLAGS="$ax_pthread_save_CFLAGS" |
14144 | LIBS="$ax_pthread_save_LIBS" | |
5e030278 | 14145 | |
05ea2a05 TT |
14146 | # More AIX lossage: compile with *_r variant |
14147 | if test "x$GCC" != "xyes"; then | |
14148 | case $host_os in | |
14149 | aix*) | |
14150 | case "x/$CC" in #( | |
14151 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
14152 | #handle absolute path differently from PATH based program lookup | |
14153 | case "x$CC" in #( | |
14154 | x/*) : | |
14155 | if as_fn_executable_p ${CC}_r; then : | |
14156 | PTHREAD_CC="${CC}_r" | |
14157 | fi ;; #( | |
14158 | *) : | |
14159 | for ac_prog in ${CC}_r | |
14160 | do | |
14161 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
14162 | set dummy $ac_prog; ac_word=$2 | |
14163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14164 | $as_echo_n "checking for $ac_word... " >&6; } | |
14165 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
14166 | $as_echo_n "(cached) " >&6 | |
14167 | else | |
14168 | if test -n "$PTHREAD_CC"; then | |
14169 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
14170 | else | |
14171 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14172 | for as_dir in $PATH | |
14173 | do | |
14174 | IFS=$as_save_IFS | |
14175 | test -z "$as_dir" && as_dir=. | |
14176 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14177 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14178 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
14179 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14180 | break 2 | |
14181 | fi | |
14182 | done | |
14183 | done | |
14184 | IFS=$as_save_IFS | |
5e030278 | 14185 | |
5e030278 | 14186 | fi |
05ea2a05 TT |
14187 | fi |
14188 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
14189 | if test -n "$PTHREAD_CC"; then | |
14190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
14191 | $as_echo "$PTHREAD_CC" >&6; } | |
14192 | else | |
14193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14194 | $as_echo "no" >&6; } | |
14195 | fi | |
5e030278 | 14196 | |
5e030278 | 14197 | |
05ea2a05 TT |
14198 | test -n "$PTHREAD_CC" && break |
14199 | done | |
14200 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
14201 | ;; | |
14202 | esac ;; #( | |
14203 | *) : | |
14204 | ;; | |
5e030278 | 14205 | esac |
05ea2a05 TT |
14206 | ;; |
14207 | esac | |
14208 | fi | |
14209 | fi | |
5e030278 | 14210 | |
05ea2a05 | 14211 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
5e030278 | 14212 | |
5e030278 | 14213 | |
5e030278 | 14214 | |
5e030278 | 14215 | |
5e030278 | 14216 | |
05ea2a05 TT |
14217 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
14218 | if test "x$ax_pthread_ok" = "xyes"; then | |
14219 | threads=yes | |
14220 | : | |
5e030278 | 14221 | else |
05ea2a05 TT |
14222 | ax_pthread_ok=no |
14223 | threads=no | |
5e030278 | 14224 | fi |
05ea2a05 TT |
14225 | ac_ext=cpp |
14226 | ac_cpp='$CXXCPP $CPPFLAGS' | |
14227 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14228 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14229 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5e030278 | 14230 | |
5e030278 | 14231 | |
05ea2a05 TT |
14232 | if test "$threads" = "yes"; then |
14233 | save_LIBS="$LIBS" | |
14234 | LIBS="$PTHREAD_LIBS $LIBS" | |
14235 | save_CXXFLAGS="$CXXFLAGS" | |
14236 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
14237 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
14238 | $as_echo_n "checking for std::thread... " >&6; } | |
14239 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
14240 | $as_echo_n "(cached) " >&6 | |
14241 | else | |
14242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14243 | /* end confdefs.h. */ |
05ea2a05 TT |
14244 | #include <thread> |
14245 | void callback() { } | |
14246 | int | |
14247 | main () | |
14248 | { | |
14249 | std::thread t(callback); | |
14250 | ; | |
14251 | return 0; | |
14252 | } | |
5e030278 | 14253 | _ACEOF |
05ea2a05 TT |
14254 | if ac_fn_cxx_try_compile "$LINENO"; then : |
14255 | gdb_cv_cxx_std_thread=yes | |
14256 | else | |
14257 | gdb_cv_cxx_std_thread=no | |
5e030278 | 14258 | fi |
05ea2a05 TT |
14259 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
14260 | fi | |
14261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
14262 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
5e030278 | 14263 | |
05ea2a05 TT |
14264 | # This check must be here, while LIBS includes any necessary |
14265 | # threading library. | |
14266 | for ac_func in pthread_sigmask pthread_setname_np | |
14267 | do : | |
14268 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14269 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14270 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
14271 | cat >>confdefs.h <<_ACEOF | |
14272 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14273 | _ACEOF | |
5e030278 TT |
14274 | |
14275 | fi | |
05ea2a05 | 14276 | done |
5e030278 | 14277 | |
5e030278 | 14278 | |
05ea2a05 TT |
14279 | LIBS="$save_LIBS" |
14280 | CXXFLAGS="$save_CXXFLAGS" | |
14281 | fi | |
14282 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
5e030278 | 14283 | |
05ea2a05 | 14284 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h |
5e030278 | 14285 | |
05ea2a05 TT |
14286 | fi |
14287 | ac_ext=c | |
14288 | ac_cpp='$CPP $CPPFLAGS' | |
14289 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14290 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14291 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5e030278 | 14292 | |
5e030278 | 14293 | |
05ea2a05 TT |
14294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
14295 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
14296 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
14297 | $as_echo_n "(cached) " >&6 | |
14298 | else | |
14299 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14300 | /* end confdefs.h. */ | |
5e030278 | 14301 | |
05ea2a05 | 14302 | #include <setjmp.h> |
5e030278 | 14303 | |
05ea2a05 TT |
14304 | int |
14305 | main () | |
14306 | { | |
14307 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); | |
14308 | ; | |
14309 | return 0; | |
14310 | } | |
14311 | _ACEOF | |
14312 | if ac_fn_c_try_compile "$LINENO"; then : | |
14313 | gdb_cv_func_sigsetjmp=yes | |
14314 | else | |
14315 | gdb_cv_func_sigsetjmp=no | |
14316 | fi | |
14317 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14318 | fi | |
14319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
14320 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
14321 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 14322 | |
05ea2a05 | 14323 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 14324 | |
05ea2a05 TT |
14325 | fi |
14326 | ||
14327 | ||
14328 | # Check whether --with-intel_pt was given. | |
14329 | if test "${with_intel_pt+set}" = set; then : | |
14330 | withval=$with_intel_pt; | |
5e030278 | 14331 | else |
05ea2a05 | 14332 | with_intel_pt=auto |
5e030278 | 14333 | fi |
05ea2a05 TT |
14334 | |
14335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
14336 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
14337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
14338 | $as_echo "$with_intel_pt" >&6; } | |
14339 | ||
14340 | if test "${with_intel_pt}" = no; then | |
14341 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
14342 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
14343 | HAVE_LIBIPT=no | |
14344 | else | |
14345 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14346 | /* end confdefs.h. */ |
5e030278 | 14347 | |
05ea2a05 TT |
14348 | #include <linux/perf_event.h> |
14349 | #ifndef PERF_ATTR_SIZE_VER5 | |
14350 | # error | |
14351 | #endif | |
5e030278 | 14352 | |
05ea2a05 TT |
14353 | _ACEOF |
14354 | if ac_fn_c_try_cpp "$LINENO"; then : | |
14355 | perf_event=yes | |
14356 | else | |
14357 | perf_event=no | |
5e030278 | 14358 | fi |
05ea2a05 TT |
14359 | rm -f conftest.err conftest.i conftest.$ac_ext |
14360 | if test "$perf_event" != yes; then | |
14361 | if test "$with_intel_pt" = yes; then | |
14362 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
14363 | else | |
14364 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
14365 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
14366 | fi | |
14367 | fi | |
5e030278 | 14368 | |
5e030278 | 14369 | |
5e030278 | 14370 | |
5e030278 | 14371 | |
5e030278 | 14372 | |
5e030278 | 14373 | |
5e030278 | 14374 | |
5e030278 | 14375 | |
5e030278 | 14376 | |
05ea2a05 | 14377 | use_additional=yes |
5e030278 | 14378 | |
05ea2a05 TT |
14379 | acl_save_prefix="$prefix" |
14380 | prefix="$acl_final_prefix" | |
14381 | acl_save_exec_prefix="$exec_prefix" | |
14382 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14383 | |
05ea2a05 TT |
14384 | eval additional_includedir=\"$includedir\" |
14385 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14386 | |
05ea2a05 TT |
14387 | exec_prefix="$acl_save_exec_prefix" |
14388 | prefix="$acl_save_prefix" | |
5e030278 | 14389 | |
5e030278 | 14390 | |
05ea2a05 TT |
14391 | # Check whether --with-libipt-prefix was given. |
14392 | if test "${with_libipt_prefix+set}" = set; then : | |
14393 | withval=$with_libipt_prefix; | |
14394 | if test "X$withval" = "Xno"; then | |
14395 | use_additional=no | |
14396 | else | |
14397 | if test "X$withval" = "X"; then | |
5e030278 | 14398 | |
05ea2a05 TT |
14399 | acl_save_prefix="$prefix" |
14400 | prefix="$acl_final_prefix" | |
14401 | acl_save_exec_prefix="$exec_prefix" | |
14402 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14403 | |
05ea2a05 TT |
14404 | eval additional_includedir=\"$includedir\" |
14405 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14406 | |
05ea2a05 TT |
14407 | exec_prefix="$acl_save_exec_prefix" |
14408 | prefix="$acl_save_prefix" | |
5e030278 | 14409 | |
05ea2a05 TT |
14410 | else |
14411 | additional_includedir="$withval/include" | |
14412 | additional_libdir="$withval/lib" | |
14413 | fi | |
14414 | fi | |
5e030278 TT |
14415 | |
14416 | fi | |
5e030278 | 14417 | |
9f1528a1 AB |
14418 | |
14419 | # Check whether --with-libipt-type was given. | |
14420 | if test "${with_libipt_type+set}" = set; then : | |
14421 | withval=$with_libipt_type; with_libipt_type=$withval | |
14422 | else | |
14423 | with_libipt_type=auto | |
14424 | fi | |
14425 | ||
14426 | lib_type=`eval echo \$with_libipt_type` | |
14427 | ||
05ea2a05 TT |
14428 | LIBIPT= |
14429 | LTLIBIPT= | |
14430 | INCIPT= | |
14431 | rpathdirs= | |
14432 | ltrpathdirs= | |
14433 | names_already_handled= | |
14434 | names_next_round='ipt ' | |
14435 | while test -n "$names_next_round"; do | |
14436 | names_this_round="$names_next_round" | |
14437 | names_next_round= | |
14438 | for name in $names_this_round; do | |
14439 | already_handled= | |
14440 | for n in $names_already_handled; do | |
14441 | if test "$n" = "$name"; then | |
14442 | already_handled=yes | |
14443 | break | |
14444 | fi | |
14445 | done | |
14446 | if test -z "$already_handled"; then | |
14447 | names_already_handled="$names_already_handled $name" | |
14448 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14449 | eval value=\"\$HAVE_LIB$uppername\" | |
14450 | if test -n "$value"; then | |
14451 | if test "$value" = yes; then | |
14452 | eval value=\"\$LIB$uppername\" | |
14453 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
14454 | eval value=\"\$LTLIB$uppername\" | |
14455 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
14456 | else | |
14457 | : | |
14458 | fi | |
14459 | else | |
14460 | found_dir= | |
14461 | found_la= | |
14462 | found_so= | |
14463 | found_a= | |
14464 | if test $use_additional = yes; then | |
9f1528a1 | 14465 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14466 | found_dir="$additional_libdir" |
14467 | found_so="$additional_libdir/lib$name.$shlibext" | |
14468 | if test -f "$additional_libdir/lib$name.la"; then | |
14469 | found_la="$additional_libdir/lib$name.la" | |
14470 | fi | |
9f1528a1 | 14471 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14472 | if test -f "$additional_libdir/lib$name.$libext"; then |
14473 | found_dir="$additional_libdir" | |
14474 | found_a="$additional_libdir/lib$name.$libext" | |
14475 | if test -f "$additional_libdir/lib$name.la"; then | |
14476 | found_la="$additional_libdir/lib$name.la" | |
14477 | fi | |
14478 | fi | |
14479 | fi | |
14480 | fi | |
14481 | if test "X$found_dir" = "X"; then | |
14482 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 14483 | |
05ea2a05 TT |
14484 | acl_save_prefix="$prefix" |
14485 | prefix="$acl_final_prefix" | |
14486 | acl_save_exec_prefix="$exec_prefix" | |
14487 | exec_prefix="$acl_final_exec_prefix" | |
14488 | eval x=\"$x\" | |
14489 | exec_prefix="$acl_save_exec_prefix" | |
14490 | prefix="$acl_save_prefix" | |
5e030278 | 14491 | |
05ea2a05 TT |
14492 | case "$x" in |
14493 | -L*) | |
14494 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 14495 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14496 | found_dir="$dir" |
14497 | found_so="$dir/lib$name.$shlibext" | |
14498 | if test -f "$dir/lib$name.la"; then | |
14499 | found_la="$dir/lib$name.la" | |
14500 | fi | |
9f1528a1 | 14501 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14502 | if test -f "$dir/lib$name.$libext"; then |
14503 | found_dir="$dir" | |
14504 | found_a="$dir/lib$name.$libext" | |
14505 | if test -f "$dir/lib$name.la"; then | |
14506 | found_la="$dir/lib$name.la" | |
14507 | fi | |
14508 | fi | |
14509 | fi | |
14510 | ;; | |
14511 | esac | |
14512 | if test "X$found_dir" != "X"; then | |
14513 | break | |
14514 | fi | |
14515 | done | |
14516 | fi | |
14517 | if test "X$found_dir" != "X"; then | |
14518 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
14519 | if test "X$found_so" != "X"; then | |
14520 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14521 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14522 | else | |
14523 | haveit= | |
14524 | for x in $ltrpathdirs; do | |
14525 | if test "X$x" = "X$found_dir"; then | |
14526 | haveit=yes | |
14527 | break | |
14528 | fi | |
14529 | done | |
14530 | if test -z "$haveit"; then | |
14531 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14532 | fi | |
14533 | if test "$hardcode_direct" = yes; then | |
14534 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14535 | else | |
14536 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14537 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14538 | haveit= | |
14539 | for x in $rpathdirs; do | |
14540 | if test "X$x" = "X$found_dir"; then | |
14541 | haveit=yes | |
14542 | break | |
14543 | fi | |
14544 | done | |
14545 | if test -z "$haveit"; then | |
14546 | rpathdirs="$rpathdirs $found_dir" | |
14547 | fi | |
14548 | else | |
14549 | haveit= | |
14550 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 14551 | |
05ea2a05 TT |
14552 | acl_save_prefix="$prefix" |
14553 | prefix="$acl_final_prefix" | |
14554 | acl_save_exec_prefix="$exec_prefix" | |
14555 | exec_prefix="$acl_final_exec_prefix" | |
14556 | eval x=\"$x\" | |
14557 | exec_prefix="$acl_save_exec_prefix" | |
14558 | prefix="$acl_save_prefix" | |
5e030278 | 14559 | |
05ea2a05 TT |
14560 | if test "X$x" = "X-L$found_dir"; then |
14561 | haveit=yes | |
14562 | break | |
14563 | fi | |
14564 | done | |
14565 | if test -z "$haveit"; then | |
14566 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
14567 | fi | |
14568 | if test "$hardcode_minus_L" != no; then | |
14569 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14570 | else | |
14571 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
14572 | fi | |
14573 | fi | |
14574 | fi | |
14575 | fi | |
14576 | else | |
14577 | if test "X$found_a" != "X"; then | |
14578 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
14579 | else | |
14580 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
14581 | fi | |
14582 | fi | |
14583 | additional_includedir= | |
14584 | case "$found_dir" in | |
14585 | */lib | */lib/) | |
14586 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14587 | additional_includedir="$basedir/include" | |
14588 | ;; | |
14589 | esac | |
14590 | if test "X$additional_includedir" != "X"; then | |
14591 | if test "X$additional_includedir" != "X/usr/include"; then | |
14592 | haveit= | |
14593 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14594 | if test -n "$GCC"; then | |
14595 | case $host_os in | |
14596 | linux*) haveit=yes;; | |
14597 | esac | |
14598 | fi | |
14599 | fi | |
14600 | if test -z "$haveit"; then | |
14601 | for x in $CPPFLAGS $INCIPT; do | |
5e030278 | 14602 | |
05ea2a05 TT |
14603 | acl_save_prefix="$prefix" |
14604 | prefix="$acl_final_prefix" | |
14605 | acl_save_exec_prefix="$exec_prefix" | |
14606 | exec_prefix="$acl_final_exec_prefix" | |
14607 | eval x=\"$x\" | |
14608 | exec_prefix="$acl_save_exec_prefix" | |
14609 | prefix="$acl_save_prefix" | |
5e030278 | 14610 | |
05ea2a05 TT |
14611 | if test "X$x" = "X-I$additional_includedir"; then |
14612 | haveit=yes | |
14613 | break | |
14614 | fi | |
14615 | done | |
14616 | if test -z "$haveit"; then | |
14617 | if test -d "$additional_includedir"; then | |
14618 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
14619 | fi | |
14620 | fi | |
14621 | fi | |
14622 | fi | |
14623 | fi | |
14624 | if test -n "$found_la"; then | |
14625 | save_libdir="$libdir" | |
14626 | case "$found_la" in | |
14627 | */* | *\\*) . "$found_la" ;; | |
14628 | *) . "./$found_la" ;; | |
14629 | esac | |
14630 | libdir="$save_libdir" | |
14631 | for dep in $dependency_libs; do | |
14632 | case "$dep" in | |
14633 | -L*) | |
14634 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
14635 | if test "X$additional_libdir" != "X/usr/lib"; then | |
14636 | haveit= | |
14637 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
14638 | if test -n "$GCC"; then | |
14639 | case $host_os in | |
14640 | linux*) haveit=yes;; | |
14641 | esac | |
14642 | fi | |
14643 | fi | |
14644 | if test -z "$haveit"; then | |
14645 | haveit= | |
14646 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 14647 | |
05ea2a05 TT |
14648 | acl_save_prefix="$prefix" |
14649 | prefix="$acl_final_prefix" | |
14650 | acl_save_exec_prefix="$exec_prefix" | |
14651 | exec_prefix="$acl_final_exec_prefix" | |
14652 | eval x=\"$x\" | |
14653 | exec_prefix="$acl_save_exec_prefix" | |
14654 | prefix="$acl_save_prefix" | |
5e030278 | 14655 | |
05ea2a05 TT |
14656 | if test "X$x" = "X-L$additional_libdir"; then |
14657 | haveit=yes | |
14658 | break | |
14659 | fi | |
14660 | done | |
14661 | if test -z "$haveit"; then | |
14662 | if test -d "$additional_libdir"; then | |
14663 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
14664 | fi | |
14665 | fi | |
14666 | haveit= | |
14667 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 14668 | |
05ea2a05 TT |
14669 | acl_save_prefix="$prefix" |
14670 | prefix="$acl_final_prefix" | |
14671 | acl_save_exec_prefix="$exec_prefix" | |
14672 | exec_prefix="$acl_final_exec_prefix" | |
14673 | eval x=\"$x\" | |
14674 | exec_prefix="$acl_save_exec_prefix" | |
14675 | prefix="$acl_save_prefix" | |
5e030278 | 14676 | |
05ea2a05 TT |
14677 | if test "X$x" = "X-L$additional_libdir"; then |
14678 | haveit=yes | |
14679 | break | |
14680 | fi | |
14681 | done | |
14682 | if test -z "$haveit"; then | |
14683 | if test -d "$additional_libdir"; then | |
14684 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
14685 | fi | |
14686 | fi | |
14687 | fi | |
14688 | fi | |
14689 | ;; | |
14690 | -R*) | |
14691 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
14692 | if test "$enable_rpath" != no; then | |
14693 | haveit= | |
14694 | for x in $rpathdirs; do | |
14695 | if test "X$x" = "X$dir"; then | |
14696 | haveit=yes | |
14697 | break | |
14698 | fi | |
14699 | done | |
14700 | if test -z "$haveit"; then | |
14701 | rpathdirs="$rpathdirs $dir" | |
14702 | fi | |
14703 | haveit= | |
14704 | for x in $ltrpathdirs; do | |
14705 | if test "X$x" = "X$dir"; then | |
14706 | haveit=yes | |
14707 | break | |
14708 | fi | |
14709 | done | |
14710 | if test -z "$haveit"; then | |
14711 | ltrpathdirs="$ltrpathdirs $dir" | |
14712 | fi | |
14713 | fi | |
14714 | ;; | |
14715 | -l*) | |
14716 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
14717 | ;; | |
14718 | *.la) | |
14719 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
14720 | ;; | |
14721 | *) | |
14722 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
14723 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
14724 | ;; | |
14725 | esac | |
14726 | done | |
14727 | fi | |
14728 | else | |
9f1528a1 AB |
14729 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
14730 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
14731 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
14732 | else | |
14733 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" | |
14734 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" | |
14735 | fi | |
05ea2a05 | 14736 | fi |
5e030278 | 14737 | fi |
05ea2a05 TT |
14738 | fi |
14739 | done | |
14740 | done | |
14741 | if test "X$rpathdirs" != "X"; then | |
14742 | if test -n "$hardcode_libdir_separator"; then | |
14743 | alldirs= | |
14744 | for found_dir in $rpathdirs; do | |
14745 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
14746 | done | |
14747 | acl_save_libdir="$libdir" | |
14748 | libdir="$alldirs" | |
14749 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14750 | libdir="$acl_save_libdir" | |
14751 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
14752 | else | |
14753 | for found_dir in $rpathdirs; do | |
14754 | acl_save_libdir="$libdir" | |
14755 | libdir="$found_dir" | |
14756 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14757 | libdir="$acl_save_libdir" | |
14758 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
14759 | done | |
14760 | fi | |
14761 | fi | |
14762 | if test "X$ltrpathdirs" != "X"; then | |
14763 | for found_dir in $ltrpathdirs; do | |
14764 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
14765 | done | |
14766 | fi | |
5e030278 TT |
14767 | |
14768 | ||
05ea2a05 | 14769 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 14770 | |
05ea2a05 TT |
14771 | for element in $INCIPT; do |
14772 | haveit= | |
14773 | for x in $CPPFLAGS; do | |
5e030278 | 14774 | |
05ea2a05 TT |
14775 | acl_save_prefix="$prefix" |
14776 | prefix="$acl_final_prefix" | |
14777 | acl_save_exec_prefix="$exec_prefix" | |
14778 | exec_prefix="$acl_final_exec_prefix" | |
14779 | eval x=\"$x\" | |
14780 | exec_prefix="$acl_save_exec_prefix" | |
14781 | prefix="$acl_save_prefix" | |
5e030278 | 14782 | |
05ea2a05 TT |
14783 | if test "X$x" = "X$element"; then |
14784 | haveit=yes | |
14785 | break | |
14786 | fi | |
14787 | done | |
14788 | if test -z "$haveit"; then | |
14789 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
14790 | fi | |
14791 | done | |
5e030278 TT |
14792 | |
14793 | ||
05ea2a05 TT |
14794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 |
14795 | $as_echo_n "checking for libipt... " >&6; } | |
14796 | if ${ac_cv_libipt+:} false; then : | |
5e030278 TT |
14797 | $as_echo_n "(cached) " >&6 |
14798 | else | |
05ea2a05 TT |
14799 | |
14800 | ac_save_LIBS="$LIBS" | |
14801 | LIBS="$LIBS $LIBIPT" | |
14802 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14803 | /* end confdefs.h. */ |
05ea2a05 | 14804 | #include "intel-pt.h" |
5e030278 TT |
14805 | int |
14806 | main () | |
14807 | { | |
05ea2a05 | 14808 | pt_insn_alloc_decoder (0); |
5e030278 TT |
14809 | ; |
14810 | return 0; | |
14811 | } | |
14812 | _ACEOF | |
05ea2a05 TT |
14813 | if ac_fn_c_try_link "$LINENO"; then : |
14814 | ac_cv_libipt=yes | |
5e030278 | 14815 | else |
05ea2a05 | 14816 | ac_cv_libipt=no |
5e030278 | 14817 | fi |
05ea2a05 TT |
14818 | rm -f core conftest.err conftest.$ac_objext \ |
14819 | conftest$ac_exeext conftest.$ac_ext | |
14820 | LIBS="$ac_save_LIBS" | |
14821 | ||
5e030278 | 14822 | fi |
05ea2a05 TT |
14823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
14824 | $as_echo "$ac_cv_libipt" >&6; } | |
14825 | if test "$ac_cv_libipt" = yes; then | |
14826 | HAVE_LIBIPT=yes | |
21987b9c | 14827 | |
05ea2a05 TT |
14828 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
14829 | ||
14830 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
14831 | $as_echo_n "checking how to link with libipt... " >&6; } | |
14832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
14833 | $as_echo "$LIBIPT" >&6; } | |
14834 | else | |
14835 | HAVE_LIBIPT=no | |
14836 | CPPFLAGS="$ac_save_CPPFLAGS" | |
14837 | LIBIPT= | |
14838 | LTLIBIPT= | |
14839 | fi | |
14840 | ||
14841 | ||
14842 | ||
14843 | ||
14844 | ||
14845 | ||
14846 | if test "$HAVE_LIBIPT" != yes; then | |
14847 | if test "$with_intel_pt" = yes; then | |
14848 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
14849 | else | |
14850 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
14851 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
14852 | fi | |
14853 | else | |
14854 | save_LIBS=$LIBS | |
14855 | LIBS="$LIBS $LIBIPT" | |
14856 | for ac_func in pt_insn_event | |
21987b9c | 14857 | do : |
05ea2a05 TT |
14858 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" |
14859 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
21987b9c | 14860 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 14861 | #define HAVE_PT_INSN_EVENT 1 |
21987b9c TT |
14862 | _ACEOF |
14863 | ||
14864 | fi | |
14865 | done | |
14866 | ||
05ea2a05 TT |
14867 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> |
14868 | " | |
14869 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
21987b9c | 14870 | |
05ea2a05 TT |
14871 | cat >>confdefs.h <<_ACEOF |
14872 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
14873 | _ACEOF | |
5e030278 | 14874 | |
5e030278 | 14875 | |
05ea2a05 TT |
14876 | fi |
14877 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
14878 | " | |
14879 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
14880 | ||
14881 | cat >>confdefs.h <<_ACEOF | |
14882 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
14883 | _ACEOF | |
5e030278 TT |
14884 | |
14885 | ||
05ea2a05 TT |
14886 | fi |
14887 | ||
14888 | LIBS=$save_LIBS | |
14889 | fi | |
14890 | fi | |
14891 | ||
14892 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
14893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
14894 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
14895 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
e9bcb658 GB |
14896 | $as_echo_n "(cached) " >&6 |
14897 | else | |
14898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14899 | /* end confdefs.h. */ | |
14900 | ||
05ea2a05 TT |
14901 | #define _SYSCALL32 |
14902 | /* Needed for new procfs interface on sparc-solaris. */ | |
14903 | #define _STRUCTURED_PROC 1 | |
14904 | #include <sys/procfs.h> | |
e9bcb658 GB |
14905 | int |
14906 | main () | |
14907 | { | |
05ea2a05 | 14908 | gregset_t avar |
e9bcb658 GB |
14909 | ; |
14910 | return 0; | |
14911 | } | |
14912 | _ACEOF | |
14913 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 14914 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
e9bcb658 | 14915 | else |
05ea2a05 | 14916 | bfd_cv_have_sys_procfs_type_gregset_t=no |
54019719 PA |
14917 | |
14918 | fi | |
05ea2a05 | 14919 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
06825bd1 | 14920 | fi |
06825bd1 | 14921 | |
05ea2a05 | 14922 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
a3828db0 | 14923 | |
05ea2a05 | 14924 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
06825bd1 | 14925 | |
05ea2a05 TT |
14926 | fi |
14927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
14928 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
14929 | ||
14930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
14931 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
14932 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
81ecdfbb | 14933 | $as_echo_n "(cached) " >&6 |
bec39cab | 14934 | else |
81ecdfbb | 14935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14936 | /* end confdefs.h. */ |
05ea2a05 TT |
14937 | |
14938 | #define _SYSCALL32 | |
14939 | /* Needed for new procfs interface on sparc-solaris. */ | |
14940 | #define _STRUCTURED_PROC 1 | |
14941 | #include <sys/procfs.h> | |
bec39cab AC |
14942 | int |
14943 | main () | |
14944 | { | |
05ea2a05 | 14945 | fpregset_t avar |
064ef605 DJ |
14946 | ; |
14947 | return 0; | |
14948 | } | |
14949 | _ACEOF | |
9b30624b | 14950 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
14951 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
14952 | else | |
14953 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
14954 | ||
14955 | fi | |
14956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14957 | fi | |
14958 | ||
14959 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
14960 | ||
14961 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
14962 | ||
14963 | fi | |
14964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
14965 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
14966 | ||
14967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
14968 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
14969 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
14970 | $as_echo_n "(cached) " >&6 | |
064ef605 | 14971 | else |
81ecdfbb | 14972 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 14973 | /* end confdefs.h. */ |
05ea2a05 TT |
14974 | |
14975 | #define _SYSCALL32 | |
14976 | /* Needed for new procfs interface on sparc-solaris. */ | |
14977 | #define _STRUCTURED_PROC 1 | |
14978 | #include <sys/procfs.h> | |
064ef605 DJ |
14979 | int |
14980 | main () | |
14981 | { | |
05ea2a05 | 14982 | prgregset_t avar |
bec39cab AC |
14983 | ; |
14984 | return 0; | |
14985 | } | |
14986 | _ACEOF | |
9b30624b | 14987 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 14988 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
70f9f479 | 14989 | else |
05ea2a05 TT |
14990 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
14991 | ||
70f9f479 | 14992 | fi |
81ecdfbb | 14993 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 14994 | fi |
bec39cab | 14995 | |
05ea2a05 | 14996 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
70f9f479 | 14997 | |
05ea2a05 TT |
14998 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
14999 | ||
15000 | fi | |
15001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
15002 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
15003 | ||
15004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
15005 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
15006 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
81ecdfbb | 15007 | $as_echo_n "(cached) " >&6 |
bec39cab | 15008 | else |
81ecdfbb | 15009 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15010 | /* end confdefs.h. */ |
05ea2a05 TT |
15011 | |
15012 | #define _SYSCALL32 | |
15013 | /* Needed for new procfs interface on sparc-solaris. */ | |
15014 | #define _STRUCTURED_PROC 1 | |
15015 | #include <sys/procfs.h> | |
064ef605 DJ |
15016 | int |
15017 | main () | |
15018 | { | |
05ea2a05 | 15019 | prfpregset_t avar |
064ef605 DJ |
15020 | ; |
15021 | return 0; | |
15022 | } | |
15023 | _ACEOF | |
9b30624b | 15024 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15025 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
064ef605 | 15026 | else |
05ea2a05 | 15027 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
064ef605 | 15028 | |
5c7f2947 | 15029 | fi |
81ecdfbb | 15030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
05ea2a05 TT |
15031 | fi |
15032 | ||
15033 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
15034 | ||
15035 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h | |
15036 | ||
15037 | fi | |
15038 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
15039 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
15040 | ||
15041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
15042 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
15043 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
15044 | $as_echo_n "(cached) " >&6 | |
15045 | else | |
15046 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15047 | /* end confdefs.h. */ |
05ea2a05 TT |
15048 | |
15049 | #define _SYSCALL32 | |
15050 | /* Needed for new procfs interface on sparc-solaris. */ | |
15051 | #define _STRUCTURED_PROC 1 | |
15052 | #include <sys/procfs.h> | |
bec39cab AC |
15053 | int |
15054 | main () | |
15055 | { | |
05ea2a05 | 15056 | prgregset32_t avar |
bec39cab AC |
15057 | ; |
15058 | return 0; | |
15059 | } | |
15060 | _ACEOF | |
9b30624b | 15061 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15062 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
15063 | else | |
15064 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
a3828db0 | 15065 | |
064ef605 | 15066 | fi |
81ecdfbb | 15067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 15068 | fi |
96d7229d | 15069 | |
05ea2a05 | 15070 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
78434e59 | 15071 | |
05ea2a05 | 15072 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
78434e59 | 15073 | |
05ea2a05 TT |
15074 | fi |
15075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
15076 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
54019719 | 15077 | |
05ea2a05 TT |
15078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
15079 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
15080 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
81ecdfbb | 15081 | $as_echo_n "(cached) " >&6 |
bec39cab | 15082 | else |
81ecdfbb | 15083 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15084 | /* end confdefs.h. */ |
05ea2a05 TT |
15085 | |
15086 | #define _SYSCALL32 | |
15087 | /* Needed for new procfs interface on sparc-solaris. */ | |
15088 | #define _STRUCTURED_PROC 1 | |
15089 | #include <sys/procfs.h> | |
bec39cab AC |
15090 | int |
15091 | main () | |
15092 | { | |
05ea2a05 | 15093 | lwpid_t avar |
bec39cab AC |
15094 | ; |
15095 | return 0; | |
15096 | } | |
15097 | _ACEOF | |
05ea2a05 TT |
15098 | if ac_fn_c_try_compile "$LINENO"; then : |
15099 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
c906108c | 15100 | else |
05ea2a05 TT |
15101 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
15102 | ||
c906108c | 15103 | fi |
05ea2a05 | 15104 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15105 | fi |
81ecdfbb | 15106 | |
05ea2a05 | 15107 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
a3828db0 | 15108 | |
05ea2a05 | 15109 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
97bf5e38 | 15110 | |
05ea2a05 TT |
15111 | fi |
15112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
15113 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
a3828db0 | 15114 | |
05ea2a05 TT |
15115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
15116 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
15117 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
81ecdfbb | 15118 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15119 | else |
81ecdfbb | 15120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15121 | /* end confdefs.h. */ |
a3828db0 | 15122 | |
05ea2a05 TT |
15123 | #define _SYSCALL32 |
15124 | /* Needed for new procfs interface on sparc-solaris. */ | |
15125 | #define _STRUCTURED_PROC 1 | |
15126 | #include <sys/procfs.h> | |
bec39cab AC |
15127 | int |
15128 | main () | |
15129 | { | |
05ea2a05 | 15130 | psaddr_t avar |
bec39cab AC |
15131 | ; |
15132 | return 0; | |
15133 | } | |
15134 | _ACEOF | |
81ecdfbb | 15135 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15136 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 15137 | else |
05ea2a05 TT |
15138 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
15139 | ||
c906108c | 15140 | fi |
81ecdfbb | 15141 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 15142 | fi |
c3f6f71d | 15143 | |
05ea2a05 | 15144 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
c906108c | 15145 | |
05ea2a05 | 15146 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
db1ff28b | 15147 | |
05ea2a05 TT |
15148 | fi |
15149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
15150 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
15151 | ||
15152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 | |
15153 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } | |
15154 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
db1ff28b JK |
15155 | $as_echo_n "(cached) " >&6 |
15156 | else | |
15157 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15158 | /* end confdefs.h. */ | |
05ea2a05 TT |
15159 | |
15160 | #define _SYSCALL32 | |
15161 | /* Needed for new procfs interface on sparc-solaris. */ | |
15162 | #define _STRUCTURED_PROC 1 | |
15163 | #include <sys/procfs.h> | |
db1ff28b JK |
15164 | int |
15165 | main () | |
15166 | { | |
05ea2a05 | 15167 | elf_fpregset_t avar |
db1ff28b JK |
15168 | ; |
15169 | return 0; | |
15170 | } | |
15171 | _ACEOF | |
15172 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15173 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
db1ff28b | 15174 | else |
05ea2a05 TT |
15175 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
15176 | ||
db1ff28b JK |
15177 | fi |
15178 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15179 | fi | |
db1ff28b | 15180 | |
05ea2a05 | 15181 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
db1ff28b | 15182 | |
05ea2a05 | 15183 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
db1ff28b | 15184 | |
05ea2a05 TT |
15185 | fi |
15186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
15187 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
db1ff28b | 15188 | |
05ea2a05 TT |
15189 | fi |
15190 | ||
15191 | ||
15192 | # Check the return and argument types of ptrace. | |
15193 | ||
15194 | ||
15195 | for ac_header in sys/ptrace.h ptrace.h | |
15196 | do : | |
15197 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
15198 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
15199 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
15200 | cat >>confdefs.h <<_ACEOF | |
15201 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
15202 | _ACEOF | |
db1ff28b JK |
15203 | |
15204 | fi | |
15205 | ||
05ea2a05 TT |
15206 | done |
15207 | ||
81ecdfbb | 15208 | |
05ea2a05 TT |
15209 | gdb_ptrace_headers=' |
15210 | #include <sys/types.h> | |
15211 | #if HAVE_SYS_PTRACE_H | |
15212 | # include <sys/ptrace.h> | |
15213 | #endif | |
15214 | #if HAVE_UNISTD_H | |
15215 | # include <unistd.h> | |
15216 | #endif | |
15217 | ' | |
5c45e068 | 15218 | |
05ea2a05 TT |
15219 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
15220 | # empty argument list, so check for that explicitly. | |
15221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
15222 | $as_echo_n "checking return type of ptrace... " >&6; } | |
15223 | if ${gdb_cv_func_ptrace_ret+:} false; then : | |
81ecdfbb | 15224 | $as_echo_n "(cached) " >&6 |
bec39cab | 15225 | else |
81ecdfbb | 15226 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15227 | /* end confdefs.h. */ |
05ea2a05 | 15228 | $gdb_ptrace_headers |
bec39cab AC |
15229 | int |
15230 | main () | |
15231 | { | |
05ea2a05 | 15232 | extern long ptrace (enum __ptrace_request, ...); |
bec39cab AC |
15233 | ; |
15234 | return 0; | |
15235 | } | |
15236 | _ACEOF | |
81ecdfbb | 15237 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15238 | gdb_cv_func_ptrace_ret='long' |
bec39cab | 15239 | else |
81ecdfbb | 15240 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15241 | /* end confdefs.h. */ |
05ea2a05 | 15242 | $gdb_ptrace_headers |
bec39cab AC |
15243 | int |
15244 | main () | |
15245 | { | |
05ea2a05 | 15246 | extern int ptrace (); |
bec39cab AC |
15247 | ; |
15248 | return 0; | |
15249 | } | |
15250 | _ACEOF | |
81ecdfbb | 15251 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15252 | gdb_cv_func_ptrace_ret='int' |
27ca5dad | 15253 | else |
05ea2a05 | 15254 | gdb_cv_func_ptrace_ret='long' |
27ca5dad | 15255 | fi |
81ecdfbb | 15256 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 15257 | fi |
05ea2a05 | 15258 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 15259 | fi |
05ea2a05 TT |
15260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
15261 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
5c45e068 MK |
15262 | |
15263 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15264 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret |
bec39cab | 15265 | _ACEOF |
3862412b | 15266 | |
05ea2a05 TT |
15267 | # Check argument types. |
15268 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
15269 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
15270 | if ${gdb_cv_func_ptrace_args+:} false; then : | |
15271 | $as_echo_n "(cached) " >&6 | |
15272 | else | |
5c45e068 | 15273 | |
05ea2a05 TT |
15274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15275 | /* end confdefs.h. */ | |
15276 | $gdb_ptrace_headers | |
15277 | int | |
15278 | main () | |
15279 | { | |
15280 | extern long ptrace (enum __ptrace_request, ...); | |
15281 | ; | |
15282 | return 0; | |
15283 | } | |
bec39cab | 15284 | _ACEOF |
05ea2a05 TT |
15285 | if ac_fn_c_try_compile "$LINENO"; then : |
15286 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' | |
15287 | else | |
15288 | ||
15289 | for gdb_arg1 in 'int' 'long'; do | |
15290 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
15291 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
15292 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
15293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15294 | /* end confdefs.h. */ | |
15295 | $gdb_ptrace_headers | |
15296 | int | |
15297 | main () | |
15298 | { | |
3862412b | 15299 | |
05ea2a05 TT |
15300 | extern $gdb_cv_func_ptrace_ret |
15301 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
5c45e068 | 15302 | |
05ea2a05 TT |
15303 | ; |
15304 | return 0; | |
15305 | } | |
15306 | _ACEOF | |
15307 | if ac_fn_c_try_compile "$LINENO"; then : | |
15308 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | |
15309 | break 4; | |
97bf5e38 | 15310 | fi |
05ea2a05 TT |
15311 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
15312 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
15313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15314 | /* end confdefs.h. */ | |
15315 | $gdb_ptrace_headers | |
15316 | int | |
15317 | main () | |
15318 | { | |
3862412b | 15319 | |
05ea2a05 TT |
15320 | extern $gdb_cv_func_ptrace_ret |
15321 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
5c45e068 | 15322 | |
05ea2a05 TT |
15323 | ; |
15324 | return 0; | |
15325 | } | |
6fea9e18 | 15326 | _ACEOF |
05ea2a05 | 15327 | if ac_fn_c_try_compile "$LINENO"; then : |
6fea9e18 | 15328 | |
05ea2a05 TT |
15329 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
15330 | break 5; | |
15331 | fi | |
15332 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15333 | done | |
15334 | done | |
15335 | done | |
15336 | done | |
15337 | done | |
15338 | # Provide a safe default value. | |
15339 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
6fea9e18 L |
15340 | |
15341 | fi | |
05ea2a05 TT |
15342 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
15343 | fi | |
15344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
15345 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
15346 | ac_save_IFS=$IFS; IFS=',' | |
15347 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
15348 | IFS=$ac_save_IFS | |
15349 | shift | |
6fea9e18 L |
15350 | |
15351 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15352 | #define PTRACE_TYPE_ARG1 $1 |
6fea9e18 L |
15353 | _ACEOF |
15354 | ||
15355 | ||
05ea2a05 TT |
15356 | cat >>confdefs.h <<_ACEOF |
15357 | #define PTRACE_TYPE_ARG3 $3 | |
bec39cab | 15358 | _ACEOF |
451928c5 | 15359 | |
60ca704f | 15360 | |
05ea2a05 TT |
15361 | cat >>confdefs.h <<_ACEOF |
15362 | #define PTRACE_TYPE_ARG4 $4 | |
15363 | _ACEOF | |
15364 | ||
15365 | if test -n "$5"; then | |
15366 | ||
15367 | cat >>confdefs.h <<_ACEOF | |
15368 | #define PTRACE_TYPE_ARG5 $5 | |
15369 | _ACEOF | |
451928c5 | 15370 | |
97bf5e38 | 15371 | fi |
451928c5 | 15372 | |
05ea2a05 TT |
15373 | |
15374 | if test "$cross_compiling" = no; then | |
15375 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15376 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15377 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15378 | $as_echo_n "(cached) " >&6 |
05ea2a05 TT |
15379 | else |
15380 | if test "$cross_compiling" = yes; then : | |
15381 | as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
451928c5 | 15382 | else |
81ecdfbb | 15383 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15384 | /* end confdefs.h. */ |
05ea2a05 | 15385 | $ac_includes_default |
bec39cab AC |
15386 | int |
15387 | main () | |
15388 | { | |
05ea2a05 TT |
15389 | /* If this system has a BSD-style setpgrp which takes arguments, |
15390 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
15391 | exit successfully. */ | |
15392 | return setpgrp (1,1) != -1; | |
bec39cab AC |
15393 | ; |
15394 | return 0; | |
15395 | } | |
15396 | _ACEOF | |
05ea2a05 TT |
15397 | if ac_fn_c_try_run "$LINENO"; then : |
15398 | ac_cv_func_setpgrp_void=no | |
451928c5 | 15399 | else |
05ea2a05 | 15400 | ac_cv_func_setpgrp_void=yes |
451928c5 | 15401 | fi |
05ea2a05 TT |
15402 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15403 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
451928c5 AC |
15404 | fi |
15405 | ||
05ea2a05 TT |
15406 | fi |
15407 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 | |
15408 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15409 | if test $ac_cv_func_setpgrp_void = yes; then | |
60ca704f | 15410 | |
05ea2a05 | 15411 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
451928c5 | 15412 | |
97bf5e38 | 15413 | fi |
451928c5 | 15414 | |
05ea2a05 TT |
15415 | else |
15416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15417 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15418 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15419 | $as_echo_n "(cached) " >&6 |
3862412b | 15420 | else |
81ecdfbb | 15421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15422 | /* end confdefs.h. */ |
05ea2a05 TT |
15423 | |
15424 | #include <unistd.h> | |
15425 | ||
bec39cab AC |
15426 | int |
15427 | main () | |
15428 | { | |
05ea2a05 TT |
15429 | |
15430 | if (setpgrp(1,1) == -1) | |
15431 | exit (0); | |
15432 | else | |
15433 | exit (1); | |
15434 | ||
bec39cab AC |
15435 | ; |
15436 | return 0; | |
15437 | } | |
15438 | _ACEOF | |
81ecdfbb | 15439 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15440 | ac_cv_func_setpgrp_void=no |
3862412b | 15441 | else |
05ea2a05 | 15442 | ac_cv_func_setpgrp_void=yes |
3862412b | 15443 | fi |
81ecdfbb | 15444 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b | 15445 | fi |
05ea2a05 TT |
15446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
15447 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15448 | if test "$ac_cv_func_setpgrp_void" = yes; then | |
15449 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h | |
3862412b | 15450 | |
05ea2a05 | 15451 | fi |
97bf5e38 | 15452 | fi |
3862412b | 15453 | |
05ea2a05 TT |
15454 | # Assume we'll default to using the included libiberty regex. |
15455 | gdb_use_included_regex=yes | |
15456 | ||
15457 | # However, if the system regex is GNU regex, then default to *not* | |
15458 | # using the included regex. | |
15459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 | |
15460 | $as_echo_n "checking for GNU regex... " >&6; } | |
15461 | if ${gdb_cv_have_gnu_regex+:} false; then : | |
81ecdfbb | 15462 | $as_echo_n "(cached) " >&6 |
3862412b | 15463 | else |
81ecdfbb | 15464 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15465 | /* end confdefs.h. */ |
05ea2a05 | 15466 | #include <gnu-versions.h> |
bec39cab AC |
15467 | int |
15468 | main () | |
15469 | { | |
05ea2a05 TT |
15470 | #define REGEX_INTERFACE_VERSION 1 |
15471 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
15472 | # error "Version mismatch" | |
15473 | #endif | |
bec39cab AC |
15474 | ; |
15475 | return 0; | |
15476 | } | |
15477 | _ACEOF | |
81ecdfbb | 15478 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15479 | gdb_cv_have_gnu_regex=yes |
3862412b | 15480 | else |
05ea2a05 | 15481 | gdb_cv_have_gnu_regex=no |
3862412b | 15482 | fi |
81ecdfbb | 15483 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b | 15484 | fi |
05ea2a05 TT |
15485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 |
15486 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
15487 | if test "$gdb_cv_have_gnu_regex" = yes; then | |
15488 | gdb_use_included_regex=no | |
15489 | fi | |
3862412b | 15490 | |
3862412b | 15491 | |
05ea2a05 TT |
15492 | # Check whether --with-included-regex was given. |
15493 | if test "${with_included_regex+set}" = set; then : | |
15494 | withval=$with_included_regex; gdb_with_regex=$withval | |
15495 | else | |
15496 | gdb_with_regex=$gdb_use_included_regex | |
97bf5e38 | 15497 | fi |
3862412b | 15498 | |
05ea2a05 | 15499 | if test "$gdb_with_regex" = yes; then |
6e9567fe | 15500 | |
05ea2a05 | 15501 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h |
6e9567fe JB |
15502 | |
15503 | fi | |
15504 | ||
05ea2a05 TT |
15505 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
15506 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
15507 | #include <sys/proc.h> | |
6e9567fe | 15508 | |
e6cdd38e | 15509 | " |
05ea2a05 | 15510 | if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : |
e6cdd38e JB |
15511 | |
15512 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15513 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
e6cdd38e JB |
15514 | _ACEOF |
15515 | ||
15516 | ||
15517 | fi | |
15518 | ||
6e9567fe | 15519 | |
05ea2a05 TT |
15520 | # See if <sys/lwp.h> defines `struct lwp`. |
15521 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 | |
15522 | $as_echo_n "checking for struct lwp... " >&6; } | |
15523 | if ${gdb_cv_struct_lwp+:} false; then : | |
81ecdfbb | 15524 | $as_echo_n "(cached) " >&6 |
596c9d4b | 15525 | else |
81ecdfbb | 15526 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15527 | /* end confdefs.h. */ |
05ea2a05 TT |
15528 | #include <sys/param.h> |
15529 | #define _KMEMUSER | |
15530 | #include <sys/lwp.h> | |
bec39cab AC |
15531 | int |
15532 | main () | |
15533 | { | |
05ea2a05 | 15534 | struct lwp l; |
bec39cab AC |
15535 | ; |
15536 | return 0; | |
15537 | } | |
15538 | _ACEOF | |
81ecdfbb | 15539 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15540 | gdb_cv_struct_lwp=yes |
596c9d4b | 15541 | else |
05ea2a05 | 15542 | gdb_cv_struct_lwp=no |
596c9d4b | 15543 | fi |
81ecdfbb | 15544 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b | 15545 | fi |
05ea2a05 TT |
15546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
15547 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
15548 | if test "$gdb_cv_struct_lwp" = yes; then | |
596c9d4b | 15549 | |
05ea2a05 | 15550 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
596c9d4b | 15551 | |
05ea2a05 | 15552 | fi |
451928c5 | 15553 | |
05ea2a05 TT |
15554 | # See if <machine/reg.h> degines `struct reg'. |
15555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 | |
15556 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
15557 | if ${gdb_cv_struct_reg+:} false; then : | |
81ecdfbb | 15558 | $as_echo_n "(cached) " >&6 |
d84dd0c5 | 15559 | else |
81ecdfbb | 15560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15561 | /* end confdefs.h. */ |
05ea2a05 TT |
15562 | #include <sys/types.h> |
15563 | #include <machine/reg.h> | |
bec39cab AC |
15564 | int |
15565 | main () | |
15566 | { | |
05ea2a05 | 15567 | struct reg r; |
bec39cab AC |
15568 | ; |
15569 | return 0; | |
15570 | } | |
15571 | _ACEOF | |
81ecdfbb | 15572 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15573 | gdb_cv_struct_reg=yes |
d84dd0c5 | 15574 | else |
05ea2a05 | 15575 | gdb_cv_struct_reg=no |
d84dd0c5 | 15576 | fi |
81ecdfbb | 15577 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 | 15578 | fi |
05ea2a05 TT |
15579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
15580 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
15581 | if test "$gdb_cv_struct_reg" = yes; then | |
d84dd0c5 | 15582 | |
05ea2a05 | 15583 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
bec39cab | 15584 | |
05ea2a05 | 15585 | fi |
d84dd0c5 | 15586 | |
05ea2a05 TT |
15587 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
15588 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
15589 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> | |
15590 | #include <machine/reg.h> | |
15591 | " | |
15592 | if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : | |
d84dd0c5 | 15593 | |
05ea2a05 TT |
15594 | cat >>confdefs.h <<_ACEOF |
15595 | #define HAVE_STRUCT_REG_R_FS 1 | |
15596 | _ACEOF | |
15597 | ||
15598 | ||
15599 | fi | |
15600 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> | |
15601 | #include <machine/reg.h> | |
15602 | " | |
15603 | if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : | |
15604 | ||
15605 | cat >>confdefs.h <<_ACEOF | |
15606 | #define HAVE_STRUCT_REG_R_GS 1 | |
15607 | _ACEOF | |
15608 | ||
15609 | ||
15610 | fi | |
15611 | ||
15612 | ||
05ea2a05 TT |
15613 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
15614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 | |
15615 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
15616 | if ${gdb_cv_have_ptrace_getregs+:} false; then : | |
81ecdfbb | 15617 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15618 | else |
81ecdfbb | 15619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15620 | /* end confdefs.h. */ |
05ea2a05 | 15621 | #include <sys/ptrace.h> |
bec39cab AC |
15622 | int |
15623 | main () | |
15624 | { | |
05ea2a05 | 15625 | PTRACE_GETREGS; |
bec39cab AC |
15626 | ; |
15627 | return 0; | |
15628 | } | |
15629 | _ACEOF | |
81ecdfbb | 15630 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15631 | gdb_cv_have_ptrace_getregs=yes |
d45fe813 | 15632 | else |
05ea2a05 | 15633 | gdb_cv_have_ptrace_getregs=no |
d45fe813 | 15634 | fi |
81ecdfbb | 15635 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15636 | fi |
15637 | ||
05ea2a05 TT |
15638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
15639 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
15640 | if test "$gdb_cv_have_ptrace_getregs" = yes; then | |
bec39cab | 15641 | |
05ea2a05 | 15642 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
d45fe813 | 15643 | |
05ea2a05 | 15644 | fi |
d45fe813 | 15645 | |
05ea2a05 TT |
15646 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
15647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 | |
15648 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
15649 | if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : | |
81ecdfbb | 15650 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15651 | else |
81ecdfbb | 15652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15653 | /* end confdefs.h. */ |
05ea2a05 | 15654 | #include <sys/ptrace.h> |
bec39cab AC |
15655 | int |
15656 | main () | |
15657 | { | |
05ea2a05 | 15658 | PTRACE_GETFPXREGS; |
bec39cab AC |
15659 | ; |
15660 | return 0; | |
15661 | } | |
15662 | _ACEOF | |
81ecdfbb | 15663 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15664 | gdb_cv_have_ptrace_getfpxregs=yes |
d45fe813 | 15665 | else |
05ea2a05 | 15666 | gdb_cv_have_ptrace_getfpxregs=no |
d45fe813 | 15667 | fi |
81ecdfbb | 15668 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15669 | fi |
15670 | ||
05ea2a05 TT |
15671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
15672 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
15673 | if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then | |
bec39cab | 15674 | |
05ea2a05 | 15675 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
d45fe813 | 15676 | |
05ea2a05 | 15677 | fi |
d45fe813 | 15678 | |
05ea2a05 TT |
15679 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
15680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 | |
15681 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
15682 | if ${gdb_cv_have_pt_getdbregs+:} false; then : | |
81ecdfbb | 15683 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15684 | else |
81ecdfbb | 15685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15686 | /* end confdefs.h. */ |
05ea2a05 TT |
15687 | #include <sys/types.h> |
15688 | #include <sys/ptrace.h> | |
bec39cab AC |
15689 | int |
15690 | main () | |
15691 | { | |
05ea2a05 | 15692 | PT_GETDBREGS; |
bec39cab AC |
15693 | ; |
15694 | return 0; | |
15695 | } | |
15696 | _ACEOF | |
81ecdfbb | 15697 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15698 | gdb_cv_have_pt_getdbregs=yes |
d45fe813 | 15699 | else |
05ea2a05 | 15700 | gdb_cv_have_pt_getdbregs=no |
d45fe813 | 15701 | fi |
81ecdfbb | 15702 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15703 | fi |
15704 | ||
05ea2a05 TT |
15705 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
15706 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
15707 | if test "$gdb_cv_have_pt_getdbregs" = yes; then | |
bec39cab | 15708 | |
05ea2a05 | 15709 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
d45fe813 | 15710 | |
05ea2a05 | 15711 | fi |
c906108c | 15712 | |
05ea2a05 TT |
15713 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
15714 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 | |
15715 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
15716 | if ${gdb_cv_have_pt_getxmmregs+:} false; then : | |
81ecdfbb | 15717 | $as_echo_n "(cached) " >&6 |
c906108c | 15718 | else |
81ecdfbb | 15719 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15720 | /* end confdefs.h. */ |
05ea2a05 TT |
15721 | #include <sys/types.h> |
15722 | #include <sys/ptrace.h> | |
bec39cab AC |
15723 | int |
15724 | main () | |
15725 | { | |
05ea2a05 | 15726 | PT_GETXMMREGS; |
bec39cab AC |
15727 | ; |
15728 | return 0; | |
15729 | } | |
15730 | _ACEOF | |
81ecdfbb | 15731 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15732 | gdb_cv_have_pt_getxmmregs=yes |
c906108c | 15733 | else |
05ea2a05 | 15734 | gdb_cv_have_pt_getxmmregs=no |
c906108c | 15735 | fi |
81ecdfbb | 15736 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
15737 | fi |
15738 | ||
05ea2a05 TT |
15739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
15740 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
15741 | if test "$gdb_cv_have_pt_getxmmregs" = yes; then | |
bec39cab | 15742 | |
05ea2a05 | 15743 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
c906108c | 15744 | |
05ea2a05 | 15745 | fi |
c906108c | 15746 | |
05ea2a05 TT |
15747 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
15748 | # Older FreeBSD versions don't have the pl_tdname member of | |
15749 | # `struct ptrace_lwpinfo'. | |
15750 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
15751 | " | |
15752 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : | |
43b7e92b | 15753 | |
05ea2a05 TT |
15754 | cat >>confdefs.h <<_ACEOF |
15755 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
43b7e92b | 15756 | _ACEOF |
43b7e92b | 15757 | |
05ea2a05 | 15758 | |
43b7e92b GB |
15759 | fi |
15760 | ||
43b7e92b | 15761 | |
05ea2a05 TT |
15762 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
15763 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
15764 | # FreeBSD 10.3. | |
15765 | 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> | |
15766 | " | |
15767 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : | |
15768 | ||
15769 | cat >>confdefs.h <<_ACEOF | |
15770 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
15771 | _ACEOF | |
43b7e92b | 15772 | |
43b7e92b | 15773 | |
c906108c | 15774 | fi |
c906108c | 15775 | |
05ea2a05 | 15776 | |
bc8bcb4b | 15777 | # Check if the compiler supports the `long long' type. |
c906108c | 15778 | |
81ecdfbb RW |
15779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
15780 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
d0ac1c44 | 15781 | if ${gdb_cv_c_long_long+:} false; then : |
81ecdfbb | 15782 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15783 | else |
81ecdfbb | 15784 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15785 | /* end confdefs.h. */ |
bc8bcb4b | 15786 | extern long long foo; |
bec39cab AC |
15787 | int |
15788 | main () | |
15789 | { | |
bc8bcb4b | 15790 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
15791 | ; |
15792 | return 0; | |
15793 | } | |
15794 | _ACEOF | |
81ecdfbb | 15795 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
15796 | gdb_cv_c_long_long=yes |
15797 | else | |
81ecdfbb | 15798 | gdb_cv_c_long_long=no |
97bf5e38 | 15799 | fi |
81ecdfbb | 15800 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15801 | fi |
81ecdfbb RW |
15802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
15803 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
0ad6b8ee | 15804 | if test "$gdb_cv_c_long_long" != yes; then |
74a0d9f6 | 15805 | # libdecnumber requires long long. |
d0ac1c44 | 15806 | as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 |
97bf5e38 MK |
15807 | fi |
15808 | ||
bc8bcb4b | 15809 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 15810 | |
81ecdfbb RW |
15811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
15812 | $as_echo_n "checking for long long support in printf... " >&6; } | |
d0ac1c44 | 15813 | if ${gdb_cv_printf_has_long_long+:} false; then : |
81ecdfbb | 15814 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15815 | else |
81ecdfbb | 15816 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15817 | gdb_cv_printf_has_long_long=no |
15818 | else | |
81ecdfbb | 15819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15820 | /* end confdefs.h. */ |
bc8bcb4b MK |
15821 | $ac_includes_default |
15822 | int | |
15823 | main () | |
15824 | { | |
15825 | char buf[32]; | |
97bf5e38 MK |
15826 | long long l = 0; |
15827 | l = (l << 16) + 0x0123; | |
15828 | l = (l << 16) + 0x4567; | |
15829 | l = (l << 16) + 0x89ab; | |
15830 | l = (l << 16) + 0xcdef; | |
15831 | sprintf (buf, "0x%016llx", l); | |
15832 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
15833 | ; |
15834 | return 0; | |
c906108c | 15835 | } |
bec39cab | 15836 | _ACEOF |
81ecdfbb | 15837 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
15838 | gdb_cv_printf_has_long_long=yes |
15839 | else | |
81ecdfbb | 15840 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 15841 | fi |
81ecdfbb RW |
15842 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15843 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 15844 | fi |
81ecdfbb | 15845 | |
97bf5e38 | 15846 | fi |
81ecdfbb RW |
15847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
15848 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
0ad6b8ee | 15849 | if test "$gdb_cv_printf_has_long_long" = yes; then |
bc8bcb4b | 15850 | |
81ecdfbb | 15851 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
15852 | |
15853 | fi | |
97bf5e38 | 15854 | |
1a619819 LM |
15855 | # Check if the compiler and runtime support printing decfloats. |
15856 | ||
81ecdfbb RW |
15857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
15858 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
d0ac1c44 | 15859 | if ${gdb_cv_printf_has_decfloat+:} false; then : |
81ecdfbb | 15860 | $as_echo_n "(cached) " >&6 |
1a619819 | 15861 | else |
81ecdfbb | 15862 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
15863 | gdb_cv_printf_has_decfloat=no |
15864 | else | |
81ecdfbb | 15865 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
15866 | /* end confdefs.h. */ |
15867 | $ac_includes_default | |
15868 | int | |
15869 | main () | |
15870 | { | |
15871 | char buf[64]; | |
15872 | _Decimal32 d32 = 1.2345df; | |
15873 | _Decimal64 d64 = 1.2345dd; | |
15874 | _Decimal128 d128 = 1.2345dl; | |
15875 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
15876 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
15877 | ; | |
15878 | return 0; | |
15879 | } | |
15880 | _ACEOF | |
81ecdfbb | 15881 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
15882 | gdb_cv_printf_has_decfloat=yes |
15883 | else | |
81ecdfbb | 15884 | gdb_cv_printf_has_decfloat=no |
1a619819 | 15885 | fi |
81ecdfbb RW |
15886 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15887 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 15888 | fi |
81ecdfbb | 15889 | |
1a619819 | 15890 | fi |
81ecdfbb RW |
15891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
15892 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
0ad6b8ee | 15893 | if test "$gdb_cv_printf_has_decfloat" = yes; then |
1a619819 | 15894 | |
81ecdfbb | 15895 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
15896 | |
15897 | fi | |
15898 | ||
bc8bcb4b MK |
15899 | # Check if the compiler supports the `long double' type. We can't use |
15900 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
15901 | # constants defined in <float.h> that fail on some systems, | |
15902 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 15903 | |
81ecdfbb RW |
15904 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
15905 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
d0ac1c44 | 15906 | if ${gdb_cv_c_long_double+:} false; then : |
81ecdfbb | 15907 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15908 | else |
81ecdfbb | 15909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15910 | /* end confdefs.h. */ |
97bf5e38 | 15911 | long double foo; |
bec39cab | 15912 | _ACEOF |
81ecdfbb | 15913 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 15914 | gdb_cv_c_long_double=yes |
97bf5e38 | 15915 | else |
81ecdfbb | 15916 | gdb_cv_c_long_double=no |
97bf5e38 | 15917 | fi |
81ecdfbb | 15918 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15919 | fi |
81ecdfbb RW |
15920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
15921 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
0ad6b8ee | 15922 | if test "$gdb_cv_c_long_double" = yes; then |
c906108c | 15923 | |
81ecdfbb | 15924 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
15925 | |
15926 | fi | |
15927 | ||
bc8bcb4b | 15928 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 15929 | |
81ecdfbb RW |
15930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
15931 | $as_echo_n "checking for long double support in printf... " >&6; } | |
d0ac1c44 | 15932 | if ${gdb_cv_printf_has_long_double+:} false; then : |
81ecdfbb | 15933 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15934 | else |
81ecdfbb | 15935 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15936 | gdb_cv_printf_has_long_double=no |
15937 | else | |
81ecdfbb | 15938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15939 | /* end confdefs.h. */ |
bc8bcb4b MK |
15940 | $ac_includes_default |
15941 | int | |
15942 | main () | |
15943 | { | |
15944 | char buf[16]; | |
97bf5e38 MK |
15945 | long double f = 3.141592653; |
15946 | sprintf (buf, "%Lg", f); | |
15947 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
15948 | ; |
15949 | return 0; | |
97bf5e38 | 15950 | } |
bec39cab | 15951 | _ACEOF |
81ecdfbb | 15952 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 15953 | gdb_cv_printf_has_long_double=yes |
c906108c | 15954 | else |
81ecdfbb | 15955 | gdb_cv_printf_has_long_double=no |
c906108c | 15956 | fi |
81ecdfbb RW |
15957 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15958 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 15959 | fi |
81ecdfbb | 15960 | |
c906108c | 15961 | fi |
81ecdfbb RW |
15962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
15963 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
0ad6b8ee | 15964 | if test "$gdb_cv_printf_has_long_double" = yes; then |
bc8bcb4b | 15965 | |
81ecdfbb | 15966 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
15967 | |
15968 | fi | |
97bf5e38 | 15969 | |
bc8bcb4b | 15970 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 15971 | |
81ecdfbb RW |
15972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
15973 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
d0ac1c44 | 15974 | if ${gdb_cv_scanf_has_long_double+:} false; then : |
81ecdfbb | 15975 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15976 | else |
81ecdfbb | 15977 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15978 | gdb_cv_scanf_has_long_double=no |
15979 | else | |
81ecdfbb | 15980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15981 | /* end confdefs.h. */ |
bc8bcb4b MK |
15982 | #include <stdio.h> |
15983 | int | |
15984 | main () | |
15985 | { | |
15986 | char *buf = "3.141592653"; | |
97bf5e38 MK |
15987 | long double f = 0; |
15988 | sscanf (buf, "%Lg", &f); | |
15989 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
15990 | ; |
15991 | return 0; | |
97bf5e38 | 15992 | } |
bec39cab | 15993 | _ACEOF |
81ecdfbb | 15994 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
15995 | gdb_cv_scanf_has_long_double=yes |
15996 | else | |
81ecdfbb | 15997 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 15998 | fi |
81ecdfbb RW |
15999 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16000 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 16001 | fi |
81ecdfbb | 16002 | |
c906108c | 16003 | fi |
81ecdfbb RW |
16004 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
16005 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
0ad6b8ee | 16006 | if test "$gdb_cv_scanf_has_long_double" = yes; then |
bc8bcb4b | 16007 | |
81ecdfbb | 16008 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16009 | |
16010 | fi | |
c906108c | 16011 | |
438013df AO |
16012 | case ${host_os} in |
16013 | aix*) | |
81ecdfbb RW |
16014 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
16015 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d0ac1c44 | 16016 | if ${gdb_cv_bigtoc+:} false; then : |
81ecdfbb | 16017 | $as_echo_n "(cached) " >&6 |
438013df | 16018 | else |
bec39cab | 16019 | |
438013df AO |
16020 | SAVE_LDFLAGS=$LDFLAGS |
16021 | ||
16022 | case $GCC in | |
16023 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
16024 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
16025 | esac | |
16026 | ||
16027 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 16028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16029 | /* end confdefs.h. */ |
438013df | 16030 | |
bec39cab AC |
16031 | int |
16032 | main () | |
16033 | { | |
438013df | 16034 | int i; |
bec39cab AC |
16035 | ; |
16036 | return 0; | |
16037 | } | |
16038 | _ACEOF | |
81ecdfbb | 16039 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16040 | |
81ecdfbb RW |
16041 | else |
16042 | gdb_cv_bigtoc= | |
438013df | 16043 | fi |
81ecdfbb RW |
16044 | rm -f core conftest.err conftest.$ac_objext \ |
16045 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 16046 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 16047 | |
bec39cab | 16048 | fi |
81ecdfbb RW |
16049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
16050 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
16051 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
16052 | ;; | |
16053 | esac | |
16054 | ||
38f6b338 | 16055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 16056 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
16057 | dynamic_list=false |
16058 | if test "${gdb_native}" = yes; then | |
16059 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
16060 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
16061 | # may not be supported there. | |
16062 | old_LDFLAGS="$LDFLAGS" | |
16063 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
16064 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
16065 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
16066 | if test "${have_libpython}" = no; then | |
16067 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
16068 | /* end confdefs.h. */ |
16069 | ||
16070 | int | |
16071 | main () | |
16072 | { | |
16073 | ||
16074 | ; | |
16075 | return 0; | |
16076 | } | |
16077 | _ACEOF | |
16078 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
16079 | dynamic_list=true |
16080 | fi | |
16081 | rm -f core conftest.err conftest.$ac_objext \ | |
16082 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
16083 | else |
16084 | # Workaround http://bugs.python.org/issue4434 where static | |
16085 | # libpythonX.Y.a would get its symbols required for | |
16086 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
16087 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
16088 | |
16089 | # Note the workaround for Python | |
16090 | # http://bugs.python.org/issue10112 earlier has removed | |
16091 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
16092 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
16093 | # always pass. | |
38f6b338 JK |
16094 | old_CFLAGS="$CFLAGS" |
16095 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
16096 | old_LIBS="$LIBS" |
16097 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
16098 | old_CPPFLAGS="$CPPFLAGS" |
16099 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 16100 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 16101 | true |
f6528abd | 16102 | else |
3bebe2f2 JK |
16103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16104 | /* end confdefs.h. */ | |
1b4f615e | 16105 | #include "Python.h" |
3bebe2f2 JK |
16106 | int |
16107 | main () | |
16108 | { | |
16109 | int err; | |
38f6b338 JK |
16110 | Py_Initialize (); |
16111 | err = PyRun_SimpleString ("import itertools\n"); | |
16112 | Py_Finalize (); | |
16113 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
16114 | ; |
16115 | return 0; | |
16116 | } | |
16117 | _ACEOF | |
16118 | if ac_fn_c_try_run "$LINENO"; then : | |
16119 | dynamic_list=true | |
16120 | fi | |
16121 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16122 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16123 | fi | |
16124 | ||
8c1fb155 | 16125 | LIBS="$old_LIBS" |
38f6b338 | 16126 | CFLAGS="$old_CFLAGS" |
1b4f615e | 16127 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
16128 | fi |
16129 | LDFLAGS="$old_LDFLAGS" | |
16130 | fi | |
16131 | if $dynamic_list; then | |
16132 | found="-Wl,--dynamic-list" | |
16133 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 16134 | else |
38f6b338 JK |
16135 | found="-rdynamic" |
16136 | RDYNAMIC="-rdynamic" | |
f6528abd | 16137 | fi |
f6528abd | 16138 | |
38f6b338 | 16139 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 16140 | $as_echo "$found" >&6; } |
0407b3f1 | 16141 | |
f6528abd | 16142 | |
0ad6b8ee | 16143 | if test "${build}" = "${host}" -a "${host}" = "${target}" ; then |
c906108c | 16144 | case ${host_os} in |
d92419e5 | 16145 | aix*) |
81ecdfbb RW |
16146 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
16147 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
d0ac1c44 | 16148 | if ${gdb_cv_have_aix_thread_debug+:} false; then : |
81ecdfbb | 16149 | $as_echo_n "(cached) " >&6 |
bec39cab | 16150 | else |
81ecdfbb | 16151 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16152 | /* end confdefs.h. */ |
d92419e5 | 16153 | #include <sys/pthdebug.h> |
bec39cab AC |
16154 | int |
16155 | main () | |
16156 | { | |
d92419e5 JB |
16157 | #ifndef PTHDB_VERSION_3 |
16158 | #error | |
16159 | #endif | |
bec39cab AC |
16160 | ; |
16161 | return 0; | |
16162 | } | |
16163 | _ACEOF | |
81ecdfbb | 16164 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
16165 | gdb_cv_have_aix_thread_debug=yes |
16166 | else | |
81ecdfbb | 16167 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 16168 | fi |
81ecdfbb | 16169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
16170 | fi |
16171 | ||
81ecdfbb RW |
16172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
16173 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
0ad6b8ee | 16174 | if test "$gdb_cv_have_aix_thread_debug" = yes; then |
d92419e5 | 16175 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" |
3483b318 | 16176 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 16177 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
16178 | |
16179 | # Older versions of AIX do not provide the declaration for | |
16180 | # the getthrds function (it appears that it was introduced | |
16181 | # with AIX 6.x). | |
16182 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
16183 | " | |
d0ac1c44 | 16184 | if test "x$ac_cv_have_decl_getthrds" = xyes; then : |
d645e32e JB |
16185 | ac_have_decl=1 |
16186 | else | |
16187 | ac_have_decl=0 | |
16188 | fi | |
16189 | ||
16190 | cat >>confdefs.h <<_ACEOF | |
16191 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
16192 | _ACEOF | |
16193 | ||
d92419e5 JB |
16194 | fi |
16195 | ;; | |
c906108c | 16196 | esac |
bec39cab | 16197 | |
c906108c SS |
16198 | fi |
16199 | ||
3f47be5c | 16200 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
16201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
16202 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
d0ac1c44 | 16203 | if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : |
81ecdfbb | 16204 | $as_echo_n "(cached) " >&6 |
bec39cab | 16205 | else |
81ecdfbb | 16206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16207 | /* end confdefs.h. */ |
3f47be5c | 16208 | #include <thread_db.h> |
bec39cab AC |
16209 | int |
16210 | main () | |
16211 | { | |
3f47be5c | 16212 | int i = TD_NOTALLOC; |
bec39cab AC |
16213 | ; |
16214 | return 0; | |
16215 | } | |
16216 | _ACEOF | |
81ecdfbb | 16217 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
16218 | gdb_cv_thread_db_h_has_td_notalloc=yes |
16219 | else | |
81ecdfbb | 16220 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 16221 | |
3f47be5c | 16222 | fi |
81ecdfbb | 16223 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 16224 | |
bec39cab | 16225 | fi |
81ecdfbb RW |
16226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
16227 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
16228 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
16229 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
d0ac1c44 | 16230 | if ${gdb_cv_thread_db_h_has_td_version+:} false; then : |
81ecdfbb | 16231 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16232 | else |
81ecdfbb | 16233 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16234 | /* end confdefs.h. */ |
16235 | #include <thread_db.h> | |
16236 | int | |
16237 | main () | |
16238 | { | |
16239 | int i = TD_VERSION; | |
16240 | ; | |
16241 | return 0; | |
16242 | } | |
16243 | _ACEOF | |
81ecdfbb | 16244 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16245 | gdb_cv_thread_db_h_has_td_version=yes |
16246 | else | |
81ecdfbb | 16247 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
16248 | |
16249 | fi | |
81ecdfbb | 16250 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16251 | |
16252 | fi | |
81ecdfbb RW |
16253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
16254 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
16255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
16256 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
d0ac1c44 | 16257 | if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : |
81ecdfbb | 16258 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16259 | else |
81ecdfbb | 16260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16261 | /* end confdefs.h. */ |
16262 | #include <thread_db.h> | |
16263 | int | |
16264 | main () | |
16265 | { | |
16266 | int i = TD_NOTLS; | |
16267 | ; | |
16268 | return 0; | |
16269 | } | |
16270 | _ACEOF | |
81ecdfbb | 16271 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16272 | gdb_cv_thread_db_h_has_td_notls=yes |
16273 | else | |
81ecdfbb | 16274 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
16275 | |
16276 | fi | |
81ecdfbb | 16277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16278 | |
16279 | fi | |
81ecdfbb RW |
16280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
16281 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
16282 | fi |
16283 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 16284 | |
81ecdfbb | 16285 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 16286 | |
59f80f10 DJ |
16287 | fi |
16288 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
16289 | ||
81ecdfbb | 16290 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
16291 | |
16292 | fi | |
16293 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
16294 | ||
81ecdfbb | 16295 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 16296 | |
3f47be5c EZ |
16297 | fi |
16298 | ||
e655c1a2 PA |
16299 | case $host_os in |
16300 | go32* | *djgpp*) | |
16301 | gdbinit=gdb.ini | |
16302 | ;; | |
16303 | *) | |
16304 | gdbinit=.gdbinit | |
16305 | ;; | |
16306 | esac | |
16307 | ||
16308 | cat >>confdefs.h <<_ACEOF | |
16309 | #define GDBINIT "$gdbinit" | |
16310 | _ACEOF | |
16311 | ||
16312 | ||
fb40c209 | 16313 | |
f83d8a90 DE |
16314 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
16315 | # except that the argument to --with-sysroot is optional. | |
16316 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
16317 | if test "x$with_sysroot" = xyes; then | |
16318 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
16319 | fi | |
bec39cab | 16320 | |
81ecdfbb RW |
16321 | # Check whether --with-sysroot was given. |
16322 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
16323 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
16324 | else | |
16325 | TARGET_SYSTEM_ROOT= | |
16326 | fi | |
030292b7 | 16327 | |
030292b7 | 16328 | |
f83d8a90 DE |
16329 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
16330 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16331 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
16332 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 16333 | |
f83d8a90 DE |
16334 | cat >>confdefs.h <<_ACEOF |
16335 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
16336 | _ACEOF | |
bec39cab | 16337 | |
030292b7 | 16338 | |
b14b1491 | 16339 | |
f83d8a90 DE |
16340 | |
16341 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16342 | if test "x$prefix" = xNONE; then | |
16343 | test_prefix=/usr/local | |
16344 | else | |
16345 | test_prefix=$prefix | |
16346 | fi | |
16347 | else | |
16348 | test_prefix=$exec_prefix | |
16349 | fi | |
16350 | value=0 | |
16351 | case ${ac_define_dir} in | |
16352 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16353 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16354 | value=1 | |
16355 | ;; | |
16356 | esac | |
16357 | ||
16358 | cat >>confdefs.h <<_ACEOF | |
16359 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
16360 | _ACEOF | |
030292b7 DJ |
16361 | |
16362 | ||
16363 | ||
16e7150e | 16364 | |
16e7150e | 16365 | |
81ecdfbb RW |
16366 | # Check whether --with-system-gdbinit was given. |
16367 | if test "${with_system_gdbinit+set}" = set; then : | |
16368 | withval=$with_system_gdbinit; | |
b14b1491 TT |
16369 | SYSTEM_GDBINIT=$withval |
16370 | else | |
16371 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
16372 | fi |
16373 | ||
16e7150e JG |
16374 | |
16375 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16376 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 16377 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
16378 | ac_define_dir=`eval echo $ac_define_dir` |
16379 | ||
16380 | cat >>confdefs.h <<_ACEOF | |
16381 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
16382 | _ACEOF | |
16383 | ||
16384 | ||
16385 | ||
0c4a4063 | 16386 | |
b14b1491 TT |
16387 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
16388 | if test "x$prefix" = xNONE; then | |
16389 | test_prefix=/usr/local | |
16390 | else | |
16391 | test_prefix=$prefix | |
16392 | fi | |
16393 | else | |
16394 | test_prefix=$exec_prefix | |
16395 | fi | |
16396 | value=0 | |
16397 | case ${ac_define_dir} in | |
16398 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16399 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16400 | value=1 | |
16401 | ;; | |
16402 | esac | |
16e7150e | 16403 | |
b14b1491 TT |
16404 | cat >>confdefs.h <<_ACEOF |
16405 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
16406 | _ACEOF |
16407 | ||
b14b1491 | 16408 | |
16e7150e | 16409 | |
0c4a4063 | 16410 | |
b835bb52 | 16411 | |
ed2a2229 CB |
16412 | # Check whether --with-system-gdbinit-dir was given. |
16413 | if test "${with_system_gdbinit_dir+set}" = set; then : | |
16414 | withval=$with_system_gdbinit_dir; | |
16415 | SYSTEM_GDBINIT_DIR=$withval | |
16416 | else | |
16417 | SYSTEM_GDBINIT_DIR= | |
16418 | fi | |
16419 | ||
16420 | ||
16421 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16422 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16423 | ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR` | |
16424 | ac_define_dir=`eval echo $ac_define_dir` | |
16425 | ||
16426 | cat >>confdefs.h <<_ACEOF | |
16427 | #define SYSTEM_GDBINIT_DIR "$ac_define_dir" | |
16428 | _ACEOF | |
16429 | ||
16430 | ||
16431 | ||
16432 | ||
16433 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16434 | if test "x$prefix" = xNONE; then | |
16435 | test_prefix=/usr/local | |
16436 | else | |
16437 | test_prefix=$prefix | |
16438 | fi | |
16439 | else | |
16440 | test_prefix=$exec_prefix | |
16441 | fi | |
16442 | value=0 | |
16443 | case ${ac_define_dir} in | |
16444 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16445 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16446 | value=1 | |
16447 | ;; | |
16448 | esac | |
16449 | ||
16450 | cat >>confdefs.h <<_ACEOF | |
16451 | #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value | |
16452 | _ACEOF | |
16453 | ||
16454 | ||
16455 | ||
16456 | ||
16457 | ||
81ecdfbb RW |
16458 | # Check whether --enable-werror was given. |
16459 | if test "${enable_werror+set}" = set; then : | |
16460 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
16461 | yes | y) ERROR_ON_WARNING="yes" ;; |
16462 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 16463 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 16464 | esac |
81ecdfbb RW |
16465 | fi |
16466 | ||
094a342e | 16467 | |
9a084706 PA |
16468 | # Enable -Werror by default when using gcc. Turn it off for releases. |
16469 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
16470 | ERROR_ON_WARNING=yes |
16471 | fi | |
16472 | ||
16473 | WERROR_CFLAGS="" | |
16474 | if test "${ERROR_ON_WARNING}" = yes ; then | |
16475 | WERROR_CFLAGS="-Werror" | |
16476 | fi | |
16477 | ||
cf6de44d | 16478 | # The options we'll try to enable. |
aac331e4 | 16479 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 16480 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
aac331e4 | 16481 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 16482 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 16483 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
7f8a5d38 | 16484 | -Wno-mismatched-tags \ |
632e107b | 16485 | -Wno-error=deprecated-register \ |
85e26832 | 16486 | -Wsuggest-override \ |
1a34f210 | 16487 | -Wimplicit-fallthrough=3 \ |
96643e35 | 16488 | -Wduplicated-cond \ |
33a6bc35 TT |
16489 | -Wshadow=local \ |
16490 | -Wdeprecated-copy \ | |
16491 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 16492 | -Wredundant-move \ |
8ddd8e0e | 16493 | -Wmissing-declarations \ |
a0761e34 | 16494 | -Wmissing-prototypes \ |
898e7f60 SM |
16495 | -Wstrict-null-sentinel \ |
16496 | " | |
3bc3d82a | 16497 | |
3526781e | 16498 | case "${host}" in |
4fa7574e RO |
16499 | *-*-mingw32*) |
16500 | # Enable -Wno-format by default when using gcc on mingw since many | |
16501 | # GCC versions complain about %I64. | |
16502 | build_warnings="$build_warnings -Wno-format" ;; | |
16503 | *-*-solaris*) | |
16504 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
16505 | # doesn't understand. | |
16506 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
16507 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
16508 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
16509 | *) |
16510 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
16511 | # but there's a special case for this below. | |
16512 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
3526781e DJ |
16513 | esac |
16514 | ||
81ecdfbb RW |
16515 | # Check whether --enable-build-warnings was given. |
16516 | if test "${enable_build_warnings+set}" = set; then : | |
16517 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
16518 | yes) ;; |
16519 | no) build_warnings="-w";; | |
16520 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16521 | build_warnings="${build_warnings} ${t}";; | |
16522 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16523 | build_warnings="${t} ${build_warnings}";; | |
16524 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16525 | esac | |
d4f3574e | 16526 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 16527 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 16528 | fi |
81ecdfbb RW |
16529 | fi |
16530 | # Check whether --enable-gdb-build-warnings was given. | |
16531 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
16532 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
16533 | yes) ;; |
16534 | no) build_warnings="-w";; | |
16535 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16536 | build_warnings="${build_warnings} ${t}";; | |
16537 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16538 | build_warnings="${t} ${build_warnings}";; | |
16539 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16540 | esac | |
16541 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
16542 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
16543 | fi | |
81ecdfbb | 16544 | fi |
3bc3d82a PA |
16545 | |
16546 | # The set of warnings supported by a C++ compiler is not the same as | |
16547 | # of the C compiler. | |
cf6de44d | 16548 | ac_ext=cpp |
3bc3d82a PA |
16549 | ac_cpp='$CXXCPP $CPPFLAGS' |
16550 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16551 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16552 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
16553 | ||
3bc3d82a | 16554 | |
81ecdfbb | 16555 | WARN_CFLAGS="" |
c906108c SS |
16556 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
16557 | then | |
81ecdfbb RW |
16558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
16559 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
16560 | # Separate out the -Werror flag as some files just cannot be |
16561 | # compiled with it enabled. | |
16562 | for w in ${build_warnings}; do | |
7544db95 PA |
16563 | # GCC does not complain about -Wno-unknown-warning. Invert |
16564 | # and test -Wunknown-warning instead. | |
16565 | case $w in | |
16566 | -Wno-*) | |
16567 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
16568 | -Wformat-nonliteral) |
16569 | # gcc requires -Wformat before -Wformat-nonliteral | |
16570 | # will work, so stick them together. | |
16571 | w="-Wformat $w" | |
16572 | wtest="$w" | |
16573 | ;; | |
7544db95 PA |
16574 | *) |
16575 | wtest=$w ;; | |
16576 | esac | |
16577 | ||
746a987d AC |
16578 | case $w in |
16579 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
16580 | *) |
16581 | # Check whether GCC accepts it. | |
4536bbc6 | 16582 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 16583 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 16584 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 16585 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
16586 | if test "x$w" = "x-Wunused-variable"; then |
16587 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
16588 | # fixed in GCC 4.9. This test is derived from the gdb | |
16589 | # source code that triggered this bug in GCC. | |
16590 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16591 | /* end confdefs.h. */ | |
16592 | struct scoped_restore_base {}; | |
16593 | struct scoped_restore_tmpl : public scoped_restore_base { | |
16594 | ~scoped_restore_tmpl() {} | |
16595 | }; | |
16596 | int | |
16597 | main () | |
16598 | { | |
16599 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
16600 | ; | |
16601 | return 0; | |
16602 | } | |
16603 | _ACEOF | |
16604 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
16605 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
16606 | fi | |
16607 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16608 | else | |
16609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16610 | /* end confdefs.h. */ |
4536bbc6 | 16611 | |
bec39cab AC |
16612 | int |
16613 | main () | |
16614 | { | |
4536bbc6 | 16615 | |
bec39cab AC |
16616 | ; |
16617 | return 0; | |
16618 | } | |
16619 | _ACEOF | |
3bc3d82a | 16620 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 16621 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 16622 | fi |
81ecdfbb | 16623 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a0de763e | 16624 | fi |
4536bbc6 | 16625 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 16626 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
16627 | esac |
16628 | done | |
81ecdfbb RW |
16629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
16630 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
16631 | fi |
16632 | ||
16633 | ||
104c1213 | 16634 | |
cf6de44d | 16635 | ac_ext=c |
3bc3d82a PA |
16636 | ac_cpp='$CPP $CPPFLAGS' |
16637 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16638 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16639 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
16640 | ||
3bc3d82a | 16641 | |
b835bb52 | 16642 | |
f35d5ade TT |
16643 | # Check whether --enable-ubsan was given. |
16644 | if test "${enable_ubsan+set}" = set; then : | |
16645 | enableval=$enable_ubsan; | |
16646 | else | |
eff98030 | 16647 | enable_ubsan=no |
f35d5ade TT |
16648 | fi |
16649 | ||
16650 | if test "x$enable_ubsan" = xauto; then | |
16651 | if $development; then | |
16652 | enable_ubsan=yes | |
16653 | fi | |
16654 | fi | |
16655 | ac_ext=cpp | |
16656 | ac_cpp='$CXXCPP $CPPFLAGS' | |
16657 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16658 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16659 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
16660 | ||
16661 | if test "x$enable_ubsan" = xyes; then | |
16662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5 | |
16663 | $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; } | |
16664 | saved_CXXFLAGS="$CXXFLAGS" | |
16665 | CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
16666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16667 | /* end confdefs.h. */ | |
16668 | ||
16669 | int | |
16670 | main () | |
16671 | { | |
16672 | ||
16673 | ; | |
16674 | return 0; | |
16675 | } | |
16676 | _ACEOF | |
16677 | if ac_fn_cxx_try_link "$LINENO"; then : | |
16678 | enable_ubsan=yes | |
16679 | else | |
16680 | enable_ubsan=no | |
16681 | fi | |
16682 | rm -f core conftest.err conftest.$ac_objext \ | |
16683 | conftest$ac_exeext conftest.$ac_ext | |
16684 | CXXFLAGS="$saved_CXXFLAGS" | |
16685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 | |
16686 | $as_echo "$enable_ubsan" >&6; } | |
16687 | if test "x$enable_ubsan" = xyes; then | |
16688 | WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
16689 | CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined" | |
16690 | fi | |
16691 | fi | |
16692 | ac_ext=c | |
16693 | ac_cpp='$CPP $CPPFLAGS' | |
16694 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16695 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16696 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
16697 | ||
16698 | ||
16699 | ||
7a292a7a | 16700 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
16701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
16702 | $as_echo_n "checking for cygwin... " >&6; } | |
d0ac1c44 | 16703 | if ${gdb_cv_os_cygwin+:} false; then : |
81ecdfbb | 16704 | $as_echo_n "(cached) " >&6 |
bec39cab | 16705 | else |
81ecdfbb | 16706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16707 | /* end confdefs.h. */ |
7a292a7a SS |
16708 | |
16709 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
16710 | lose | |
16711 | #endif | |
bec39cab | 16712 | _ACEOF |
7a292a7a | 16713 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 16714 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
16715 | gdb_cv_os_cygwin=yes |
16716 | else | |
7a292a7a SS |
16717 | gdb_cv_os_cygwin=no |
16718 | fi | |
16719 | rm -f conftest* | |
16720 | ||
16721 | fi | |
81ecdfbb RW |
16722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
16723 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 16724 | |
aff38e61 | 16725 | |
3eb25fda | 16726 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 16727 | case ${host} in |
95cbc983 AC |
16728 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
16729 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 16730 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
c1168a2f | 16731 | *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;; |
aff38e61 AC |
16732 | esac |
16733 | ||
16734 | ||
cd0fc7c3 SS |
16735 | # libreadline needs libuser32.a in a cygwin environment |
16736 | WIN32LIBS= | |
0ad6b8ee | 16737 | if test x"$gdb_cv_os_cygwin" = xyes; then |
c5394b80 JM |
16738 | WIN32LIBS="-luser32" |
16739 | case "${target}" in | |
16740 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
16741 | ;; | |
16742 | esac | |
cd0fc7c3 | 16743 | fi |
c906108c | 16744 | |
b4505029 | 16745 | # The ser-tcp.c module requires sockets. |
b2ceabe8 TT |
16746 | # Note that WIN32APILIBS is set by GDB_AC_COMMON. |
16747 | WIN32LIBS="$WIN32LIBS $WIN32APILIBS" | |
7a292a7a | 16748 | |
31d99776 | 16749 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
16750 | |
16751 | OLD_CFLAGS=$CFLAGS | |
16752 | OLD_LDFLAGS=$LDFLAGS | |
16753 | OLD_LIBS=$LIBS | |
16754 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
16755 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
16756 | # always want our bfd. | |
16757 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
16758 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
16759 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 16760 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 16761 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 16762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb | 16763 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
d0ac1c44 | 16764 | if ${gdb_cv_var_elf+:} false; then : |
81ecdfbb | 16765 | $as_echo_n "(cached) " >&6 |
31d99776 | 16766 | else |
81ecdfbb | 16767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
16768 | /* end confdefs.h. */ |
16769 | #include <stdlib.h> | |
def63ff0 TT |
16770 | #include "bfd.h" |
16771 | #include "elf-bfd.h" | |
31d99776 DJ |
16772 | |
16773 | int | |
16774 | main () | |
16775 | { | |
def63ff0 | 16776 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
16777 | ; |
16778 | return 0; | |
16779 | } | |
16780 | _ACEOF | |
81ecdfbb | 16781 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
16782 | gdb_cv_var_elf=yes |
16783 | else | |
81ecdfbb | 16784 | gdb_cv_var_elf=no |
31d99776 | 16785 | fi |
81ecdfbb RW |
16786 | rm -f core conftest.err conftest.$ac_objext \ |
16787 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 16788 | fi |
81ecdfbb RW |
16789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
16790 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
16791 | CFLAGS=$OLD_CFLAGS |
16792 | LDFLAGS=$OLD_LDFLAGS | |
16793 | LIBS=$OLD_LIBS | |
0ad6b8ee | 16794 | if test "$gdb_cv_var_elf" = yes; then |
d4777acb | 16795 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
31d99776 | 16796 | |
81ecdfbb | 16797 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 16798 | |
075ff26d JK |
16799 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
16800 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
16801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
16802 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 16803 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
16804 | $as_echo_n "(cached) " >&6 |
16805 | else | |
16806 | ac_func_search_save_LIBS=$LIBS | |
16807 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16808 | /* end confdefs.h. */ | |
16809 | ||
16810 | /* Override any GCC internal prototype to avoid an error. | |
16811 | Use char because int might match the return type of a GCC | |
16812 | builtin and then its argument prototype would still apply. */ | |
16813 | #ifdef __cplusplus | |
16814 | extern "C" | |
16815 | #endif | |
16816 | char dlopen (); | |
16817 | int | |
16818 | main () | |
16819 | { | |
16820 | return dlopen (); | |
16821 | ; | |
16822 | return 0; | |
16823 | } | |
16824 | _ACEOF | |
16825 | for ac_lib in '' dl; do | |
16826 | if test -z "$ac_lib"; then | |
16827 | ac_res="none required" | |
16828 | else | |
16829 | ac_res=-l$ac_lib | |
16830 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
16831 | fi | |
16832 | if ac_fn_c_try_link "$LINENO"; then : | |
16833 | ac_cv_search_dlopen=$ac_res | |
16834 | fi | |
16835 | rm -f core conftest.err conftest.$ac_objext \ | |
16836 | conftest$ac_exeext | |
d0ac1c44 | 16837 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
16838 | break |
16839 | fi | |
16840 | done | |
d0ac1c44 | 16841 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
16842 | |
16843 | else | |
16844 | ac_cv_search_dlopen=no | |
16845 | fi | |
16846 | rm conftest.$ac_ext | |
16847 | LIBS=$ac_func_search_save_LIBS | |
16848 | fi | |
16849 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
16850 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
16851 | ac_res=$ac_cv_search_dlopen | |
16852 | if test "$ac_res" != no; then : | |
16853 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
16854 | ||
16855 | fi | |
16856 | ||
075ff26d | 16857 | fi |
31d99776 | 16858 | fi |
31d99776 | 16859 | |
4f05add4 TT |
16860 | # Add macho support to GDB, but only if BFD includes it. |
16861 | ||
16862 | OLD_CFLAGS=$CFLAGS | |
16863 | OLD_LDFLAGS=$LDFLAGS | |
16864 | OLD_LIBS=$LIBS | |
16865 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
16866 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
16867 | # always want our bfd. | |
16868 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
16869 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
16870 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 16871 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 16872 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
16873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
16874 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
d0ac1c44 | 16875 | if ${gdb_cv_var_macho+:} false; then : |
4f05add4 TT |
16876 | $as_echo_n "(cached) " >&6 |
16877 | else | |
16878 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16879 | /* end confdefs.h. */ | |
16880 | #include <stdlib.h> | |
16881 | #include "bfd.h" | |
16882 | #include "mach-o.h" | |
16883 | ||
16884 | int | |
16885 | main () | |
16886 | { | |
16887 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
16888 | ; | |
16889 | return 0; | |
16890 | } | |
16891 | _ACEOF | |
16892 | if ac_fn_c_try_link "$LINENO"; then : | |
16893 | gdb_cv_var_macho=yes | |
16894 | else | |
16895 | gdb_cv_var_macho=no | |
16896 | fi | |
16897 | rm -f core conftest.err conftest.$ac_objext \ | |
16898 | conftest$ac_exeext conftest.$ac_ext | |
16899 | fi | |
16900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
16901 | $as_echo "$gdb_cv_var_macho" >&6; } | |
16902 | CFLAGS=$OLD_CFLAGS | |
16903 | LDFLAGS=$OLD_LDFLAGS | |
16904 | LIBS=$OLD_LIBS | |
0ad6b8ee | 16905 | if test "$gdb_cv_var_macho" = yes; then |
4f05add4 TT |
16906 | CONFIG_OBS="$CONFIG_OBS machoread.o" |
16907 | fi | |
16908 | ||
121ce6e5 DJ |
16909 | # Add any host-specific objects to GDB. |
16910 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
16911 | ||
608e2dbb | 16912 | # If building on ELF, look for lzma support for embedded compressed debug info. |
0ad6b8ee | 16913 | if test "$gdb_cv_var_elf" = yes; then |
608e2dbb TT |
16914 | |
16915 | # Check whether --with-lzma was given. | |
16916 | if test "${with_lzma+set}" = set; then : | |
16917 | withval=$with_lzma; | |
16918 | else | |
16919 | with_lzma=auto | |
16920 | fi | |
16921 | ||
16922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
16923 | $as_echo_n "checking whether to use lzma... " >&6; } | |
16924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
16925 | $as_echo "$with_lzma" >&6; } | |
16926 | ||
16927 | if test "${with_lzma}" != no; then | |
16928 | ||
16929 | ||
16930 | ||
16931 | ||
16932 | ||
16933 | ||
16934 | ||
16935 | ||
16936 | use_additional=yes | |
16937 | ||
16938 | acl_save_prefix="$prefix" | |
16939 | prefix="$acl_final_prefix" | |
16940 | acl_save_exec_prefix="$exec_prefix" | |
16941 | exec_prefix="$acl_final_exec_prefix" | |
16942 | ||
16943 | eval additional_includedir=\"$includedir\" | |
16944 | eval additional_libdir=\"$libdir\" | |
16945 | ||
16946 | exec_prefix="$acl_save_exec_prefix" | |
16947 | prefix="$acl_save_prefix" | |
16948 | ||
16949 | ||
16950 | # Check whether --with-liblzma-prefix was given. | |
16951 | if test "${with_liblzma_prefix+set}" = set; then : | |
16952 | withval=$with_liblzma_prefix; | |
16953 | if test "X$withval" = "Xno"; then | |
16954 | use_additional=no | |
16955 | else | |
16956 | if test "X$withval" = "X"; then | |
16957 | ||
16958 | acl_save_prefix="$prefix" | |
16959 | prefix="$acl_final_prefix" | |
16960 | acl_save_exec_prefix="$exec_prefix" | |
16961 | exec_prefix="$acl_final_exec_prefix" | |
16962 | ||
16963 | eval additional_includedir=\"$includedir\" | |
16964 | eval additional_libdir=\"$libdir\" | |
16965 | ||
16966 | exec_prefix="$acl_save_exec_prefix" | |
16967 | prefix="$acl_save_prefix" | |
16968 | ||
16969 | else | |
16970 | additional_includedir="$withval/include" | |
16971 | additional_libdir="$withval/lib" | |
16972 | fi | |
16973 | fi | |
16974 | ||
16975 | fi | |
16976 | ||
9f1528a1 AB |
16977 | |
16978 | # Check whether --with-liblzma-type was given. | |
16979 | if test "${with_liblzma_type+set}" = set; then : | |
16980 | withval=$with_liblzma_type; with_liblzma_type=$withval | |
16981 | else | |
16982 | with_liblzma_type=auto | |
16983 | fi | |
16984 | ||
16985 | lib_type=`eval echo \$with_liblzma_type` | |
16986 | ||
608e2dbb TT |
16987 | LIBLZMA= |
16988 | LTLIBLZMA= | |
16989 | INCLZMA= | |
16990 | rpathdirs= | |
16991 | ltrpathdirs= | |
16992 | names_already_handled= | |
16993 | names_next_round='lzma ' | |
16994 | while test -n "$names_next_round"; do | |
16995 | names_this_round="$names_next_round" | |
16996 | names_next_round= | |
16997 | for name in $names_this_round; do | |
16998 | already_handled= | |
16999 | for n in $names_already_handled; do | |
17000 | if test "$n" = "$name"; then | |
17001 | already_handled=yes | |
17002 | break | |
17003 | fi | |
17004 | done | |
17005 | if test -z "$already_handled"; then | |
17006 | names_already_handled="$names_already_handled $name" | |
17007 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17008 | eval value=\"\$HAVE_LIB$uppername\" | |
17009 | if test -n "$value"; then | |
17010 | if test "$value" = yes; then | |
17011 | eval value=\"\$LIB$uppername\" | |
17012 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
17013 | eval value=\"\$LTLIB$uppername\" | |
17014 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
17015 | else | |
17016 | : | |
17017 | fi | |
17018 | else | |
17019 | found_dir= | |
17020 | found_la= | |
17021 | found_so= | |
17022 | found_a= | |
17023 | if test $use_additional = yes; then | |
9f1528a1 | 17024 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17025 | found_dir="$additional_libdir" |
17026 | found_so="$additional_libdir/lib$name.$shlibext" | |
17027 | if test -f "$additional_libdir/lib$name.la"; then | |
17028 | found_la="$additional_libdir/lib$name.la" | |
17029 | fi | |
9f1528a1 | 17030 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17031 | if test -f "$additional_libdir/lib$name.$libext"; then |
17032 | found_dir="$additional_libdir" | |
17033 | found_a="$additional_libdir/lib$name.$libext" | |
17034 | if test -f "$additional_libdir/lib$name.la"; then | |
17035 | found_la="$additional_libdir/lib$name.la" | |
17036 | fi | |
17037 | fi | |
17038 | fi | |
17039 | fi | |
17040 | if test "X$found_dir" = "X"; then | |
17041 | for x in $LDFLAGS $LTLIBLZMA; do | |
17042 | ||
17043 | acl_save_prefix="$prefix" | |
17044 | prefix="$acl_final_prefix" | |
17045 | acl_save_exec_prefix="$exec_prefix" | |
17046 | exec_prefix="$acl_final_exec_prefix" | |
17047 | eval x=\"$x\" | |
17048 | exec_prefix="$acl_save_exec_prefix" | |
17049 | prefix="$acl_save_prefix" | |
17050 | ||
17051 | case "$x" in | |
17052 | -L*) | |
17053 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 17054 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17055 | found_dir="$dir" |
17056 | found_so="$dir/lib$name.$shlibext" | |
17057 | if test -f "$dir/lib$name.la"; then | |
17058 | found_la="$dir/lib$name.la" | |
17059 | fi | |
9f1528a1 | 17060 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17061 | if test -f "$dir/lib$name.$libext"; then |
17062 | found_dir="$dir" | |
17063 | found_a="$dir/lib$name.$libext" | |
17064 | if test -f "$dir/lib$name.la"; then | |
17065 | found_la="$dir/lib$name.la" | |
17066 | fi | |
17067 | fi | |
17068 | fi | |
17069 | ;; | |
17070 | esac | |
17071 | if test "X$found_dir" != "X"; then | |
17072 | break | |
17073 | fi | |
17074 | done | |
17075 | fi | |
17076 | if test "X$found_dir" != "X"; then | |
17077 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
17078 | if test "X$found_so" != "X"; then | |
17079 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17080 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17081 | else | |
17082 | haveit= | |
17083 | for x in $ltrpathdirs; do | |
17084 | if test "X$x" = "X$found_dir"; then | |
17085 | haveit=yes | |
17086 | break | |
17087 | fi | |
17088 | done | |
17089 | if test -z "$haveit"; then | |
17090 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17091 | fi | |
17092 | if test "$hardcode_direct" = yes; then | |
17093 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17094 | else | |
17095 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17096 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17097 | haveit= | |
17098 | for x in $rpathdirs; do | |
17099 | if test "X$x" = "X$found_dir"; then | |
17100 | haveit=yes | |
17101 | break | |
17102 | fi | |
17103 | done | |
17104 | if test -z "$haveit"; then | |
17105 | rpathdirs="$rpathdirs $found_dir" | |
17106 | fi | |
17107 | else | |
17108 | haveit= | |
17109 | for x in $LDFLAGS $LIBLZMA; do | |
17110 | ||
17111 | acl_save_prefix="$prefix" | |
17112 | prefix="$acl_final_prefix" | |
17113 | acl_save_exec_prefix="$exec_prefix" | |
17114 | exec_prefix="$acl_final_exec_prefix" | |
17115 | eval x=\"$x\" | |
17116 | exec_prefix="$acl_save_exec_prefix" | |
17117 | prefix="$acl_save_prefix" | |
17118 | ||
17119 | if test "X$x" = "X-L$found_dir"; then | |
17120 | haveit=yes | |
17121 | break | |
17122 | fi | |
17123 | done | |
17124 | if test -z "$haveit"; then | |
17125 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
17126 | fi | |
17127 | if test "$hardcode_minus_L" != no; then | |
17128 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17129 | else | |
17130 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17131 | fi | |
17132 | fi | |
17133 | fi | |
17134 | fi | |
17135 | else | |
17136 | if test "X$found_a" != "X"; then | |
17137 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
17138 | else | |
17139 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
17140 | fi | |
17141 | fi | |
17142 | additional_includedir= | |
17143 | case "$found_dir" in | |
17144 | */lib | */lib/) | |
17145 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17146 | additional_includedir="$basedir/include" | |
17147 | ;; | |
17148 | esac | |
17149 | if test "X$additional_includedir" != "X"; then | |
17150 | if test "X$additional_includedir" != "X/usr/include"; then | |
17151 | haveit= | |
17152 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17153 | if test -n "$GCC"; then | |
17154 | case $host_os in | |
17155 | linux*) haveit=yes;; | |
17156 | esac | |
17157 | fi | |
17158 | fi | |
17159 | if test -z "$haveit"; then | |
17160 | for x in $CPPFLAGS $INCLZMA; do | |
17161 | ||
17162 | acl_save_prefix="$prefix" | |
17163 | prefix="$acl_final_prefix" | |
17164 | acl_save_exec_prefix="$exec_prefix" | |
17165 | exec_prefix="$acl_final_exec_prefix" | |
17166 | eval x=\"$x\" | |
17167 | exec_prefix="$acl_save_exec_prefix" | |
17168 | prefix="$acl_save_prefix" | |
17169 | ||
17170 | if test "X$x" = "X-I$additional_includedir"; then | |
17171 | haveit=yes | |
17172 | break | |
17173 | fi | |
17174 | done | |
17175 | if test -z "$haveit"; then | |
17176 | if test -d "$additional_includedir"; then | |
17177 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
17178 | fi | |
17179 | fi | |
17180 | fi | |
17181 | fi | |
17182 | fi | |
17183 | if test -n "$found_la"; then | |
17184 | save_libdir="$libdir" | |
17185 | case "$found_la" in | |
17186 | */* | *\\*) . "$found_la" ;; | |
17187 | *) . "./$found_la" ;; | |
17188 | esac | |
17189 | libdir="$save_libdir" | |
17190 | for dep in $dependency_libs; do | |
17191 | case "$dep" in | |
17192 | -L*) | |
17193 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17194 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17195 | haveit= | |
17196 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17197 | if test -n "$GCC"; then | |
17198 | case $host_os in | |
17199 | linux*) haveit=yes;; | |
17200 | esac | |
17201 | fi | |
17202 | fi | |
17203 | if test -z "$haveit"; then | |
17204 | haveit= | |
17205 | for x in $LDFLAGS $LIBLZMA; do | |
17206 | ||
17207 | acl_save_prefix="$prefix" | |
17208 | prefix="$acl_final_prefix" | |
17209 | acl_save_exec_prefix="$exec_prefix" | |
17210 | exec_prefix="$acl_final_exec_prefix" | |
17211 | eval x=\"$x\" | |
17212 | exec_prefix="$acl_save_exec_prefix" | |
17213 | prefix="$acl_save_prefix" | |
17214 | ||
17215 | if test "X$x" = "X-L$additional_libdir"; then | |
17216 | haveit=yes | |
17217 | break | |
17218 | fi | |
17219 | done | |
17220 | if test -z "$haveit"; then | |
17221 | if test -d "$additional_libdir"; then | |
17222 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
17223 | fi | |
17224 | fi | |
17225 | haveit= | |
17226 | for x in $LDFLAGS $LTLIBLZMA; do | |
17227 | ||
17228 | acl_save_prefix="$prefix" | |
17229 | prefix="$acl_final_prefix" | |
17230 | acl_save_exec_prefix="$exec_prefix" | |
17231 | exec_prefix="$acl_final_exec_prefix" | |
17232 | eval x=\"$x\" | |
17233 | exec_prefix="$acl_save_exec_prefix" | |
17234 | prefix="$acl_save_prefix" | |
17235 | ||
17236 | if test "X$x" = "X-L$additional_libdir"; then | |
17237 | haveit=yes | |
17238 | break | |
17239 | fi | |
17240 | done | |
17241 | if test -z "$haveit"; then | |
17242 | if test -d "$additional_libdir"; then | |
17243 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
17244 | fi | |
17245 | fi | |
17246 | fi | |
17247 | fi | |
17248 | ;; | |
17249 | -R*) | |
17250 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17251 | if test "$enable_rpath" != no; then | |
17252 | haveit= | |
17253 | for x in $rpathdirs; do | |
17254 | if test "X$x" = "X$dir"; then | |
17255 | haveit=yes | |
17256 | break | |
17257 | fi | |
17258 | done | |
17259 | if test -z "$haveit"; then | |
17260 | rpathdirs="$rpathdirs $dir" | |
17261 | fi | |
17262 | haveit= | |
17263 | for x in $ltrpathdirs; do | |
17264 | if test "X$x" = "X$dir"; then | |
17265 | haveit=yes | |
17266 | break | |
17267 | fi | |
17268 | done | |
17269 | if test -z "$haveit"; then | |
17270 | ltrpathdirs="$ltrpathdirs $dir" | |
17271 | fi | |
17272 | fi | |
17273 | ;; | |
17274 | -l*) | |
17275 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17276 | ;; | |
17277 | *.la) | |
17278 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17279 | ;; | |
17280 | *) | |
17281 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
17282 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
17283 | ;; | |
17284 | esac | |
17285 | done | |
17286 | fi | |
17287 | else | |
9f1528a1 AB |
17288 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
17289 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17290 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
17291 | else | |
17292 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext" | |
17293 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext" | |
17294 | fi | |
608e2dbb TT |
17295 | fi |
17296 | fi | |
17297 | fi | |
17298 | done | |
17299 | done | |
17300 | if test "X$rpathdirs" != "X"; then | |
17301 | if test -n "$hardcode_libdir_separator"; then | |
17302 | alldirs= | |
17303 | for found_dir in $rpathdirs; do | |
17304 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17305 | done | |
17306 | acl_save_libdir="$libdir" | |
17307 | libdir="$alldirs" | |
17308 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17309 | libdir="$acl_save_libdir" | |
17310 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17311 | else | |
17312 | for found_dir in $rpathdirs; do | |
17313 | acl_save_libdir="$libdir" | |
17314 | libdir="$found_dir" | |
17315 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17316 | libdir="$acl_save_libdir" | |
17317 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17318 | done | |
17319 | fi | |
17320 | fi | |
17321 | if test "X$ltrpathdirs" != "X"; then | |
17322 | for found_dir in $ltrpathdirs; do | |
17323 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
17324 | done | |
17325 | fi | |
17326 | ||
17327 | ||
17328 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17329 | ||
17330 | for element in $INCLZMA; do | |
17331 | haveit= | |
17332 | for x in $CPPFLAGS; do | |
17333 | ||
17334 | acl_save_prefix="$prefix" | |
17335 | prefix="$acl_final_prefix" | |
17336 | acl_save_exec_prefix="$exec_prefix" | |
17337 | exec_prefix="$acl_final_exec_prefix" | |
17338 | eval x=\"$x\" | |
17339 | exec_prefix="$acl_save_exec_prefix" | |
17340 | prefix="$acl_save_prefix" | |
17341 | ||
17342 | if test "X$x" = "X$element"; then | |
17343 | haveit=yes | |
17344 | break | |
17345 | fi | |
17346 | done | |
17347 | if test -z "$haveit"; then | |
17348 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17349 | fi | |
17350 | done | |
17351 | ||
17352 | ||
17353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
17354 | $as_echo_n "checking for liblzma... " >&6; } | |
d0ac1c44 | 17355 | if ${ac_cv_liblzma+:} false; then : |
608e2dbb TT |
17356 | $as_echo_n "(cached) " >&6 |
17357 | else | |
17358 | ||
17359 | ac_save_LIBS="$LIBS" | |
17360 | LIBS="$LIBS $LIBLZMA" | |
17361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17362 | /* end confdefs.h. */ | |
17363 | #include "lzma.h" | |
17364 | int | |
17365 | main () | |
17366 | { | |
17367 | lzma_index_iter iter; | |
17368 | lzma_index_iter_init (&iter, 0); | |
17369 | lzma_mf_is_supported (LZMA_MF_HC3); | |
17370 | ; | |
17371 | return 0; | |
17372 | } | |
17373 | _ACEOF | |
17374 | if ac_fn_c_try_link "$LINENO"; then : | |
17375 | ac_cv_liblzma=yes | |
17376 | else | |
17377 | ac_cv_liblzma=no | |
17378 | fi | |
17379 | rm -f core conftest.err conftest.$ac_objext \ | |
17380 | conftest$ac_exeext conftest.$ac_ext | |
17381 | LIBS="$ac_save_LIBS" | |
17382 | ||
17383 | fi | |
17384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
17385 | $as_echo "$ac_cv_liblzma" >&6; } | |
17386 | if test "$ac_cv_liblzma" = yes; then | |
17387 | HAVE_LIBLZMA=yes | |
17388 | ||
17389 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
17390 | ||
17391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
17392 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
17393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
17394 | $as_echo "$LIBLZMA" >&6; } | |
17395 | else | |
17396 | HAVE_LIBLZMA=no | |
17397 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17398 | LIBLZMA= | |
17399 | LTLIBLZMA= | |
17400 | fi | |
17401 | ||
17402 | ||
17403 | ||
17404 | ||
17405 | ||
17406 | ||
17407 | if test "$HAVE_LIBLZMA" != yes; then | |
17408 | if test "$with_lzma" = yes; then | |
d0ac1c44 | 17409 | as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 |
608e2dbb TT |
17410 | fi |
17411 | fi | |
17412 | fi | |
17413 | fi | |
17414 | ||
3fc11d3e JM |
17415 | LIBGUI="../libgui/src/libgui.a" |
17416 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
17417 | ||
17418 | ||
7a292a7a | 17419 | |
3fc11d3e JM |
17420 | WIN32LDAPP= |
17421 | ||
17422 | ||
17423 | ||
d91670b9 | 17424 | case "${host}" in |
686a5eed | 17425 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
17426 | configdir="win" |
17427 | ;; | |
17428 | *) | |
17429 | configdir="unix" | |
17430 | ;; | |
17431 | esac | |
3fc11d3e JM |
17432 | |
17433 | GDBTKLIBS= | |
17434 | if test "${enable_gdbtk}" = "yes"; then | |
17435 | ||
d1c3b63a KS |
17436 | # Gdbtk must have an absolute path to srcdir in order to run |
17437 | # properly when not installed. | |
17438 | here=`pwd` | |
17439 | cd ${srcdir} | |
17440 | GDBTK_SRC_DIR=`pwd` | |
17441 | cd $here | |
17442 | ||
bec39cab | 17443 | |
5062cc19 KS |
17444 | # |
17445 | # Ok, lets find the tcl configuration | |
17446 | # First, look for one uninstalled. | |
17447 | # the alternative search directory is invoked by --with-tcl | |
17448 | # | |
3fc11d3e | 17449 | |
5062cc19 KS |
17450 | if test x"${no_tcl}" = x ; then |
17451 | # we reset no_tcl in case something fails here | |
17452 | no_tcl=true | |
bec39cab | 17453 | |
81ecdfbb RW |
17454 | # Check whether --with-tcl was given. |
17455 | if test "${with_tcl+set}" = set; then : | |
17456 | withval=$with_tcl; with_tclconfig=${withval} | |
17457 | fi | |
17458 | ||
17459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
17460 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
d0ac1c44 | 17461 | if ${ac_cv_c_tclconfig+:} false; then : |
81ecdfbb | 17462 | $as_echo_n "(cached) " >&6 |
3fc11d3e | 17463 | else |
bec39cab | 17464 | |
3fc11d3e | 17465 | |
5062cc19 KS |
17466 | # First check to see if --with-tcl was specified. |
17467 | case "${host}" in | |
17468 | *-*-cygwin*) platDir="win" ;; | |
17469 | *) platDir="unix" ;; | |
17470 | esac | |
17471 | if test x"${with_tclconfig}" != x ; then | |
17472 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
17473 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
17474 | else | |
d0ac1c44 | 17475 | as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17476 | fi |
17477 | fi | |
17478 | ||
17479 | # then check for a private Tcl installation | |
17480 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17481 | for i in \ | |
17482 | ../tcl \ | |
17483 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17484 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
17485 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17486 | ../../tcl \ | |
17487 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17488 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17489 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17490 | ../../../tcl \ | |
17491 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17492 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17493 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17494 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17495 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17496 | break | |
17497 | fi | |
17498 | done | |
17499 | fi | |
17500 | ||
17501 | # on Darwin, check in Framework installation locations | |
17502 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
17503 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
17504 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
17505 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
17506 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
17507 | ; do | |
17508 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
17509 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
17510 | break | |
17511 | fi | |
17512 | done | |
17513 | fi | |
17514 | ||
17515 | # check in a few common install locations | |
17516 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17517 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
17518 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
17519 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
17520 | `ls -d /usr/local/lib 2>/dev/null` \ | |
17521 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
17522 | `ls -d /usr/lib 2>/dev/null` \ | |
17523 | ; do | |
17524 | if test -f "$i/tclConfig.sh" ; then | |
17525 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
17526 | break | |
17527 | fi | |
17528 | done | |
17529 | fi | |
3fc11d3e | 17530 | |
5062cc19 KS |
17531 | # check in a few other private locations |
17532 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17533 | for i in \ | |
17534 | ${srcdir}/../tcl \ | |
17535 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17536 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
17537 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17538 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17539 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17540 | break | |
17541 | fi | |
17542 | done | |
17543 | fi | |
bec39cab | 17544 | |
3fc11d3e JM |
17545 | fi |
17546 | ||
5062cc19 KS |
17547 | |
17548 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17549 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
17550 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
17551 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
17552 | else |
17553 | no_tcl= | |
17554 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
17555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17556 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
17557 | fi |
17558 | fi | |
3fc11d3e | 17559 | |
bec39cab | 17560 | |
85541719 DE |
17561 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
17562 | # point to doing Tcl. | |
bec39cab | 17563 | |
5062cc19 KS |
17564 | # |
17565 | # Ok, lets find the tk configuration | |
17566 | # First, look for one uninstalled. | |
17567 | # the alternative search directory is invoked by --with-tk | |
17568 | # | |
3fc11d3e | 17569 | |
5062cc19 KS |
17570 | if test x"${no_tk}" = x ; then |
17571 | # we reset no_tk in case something fails here | |
17572 | no_tk=true | |
bec39cab | 17573 | |
81ecdfbb RW |
17574 | # Check whether --with-tk was given. |
17575 | if test "${with_tk+set}" = set; then : | |
17576 | withval=$with_tk; with_tkconfig=${withval} | |
17577 | fi | |
17578 | ||
17579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
17580 | $as_echo_n "checking for Tk configuration... " >&6; } | |
d0ac1c44 | 17581 | if ${ac_cv_c_tkconfig+:} false; then : |
81ecdfbb | 17582 | $as_echo_n "(cached) " >&6 |
bec39cab | 17583 | else |
3fc11d3e JM |
17584 | |
17585 | ||
5062cc19 KS |
17586 | # First check to see if --with-tkconfig was specified. |
17587 | if test x"${with_tkconfig}" != x ; then | |
17588 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
17589 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
17590 | else | |
d0ac1c44 | 17591 | as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17592 | fi |
17593 | fi | |
3fc11d3e | 17594 | |
5062cc19 KS |
17595 | # then check for a private Tk library |
17596 | case "${host}" in | |
17597 | *-*-cygwin*) platDir="win" ;; | |
17598 | *) platDir="unix" ;; | |
17599 | esac | |
17600 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17601 | for i in \ | |
17602 | ../tk \ | |
17603 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17604 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
17605 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
17606 | ../../tk \ | |
17607 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17608 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
17609 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
17610 | ../../../tk \ | |
17611 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17612 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
17613 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
17614 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
17615 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
17616 | break | |
17617 | fi | |
17618 | done | |
17619 | fi | |
17620 | ||
17621 | # on Darwin, check in Framework installation locations | |
17622 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
17623 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
17624 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
17625 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
17626 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
17627 | ; do | |
17628 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
17629 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
17630 | break | |
17631 | fi | |
17632 | done | |
17633 | fi | |
17634 | ||
17635 | # check in a few common install locations | |
17636 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17637 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
17638 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
17639 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
17640 | `ls -d /usr/local/lib 2>/dev/null` \ | |
17641 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
17642 | `ls -d /usr/lib 2>/dev/null` \ | |
17643 | ; do | |
17644 | if test -f "$i/tkConfig.sh" ; then | |
17645 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
17646 | break | |
17647 | fi | |
17648 | done | |
17649 | fi | |
17650 | # check in a few other private locations | |
17651 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17652 | for i in \ | |
17653 | ${srcdir}/../tk \ | |
17654 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17655 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
17656 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
17657 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
17658 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
17659 | break | |
17660 | fi | |
17661 | done | |
17662 | fi | |
3fc11d3e | 17663 | |
3fc11d3e JM |
17664 | fi |
17665 | ||
17666 | ||
5062cc19 KS |
17667 | if test x"${ac_cv_c_tkconfig}" = x ; then |
17668 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
17669 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
17670 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
17671 | else |
17672 | no_tk= | |
17673 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
17674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17675 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 17676 | fi |
3fc11d3e | 17677 | fi |
dd2504ab | 17678 | |
dd2504ab | 17679 | |
85541719 DE |
17680 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
17681 | ||
81ecdfbb RW |
17682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17683 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
17684 | |
17685 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
17686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
17687 | $as_echo "loading" >&6; } | |
85541719 DE |
17688 | . ${TCL_BIN_DIR}/tclConfig.sh |
17689 | else | |
81ecdfbb RW |
17690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17691 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
17692 | fi |
17693 | ||
17694 | # eval is required to do the TCL_DBGX substitution | |
17695 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
17696 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
17697 | ||
17698 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
17699 | # then set the common variable name to the value of the build variables. | |
17700 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
17701 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
17702 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
17703 | # installed and uninstalled version of Tcl. | |
17704 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
17705 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
17706 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
17707 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
17708 | elif test "`uname -s`" = "Darwin"; then | |
17709 | # If Tcl was built as a framework, attempt to use the libraries | |
17710 | # from the framework at the given location so that linking works | |
a68ffae9 | 17711 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
17712 | case ${TCL_DEFS} in |
17713 | *TCL_FRAMEWORK*) | |
17714 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
17715 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
17716 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
17717 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
17718 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
17719 | break | |
17720 | fi | |
17721 | done | |
17722 | fi | |
17723 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
17724 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
17725 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
17726 | fi | |
17727 | ;; | |
17728 | esac | |
17729 | fi | |
17730 | ||
17731 | # eval is required to do the TCL_DBGX substitution | |
17732 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
17733 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
17734 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
17735 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
17736 | ||
17737 | ||
17738 | ||
17739 | ||
17740 | ||
17741 | ||
17742 | ||
17743 | ||
17744 | ||
17745 | ||
17746 | ||
17747 | ||
17748 | ||
17749 | ||
17750 | ||
17751 | # Check for in-tree tcl | |
17752 | here=`pwd` | |
17753 | cd ${srcdir}/.. | |
17754 | topdir=`pwd` | |
17755 | cd ${here} | |
17756 | ||
17757 | intree="no" | |
17758 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
17759 | intree="yes" | |
17760 | fi | |
17761 | ||
17762 | # Find Tcl private headers | |
17763 | if test x"${intree}" = xno; then | |
17764 | ||
81ecdfbb RW |
17765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
17766 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
17767 | private_dir="" |
17768 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
17769 | if test -f ${dir}/tclInt.h ; then | |
17770 | private_dir=${dir} | |
17771 | fi | |
17772 | ||
17773 | if test x"${private_dir}" = x; then | |
d0ac1c44 | 17774 | as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
17775 | else |
17776 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
17777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
17778 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
17779 | fi |
17780 | ||
17781 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
17782 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
17783 | TCL_DEPS="" | |
17784 | else | |
17785 | # If building tcl in the same src tree, private headers | |
17786 | # are not needed, but we need to be sure to use the right | |
17787 | # headers library | |
17788 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
17789 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
17790 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
17791 | fi | |
17792 | ||
17793 | ||
17794 | ||
17795 | ||
17796 | ||
81ecdfbb RW |
17797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17798 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 17799 | |
5062cc19 | 17800 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
17801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
17802 | $as_echo "loading" >&6; } | |
5062cc19 | 17803 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 17804 | else |
81ecdfbb RW |
17805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17806 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 17807 | fi |
bec39cab | 17808 | |
5062cc19 KS |
17809 | # eval is required to do the TK_DBGX substitution |
17810 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
17811 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
17812 | ||
17813 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
17814 | # then set the common variable name to the value of the build variables. | |
17815 | # For example, the variable TK_LIB_SPEC will be set to the value | |
17816 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
17817 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
17818 | # installed and uninstalled version of Tcl. | |
85541719 | 17819 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
17820 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
17821 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
17822 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
17823 | elif test "`uname -s`" = "Darwin"; then | |
17824 | # If Tk was built as a framework, attempt to use the libraries | |
17825 | # from the framework at the given location so that linking works | |
a68ffae9 | 17826 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
17827 | case ${TK_DEFS} in |
17828 | *TK_FRAMEWORK*) | |
85541719 | 17829 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
17830 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
17831 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
17832 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
17833 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
17834 | break | |
17835 | fi | |
17836 | done | |
17837 | fi | |
85541719 | 17838 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
17839 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
17840 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
17841 | fi | |
17842 | ;; | |
17843 | esac | |
3fc11d3e JM |
17844 | fi |
17845 | ||
5062cc19 KS |
17846 | # eval is required to do the TK_DBGX substitution |
17847 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
17848 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
17849 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
17850 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 17851 | |
3fc11d3e JM |
17852 | |
17853 | ||
bec39cab AC |
17854 | |
17855 | ||
17856 | ||
17857 | ||
17858 | ||
17859 | ||
17860 | ||
3fc11d3e | 17861 | |
3fc11d3e | 17862 | |
bec39cab | 17863 | |
bec39cab | 17864 | |
85541719 DE |
17865 | # Check for in-tree Tk |
17866 | intree="no" | |
17867 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
17868 | intree="yes" | |
17869 | fi | |
3fc11d3e | 17870 | |
85541719 DE |
17871 | # Find Tk private headers |
17872 | if test x"${intree}" = xno; then | |
3fc11d3e | 17873 | |
81ecdfbb RW |
17874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
17875 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
17876 | private_dir="" |
17877 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
17878 | if test -f ${dir}/tkInt.h; then | |
17879 | private_dir=${dir} | |
3fc11d3e | 17880 | fi |
bec39cab | 17881 | |
5062cc19 | 17882 | if test x"${private_dir}" = x; then |
d0ac1c44 | 17883 | as_fn_error $? "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 17884 | else |
5062cc19 | 17885 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
17886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
17887 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 17888 | fi |
3fc11d3e | 17889 | |
85541719 DE |
17890 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
17891 | TK_LIBRARY=${TK_LIB_SPEC} | |
17892 | TK_DEPS="" | |
17893 | else | |
17894 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
17895 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
17896 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
17897 | fi | |
3fc11d3e JM |
17898 | |
17899 | ||
3fc11d3e JM |
17900 | |
17901 | ||
3fc11d3e | 17902 | |
85541719 | 17903 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 17904 | |
85541719 DE |
17905 | # Include some libraries that Tcl and Tk want. |
17906 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
17907 | # Yes, the ordering seems wrong here. But it isn't. | |
17908 | # TK_LIBS is the list of libraries that need to be linked | |
17909 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
17910 | # were in LIBS then any link tests after this point would | |
17911 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
17912 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 17913 | |
85541719 DE |
17914 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
17915 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
17916 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
17917 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
17918 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
17919 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
17920 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 17921 | |
0ad6b8ee | 17922 | if test x"$gdb_cv_os_cygwin" = xyes; then |
85541719 DE |
17923 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" |
17924 | WIN32LDAPP="-Wl,--subsystem,console" | |
17925 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 17926 | fi |
ffc6a242 | 17927 | |
81ecdfbb | 17928 | subdirs="$subdirs gdbtk" |
3ace7edb | 17929 | |
85541719 | 17930 | fi |
3fc11d3e JM |
17931 | fi |
17932 | ||
17933 | ||
17934 | ||
17935 | ||
17936 | ||
17937 | ||
17938 | ||
17939 | ||
81ecdfbb RW |
17940 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
17941 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 17942 | |
c906108c | 17943 | |
81ecdfbb RW |
17944 | # Check whether --with-x was given. |
17945 | if test "${with_x+set}" = set; then : | |
17946 | withval=$with_x; | |
17947 | fi | |
c906108c SS |
17948 | |
17949 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
17950 | if test "x$with_x" = xno; then | |
17951 | # The user explicitly disabled X. | |
17952 | have_x=disabled | |
17953 | else | |
81ecdfbb | 17954 | case $x_includes,$x_libraries in #( |
d0ac1c44 SM |
17955 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
17956 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
81ecdfbb | 17957 | $as_echo_n "(cached) " >&6 |
c906108c SS |
17958 | else |
17959 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 17960 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 17961 | rm -f -r conftest.dir |
bec39cab AC |
17962 | if mkdir conftest.dir; then |
17963 | cd conftest.dir | |
bec39cab | 17964 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
17965 | incroot: |
17966 | @echo incroot='${INCROOT}' | |
17967 | usrlibdir: | |
17968 | @echo usrlibdir='${USRLIBDIR}' | |
17969 | libdir: | |
17970 | @echo libdir='${LIBDIR}' | |
17971 | _ACEOF | |
17972 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
d0ac1c44 | 17973 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
81ecdfbb RW |
17974 | for ac_var in incroot usrlibdir libdir; do |
17975 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
17976 | done | |
c906108c | 17977 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
17978 | for ac_extension in a so sl dylib la dll; do |
17979 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
17980 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 17981 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
17982 | fi |
17983 | done | |
17984 | # Screen out bogus values from the imake configuration. They are | |
17985 | # bogus both because they are the default anyway, and because | |
17986 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 17987 | case $ac_im_incroot in |
81ecdfbb | 17988 | /usr/include) ac_x_includes= ;; |
bec39cab | 17989 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 17990 | esac |
bec39cab | 17991 | case $ac_im_usrlibdir in |
81ecdfbb | 17992 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 17993 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
17994 | esac |
17995 | fi | |
17996 | cd .. | |
81ecdfbb | 17997 | rm -f -r conftest.dir |
c906108c SS |
17998 | fi |
17999 | ||
bec39cab AC |
18000 | # Standard set of common directories for X headers. |
18001 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
18002 | ac_x_header_dirs=' | |
18003 | /usr/X11/include | |
81ecdfbb | 18004 | /usr/X11R7/include |
bec39cab AC |
18005 | /usr/X11R6/include |
18006 | /usr/X11R5/include | |
18007 | /usr/X11R4/include | |
18008 | ||
18009 | /usr/include/X11 | |
81ecdfbb | 18010 | /usr/include/X11R7 |
bec39cab AC |
18011 | /usr/include/X11R6 |
18012 | /usr/include/X11R5 | |
18013 | /usr/include/X11R4 | |
18014 | ||
18015 | /usr/local/X11/include | |
81ecdfbb | 18016 | /usr/local/X11R7/include |
bec39cab AC |
18017 | /usr/local/X11R6/include |
18018 | /usr/local/X11R5/include | |
18019 | /usr/local/X11R4/include | |
18020 | ||
18021 | /usr/local/include/X11 | |
81ecdfbb | 18022 | /usr/local/include/X11R7 |
bec39cab AC |
18023 | /usr/local/include/X11R6 |
18024 | /usr/local/include/X11R5 | |
18025 | /usr/local/include/X11R4 | |
18026 | ||
18027 | /usr/X386/include | |
18028 | /usr/x386/include | |
18029 | /usr/XFree86/include/X11 | |
18030 | ||
18031 | /usr/include | |
18032 | /usr/local/include | |
18033 | /usr/unsupported/include | |
18034 | /usr/athena/include | |
18035 | /usr/local/x11r5/include | |
18036 | /usr/lpp/Xamples/include | |
18037 | ||
18038 | /usr/openwin/include | |
18039 | /usr/openwin/share/include' | |
18040 | ||
18041 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 18042 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 18043 | # First, try using that file with no special directory specified. |
81ecdfbb | 18044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 18045 | /* end confdefs.h. */ |
81ecdfbb | 18046 | #include <X11/Xlib.h> |
bec39cab | 18047 | _ACEOF |
81ecdfbb | 18048 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
18049 | # We can compile using X headers with no special include directory. |
18050 | ac_x_includes= | |
18051 | else | |
bec39cab | 18052 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 18053 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
18054 | ac_x_includes=$ac_dir |
18055 | break | |
18056 | fi | |
18057 | done | |
c906108c | 18058 | fi |
d0ac1c44 | 18059 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 18060 | fi # $ac_x_includes = no |
c906108c | 18061 | |
bec39cab | 18062 | if test "$ac_x_libraries" = no; then |
c906108c | 18063 | # Check for the libraries. |
c906108c SS |
18064 | # See if we find them without any special options. |
18065 | # Don't add to $LIBS permanently. | |
bec39cab | 18066 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
18067 | LIBS="-lX11 $LIBS" |
18068 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 18069 | /* end confdefs.h. */ |
81ecdfbb | 18070 | #include <X11/Xlib.h> |
bec39cab AC |
18071 | int |
18072 | main () | |
18073 | { | |
81ecdfbb | 18074 | XrmInitialize () |
bec39cab AC |
18075 | ; |
18076 | return 0; | |
18077 | } | |
18078 | _ACEOF | |
81ecdfbb | 18079 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 18080 | LIBS=$ac_save_LIBS |
c906108c SS |
18081 | # We can link X programs with no special library path. |
18082 | ac_x_libraries= | |
18083 | else | |
81ecdfbb RW |
18084 | LIBS=$ac_save_LIBS |
18085 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 18086 | do |
bec39cab | 18087 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
18088 | for ac_extension in a so sl dylib la dll; do |
18089 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
18090 | ac_x_libraries=$ac_dir |
18091 | break 2 | |
18092 | fi | |
18093 | done | |
18094 | done | |
18095 | fi | |
81ecdfbb RW |
18096 | rm -f core conftest.err conftest.$ac_objext \ |
18097 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 18098 | fi # $ac_x_libraries = no |
c906108c | 18099 | |
81ecdfbb RW |
18100 | case $ac_x_includes,$ac_x_libraries in #( |
18101 | no,* | *,no | *\'*) | |
18102 | # Didn't find X, or a directory has "'" in its name. | |
18103 | ac_cv_have_x="have_x=no";; #( | |
18104 | *) | |
18105 | # Record where we found X for the cache. | |
18106 | ac_cv_have_x="have_x=yes\ | |
18107 | ac_x_includes='$ac_x_includes'\ | |
18108 | ac_x_libraries='$ac_x_libraries'" | |
18109 | esac | |
c906108c | 18110 | fi |
81ecdfbb RW |
18111 | ;; #( |
18112 | *) have_x=yes;; | |
18113 | esac | |
c906108c SS |
18114 | eval "$ac_cv_have_x" |
18115 | fi # $with_x != no | |
18116 | ||
18117 | if test "$have_x" != yes; then | |
81ecdfbb RW |
18118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
18119 | $as_echo "$have_x" >&6; } | |
c906108c SS |
18120 | no_x=yes |
18121 | else | |
18122 | # If each of the values was on the command line, it overrides each guess. | |
18123 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
18124 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
18125 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
18126 | ac_cv_have_x="have_x=yes\ |
18127 | ac_x_includes='$x_includes'\ | |
18128 | ac_x_libraries='$x_libraries'" | |
18129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
18130 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
18131 | fi |
18132 | ||
18133 | ||
bec39cab | 18134 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 18135 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
18136 | # This code just checks for a few cases where we'd like to ignore those |
18137 | # definitions, even when they're present in the '.mt' file. These cases | |
18138 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 18139 | # not part of the source tree. |
7a292a7a | 18140 | # |
81ecdfbb RW |
18141 | # Check whether --enable-sim was given. |
18142 | if test "${enable_sim+set}" = set; then : | |
18143 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
18144 | echo "enableval = ${enableval}"; |
18145 | case "${enableval}" in | |
18146 | yes) ignore_sim=false ;; | |
18147 | no) ignore_sim=true ;; | |
18148 | *) ignore_sim=false ;; | |
18149 | esac | |
18150 | else | |
18151 | ignore_sim=false | |
81ecdfbb RW |
18152 | fi |
18153 | ||
7a292a7a SS |
18154 | |
18155 | if test ! -d "${srcdir}/../sim"; then | |
18156 | ignore_sim=true | |
18157 | fi | |
18158 | ||
9b624dbe UW |
18159 | SIM= |
18160 | SIM_OBS= | |
18161 | if test "${ignore_sim}" = "false"; then | |
18162 | if test x"${gdb_sim}" != x ; then | |
18163 | SIM="${gdb_sim}" | |
18164 | SIM_OBS="remote-sim.o" | |
60ca704f | 18165 | |
81ecdfbb | 18166 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 18167 | |
976102cd PA |
18168 | |
18169 | # Some tdep code should only be compiled in when the ppc sim is | |
18170 | # built. PR sim/13418. | |
18171 | case $target in | |
18172 | powerpc*-*-*) | |
18173 | ||
18174 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
18175 | ||
18176 | ;; | |
18177 | esac | |
9b624dbe | 18178 | fi |
7a292a7a SS |
18179 | fi |
18180 | ||
18181 | ||
18182 | ||
c906108c SS |
18183 | |
18184 | ||
18185 | ||
18186 | ||
18187 | ||
18188 | ||
dfcd3bfb | 18189 | |
e56ac5c3 AC |
18190 | |
18191 | ||
b3a90332 AC |
18192 | |
18193 | ||
c35f4ffc | 18194 | # List of host floatformats. |
bec39cab AC |
18195 | |
18196 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18197 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 18198 | _ACEOF |
c35f4ffc | 18199 | |
bec39cab AC |
18200 | |
18201 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18202 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
18203 | _ACEOF |
18204 | ||
c35f4ffc | 18205 | |
bec39cab | 18206 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 18207 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 18208 | _ACEOF |
c35f4ffc AC |
18209 | |
18210 | ||
c906108c SS |
18211 | # target_subdir is used by the testsuite to find the target libraries. |
18212 | target_subdir= | |
18213 | if test "${host}" != "${target}"; then | |
18214 | target_subdir="${target_alias}/" | |
18215 | fi | |
18216 | ||
18217 | ||
21ea5acd | 18218 | # Import nat definitions. |
2b351b19 | 18219 | nat_makefile_frag=/dev/null |
771b4502 | 18220 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
18221 | . ${srcdir}/configure.nat |
18222 | nativefile=$NAT_FILE | |
c906108c | 18223 | fi |
c906108c | 18224 | |
c906108c SS |
18225 | |
18226 | ||
18227 | ||
21ea5acd SDJ |
18228 | |
18229 | ||
18230 | ||
18231 | ||
18232 | ||
c906108c SS |
18233 | |
18234 | ||
b00a8037 | 18235 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
18236 | |
18237 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 18238 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 18239 | _ACEOF |
b00a8037 DJ |
18240 | |
18241 | fi | |
18242 | ||
393fd4c3 YQ |
18243 | # Check for babeltrace and babeltrace-ctf |
18244 | ||
18245 | # Check whether --with-babeltrace was given. | |
18246 | if test "${with_babeltrace+set}" = set; then : | |
18247 | withval=$with_babeltrace; | |
18248 | else | |
18249 | with_babeltrace=auto | |
18250 | fi | |
18251 | ||
18252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
18253 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
18254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
18255 | $as_echo "$with_babeltrace" >&6; } | |
18256 | ||
18257 | if test "x$with_babeltrace" = "xno"; then | |
18258 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
18259 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
18260 | else | |
18261 | # Append -Werror to CFLAGS so that configure can catch the warning | |
18262 | # "assignment from incompatible pointer type", which is related to | |
18263 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
18264 | # in GDB, while babeltrace 1.0.3 is broken. | |
18265 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
18266 | # safe to save and restore CFLAGS here. | |
18267 | saved_CFLAGS=$CFLAGS | |
18268 | CFLAGS="$CFLAGS -Werror" | |
18269 | ||
18270 | ||
18271 | ||
18272 | ||
18273 | ||
18274 | ||
18275 | ||
18276 | ||
18277 | use_additional=yes | |
18278 | ||
18279 | acl_save_prefix="$prefix" | |
18280 | prefix="$acl_final_prefix" | |
18281 | acl_save_exec_prefix="$exec_prefix" | |
18282 | exec_prefix="$acl_final_exec_prefix" | |
18283 | ||
18284 | eval additional_includedir=\"$includedir\" | |
18285 | eval additional_libdir=\"$libdir\" | |
18286 | ||
18287 | exec_prefix="$acl_save_exec_prefix" | |
18288 | prefix="$acl_save_prefix" | |
18289 | ||
18290 | ||
18291 | # Check whether --with-libbabeltrace-prefix was given. | |
18292 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
18293 | withval=$with_libbabeltrace_prefix; | |
18294 | if test "X$withval" = "Xno"; then | |
18295 | use_additional=no | |
18296 | else | |
18297 | if test "X$withval" = "X"; then | |
18298 | ||
18299 | acl_save_prefix="$prefix" | |
18300 | prefix="$acl_final_prefix" | |
18301 | acl_save_exec_prefix="$exec_prefix" | |
18302 | exec_prefix="$acl_final_exec_prefix" | |
18303 | ||
18304 | eval additional_includedir=\"$includedir\" | |
18305 | eval additional_libdir=\"$libdir\" | |
18306 | ||
18307 | exec_prefix="$acl_save_exec_prefix" | |
18308 | prefix="$acl_save_prefix" | |
18309 | ||
18310 | else | |
18311 | additional_includedir="$withval/include" | |
18312 | additional_libdir="$withval/lib" | |
18313 | fi | |
18314 | fi | |
18315 | ||
18316 | fi | |
18317 | ||
9f1528a1 AB |
18318 | |
18319 | # Check whether --with-libbabeltrace-type was given. | |
18320 | if test "${with_libbabeltrace_type+set}" = set; then : | |
18321 | withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval | |
18322 | else | |
18323 | with_libbabeltrace_type=auto | |
18324 | fi | |
18325 | ||
18326 | lib_type=`eval echo \$with_libbabeltrace_type` | |
18327 | ||
393fd4c3 YQ |
18328 | LIBBABELTRACE= |
18329 | LTLIBBABELTRACE= | |
18330 | INCBABELTRACE= | |
18331 | rpathdirs= | |
18332 | ltrpathdirs= | |
18333 | names_already_handled= | |
18334 | names_next_round='babeltrace babeltrace-ctf' | |
18335 | while test -n "$names_next_round"; do | |
18336 | names_this_round="$names_next_round" | |
18337 | names_next_round= | |
18338 | for name in $names_this_round; do | |
18339 | already_handled= | |
18340 | for n in $names_already_handled; do | |
18341 | if test "$n" = "$name"; then | |
18342 | already_handled=yes | |
18343 | break | |
18344 | fi | |
18345 | done | |
18346 | if test -z "$already_handled"; then | |
18347 | names_already_handled="$names_already_handled $name" | |
18348 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
18349 | eval value=\"\$HAVE_LIB$uppername\" | |
18350 | if test -n "$value"; then | |
18351 | if test "$value" = yes; then | |
18352 | eval value=\"\$LIB$uppername\" | |
18353 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
18354 | eval value=\"\$LTLIB$uppername\" | |
18355 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
18356 | else | |
18357 | : | |
18358 | fi | |
18359 | else | |
18360 | found_dir= | |
18361 | found_la= | |
18362 | found_so= | |
18363 | found_a= | |
18364 | if test $use_additional = yes; then | |
9f1528a1 | 18365 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18366 | found_dir="$additional_libdir" |
18367 | found_so="$additional_libdir/lib$name.$shlibext" | |
18368 | if test -f "$additional_libdir/lib$name.la"; then | |
18369 | found_la="$additional_libdir/lib$name.la" | |
18370 | fi | |
9f1528a1 | 18371 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18372 | if test -f "$additional_libdir/lib$name.$libext"; then |
18373 | found_dir="$additional_libdir" | |
18374 | found_a="$additional_libdir/lib$name.$libext" | |
18375 | if test -f "$additional_libdir/lib$name.la"; then | |
18376 | found_la="$additional_libdir/lib$name.la" | |
18377 | fi | |
18378 | fi | |
18379 | fi | |
18380 | fi | |
18381 | if test "X$found_dir" = "X"; then | |
18382 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18383 | ||
18384 | acl_save_prefix="$prefix" | |
18385 | prefix="$acl_final_prefix" | |
18386 | acl_save_exec_prefix="$exec_prefix" | |
18387 | exec_prefix="$acl_final_exec_prefix" | |
18388 | eval x=\"$x\" | |
18389 | exec_prefix="$acl_save_exec_prefix" | |
18390 | prefix="$acl_save_prefix" | |
18391 | ||
18392 | case "$x" in | |
18393 | -L*) | |
18394 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 18395 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18396 | found_dir="$dir" |
18397 | found_so="$dir/lib$name.$shlibext" | |
18398 | if test -f "$dir/lib$name.la"; then | |
18399 | found_la="$dir/lib$name.la" | |
18400 | fi | |
9f1528a1 | 18401 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18402 | if test -f "$dir/lib$name.$libext"; then |
18403 | found_dir="$dir" | |
18404 | found_a="$dir/lib$name.$libext" | |
18405 | if test -f "$dir/lib$name.la"; then | |
18406 | found_la="$dir/lib$name.la" | |
18407 | fi | |
18408 | fi | |
18409 | fi | |
18410 | ;; | |
18411 | esac | |
18412 | if test "X$found_dir" != "X"; then | |
18413 | break | |
18414 | fi | |
18415 | done | |
18416 | fi | |
18417 | if test "X$found_dir" != "X"; then | |
18418 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
18419 | if test "X$found_so" != "X"; then | |
18420 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
18421 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18422 | else | |
18423 | haveit= | |
18424 | for x in $ltrpathdirs; do | |
18425 | if test "X$x" = "X$found_dir"; then | |
18426 | haveit=yes | |
18427 | break | |
18428 | fi | |
18429 | done | |
18430 | if test -z "$haveit"; then | |
18431 | ltrpathdirs="$ltrpathdirs $found_dir" | |
18432 | fi | |
18433 | if test "$hardcode_direct" = yes; then | |
18434 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18435 | else | |
18436 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
18437 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18438 | haveit= | |
18439 | for x in $rpathdirs; do | |
18440 | if test "X$x" = "X$found_dir"; then | |
18441 | haveit=yes | |
18442 | break | |
18443 | fi | |
18444 | done | |
18445 | if test -z "$haveit"; then | |
18446 | rpathdirs="$rpathdirs $found_dir" | |
18447 | fi | |
18448 | else | |
18449 | haveit= | |
18450 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18451 | ||
18452 | acl_save_prefix="$prefix" | |
18453 | prefix="$acl_final_prefix" | |
18454 | acl_save_exec_prefix="$exec_prefix" | |
18455 | exec_prefix="$acl_final_exec_prefix" | |
18456 | eval x=\"$x\" | |
18457 | exec_prefix="$acl_save_exec_prefix" | |
18458 | prefix="$acl_save_prefix" | |
18459 | ||
18460 | if test "X$x" = "X-L$found_dir"; then | |
18461 | haveit=yes | |
18462 | break | |
18463 | fi | |
18464 | done | |
18465 | if test -z "$haveit"; then | |
18466 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
18467 | fi | |
18468 | if test "$hardcode_minus_L" != no; then | |
18469 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18470 | else | |
18471 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
18472 | fi | |
18473 | fi | |
18474 | fi | |
18475 | fi | |
18476 | else | |
18477 | if test "X$found_a" != "X"; then | |
18478 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
18479 | else | |
18480 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
18481 | fi | |
18482 | fi | |
18483 | additional_includedir= | |
18484 | case "$found_dir" in | |
18485 | */lib | */lib/) | |
18486 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
18487 | additional_includedir="$basedir/include" | |
18488 | ;; | |
18489 | esac | |
18490 | if test "X$additional_includedir" != "X"; then | |
18491 | if test "X$additional_includedir" != "X/usr/include"; then | |
18492 | haveit= | |
18493 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
18494 | if test -n "$GCC"; then | |
18495 | case $host_os in | |
18496 | linux*) haveit=yes;; | |
18497 | esac | |
18498 | fi | |
18499 | fi | |
18500 | if test -z "$haveit"; then | |
18501 | for x in $CPPFLAGS $INCBABELTRACE; do | |
18502 | ||
18503 | acl_save_prefix="$prefix" | |
18504 | prefix="$acl_final_prefix" | |
18505 | acl_save_exec_prefix="$exec_prefix" | |
18506 | exec_prefix="$acl_final_exec_prefix" | |
18507 | eval x=\"$x\" | |
18508 | exec_prefix="$acl_save_exec_prefix" | |
18509 | prefix="$acl_save_prefix" | |
18510 | ||
18511 | if test "X$x" = "X-I$additional_includedir"; then | |
18512 | haveit=yes | |
18513 | break | |
18514 | fi | |
18515 | done | |
18516 | if test -z "$haveit"; then | |
18517 | if test -d "$additional_includedir"; then | |
18518 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
18519 | fi | |
18520 | fi | |
18521 | fi | |
18522 | fi | |
18523 | fi | |
18524 | if test -n "$found_la"; then | |
18525 | save_libdir="$libdir" | |
18526 | case "$found_la" in | |
18527 | */* | *\\*) . "$found_la" ;; | |
18528 | *) . "./$found_la" ;; | |
18529 | esac | |
18530 | libdir="$save_libdir" | |
18531 | for dep in $dependency_libs; do | |
18532 | case "$dep" in | |
18533 | -L*) | |
18534 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
18535 | if test "X$additional_libdir" != "X/usr/lib"; then | |
18536 | haveit= | |
18537 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
18538 | if test -n "$GCC"; then | |
18539 | case $host_os in | |
18540 | linux*) haveit=yes;; | |
18541 | esac | |
18542 | fi | |
18543 | fi | |
18544 | if test -z "$haveit"; then | |
18545 | haveit= | |
18546 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18547 | ||
18548 | acl_save_prefix="$prefix" | |
18549 | prefix="$acl_final_prefix" | |
18550 | acl_save_exec_prefix="$exec_prefix" | |
18551 | exec_prefix="$acl_final_exec_prefix" | |
18552 | eval x=\"$x\" | |
18553 | exec_prefix="$acl_save_exec_prefix" | |
18554 | prefix="$acl_save_prefix" | |
18555 | ||
18556 | if test "X$x" = "X-L$additional_libdir"; then | |
18557 | haveit=yes | |
18558 | break | |
18559 | fi | |
18560 | done | |
18561 | if test -z "$haveit"; then | |
18562 | if test -d "$additional_libdir"; then | |
18563 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
18564 | fi | |
18565 | fi | |
18566 | haveit= | |
18567 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18568 | ||
18569 | acl_save_prefix="$prefix" | |
18570 | prefix="$acl_final_prefix" | |
18571 | acl_save_exec_prefix="$exec_prefix" | |
18572 | exec_prefix="$acl_final_exec_prefix" | |
18573 | eval x=\"$x\" | |
18574 | exec_prefix="$acl_save_exec_prefix" | |
18575 | prefix="$acl_save_prefix" | |
18576 | ||
18577 | if test "X$x" = "X-L$additional_libdir"; then | |
18578 | haveit=yes | |
18579 | break | |
18580 | fi | |
18581 | done | |
18582 | if test -z "$haveit"; then | |
18583 | if test -d "$additional_libdir"; then | |
18584 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
18585 | fi | |
18586 | fi | |
18587 | fi | |
18588 | fi | |
18589 | ;; | |
18590 | -R*) | |
18591 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
18592 | if test "$enable_rpath" != no; then | |
18593 | haveit= | |
18594 | for x in $rpathdirs; do | |
18595 | if test "X$x" = "X$dir"; then | |
18596 | haveit=yes | |
18597 | break | |
18598 | fi | |
18599 | done | |
18600 | if test -z "$haveit"; then | |
18601 | rpathdirs="$rpathdirs $dir" | |
18602 | fi | |
18603 | haveit= | |
18604 | for x in $ltrpathdirs; do | |
18605 | if test "X$x" = "X$dir"; then | |
18606 | haveit=yes | |
18607 | break | |
18608 | fi | |
18609 | done | |
18610 | if test -z "$haveit"; then | |
18611 | ltrpathdirs="$ltrpathdirs $dir" | |
18612 | fi | |
18613 | fi | |
18614 | ;; | |
18615 | -l*) | |
18616 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
18617 | ;; | |
18618 | *.la) | |
18619 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
18620 | ;; | |
18621 | *) | |
18622 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
18623 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
18624 | ;; | |
18625 | esac | |
18626 | done | |
18627 | fi | |
18628 | else | |
9f1528a1 AB |
18629 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
18630 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
18631 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
18632 | else | |
18633 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext" | |
18634 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext" | |
18635 | fi | |
393fd4c3 YQ |
18636 | fi |
18637 | fi | |
18638 | fi | |
18639 | done | |
18640 | done | |
18641 | if test "X$rpathdirs" != "X"; then | |
18642 | if test -n "$hardcode_libdir_separator"; then | |
18643 | alldirs= | |
18644 | for found_dir in $rpathdirs; do | |
18645 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
18646 | done | |
18647 | acl_save_libdir="$libdir" | |
18648 | libdir="$alldirs" | |
18649 | eval flag=\"$hardcode_libdir_flag_spec\" | |
18650 | libdir="$acl_save_libdir" | |
18651 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
18652 | else | |
18653 | for found_dir in $rpathdirs; do | |
18654 | acl_save_libdir="$libdir" | |
18655 | libdir="$found_dir" | |
18656 | eval flag=\"$hardcode_libdir_flag_spec\" | |
18657 | libdir="$acl_save_libdir" | |
18658 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
18659 | done | |
18660 | fi | |
18661 | fi | |
18662 | if test "X$ltrpathdirs" != "X"; then | |
18663 | for found_dir in $ltrpathdirs; do | |
18664 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
18665 | done | |
18666 | fi | |
18667 | ||
18668 | ||
18669 | ac_save_CPPFLAGS="$CPPFLAGS" | |
18670 | ||
18671 | for element in $INCBABELTRACE; do | |
18672 | haveit= | |
18673 | for x in $CPPFLAGS; do | |
18674 | ||
18675 | acl_save_prefix="$prefix" | |
18676 | prefix="$acl_final_prefix" | |
18677 | acl_save_exec_prefix="$exec_prefix" | |
18678 | exec_prefix="$acl_final_exec_prefix" | |
18679 | eval x=\"$x\" | |
18680 | exec_prefix="$acl_save_exec_prefix" | |
18681 | prefix="$acl_save_prefix" | |
18682 | ||
18683 | if test "X$x" = "X$element"; then | |
18684 | haveit=yes | |
18685 | break | |
18686 | fi | |
18687 | done | |
18688 | if test -z "$haveit"; then | |
18689 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
18690 | fi | |
18691 | done | |
18692 | ||
18693 | ||
18694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
18695 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
d0ac1c44 | 18696 | if ${ac_cv_libbabeltrace+:} false; then : |
393fd4c3 YQ |
18697 | $as_echo_n "(cached) " >&6 |
18698 | else | |
18699 | ||
18700 | ac_save_LIBS="$LIBS" | |
18701 | LIBS="$LIBS $LIBBABELTRACE" | |
18702 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
18703 | /* end confdefs.h. */ | |
18704 | #include <babeltrace/babeltrace.h> | |
18705 | #include <babeltrace/ctf/events.h> | |
18706 | #include <babeltrace/ctf/iterator.h> | |
18707 | int | |
18708 | main () | |
18709 | { | |
18710 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
18711 | struct bt_ctf_event *event = NULL; | |
18712 | const struct bt_definition *scope; | |
18713 | ||
13cdc2af | 18714 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 18715 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
18716 | scope = bt_ctf_get_top_level_scope (event, |
18717 | BT_STREAM_EVENT_HEADER); | |
18718 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
18719 | ||
18720 | ; | |
18721 | return 0; | |
18722 | } | |
18723 | _ACEOF | |
18724 | if ac_fn_c_try_link "$LINENO"; then : | |
18725 | ac_cv_libbabeltrace=yes | |
18726 | else | |
18727 | ac_cv_libbabeltrace=no | |
18728 | fi | |
18729 | rm -f core conftest.err conftest.$ac_objext \ | |
18730 | conftest$ac_exeext conftest.$ac_ext | |
18731 | LIBS="$ac_save_LIBS" | |
18732 | ||
18733 | fi | |
18734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
18735 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
18736 | if test "$ac_cv_libbabeltrace" = yes; then | |
18737 | HAVE_LIBBABELTRACE=yes | |
18738 | ||
18739 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
18740 | ||
18741 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
18742 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
18743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
18744 | $as_echo "$LIBBABELTRACE" >&6; } | |
18745 | else | |
18746 | HAVE_LIBBABELTRACE=no | |
18747 | CPPFLAGS="$ac_save_CPPFLAGS" | |
18748 | LIBBABELTRACE= | |
18749 | LTLIBBABELTRACE= | |
18750 | fi | |
18751 | ||
18752 | ||
18753 | ||
18754 | ||
18755 | ||
18756 | ||
18757 | CFLAGS=$saved_CFLAGS | |
18758 | ||
18759 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
18760 | if test "$with_babeltrace" = yes; then | |
d0ac1c44 | 18761 | as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 |
393fd4c3 YQ |
18762 | else |
18763 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
18764 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
18765 | fi | |
18766 | fi | |
18767 | fi | |
18768 | ||
ccb1ba62 CB |
18769 | # Check for xxhash |
18770 | ||
18771 | # Check whether --with-xxhash was given. | |
18772 | if test "${with_xxhash+set}" = set; then : | |
18773 | withval=$with_xxhash; | |
18774 | else | |
18775 | with_xxhash=auto | |
18776 | fi | |
18777 | ||
18778 | ||
1776e3e5 NA |
18779 | # Check whether --enable-libctf was given. |
18780 | if test "${enable_libctf+set}" = set; then : | |
18781 | enableval=$enable_libctf; | |
18782 | case "$enableval" in | |
18783 | yes|no) ;; | |
18784 | *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;; | |
18785 | esac | |
18786 | ||
18787 | else | |
18788 | enable_libctf=yes | |
18789 | fi | |
18790 | ||
18791 | ||
18792 | if test x${enable_static} = xno; then | |
18793 | LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so" | |
18794 | CTF_DEPS="../libctf/.libs/libctf.so" | |
18795 | else | |
18796 | LIBCTF="../libctf/.libs/libctf.a" | |
18797 | CTF_DEPS="$LIBCTF" | |
18798 | fi | |
18799 | if test "${enable_libctf}" = yes; then | |
18800 | ||
18801 | $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h | |
18802 | ||
18803 | else | |
18804 | LIBCTF= | |
18805 | CTF_DEPS= | |
18806 | fi | |
18807 | ||
18808 | ||
18809 | ||
18810 | ||
18811 | # If nativefile (NAT_FILE) is not set in configure.nat, we link to an | |
18812 | # empty version. | |
18813 | ||
ccb1ba62 CB |
18814 | if test "x$with_xxhash" != "xno"; then |
18815 | ||
18816 | ||
18817 | ||
18818 | ||
18819 | ||
18820 | ||
18821 | ||
18822 | ||
18823 | use_additional=yes | |
18824 | ||
18825 | acl_save_prefix="$prefix" | |
18826 | prefix="$acl_final_prefix" | |
18827 | acl_save_exec_prefix="$exec_prefix" | |
18828 | exec_prefix="$acl_final_exec_prefix" | |
18829 | ||
18830 | eval additional_includedir=\"$includedir\" | |
18831 | eval additional_libdir=\"$libdir\" | |
18832 | ||
18833 | exec_prefix="$acl_save_exec_prefix" | |
18834 | prefix="$acl_save_prefix" | |
18835 | ||
18836 | ||
18837 | # Check whether --with-libxxhash-prefix was given. | |
18838 | if test "${with_libxxhash_prefix+set}" = set; then : | |
18839 | withval=$with_libxxhash_prefix; | |
18840 | if test "X$withval" = "Xno"; then | |
18841 | use_additional=no | |
18842 | else | |
18843 | if test "X$withval" = "X"; then | |
18844 | ||
18845 | acl_save_prefix="$prefix" | |
18846 | prefix="$acl_final_prefix" | |
18847 | acl_save_exec_prefix="$exec_prefix" | |
18848 | exec_prefix="$acl_final_exec_prefix" | |
18849 | ||
18850 | eval additional_includedir=\"$includedir\" | |
18851 | eval additional_libdir=\"$libdir\" | |
18852 | ||
18853 | exec_prefix="$acl_save_exec_prefix" | |
18854 | prefix="$acl_save_prefix" | |
18855 | ||
18856 | else | |
18857 | additional_includedir="$withval/include" | |
18858 | additional_libdir="$withval/lib" | |
18859 | fi | |
18860 | fi | |
18861 | ||
18862 | fi | |
18863 | ||
9f1528a1 AB |
18864 | |
18865 | # Check whether --with-libxxhash-type was given. | |
18866 | if test "${with_libxxhash_type+set}" = set; then : | |
18867 | withval=$with_libxxhash_type; with_libxxhash_type=$withval | |
18868 | else | |
18869 | with_libxxhash_type=auto | |
18870 | fi | |
18871 | ||
18872 | lib_type=`eval echo \$with_libxxhash_type` | |
18873 | ||
ccb1ba62 CB |
18874 | LIBXXHASH= |
18875 | LTLIBXXHASH= | |
18876 | INCXXHASH= | |
18877 | rpathdirs= | |
18878 | ltrpathdirs= | |
18879 | names_already_handled= | |
18880 | names_next_round='xxhash ' | |
18881 | while test -n "$names_next_round"; do | |
18882 | names_this_round="$names_next_round" | |
18883 | names_next_round= | |
18884 | for name in $names_this_round; do | |
18885 | already_handled= | |
18886 | for n in $names_already_handled; do | |
18887 | if test "$n" = "$name"; then | |
18888 | already_handled=yes | |
18889 | break | |
18890 | fi | |
18891 | done | |
18892 | if test -z "$already_handled"; then | |
18893 | names_already_handled="$names_already_handled $name" | |
18894 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
18895 | eval value=\"\$HAVE_LIB$uppername\" | |
18896 | if test -n "$value"; then | |
18897 | if test "$value" = yes; then | |
18898 | eval value=\"\$LIB$uppername\" | |
18899 | test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" | |
18900 | eval value=\"\$LTLIB$uppername\" | |
18901 | test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" | |
18902 | else | |
18903 | : | |
18904 | fi | |
18905 | else | |
18906 | found_dir= | |
18907 | found_la= | |
18908 | found_so= | |
18909 | found_a= | |
18910 | if test $use_additional = yes; then | |
9f1528a1 | 18911 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
18912 | found_dir="$additional_libdir" |
18913 | found_so="$additional_libdir/lib$name.$shlibext" | |
18914 | if test -f "$additional_libdir/lib$name.la"; then | |
18915 | found_la="$additional_libdir/lib$name.la" | |
18916 | fi | |
9f1528a1 | 18917 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
18918 | if test -f "$additional_libdir/lib$name.$libext"; then |
18919 | found_dir="$additional_libdir" | |
18920 | found_a="$additional_libdir/lib$name.$libext" | |
18921 | if test -f "$additional_libdir/lib$name.la"; then | |
18922 | found_la="$additional_libdir/lib$name.la" | |
18923 | fi | |
18924 | fi | |
18925 | fi | |
18926 | fi | |
18927 | if test "X$found_dir" = "X"; then | |
18928 | for x in $LDFLAGS $LTLIBXXHASH; do | |
18929 | ||
18930 | acl_save_prefix="$prefix" | |
18931 | prefix="$acl_final_prefix" | |
18932 | acl_save_exec_prefix="$exec_prefix" | |
18933 | exec_prefix="$acl_final_exec_prefix" | |
18934 | eval x=\"$x\" | |
18935 | exec_prefix="$acl_save_exec_prefix" | |
18936 | prefix="$acl_save_prefix" | |
18937 | ||
18938 | case "$x" in | |
18939 | -L*) | |
18940 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 18941 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
18942 | found_dir="$dir" |
18943 | found_so="$dir/lib$name.$shlibext" | |
18944 | if test -f "$dir/lib$name.la"; then | |
18945 | found_la="$dir/lib$name.la" | |
18946 | fi | |
9f1528a1 | 18947 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
18948 | if test -f "$dir/lib$name.$libext"; then |
18949 | found_dir="$dir" | |
18950 | found_a="$dir/lib$name.$libext" | |
18951 | if test -f "$dir/lib$name.la"; then | |
18952 | found_la="$dir/lib$name.la" | |
18953 | fi | |
18954 | fi | |
18955 | fi | |
18956 | ;; | |
18957 | esac | |
18958 | if test "X$found_dir" != "X"; then | |
18959 | break | |
18960 | fi | |
18961 | done | |
18962 | fi | |
18963 | if test "X$found_dir" != "X"; then | |
18964 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name" | |
18965 | if test "X$found_so" != "X"; then | |
18966 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
18967 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
18968 | else | |
18969 | haveit= | |
18970 | for x in $ltrpathdirs; do | |
18971 | if test "X$x" = "X$found_dir"; then | |
18972 | haveit=yes | |
18973 | break | |
18974 | fi | |
18975 | done | |
18976 | if test -z "$haveit"; then | |
18977 | ltrpathdirs="$ltrpathdirs $found_dir" | |
18978 | fi | |
18979 | if test "$hardcode_direct" = yes; then | |
18980 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
18981 | else | |
18982 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
18983 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
18984 | haveit= | |
18985 | for x in $rpathdirs; do | |
18986 | if test "X$x" = "X$found_dir"; then | |
18987 | haveit=yes | |
18988 | break | |
18989 | fi | |
18990 | done | |
18991 | if test -z "$haveit"; then | |
18992 | rpathdirs="$rpathdirs $found_dir" | |
18993 | fi | |
18994 | else | |
18995 | haveit= | |
18996 | for x in $LDFLAGS $LIBXXHASH; do | |
18997 | ||
18998 | acl_save_prefix="$prefix" | |
18999 | prefix="$acl_final_prefix" | |
19000 | acl_save_exec_prefix="$exec_prefix" | |
19001 | exec_prefix="$acl_final_exec_prefix" | |
19002 | eval x=\"$x\" | |
19003 | exec_prefix="$acl_save_exec_prefix" | |
19004 | prefix="$acl_save_prefix" | |
19005 | ||
19006 | if test "X$x" = "X-L$found_dir"; then | |
19007 | haveit=yes | |
19008 | break | |
19009 | fi | |
19010 | done | |
19011 | if test -z "$haveit"; then | |
19012 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" | |
19013 | fi | |
19014 | if test "$hardcode_minus_L" != no; then | |
19015 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19016 | else | |
19017 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19018 | fi | |
19019 | fi | |
19020 | fi | |
19021 | fi | |
19022 | else | |
19023 | if test "X$found_a" != "X"; then | |
19024 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" | |
19025 | else | |
19026 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" | |
19027 | fi | |
19028 | fi | |
19029 | additional_includedir= | |
19030 | case "$found_dir" in | |
19031 | */lib | */lib/) | |
19032 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
19033 | additional_includedir="$basedir/include" | |
19034 | ;; | |
19035 | esac | |
19036 | if test "X$additional_includedir" != "X"; then | |
19037 | if test "X$additional_includedir" != "X/usr/include"; then | |
19038 | haveit= | |
19039 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
19040 | if test -n "$GCC"; then | |
19041 | case $host_os in | |
19042 | linux*) haveit=yes;; | |
19043 | esac | |
19044 | fi | |
19045 | fi | |
19046 | if test -z "$haveit"; then | |
19047 | for x in $CPPFLAGS $INCXXHASH; do | |
19048 | ||
19049 | acl_save_prefix="$prefix" | |
19050 | prefix="$acl_final_prefix" | |
19051 | acl_save_exec_prefix="$exec_prefix" | |
19052 | exec_prefix="$acl_final_exec_prefix" | |
19053 | eval x=\"$x\" | |
19054 | exec_prefix="$acl_save_exec_prefix" | |
19055 | prefix="$acl_save_prefix" | |
19056 | ||
19057 | if test "X$x" = "X-I$additional_includedir"; then | |
19058 | haveit=yes | |
19059 | break | |
19060 | fi | |
19061 | done | |
19062 | if test -z "$haveit"; then | |
19063 | if test -d "$additional_includedir"; then | |
19064 | INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" | |
19065 | fi | |
19066 | fi | |
19067 | fi | |
19068 | fi | |
19069 | fi | |
19070 | if test -n "$found_la"; then | |
19071 | save_libdir="$libdir" | |
19072 | case "$found_la" in | |
19073 | */* | *\\*) . "$found_la" ;; | |
19074 | *) . "./$found_la" ;; | |
19075 | esac | |
19076 | libdir="$save_libdir" | |
19077 | for dep in $dependency_libs; do | |
19078 | case "$dep" in | |
19079 | -L*) | |
19080 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
19081 | if test "X$additional_libdir" != "X/usr/lib"; then | |
19082 | haveit= | |
19083 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
19084 | if test -n "$GCC"; then | |
19085 | case $host_os in | |
19086 | linux*) haveit=yes;; | |
19087 | esac | |
19088 | fi | |
19089 | fi | |
19090 | if test -z "$haveit"; then | |
19091 | haveit= | |
19092 | for x in $LDFLAGS $LIBXXHASH; do | |
19093 | ||
19094 | acl_save_prefix="$prefix" | |
19095 | prefix="$acl_final_prefix" | |
19096 | acl_save_exec_prefix="$exec_prefix" | |
19097 | exec_prefix="$acl_final_exec_prefix" | |
19098 | eval x=\"$x\" | |
19099 | exec_prefix="$acl_save_exec_prefix" | |
19100 | prefix="$acl_save_prefix" | |
19101 | ||
19102 | if test "X$x" = "X-L$additional_libdir"; then | |
19103 | haveit=yes | |
19104 | break | |
19105 | fi | |
19106 | done | |
19107 | if test -z "$haveit"; then | |
19108 | if test -d "$additional_libdir"; then | |
19109 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" | |
19110 | fi | |
19111 | fi | |
19112 | haveit= | |
19113 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19114 | ||
19115 | acl_save_prefix="$prefix" | |
19116 | prefix="$acl_final_prefix" | |
19117 | acl_save_exec_prefix="$exec_prefix" | |
19118 | exec_prefix="$acl_final_exec_prefix" | |
19119 | eval x=\"$x\" | |
19120 | exec_prefix="$acl_save_exec_prefix" | |
19121 | prefix="$acl_save_prefix" | |
19122 | ||
19123 | if test "X$x" = "X-L$additional_libdir"; then | |
19124 | haveit=yes | |
19125 | break | |
19126 | fi | |
19127 | done | |
19128 | if test -z "$haveit"; then | |
19129 | if test -d "$additional_libdir"; then | |
19130 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" | |
19131 | fi | |
19132 | fi | |
19133 | fi | |
19134 | fi | |
19135 | ;; | |
19136 | -R*) | |
19137 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
19138 | if test "$enable_rpath" != no; then | |
19139 | haveit= | |
19140 | for x in $rpathdirs; do | |
19141 | if test "X$x" = "X$dir"; then | |
19142 | haveit=yes | |
19143 | break | |
19144 | fi | |
19145 | done | |
19146 | if test -z "$haveit"; then | |
19147 | rpathdirs="$rpathdirs $dir" | |
19148 | fi | |
19149 | haveit= | |
19150 | for x in $ltrpathdirs; do | |
19151 | if test "X$x" = "X$dir"; then | |
19152 | haveit=yes | |
19153 | break | |
19154 | fi | |
19155 | done | |
19156 | if test -z "$haveit"; then | |
19157 | ltrpathdirs="$ltrpathdirs $dir" | |
19158 | fi | |
19159 | fi | |
19160 | ;; | |
19161 | -l*) | |
19162 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
19163 | ;; | |
19164 | *.la) | |
19165 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19166 | ;; | |
19167 | *) | |
19168 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" | |
19169 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" | |
19170 | ;; | |
19171 | esac | |
19172 | done | |
19173 | fi | |
19174 | else | |
9f1528a1 AB |
19175 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19176 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19177 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" | |
19178 | else | |
19179 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext" | |
19180 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext" | |
19181 | fi | |
ccb1ba62 CB |
19182 | fi |
19183 | fi | |
19184 | fi | |
19185 | done | |
19186 | done | |
19187 | if test "X$rpathdirs" != "X"; then | |
19188 | if test -n "$hardcode_libdir_separator"; then | |
19189 | alldirs= | |
19190 | for found_dir in $rpathdirs; do | |
19191 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19192 | done | |
19193 | acl_save_libdir="$libdir" | |
19194 | libdir="$alldirs" | |
19195 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19196 | libdir="$acl_save_libdir" | |
19197 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19198 | else | |
19199 | for found_dir in $rpathdirs; do | |
19200 | acl_save_libdir="$libdir" | |
19201 | libdir="$found_dir" | |
19202 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19203 | libdir="$acl_save_libdir" | |
19204 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19205 | done | |
19206 | fi | |
19207 | fi | |
19208 | if test "X$ltrpathdirs" != "X"; then | |
19209 | for found_dir in $ltrpathdirs; do | |
19210 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" | |
19211 | done | |
19212 | fi | |
19213 | ||
19214 | ||
19215 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19216 | ||
19217 | for element in $INCXXHASH; do | |
19218 | haveit= | |
19219 | for x in $CPPFLAGS; do | |
19220 | ||
19221 | acl_save_prefix="$prefix" | |
19222 | prefix="$acl_final_prefix" | |
19223 | acl_save_exec_prefix="$exec_prefix" | |
19224 | exec_prefix="$acl_final_exec_prefix" | |
19225 | eval x=\"$x\" | |
19226 | exec_prefix="$acl_save_exec_prefix" | |
19227 | prefix="$acl_save_prefix" | |
19228 | ||
19229 | if test "X$x" = "X$element"; then | |
19230 | haveit=yes | |
19231 | break | |
19232 | fi | |
19233 | done | |
19234 | if test -z "$haveit"; then | |
19235 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19236 | fi | |
19237 | done | |
19238 | ||
19239 | ||
19240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 | |
19241 | $as_echo_n "checking for libxxhash... " >&6; } | |
19242 | if ${ac_cv_libxxhash+:} false; then : | |
19243 | $as_echo_n "(cached) " >&6 | |
19244 | else | |
19245 | ||
19246 | ac_save_LIBS="$LIBS" | |
19247 | LIBS="$LIBS $LIBXXHASH" | |
19248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19249 | /* end confdefs.h. */ | |
19250 | #include <xxhash.h> | |
19251 | int | |
19252 | main () | |
19253 | { | |
19254 | XXH32("foo", 3, 0); | |
19255 | ||
19256 | ; | |
19257 | return 0; | |
19258 | } | |
19259 | _ACEOF | |
19260 | if ac_fn_c_try_link "$LINENO"; then : | |
19261 | ac_cv_libxxhash=yes | |
19262 | else | |
19263 | ac_cv_libxxhash=no | |
19264 | fi | |
19265 | rm -f core conftest.err conftest.$ac_objext \ | |
19266 | conftest$ac_exeext conftest.$ac_ext | |
19267 | LIBS="$ac_save_LIBS" | |
19268 | ||
19269 | fi | |
19270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 | |
19271 | $as_echo "$ac_cv_libxxhash" >&6; } | |
19272 | if test "$ac_cv_libxxhash" = yes; then | |
19273 | HAVE_LIBXXHASH=yes | |
19274 | ||
19275 | $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h | |
19276 | ||
19277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 | |
19278 | $as_echo_n "checking how to link with libxxhash... " >&6; } | |
19279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 | |
19280 | $as_echo "$LIBXXHASH" >&6; } | |
19281 | else | |
19282 | HAVE_LIBXXHASH=no | |
19283 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19284 | LIBXXHASH= | |
19285 | LTLIBXXHASH= | |
19286 | fi | |
19287 | ||
19288 | ||
19289 | ||
19290 | ||
19291 | ||
19292 | ||
19293 | if test "$HAVE_LIBXXHASH" != yes; then | |
19294 | if test "$with_xxhash" = yes; then | |
19295 | as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 | |
19296 | fi | |
19297 | fi | |
19298 | if test "x$with_xxhash" = "xauto"; then | |
19299 | with_xxhash="$HAVE_LIBXXHASH" | |
19300 | fi | |
19301 | fi | |
19302 | ||
19303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 | |
19304 | $as_echo_n "checking whether to use xxhash... " >&6; } | |
19305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 | |
19306 | $as_echo "$with_xxhash" >&6; } | |
19307 | ||
a0a461e5 | 19308 | NM_H= |
c906108c SS |
19309 | rm -f nm.h |
19310 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
19311 | case "${nativefile}" in |
19312 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
19313 | * ) GDB_NM_FILE="${nativefile}" | |
19314 | esac | |
a0a461e5 TT |
19315 | ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE" |
19316 | ||
60ca704f SE |
19317 | |
19318 | cat >>confdefs.h <<_ACEOF | |
b78960be | 19319 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 19320 | _ACEOF |
5a2402b8 | 19321 | |
a0a461e5 | 19322 | NM_H=nm.h |
c906108c | 19323 | fi |
5a2402b8 AC |
19324 | |
19325 | ||
a0a461e5 | 19326 | |
e3487908 GKB |
19327 | for ac_prog in xsltproc |
19328 | do | |
19329 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
19330 | set dummy $ac_prog; ac_word=$2 | |
19331 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
19332 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 19333 | if ${ac_cv_path_XSLTPROC+:} false; then : |
e3487908 GKB |
19334 | $as_echo_n "(cached) " >&6 |
19335 | else | |
19336 | case $XSLTPROC in | |
19337 | [\\/]* | ?:[\\/]*) | |
19338 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
19339 | ;; | |
19340 | *) | |
19341 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
19342 | for as_dir in $PATH | |
19343 | do | |
19344 | IFS=$as_save_IFS | |
19345 | test -z "$as_dir" && as_dir=. | |
19346 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 19347 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e3487908 GKB |
19348 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" |
19349 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
19350 | break 2 | |
19351 | fi | |
19352 | done | |
19353 | done | |
19354 | IFS=$as_save_IFS | |
19355 | ||
19356 | ;; | |
19357 | esac | |
19358 | fi | |
19359 | XSLTPROC=$ac_cv_path_XSLTPROC | |
19360 | if test -n "$XSLTPROC"; then | |
19361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
19362 | $as_echo "$XSLTPROC" >&6; } | |
19363 | else | |
19364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
19365 | $as_echo "no" >&6; } | |
19366 | fi | |
19367 | ||
19368 | ||
19369 | test -n "$XSLTPROC" && break | |
19370 | done | |
19371 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
19372 | ||
19373 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
19374 | if test "${XSLTPROC}" = missing; then | |
d0ac1c44 | 19375 | as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 |
e3487908 GKB |
19376 | fi |
19377 | fi | |
19378 | ||
19379 | ||
c906108c SS |
19380 | |
19381 | ||
c906108c | 19382 | |
81ecdfbb | 19383 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 19384 | |
bec39cab | 19385 | |
8ecfd7bd SDJ |
19386 | |
19387 | # Check whether we will enable the inclusion of unit tests when | |
19388 | # compiling GDB. | |
19389 | # | |
19390 | # The default value of this option changes depending whether we're on | |
19391 | # development mode (in which case it's "true") or not (in which case | |
db6878ac SM |
19392 | # it's "false"). The $development variable is set by the GDB_AC_COMMON |
19393 | # macro, which must therefore be used before GDB_AC_SELFTEST. | |
4d696a5c SM |
19394 | |
19395 | if test "x$development" != xtrue && test "x$development" != xfalse; then : | |
19396 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 | |
19397 | fi | |
19398 | ||
8ecfd7bd SDJ |
19399 | # Check whether --enable-unit-tests was given. |
19400 | if test "${enable_unit_tests+set}" = set; then : | |
19401 | enableval=$enable_unit_tests; case "${enableval}" in | |
19402 | yes) enable_unittests=true ;; | |
19403 | no) enable_unittests=false ;; | |
19404 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
19405 | esac | |
19406 | else | |
19407 | enable_unittests=$development | |
19408 | fi | |
19409 | ||
19410 | ||
19411 | if $enable_unittests; then | |
dcd1f979 TT |
19412 | |
19413 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
19414 | ||
8ecfd7bd | 19415 | |
74cd3f9d SM |
19416 | CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)" |
19417 | CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)" | |
8ecfd7bd | 19418 | |
dcd1f979 TT |
19419 | fi |
19420 | ||
b292c783 | 19421 | |
8ecfd7bd | 19422 | |
f6a88844 JM |
19423 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
19424 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
19425 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
19426 | GDB_TRANSFORM_NAME=gdb | |
19427 | fi | |
19428 | ||
19429 | ||
19430 | ||
19431 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19432 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
19433 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
19434 | GCORE_TRANSFORM_NAME=gcore | |
19435 | fi | |
19436 | ||
b292c783 JK |
19437 | |
19438 | ac_config_files="$ac_config_files gcore" | |
19439 | ||
141ec9f6 | 19440 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" |
81ecdfbb | 19441 | |
89a34d1b | 19442 | |
bec39cab AC |
19443 | cat >confcache <<\_ACEOF |
19444 | # This file is a shell script that caches the results of configure | |
19445 | # tests run on this system so they can be shared between configure | |
19446 | # scripts and configure runs, see configure's option --config-cache. | |
19447 | # It is not useful on other systems. If it contains results you don't | |
19448 | # want to keep, you may remove or edit it. | |
19449 | # | |
19450 | # config.status only pays attention to the cache file if you give it | |
19451 | # the --recheck option to rerun configure. | |
19452 | # | |
19453 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
19454 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
19455 | # following values. | |
19456 | ||
19457 | _ACEOF | |
19458 | ||
19459 | # The following way of writing the cache mishandles newlines in values, | |
19460 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 19461 | # So, we kill variables containing newlines. |
bec39cab AC |
19462 | # Ultrix sh set writes to stderr and can't be redirected directly, |
19463 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
19464 | ( |
19465 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
19466 | eval ac_val=\$$ac_var | |
19467 | case $ac_val in #( | |
19468 | *${as_nl}*) | |
19469 | case $ac_var in #( | |
19470 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
19471 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
19472 | esac | |
19473 | case $ac_var in #( | |
19474 | _ | IFS | as_nl) ;; #( | |
19475 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
19476 | *) { eval $ac_var=; unset $ac_var;} ;; | |
19477 | esac ;; | |
19478 | esac | |
19479 | done | |
19480 | ||
bec39cab | 19481 | (set) 2>&1 | |
81ecdfbb RW |
19482 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
19483 | *${as_nl}ac_space=\ *) | |
19484 | # `set' does not quote correctly, so add quotes: double-quote | |
19485 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
19486 | sed -n \ |
19487 | "s/'/'\\\\''/g; | |
19488 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 19489 | ;; #( |
bec39cab AC |
19490 | *) |
19491 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 19492 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 19493 | ;; |
81ecdfbb RW |
19494 | esac | |
19495 | sort | |
19496 | ) | | |
bec39cab | 19497 | sed ' |
81ecdfbb | 19498 | /^ac_cv_env_/b end |
bec39cab | 19499 | t clear |
81ecdfbb | 19500 | :clear |
bec39cab AC |
19501 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
19502 | t end | |
81ecdfbb RW |
19503 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
19504 | :end' >>confcache | |
19505 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
19506 | if test -w "$cache_file"; then | |
d0ac1c44 | 19507 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
19508 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
19509 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
19510 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
19511 | cat confcache >"$cache_file" | |
19512 | else | |
19513 | case $cache_file in #( | |
19514 | */* | ?:*) | |
19515 | mv -f confcache "$cache_file"$$ && | |
19516 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
19517 | *) | |
19518 | mv -f confcache "$cache_file" ;; | |
19519 | esac | |
19520 | fi | |
19521 | fi | |
bec39cab | 19522 | else |
81ecdfbb RW |
19523 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
19524 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
19525 | fi |
19526 | fi | |
19527 | rm -f confcache | |
19528 | ||
19529 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
19530 | # Let make expand exec_prefix. | |
19531 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
19532 | ||
bec39cab AC |
19533 | DEFS=-DHAVE_CONFIG_H |
19534 | ||
19535 | ac_libobjs= | |
19536 | ac_ltlibobjs= | |
d0ac1c44 | 19537 | U= |
bec39cab AC |
19538 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
19539 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
19540 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
19541 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
19542 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
19543 | # will be set to the directory where LIBOBJS objects are built. | |
19544 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
19545 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
19546 | done |
19547 | LIBOBJS=$ac_libobjs | |
19548 | ||
19549 | LTLIBOBJS=$ac_ltlibobjs | |
19550 | ||
19551 | ||
85981d60 | 19552 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 19553 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
81ecdfbb | 19554 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
85981d60 | 19555 | fi |
4df42755 | 19556 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
d0ac1c44 | 19557 | as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. |
4df42755 DE |
19558 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19559 | fi | |
19560 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
d0ac1c44 | 19561 | as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. |
4df42755 DE |
19562 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19563 | fi | |
81ecdfbb RW |
19564 | |
19565 | ||
d0ac1c44 | 19566 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 19567 | ac_write_fail=0 |
bec39cab AC |
19568 | ac_clean_files_save=$ac_clean_files |
19569 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
19570 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
19571 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
19572 | as_write_fail=0 | |
19573 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
19574 | #! $SHELL |
19575 | # Generated by $as_me. | |
19576 | # Run this file to recreate the current configuration. | |
19577 | # Compiler output produced by configure, useful for debugging | |
19578 | # configure, is in config.log if it exists. | |
19579 | ||
19580 | debug=false | |
19581 | ac_cs_recheck=false | |
19582 | ac_cs_silent=false | |
bec39cab | 19583 | |
81ecdfbb RW |
19584 | SHELL=\${CONFIG_SHELL-$SHELL} |
19585 | export SHELL | |
19586 | _ASEOF | |
19587 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
19588 | ## -------------------- ## | |
19589 | ## M4sh Initialization. ## | |
19590 | ## -------------------- ## | |
19591 | ||
19592 | # Be more Bourne compatible | |
19593 | DUALCASE=1; export DUALCASE # for MKS sh | |
19594 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
19595 | emulate sh |
19596 | NULLCMD=: | |
81ecdfbb | 19597 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
19598 | # is contrary to our usage. Disable this feature. |
19599 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
19600 | setopt NO_GLOB_SUBST |
19601 | else | |
19602 | case `(set -o) 2>/dev/null` in #( | |
19603 | *posix*) : | |
19604 | set -o posix ;; #( | |
19605 | *) : | |
19606 | ;; | |
19607 | esac | |
bec39cab | 19608 | fi |
bec39cab | 19609 | |
81ecdfbb RW |
19610 | |
19611 | as_nl=' | |
19612 | ' | |
19613 | export as_nl | |
19614 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
19615 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
19616 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
19617 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
19618 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
19619 | # but without wasting forks for bash or zsh. | |
19620 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
19621 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
19622 | as_echo='print -r --' | |
19623 | as_echo_n='print -rn --' | |
19624 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
19625 | as_echo='printf %s\n' | |
19626 | as_echo_n='printf %s' | |
19627 | else | |
19628 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
19629 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
19630 | as_echo_n='/usr/ucb/echo -n' | |
19631 | else | |
19632 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
19633 | as_echo_n_body='eval | |
19634 | arg=$1; | |
19635 | case $arg in #( | |
19636 | *"$as_nl"*) | |
19637 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
19638 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
19639 | esac; | |
19640 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
19641 | ' | |
19642 | export as_echo_n_body | |
19643 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
19644 | fi | |
19645 | export as_echo_body | |
19646 | as_echo='sh -c $as_echo_body as_echo' | |
19647 | fi | |
19648 | ||
19649 | # The user is always right. | |
19650 | if test "${PATH_SEPARATOR+set}" != set; then | |
19651 | PATH_SEPARATOR=: | |
19652 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
19653 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
19654 | PATH_SEPARATOR=';' | |
19655 | } | |
bec39cab AC |
19656 | fi |
19657 | ||
19658 | ||
81ecdfbb RW |
19659 | # IFS |
19660 | # We need space, tab and new line, in precisely that order. Quoting is | |
19661 | # there to prevent editors from complaining about space-tab. | |
19662 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
19663 | # splitting by setting IFS to empty value.) | |
19664 | IFS=" "" $as_nl" | |
19665 | ||
19666 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 19667 | as_myself= |
81ecdfbb RW |
19668 | case $0 in #(( |
19669 | *[\\/]* ) as_myself=$0 ;; | |
19670 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
19671 | for as_dir in $PATH | |
19672 | do | |
19673 | IFS=$as_save_IFS | |
19674 | test -z "$as_dir" && as_dir=. | |
19675 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
19676 | done | |
19677 | IFS=$as_save_IFS | |
19678 | ||
19679 | ;; | |
19680 | esac | |
19681 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
19682 | # in which case we are not to be found in the path. | |
19683 | if test "x$as_myself" = x; then | |
19684 | as_myself=$0 | |
19685 | fi | |
19686 | if test ! -f "$as_myself"; then | |
19687 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
19688 | exit 1 | |
19689 | fi | |
19690 | ||
19691 | # Unset variables that we do not need and which cause bugs (e.g. in | |
19692 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
19693 | # suppresses any "Segmentation fault" message there. '((' could | |
19694 | # trigger a bug in pdksh 5.2.14. | |
19695 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
19696 | do eval test x\${$as_var+set} = xset \ | |
19697 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
19698 | done | |
bec39cab AC |
19699 | PS1='$ ' |
19700 | PS2='> ' | |
19701 | PS4='+ ' | |
19702 | ||
19703 | # NLS nuisances. | |
81ecdfbb RW |
19704 | LC_ALL=C |
19705 | export LC_ALL | |
19706 | LANGUAGE=C | |
19707 | export LANGUAGE | |
19708 | ||
19709 | # CDPATH. | |
19710 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
19711 | ||
19712 | ||
d0ac1c44 SM |
19713 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
19714 | # ---------------------------------------- | |
81ecdfbb RW |
19715 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
19716 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 19717 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
19718 | as_fn_error () |
19719 | { | |
d0ac1c44 SM |
19720 | as_status=$1; test $as_status -eq 0 && as_status=1 |
19721 | if test "$4"; then | |
19722 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
19723 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 19724 | fi |
d0ac1c44 | 19725 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
19726 | as_fn_exit $as_status |
19727 | } # as_fn_error | |
19728 | ||
19729 | ||
19730 | # as_fn_set_status STATUS | |
19731 | # ----------------------- | |
19732 | # Set $? to STATUS, without forking. | |
19733 | as_fn_set_status () | |
19734 | { | |
19735 | return $1 | |
19736 | } # as_fn_set_status | |
19737 | ||
19738 | # as_fn_exit STATUS | |
19739 | # ----------------- | |
19740 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
19741 | as_fn_exit () | |
19742 | { | |
19743 | set +e | |
19744 | as_fn_set_status $1 | |
19745 | exit $1 | |
19746 | } # as_fn_exit | |
19747 | ||
19748 | # as_fn_unset VAR | |
19749 | # --------------- | |
19750 | # Portably unset VAR. | |
19751 | as_fn_unset () | |
19752 | { | |
19753 | { eval $1=; unset $1;} | |
19754 | } | |
19755 | as_unset=as_fn_unset | |
19756 | # as_fn_append VAR VALUE | |
19757 | # ---------------------- | |
19758 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
19759 | # advantage of any shell optimizations that allow amortized linear growth over | |
19760 | # repeated appends, instead of the typical quadratic growth present in naive | |
19761 | # implementations. | |
19762 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
19763 | eval 'as_fn_append () | |
19764 | { | |
19765 | eval $1+=\$2 | |
19766 | }' | |
19767 | else | |
19768 | as_fn_append () | |
19769 | { | |
19770 | eval $1=\$$1\$2 | |
19771 | } | |
19772 | fi # as_fn_append | |
19773 | ||
19774 | # as_fn_arith ARG... | |
19775 | # ------------------ | |
19776 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
19777 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
19778 | # must be portable across $(()) and expr. | |
19779 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
19780 | eval 'as_fn_arith () | |
19781 | { | |
19782 | as_val=$(( $* )) | |
19783 | }' | |
19784 | else | |
19785 | as_fn_arith () | |
19786 | { | |
19787 | as_val=`expr "$@" || test $? -eq 1` | |
19788 | } | |
19789 | fi # as_fn_arith | |
bec39cab | 19790 | |
81ecdfbb RW |
19791 | |
19792 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
19793 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
19794 | as_expr=expr |
19795 | else | |
19796 | as_expr=false | |
19797 | fi | |
19798 | ||
81ecdfbb | 19799 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
19800 | as_basename=basename |
19801 | else | |
19802 | as_basename=false | |
19803 | fi | |
19804 | ||
81ecdfbb RW |
19805 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
19806 | as_dirname=dirname | |
19807 | else | |
19808 | as_dirname=false | |
19809 | fi | |
bec39cab | 19810 | |
81ecdfbb | 19811 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
19812 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
19813 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
19814 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
19815 | $as_echo X/"$0" | | |
19816 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
19817 | s//\1/ | |
19818 | q | |
19819 | } | |
19820 | /^X\/\(\/\/\)$/{ | |
19821 | s//\1/ | |
19822 | q | |
19823 | } | |
19824 | /^X\/\(\/\).*/{ | |
19825 | s//\1/ | |
19826 | q | |
19827 | } | |
19828 | s/.*/./; q'` | |
b4e70030 | 19829 | |
b4e70030 JB |
19830 | # Avoid depending upon Character Ranges. |
19831 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
19832 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
19833 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
19834 | as_cr_digits='0123456789' | |
19835 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
19836 | ||
81ecdfbb RW |
19837 | ECHO_C= ECHO_N= ECHO_T= |
19838 | case `echo -n x` in #((((( | |
19839 | -n*) | |
19840 | case `echo 'xy\c'` in | |
19841 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
19842 | xy) ECHO_C='\c';; | |
19843 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
19844 | ECHO_T=' ';; | |
19845 | esac;; | |
19846 | *) | |
19847 | ECHO_N='-n';; | |
bec39cab AC |
19848 | esac |
19849 | ||
81ecdfbb RW |
19850 | rm -f conf$$ conf$$.exe conf$$.file |
19851 | if test -d conf$$.dir; then | |
19852 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 19853 | else |
81ecdfbb RW |
19854 | rm -f conf$$.dir |
19855 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 19856 | fi |
81ecdfbb RW |
19857 | if (echo >conf$$.file) 2>/dev/null; then |
19858 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 19859 | as_ln_s='ln -s' |
81ecdfbb RW |
19860 | # ... but there are two gotchas: |
19861 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
19862 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 19863 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 19864 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 19865 | as_ln_s='cp -pR' |
81ecdfbb RW |
19866 | elif ln conf$$.file conf$$ 2>/dev/null; then |
19867 | as_ln_s=ln | |
19868 | else | |
d0ac1c44 | 19869 | as_ln_s='cp -pR' |
b4e70030 | 19870 | fi |
bec39cab | 19871 | else |
d0ac1c44 | 19872 | as_ln_s='cp -pR' |
bec39cab | 19873 | fi |
81ecdfbb RW |
19874 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
19875 | rmdir conf$$.dir 2>/dev/null | |
19876 | ||
19877 | ||
19878 | # as_fn_mkdir_p | |
19879 | # ------------- | |
19880 | # Create "$as_dir" as a directory, including parents if necessary. | |
19881 | as_fn_mkdir_p () | |
19882 | { | |
19883 | ||
19884 | case $as_dir in #( | |
19885 | -*) as_dir=./$as_dir;; | |
19886 | esac | |
19887 | test -d "$as_dir" || eval $as_mkdir_p || { | |
19888 | as_dirs= | |
19889 | while :; do | |
19890 | case $as_dir in #( | |
19891 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
19892 | *) as_qdir=$as_dir;; | |
19893 | esac | |
19894 | as_dirs="'$as_qdir' $as_dirs" | |
19895 | as_dir=`$as_dirname -- "$as_dir" || | |
19896 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
19897 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
19898 | X"$as_dir" : 'X\(//\)$' \| \ | |
19899 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
19900 | $as_echo X"$as_dir" | | |
19901 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
19902 | s//\1/ | |
19903 | q | |
19904 | } | |
19905 | /^X\(\/\/\)[^/].*/{ | |
19906 | s//\1/ | |
19907 | q | |
19908 | } | |
19909 | /^X\(\/\/\)$/{ | |
19910 | s//\1/ | |
19911 | q | |
19912 | } | |
19913 | /^X\(\/\).*/{ | |
19914 | s//\1/ | |
19915 | q | |
19916 | } | |
19917 | s/.*/./; q'` | |
19918 | test -d "$as_dir" && break | |
19919 | done | |
19920 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 19921 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb | 19922 | |
bec39cab | 19923 | |
81ecdfbb | 19924 | } # as_fn_mkdir_p |
bec39cab | 19925 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 19926 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
19927 | else |
19928 | test -d ./-p && rmdir ./-p | |
19929 | as_mkdir_p=false | |
19930 | fi | |
19931 | ||
d0ac1c44 SM |
19932 | |
19933 | # as_fn_executable_p FILE | |
19934 | # ----------------------- | |
19935 | # Test if FILE is an executable regular file. | |
19936 | as_fn_executable_p () | |
19937 | { | |
19938 | test -f "$1" && test -x "$1" | |
19939 | } # as_fn_executable_p | |
19940 | as_test_x='test -x' | |
19941 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
19942 | |
19943 | # Sed expression to map a string onto a valid CPP name. | |
19944 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
19945 | ||
19946 | # Sed expression to map a string onto a valid variable name. | |
19947 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
19948 | ||
19949 | ||
bec39cab | 19950 | exec 6>&1 |
81ecdfbb RW |
19951 | ## ----------------------------------- ## |
19952 | ## Main body of $CONFIG_STATUS script. ## | |
19953 | ## ----------------------------------- ## | |
19954 | _ASEOF | |
19955 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
19956 | ||
19957 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
19958 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 19959 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
19960 | # values after options handling. |
19961 | ac_log=" | |
bec39cab | 19962 | This file was extended by $as_me, which was |
d0ac1c44 | 19963 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
19964 | |
19965 | CONFIG_FILES = $CONFIG_FILES | |
19966 | CONFIG_HEADERS = $CONFIG_HEADERS | |
19967 | CONFIG_LINKS = $CONFIG_LINKS | |
19968 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
19969 | $ $0 $@ | |
19970 | ||
81ecdfbb RW |
19971 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
19972 | " | |
19973 | ||
bec39cab AC |
19974 | _ACEOF |
19975 | ||
81ecdfbb RW |
19976 | case $ac_config_files in *" |
19977 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
19978 | esac | |
234b45d4 | 19979 | |
81ecdfbb RW |
19980 | case $ac_config_headers in *" |
19981 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
19982 | esac | |
b4e70030 | 19983 | |
b4e70030 | 19984 | |
81ecdfbb RW |
19985 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
19986 | # Files that config.status was made for. | |
19987 | config_files="$ac_config_files" | |
19988 | config_headers="$ac_config_headers" | |
19989 | config_links="$ac_config_links" | |
19990 | config_commands="$ac_config_commands" | |
234b45d4 | 19991 | |
81ecdfbb | 19992 | _ACEOF |
b4e70030 | 19993 | |
81ecdfbb | 19994 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 19995 | ac_cs_usage="\ |
81ecdfbb RW |
19996 | \`$as_me' instantiates files and other configuration actions |
19997 | from templates according to the current configuration. Unless the files | |
19998 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 19999 | |
81ecdfbb | 20000 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 20001 | |
bec39cab | 20002 | -h, --help print this help, then exit |
81ecdfbb | 20003 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 20004 | --config print configuration, then exit |
81ecdfbb RW |
20005 | -q, --quiet, --silent |
20006 | do not print progress messages | |
bec39cab AC |
20007 | -d, --debug don't remove temporary files |
20008 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
20009 | --file=FILE[:TEMPLATE] |
20010 | instantiate the configuration file FILE | |
20011 | --header=FILE[:TEMPLATE] | |
20012 | instantiate the configuration header FILE | |
234b45d4 | 20013 | |
bec39cab AC |
20014 | Configuration files: |
20015 | $config_files | |
234b45d4 | 20016 | |
bec39cab AC |
20017 | Configuration headers: |
20018 | $config_headers | |
234b45d4 | 20019 | |
bec39cab AC |
20020 | Configuration links: |
20021 | $config_links | |
234b45d4 | 20022 | |
bec39cab AC |
20023 | Configuration commands: |
20024 | $config_commands | |
20025 | ||
81ecdfbb | 20026 | Report bugs to the package provider." |
b4e70030 | 20027 | |
81ecdfbb RW |
20028 | _ACEOF |
20029 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20030 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
20031 | ac_cs_version="\\ |
20032 | config.status | |
d0ac1c44 SM |
20033 | configured by $0, generated by GNU Autoconf 2.69, |
20034 | with options \\"\$ac_cs_config\\" | |
bec39cab | 20035 | |
d0ac1c44 | 20036 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
20037 | This config.status script is free software; the Free Software Foundation |
20038 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
20039 | |
20040 | ac_pwd='$ac_pwd' | |
20041 | srcdir='$srcdir' | |
20042 | INSTALL='$INSTALL' | |
81ecdfbb RW |
20043 | AWK='$AWK' |
20044 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
20045 | _ACEOF |
20046 | ||
81ecdfbb RW |
20047 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20048 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
20049 | ac_need_defaults=: |
20050 | while test $# != 0 | |
20051 | do | |
20052 | case $1 in | |
d0ac1c44 | 20053 | --*=?*) |
81ecdfbb RW |
20054 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
20055 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 20056 | ac_shift=: |
c906108c | 20057 | ;; |
d0ac1c44 SM |
20058 | --*=) |
20059 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
20060 | ac_optarg= | |
20061 | ac_shift=: | |
20062 | ;; | |
81ecdfbb | 20063 | *) |
bec39cab AC |
20064 | ac_option=$1 |
20065 | ac_optarg=$2 | |
20066 | ac_shift=shift | |
c906108c | 20067 | ;; |
bec39cab | 20068 | esac |
c906108c | 20069 | |
bec39cab AC |
20070 | case $ac_option in |
20071 | # Handling of the options. | |
bec39cab AC |
20072 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
20073 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
20074 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
20075 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
20076 | --config | --confi | --conf | --con | --co | --c ) |
20077 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 20078 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
20079 | debug=: ;; |
20080 | --file | --fil | --fi | --f ) | |
20081 | $ac_shift | |
81ecdfbb RW |
20082 | case $ac_optarg in |
20083 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 20084 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
20085 | esac |
20086 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
20087 | ac_need_defaults=false;; |
20088 | --header | --heade | --head | --hea ) | |
20089 | $ac_shift | |
81ecdfbb RW |
20090 | case $ac_optarg in |
20091 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
20092 | esac | |
20093 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 20094 | ac_need_defaults=false;; |
81ecdfbb RW |
20095 | --he | --h) |
20096 | # Conflict between --help and --header | |
d0ac1c44 | 20097 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
20098 | Try \`$0 --help' for more information.";; |
20099 | --help | --hel | -h ) | |
20100 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
20101 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
20102 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
20103 | ac_cs_silent=: ;; | |
c906108c | 20104 | |
bec39cab | 20105 | # This is an error. |
d0ac1c44 | 20106 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 20107 | Try \`$0 --help' for more information." ;; |
c906108c | 20108 | |
81ecdfbb RW |
20109 | *) as_fn_append ac_config_targets " $1" |
20110 | ac_need_defaults=false ;; | |
c906108c | 20111 | |
bec39cab AC |
20112 | esac |
20113 | shift | |
20114 | done | |
c906108c | 20115 | |
bec39cab | 20116 | ac_configure_extra_args= |
c906108c | 20117 | |
bec39cab AC |
20118 | if $ac_cs_silent; then |
20119 | exec 6>/dev/null | |
20120 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
20121 | fi | |
c906108c | 20122 | |
bec39cab | 20123 | _ACEOF |
81ecdfbb | 20124 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 20125 | if \$ac_cs_recheck; then |
d0ac1c44 | 20126 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
20127 | shift |
20128 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
20129 | CONFIG_SHELL='$SHELL' | |
20130 | export CONFIG_SHELL | |
20131 | exec "\$@" | |
bec39cab AC |
20132 | fi |
20133 | ||
20134 | _ACEOF | |
81ecdfbb RW |
20135 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20136 | exec 5>>config.log | |
20137 | { | |
20138 | echo | |
20139 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
20140 | ## Running $as_me. ## | |
20141 | _ASBOX | |
20142 | $as_echo "$ac_log" | |
20143 | } >&5 | |
bec39cab | 20144 | |
81ecdfbb RW |
20145 | _ACEOF |
20146 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 20147 | # |
81ecdfbb | 20148 | # INIT-COMMANDS |
c906108c | 20149 | # |
a417dc56 | 20150 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
a0a461e5 | 20151 | GDB_NM_FILE=$GDB_NM_FILE |
b4e70030 | 20152 | |
bec39cab AC |
20153 | _ACEOF |
20154 | ||
81ecdfbb | 20155 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 20156 | |
81ecdfbb | 20157 | # Handling of arguments. |
bec39cab | 20158 | for ac_config_target in $ac_config_targets |
c906108c | 20159 | do |
81ecdfbb RW |
20160 | case $ac_config_target in |
20161 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
20162 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 20163 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
a0a461e5 | 20164 | "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;; |
b292c783 | 20165 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 20166 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 20167 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
141ec9f6 | 20168 | "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; |
5ae98d25 | 20169 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 20170 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb | 20171 | |
d0ac1c44 | 20172 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c906108c SS |
20173 | esac |
20174 | done | |
20175 | ||
81ecdfbb | 20176 | |
bec39cab AC |
20177 | # If the user did not use the arguments to specify the items to instantiate, |
20178 | # then the envvar interface is used. Set only those that are not. | |
20179 | # We use the long form for the default assignment because of an extremely | |
20180 | # bizarre bug on SunOS 4.1.3. | |
20181 | if $ac_need_defaults; then | |
20182 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
20183 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
20184 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
20185 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
20186 | fi | |
20187 | ||
b4e70030 | 20188 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 20189 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 20190 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
20191 | # Hook for its removal unless debugging. |
20192 | # Note that there is a small window in which the directory will not be cleaned: | |
20193 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
20194 | $debug || |
20195 | { | |
d0ac1c44 | 20196 | tmp= ac_tmp= |
81ecdfbb | 20197 | trap 'exit_status=$? |
d0ac1c44 SM |
20198 | : "${ac_tmp:=$tmp}" |
20199 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
20200 | ' 0 |
20201 | trap 'as_fn_exit 1' 1 2 13 15 | |
20202 | } | |
20203 | # Create a (secure) tmp directory for tmp files. | |
20204 | ||
20205 | { | |
20206 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 20207 | test -d "$tmp" |
81ecdfbb RW |
20208 | } || |
20209 | { | |
20210 | tmp=./conf$$-$RANDOM | |
20211 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
20212 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
20213 | ac_tmp=$tmp | |
81ecdfbb RW |
20214 | |
20215 | # Set up the scripts for CONFIG_FILES section. | |
20216 | # No need to generate them if there are no CONFIG_FILES. | |
20217 | # This happens for instance with `./config.status config.h'. | |
20218 | if test -n "$CONFIG_FILES"; then | |
20219 | ||
20220 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
20221 | ac_cs_awk_getline=: | |
20222 | ac_cs_awk_pipe_init= | |
20223 | ac_cs_awk_read_file=' | |
20224 | while ((getline aline < (F[key])) > 0) | |
20225 | print(aline) | |
20226 | close(F[key])' | |
20227 | ac_cs_awk_pipe_fini= | |
20228 | else | |
20229 | ac_cs_awk_getline=false | |
20230 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
20231 | ac_cs_awk_read_file=' | |
20232 | print "|#_!!_#|" | |
20233 | print "cat " F[key] " &&" | |
20234 | '$ac_cs_awk_pipe_init | |
20235 | # The final `:' finishes the AND list. | |
20236 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
20237 | fi | |
20238 | ac_cr=`echo X | tr X '\015'` | |
20239 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
20240 | # But we know of no other shell where ac_cr would be empty at this | |
20241 | # point, so we can use a bashism as a fallback. | |
20242 | if test "x$ac_cr" = x; then | |
20243 | eval ac_cr=\$\'\\r\' | |
20244 | fi | |
20245 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
20246 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 20247 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
20248 | else |
20249 | ac_cs_awk_cr=$ac_cr | |
20250 | fi | |
20251 | ||
d0ac1c44 | 20252 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
20253 | _ACEOF |
20254 | ||
20255 | # Create commands to substitute file output variables. | |
20256 | { | |
20257 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d0ac1c44 | 20258 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
81ecdfbb RW |
20259 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
20260 | echo "_ACAWK" && | |
20261 | echo "_ACEOF" | |
20262 | } >conf$$files.sh && | |
20263 | . ./conf$$files.sh || | |
d0ac1c44 | 20264 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20265 | rm -f conf$$files.sh |
20266 | ||
20267 | { | |
20268 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
20269 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
20270 | echo "_ACEOF" | |
20271 | } >conf$$subs.sh || | |
d0ac1c44 SM |
20272 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
20273 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
20274 | ac_delim='%!_!# ' |
20275 | for ac_last_try in false false false false false :; do | |
20276 | . ./conf$$subs.sh || | |
d0ac1c44 | 20277 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20278 | |
20279 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
20280 | if test $ac_delim_n = $ac_delim_num; then | |
20281 | break | |
20282 | elif $ac_last_try; then | |
d0ac1c44 | 20283 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20284 | else |
20285 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20286 | fi | |
20287 | done | |
20288 | rm -f conf$$subs.sh | |
20289 | ||
20290 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20291 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
20292 | _ACEOF |
20293 | sed -n ' | |
20294 | h | |
20295 | s/^/S["/; s/!.*/"]=/ | |
20296 | p | |
20297 | g | |
20298 | s/^[^!]*!// | |
20299 | :repl | |
20300 | t repl | |
20301 | s/'"$ac_delim"'$// | |
20302 | t delim | |
20303 | :nl | |
20304 | h | |
d0ac1c44 | 20305 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20306 | t more1 |
20307 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
20308 | p | |
20309 | n | |
20310 | b repl | |
20311 | :more1 | |
20312 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20313 | p | |
20314 | g | |
20315 | s/.\{148\}// | |
20316 | t nl | |
20317 | :delim | |
20318 | h | |
d0ac1c44 | 20319 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20320 | t more2 |
20321 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
20322 | p | |
20323 | b | |
20324 | :more2 | |
20325 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20326 | p | |
20327 | g | |
20328 | s/.\{148\}// | |
20329 | t delim | |
20330 | ' <conf$$subs.awk | sed ' | |
20331 | /^[^""]/{ | |
20332 | N | |
20333 | s/\n// | |
20334 | } | |
20335 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
20336 | rm -f conf$$subs.awk | |
20337 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20338 | _ACAWK | |
d0ac1c44 | 20339 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
20340 | for (key in S) S_is_set[key] = 1 |
20341 | FS = "\a" | |
20342 | \$ac_cs_awk_pipe_init | |
20343 | } | |
20344 | { | |
20345 | line = $ 0 | |
20346 | nfields = split(line, field, "@") | |
20347 | substed = 0 | |
20348 | len = length(field[1]) | |
20349 | for (i = 2; i < nfields; i++) { | |
20350 | key = field[i] | |
20351 | keylen = length(key) | |
20352 | if (S_is_set[key]) { | |
20353 | value = S[key] | |
20354 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
20355 | len += length(value) + length(field[++i]) | |
20356 | substed = 1 | |
20357 | } else | |
20358 | len += 1 + keylen | |
20359 | } | |
20360 | if (nfields == 3 && !substed) { | |
20361 | key = field[2] | |
20362 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
20363 | \$ac_cs_awk_read_file | |
20364 | next | |
20365 | } | |
20366 | } | |
20367 | print line | |
b4e70030 | 20368 | } |
81ecdfbb RW |
20369 | \$ac_cs_awk_pipe_fini |
20370 | _ACAWK | |
20371 | _ACEOF | |
20372 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20373 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
20374 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
20375 | else | |
20376 | cat | |
d0ac1c44 SM |
20377 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
20378 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
81ecdfbb RW |
20379 | _ACEOF |
20380 | ||
d0ac1c44 SM |
20381 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
20382 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
20383 | # trailing colons and then remove the whole line if VPATH becomes empty |
20384 | # (actually we leave an empty line to preserve line numbers). | |
20385 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
20386 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
20387 | h | |
20388 | s/// | |
20389 | s/^/:/ | |
20390 | s/[ ]*$/:/ | |
20391 | s/:\$(srcdir):/:/g | |
20392 | s/:\${srcdir}:/:/g | |
20393 | s/:@srcdir@:/:/g | |
20394 | s/^:*// | |
81ecdfbb | 20395 | s/:*$// |
d0ac1c44 SM |
20396 | x |
20397 | s/\(=[ ]*\).*/\1/ | |
20398 | G | |
20399 | s/\n// | |
81ecdfbb RW |
20400 | s/^[^=]*=[ ]*$// |
20401 | }' | |
20402 | fi | |
20403 | ||
20404 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20405 | fi # test -n "$CONFIG_FILES" | |
20406 | ||
20407 | # Set up the scripts for CONFIG_HEADERS section. | |
20408 | # No need to generate them if there are no CONFIG_HEADERS. | |
20409 | # This happens for instance with `./config.status Makefile'. | |
20410 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 20411 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb RW |
20412 | BEGIN { |
20413 | _ACEOF | |
20414 | ||
20415 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
20416 | # here-document in config.status, that substitutes the proper values into | |
20417 | # config.h.in to produce config.h. | |
4e8d927d | 20418 | |
81ecdfbb RW |
20419 | # Create a delimiter string that does not exist in confdefs.h, to ease |
20420 | # handling of long lines. | |
20421 | ac_delim='%!_!# ' | |
20422 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
20423 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
20424 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
20425 | break |
20426 | elif $ac_last_try; then | |
d0ac1c44 | 20427 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
20428 | else |
20429 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20430 | fi | |
20431 | done | |
4e8d927d | 20432 | |
81ecdfbb RW |
20433 | # For the awk script, D is an array of macro values keyed by name, |
20434 | # likewise P contains macro parameters if any. Preserve backslash | |
20435 | # newline sequences. | |
20436 | ||
20437 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
20438 | sed -n ' | |
20439 | s/.\{148\}/&'"$ac_delim"'/g | |
20440 | t rset | |
20441 | :rset | |
20442 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
20443 | t def | |
20444 | d | |
20445 | :def | |
20446 | s/\\$// | |
20447 | t bsnl | |
20448 | s/["\\]/\\&/g | |
20449 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
20450 | D["\1"]=" \3"/p | |
20451 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
20452 | d | |
20453 | :bsnl | |
20454 | s/["\\]/\\&/g | |
20455 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
20456 | D["\1"]=" \3\\\\\\n"\\/p | |
20457 | t cont | |
20458 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
20459 | t cont | |
20460 | d | |
20461 | :cont | |
20462 | n | |
20463 | s/.\{148\}/&'"$ac_delim"'/g | |
20464 | t clear | |
20465 | :clear | |
20466 | s/\\$// | |
20467 | t bsnlc | |
20468 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
20469 | d | |
20470 | :bsnlc | |
20471 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
20472 | b cont | |
20473 | ' <confdefs.h | sed ' | |
20474 | s/'"$ac_delim"'/"\\\ | |
20475 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
20476 | ||
20477 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20478 | for (key in D) D_is_set[key] = 1 | |
20479 | FS = "\a" | |
20480 | } | |
20481 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
20482 | line = \$ 0 | |
20483 | split(line, arg, " ") | |
20484 | if (arg[1] == "#") { | |
20485 | defundef = arg[2] | |
20486 | mac1 = arg[3] | |
20487 | } else { | |
20488 | defundef = substr(arg[1], 2) | |
20489 | mac1 = arg[2] | |
20490 | } | |
20491 | split(mac1, mac2, "(") #) | |
20492 | macro = mac2[1] | |
20493 | prefix = substr(line, 1, index(line, defundef) - 1) | |
20494 | if (D_is_set[macro]) { | |
20495 | # Preserve the white space surrounding the "#". | |
20496 | print prefix "define", macro P[macro] D[macro] | |
20497 | next | |
20498 | } else { | |
20499 | # Replace #undef with comments. This is necessary, for example, | |
20500 | # in the case of _POSIX_SOURCE, which is predefined and required | |
20501 | # on some systems where configure will not decide to define it. | |
20502 | if (defundef == "undef") { | |
20503 | print "/*", prefix defundef, macro, "*/" | |
20504 | next | |
20505 | } | |
20506 | } | |
b4e70030 | 20507 | } |
81ecdfbb RW |
20508 | { print } |
20509 | _ACAWK | |
b4e70030 | 20510 | _ACEOF |
81ecdfbb | 20511 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 20512 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb | 20513 | fi # test -n "$CONFIG_HEADERS" |
4e8d927d | 20514 | |
4e8d927d | 20515 | |
81ecdfbb RW |
20516 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
20517 | shift | |
20518 | for ac_tag | |
20519 | do | |
20520 | case $ac_tag in | |
20521 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
20522 | esac | |
20523 | case $ac_mode$ac_tag in | |
20524 | :[FHL]*:*);; | |
d0ac1c44 | 20525 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
20526 | :[FH]-) ac_tag=-:-;; |
20527 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
20528 | esac | |
20529 | ac_save_IFS=$IFS | |
20530 | IFS=: | |
20531 | set x $ac_tag | |
20532 | IFS=$ac_save_IFS | |
20533 | shift | |
20534 | ac_file=$1 | |
20535 | shift | |
4e8d927d | 20536 | |
81ecdfbb RW |
20537 | case $ac_mode in |
20538 | :L) ac_source=$1;; | |
20539 | :[FH]) | |
20540 | ac_file_inputs= | |
20541 | for ac_f | |
20542 | do | |
20543 | case $ac_f in | |
d0ac1c44 | 20544 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
20545 | *) # Look for the file first in the build tree, then in the source tree |
20546 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
20547 | # because $ac_f cannot contain `:'. | |
20548 | test -f "$ac_f" || | |
20549 | case $ac_f in | |
20550 | [\\/$]*) false;; | |
20551 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
20552 | esac || | |
d0ac1c44 | 20553 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
20554 | esac |
20555 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
20556 | as_fn_append ac_file_inputs " '$ac_f'" | |
20557 | done | |
20558 | ||
20559 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
20560 | # use $as_me), people would be surprised to read: | |
20561 | # /* config.h. Generated by config.status. */ | |
20562 | configure_input='Generated from '` | |
20563 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
20564 | `' by configure.' | |
20565 | if test x"$ac_file" != x-; then | |
20566 | configure_input="$ac_file. $configure_input" | |
20567 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
20568 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 20569 | fi |
81ecdfbb RW |
20570 | # Neutralize special characters interpreted by sed in replacement strings. |
20571 | case $configure_input in #( | |
20572 | *\&* | *\|* | *\\* ) | |
20573 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
20574 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
20575 | *) ac_sed_conf_input=$configure_input;; | |
20576 | esac | |
4e8d927d | 20577 | |
81ecdfbb | 20578 | case $ac_tag in |
d0ac1c44 SM |
20579 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
20580 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
20581 | esac |
20582 | ;; | |
c906108c SS |
20583 | esac |
20584 | ||
81ecdfbb | 20585 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
20586 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
20587 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
20588 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
20589 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
20590 | $as_echo X"$ac_file" | | |
20591 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
20592 | s//\1/ | |
20593 | q | |
20594 | } | |
20595 | /^X\(\/\/\)[^/].*/{ | |
20596 | s//\1/ | |
20597 | q | |
20598 | } | |
20599 | /^X\(\/\/\)$/{ | |
20600 | s//\1/ | |
20601 | q | |
20602 | } | |
20603 | /^X\(\/\).*/{ | |
20604 | s//\1/ | |
20605 | q | |
20606 | } | |
20607 | s/.*/./; q'` | |
20608 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
20609 | ac_builddir=. |
20610 | ||
81ecdfbb RW |
20611 | case "$ac_dir" in |
20612 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
20613 | *) | |
20614 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
20615 | # A ".." for each directory in $ac_dir_suffix. | |
20616 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
20617 | case $ac_top_builddir_sub in | |
20618 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
20619 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
20620 | esac ;; | |
20621 | esac | |
20622 | ac_abs_top_builddir=$ac_pwd | |
20623 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
20624 | # for backward compatibility: | |
20625 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
20626 | |
20627 | case $srcdir in | |
81ecdfbb | 20628 | .) # We are building in place. |
bec39cab | 20629 | ac_srcdir=. |
81ecdfbb RW |
20630 | ac_top_srcdir=$ac_top_builddir_sub |
20631 | ac_abs_top_srcdir=$ac_pwd ;; | |
20632 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 20633 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
20634 | ac_top_srcdir=$srcdir |
20635 | ac_abs_top_srcdir=$srcdir ;; | |
20636 | *) # Relative name. | |
20637 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
20638 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
20639 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 20640 | esac |
81ecdfbb | 20641 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 20642 | |
c906108c | 20643 | |
81ecdfbb RW |
20644 | case $ac_mode in |
20645 | :F) | |
20646 | # | |
20647 | # CONFIG_FILE | |
20648 | # | |
c906108c | 20649 | |
bec39cab AC |
20650 | case $INSTALL in |
20651 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 20652 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 20653 | esac |
81ecdfbb | 20654 | _ACEOF |
121ce6e5 | 20655 | |
81ecdfbb RW |
20656 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20657 | # If the template does not know about datarootdir, expand it. | |
20658 | # FIXME: This hack should be removed a few years after 2.60. | |
20659 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
20660 | ac_sed_dataroot=' | |
20661 | /datarootdir/ { | |
20662 | p | |
20663 | q | |
20664 | } | |
20665 | /@datadir@/p | |
20666 | /@docdir@/p | |
20667 | /@infodir@/p | |
20668 | /@localedir@/p | |
20669 | /@mandir@/p' | |
20670 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
20671 | *datarootdir*) ac_datarootdir_seen=yes;; | |
20672 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
20673 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
20674 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
20675 | _ACEOF | |
20676 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20677 | ac_datarootdir_hack=' | |
20678 | s&@datadir@&$datadir&g | |
20679 | s&@docdir@&$docdir&g | |
20680 | s&@infodir@&$infodir&g | |
20681 | s&@localedir@&$localedir&g | |
20682 | s&@mandir@&$mandir&g | |
20683 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
20684 | esac | |
4e8d927d | 20685 | _ACEOF |
81ecdfbb RW |
20686 | |
20687 | # Neutralize VPATH when `$srcdir' = `.'. | |
20688 | # Shell code in configure.ac might set extrasub. | |
20689 | # FIXME: do we really want to maintain this feature? | |
20690 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20691 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
20692 | $extrasub |
20693 | _ACEOF | |
81ecdfbb | 20694 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
20695 | :t |
20696 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
20697 | s|@configure_input@|$ac_sed_conf_input|;t t |
20698 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
20699 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
20700 | s&@srcdir@&$ac_srcdir&;t t | |
20701 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
20702 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
20703 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
20704 | s&@builddir@&$ac_builddir&;t t | |
20705 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
20706 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
20707 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
20708 | $ac_datarootdir_hack |
20709 | " | |
20710 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
20711 | if $ac_cs_awk_getline; then | |
d0ac1c44 | 20712 | $AWK -f "$ac_tmp/subs.awk" |
81ecdfbb | 20713 | else |
d0ac1c44 SM |
20714 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
20715 | fi \ | |
20716 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
20717 | |
20718 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
20719 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
20720 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
20721 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 20722 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 20723 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 20724 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 20725 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 20726 | |
d0ac1c44 | 20727 | rm -f "$ac_tmp/stdin" |
bec39cab | 20728 | case $ac_file in |
d0ac1c44 SM |
20729 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
20730 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 20731 | esac \ |
d0ac1c44 | 20732 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
20733 | ;; |
20734 | :H) | |
20735 | # | |
20736 | # CONFIG_HEADER | |
20737 | # | |
bec39cab | 20738 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
20739 | { |
20740 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
20741 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
20742 | } >"$ac_tmp/config.h" \ | |
20743 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
20744 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
20745 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
20746 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 20747 | else |
81ecdfbb | 20748 | rm -f "$ac_file" |
d0ac1c44 SM |
20749 | mv "$ac_tmp/config.h" "$ac_file" \ |
20750 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
20751 | fi |
20752 | else | |
81ecdfbb | 20753 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
20754 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
20755 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
bec39cab | 20756 | fi |
81ecdfbb RW |
20757 | ;; |
20758 | :L) | |
20759 | # | |
20760 | # CONFIG_LINK | |
20761 | # | |
c906108c | 20762 | |
81ecdfbb RW |
20763 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
20764 | : | |
b4e70030 | 20765 | else |
81ecdfbb RW |
20766 | # Prefer the file from the source tree if names are identical. |
20767 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
20768 | ac_source=$srcdir/$ac_source | |
20769 | fi | |
b4e70030 | 20770 | |
81ecdfbb RW |
20771 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
20772 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 20773 | |
81ecdfbb | 20774 | if test ! -r "$ac_source"; then |
d0ac1c44 | 20775 | as_fn_error $? "$ac_source: file not found" "$LINENO" 5 |
81ecdfbb RW |
20776 | fi |
20777 | rm -f "$ac_file" | |
bec39cab | 20778 | |
81ecdfbb | 20779 | # Try a relative symlink, then a hard link, then a copy. |
d0ac1c44 | 20780 | case $ac_source in |
81ecdfbb RW |
20781 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; |
20782 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
20783 | esac | |
20784 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
20785 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
20786 | cp -p "$ac_source" "$ac_file" || | |
d0ac1c44 | 20787 | as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 |
81ecdfbb RW |
20788 | fi |
20789 | ;; | |
20790 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
20791 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
20792 | ;; | |
c906108c | 20793 | esac |
b4e70030 | 20794 | |
bec39cab | 20795 | |
81ecdfbb | 20796 | case $ac_file$ac_mode in |
c5adaa19 | 20797 | "config.h":H) echo > stamp-h ;; |
81ecdfbb | 20798 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
a0a461e5 | 20799 | "nm.h":L) echo > stamp-nmh ;; |
b292c783 | 20800 | "gcore":F) chmod +x gcore ;; |
81ecdfbb | 20801 | |
bec39cab | 20802 | esac |
81ecdfbb | 20803 | done # for ac_tag |
c906108c | 20804 | |
bec39cab | 20805 | |
81ecdfbb | 20806 | as_fn_exit 0 |
bec39cab | 20807 | _ACEOF |
bec39cab AC |
20808 | ac_clean_files=$ac_clean_files_save |
20809 | ||
81ecdfbb | 20810 | test $ac_write_fail = 0 || |
d0ac1c44 | 20811 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 20812 | |
bec39cab AC |
20813 | |
20814 | # configure is writing to config.log, and then calls config.status. | |
20815 | # config.status does its own redirection, appending to config.log. | |
20816 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
20817 | # by configure, so config.status won't be able to write to it; its | |
20818 | # output is simply discarded. So we exec the FD to /dev/null, | |
20819 | # effectively closing config.log, so it can be properly (re)opened and | |
20820 | # appended to by config.status. When coming back to configure, we | |
20821 | # need to make the FD available again. | |
20822 | if test "$no_create" != yes; then | |
20823 | ac_cs_success=: | |
20824 | ac_config_status_args= | |
20825 | test "$silent" = yes && | |
20826 | ac_config_status_args="$ac_config_status_args --quiet" | |
20827 | exec 5>/dev/null | |
20828 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
20829 | exec 5>>config.log | |
20830 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
20831 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 20832 | $ac_cs_success || as_fn_exit 1 |
bec39cab | 20833 | fi |
c906108c | 20834 | |
bec39cab | 20835 | # |
81ecdfbb | 20836 | # CONFIG_SUBDIRS section. |
bec39cab | 20837 | # |
c906108c SS |
20838 | if test "$no_recursion" != yes; then |
20839 | ||
81ecdfbb RW |
20840 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
20841 | # so they do not pile up. | |
c906108c SS |
20842 | ac_sub_configure_args= |
20843 | ac_prev= | |
fdc59709 PB |
20844 | eval "set x $ac_configure_args" |
20845 | shift | |
20846 | for ac_arg | |
20847 | do | |
c906108c SS |
20848 | if test -n "$ac_prev"; then |
20849 | ac_prev= | |
20850 | continue | |
20851 | fi | |
bec39cab | 20852 | case $ac_arg in |
c906108c SS |
20853 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
20854 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
20855 | ac_prev=cache_file ;; | |
20856 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
20857 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
20858 | | --c=*) | |
20859 | ;; | |
20860 | --config-cache | -C) | |
c906108c SS |
20861 | ;; |
20862 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
20863 | ac_prev=srcdir ;; | |
20864 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
20865 | ;; | |
bec39cab AC |
20866 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
20867 | ac_prev=prefix ;; | |
20868 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
20869 | ;; | |
81ecdfbb RW |
20870 | --disable-option-checking) |
20871 | ;; | |
fdc59709 PB |
20872 | *) |
20873 | case $ac_arg in | |
81ecdfbb | 20874 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 20875 | esac |
81ecdfbb | 20876 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
20877 | esac |
20878 | done | |
20879 | ||
bec39cab AC |
20880 | # Always prepend --prefix to ensure using the same prefix |
20881 | # in subdir configurations. | |
fdc59709 PB |
20882 | ac_arg="--prefix=$prefix" |
20883 | case $ac_arg in | |
81ecdfbb | 20884 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 20885 | esac |
81ecdfbb RW |
20886 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
20887 | ||
20888 | # Pass --silent | |
20889 | if test "$silent" = yes; then | |
20890 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
20891 | fi | |
20892 | ||
20893 | # Always prepend --disable-option-checking to silence warnings, since | |
20894 | # different subdirs can have different --enable and --with options. | |
20895 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 20896 | |
b4e70030 | 20897 | ac_popdir=`pwd` |
bec39cab | 20898 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
20899 | |
20900 | # Do not complain, so a configure script can configure whichever | |
20901 | # parts of a large source tree are present. | |
fdc59709 | 20902 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 20903 | |
81ecdfbb RW |
20904 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
20905 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
20906 | $as_echo "$ac_msg" >&6 | |
20907 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
20908 | ac_builddir=. |
20909 | ||
81ecdfbb RW |
20910 | case "$ac_dir" in |
20911 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
20912 | *) | |
20913 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
20914 | # A ".." for each directory in $ac_dir_suffix. | |
20915 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
20916 | case $ac_top_builddir_sub in | |
20917 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
20918 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
20919 | esac ;; | |
20920 | esac | |
20921 | ac_abs_top_builddir=$ac_pwd | |
20922 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
20923 | # for backward compatibility: | |
20924 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
20925 | |
20926 | case $srcdir in | |
81ecdfbb | 20927 | .) # We are building in place. |
bec39cab | 20928 | ac_srcdir=. |
81ecdfbb RW |
20929 | ac_top_srcdir=$ac_top_builddir_sub |
20930 | ac_abs_top_srcdir=$ac_pwd ;; | |
20931 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 20932 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
20933 | ac_top_srcdir=$srcdir |
20934 | ac_abs_top_srcdir=$srcdir ;; | |
20935 | *) # Relative name. | |
20936 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
20937 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
20938 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 20939 | esac |
81ecdfbb | 20940 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 20941 | |
c906108c | 20942 | |
fdc59709 | 20943 | cd "$ac_dir" |
c906108c SS |
20944 | |
20945 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
20946 | if test -f "$ac_srcdir/configure.gnu"; then |
20947 | ac_sub_configure=$ac_srcdir/configure.gnu | |
20948 | elif test -f "$ac_srcdir/configure"; then | |
20949 | ac_sub_configure=$ac_srcdir/configure | |
20950 | elif test -f "$ac_srcdir/configure.in"; then | |
20951 | # This should be Cygnus configure. | |
20952 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 20953 | else |
81ecdfbb RW |
20954 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
20955 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
20956 | ac_sub_configure= |
20957 | fi | |
20958 | ||
20959 | # The recursion is here. | |
20960 | if test -n "$ac_sub_configure"; then | |
c906108c | 20961 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
20962 | case $cache_file in |
20963 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
20964 | *) # Relative name. |
20965 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 20966 | esac |
c906108c | 20967 | |
81ecdfbb RW |
20968 | { $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 |
20969 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 20970 | # The eval makes quoting arguments work. |
fdc59709 PB |
20971 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
20972 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 20973 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
20974 | fi |
20975 | ||
fdc59709 | 20976 | cd "$ac_popdir" |
c906108c SS |
20977 | done |
20978 | fi | |
81ecdfbb RW |
20979 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
20980 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
20981 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
20982 | fi | |
c906108c | 20983 |