]>
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 | ||
f99d1d37 | 622 | enable_option_checking=no |
a100a945 | 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 | |
393fd4c3 YQ |
636 | LTLIBBABELTRACE |
637 | LIBBABELTRACE | |
638 | HAVE_LIBBABELTRACE | |
abbbd4a3 AB |
639 | LIBBACKTRACE_LIB |
640 | LIBBACKTRACE_INC | |
21ea5acd SDJ |
641 | HAVE_NATIVE_GCORE_HOST |
642 | NAT_GENERATED_FILES | |
643 | XM_CLIBS | |
644 | MH_CFLAGS | |
645 | LOADLIBES | |
646 | NAT_CDEPS | |
647 | NATDEPFILES | |
648 | NAT_FILE | |
81ecdfbb RW |
649 | target_subdir |
650 | CONFIG_UNINSTALL | |
651 | CONFIG_INSTALL | |
652 | CONFIG_CLEAN | |
653 | CONFIG_ALL | |
654 | CONFIG_SRCS | |
655 | CONFIG_DEPS | |
656 | CONFIG_OBS | |
657 | PROFILE_CFLAGS | |
658 | ENABLE_CFLAGS | |
659 | SIM_OBS | |
660 | SIM | |
661 | XMKMF | |
662 | GDBTK_SRC_DIR | |
663 | GDBTK_CFLAGS | |
664 | GDBTKLIBS | |
665 | X_LIBS | |
666 | X_LDFLAGS | |
667 | X_CFLAGS | |
668 | TK_XINCLUDES | |
669 | TK_DEPS | |
670 | TK_LIBRARY | |
671 | TK_INCLUDE | |
672 | TK_STUB_LIB_SPEC | |
673 | TK_STUB_LIB_FLAG | |
674 | TK_STUB_LIB_FILE | |
675 | TK_LIB_SPEC | |
676 | TK_LIB_FLAG | |
677 | TK_LIB_FILE | |
678 | TK_SRC_DIR | |
679 | TK_BIN_DIR | |
680 | TK_VERSION | |
681 | TCL_DEPS | |
682 | TCL_LIBRARY | |
683 | TCL_INCLUDE | |
684 | TCL_STUB_LIB_SPEC | |
685 | TCL_STUB_LIB_FLAG | |
686 | TCL_STUB_LIB_FILE | |
687 | TCL_LIB_SPEC | |
688 | TCL_LIB_FLAG | |
689 | TCL_LIB_FILE | |
690 | TCL_SRC_DIR | |
691 | TCL_BIN_DIR | |
692 | TCL_PATCH_LEVEL | |
693 | TCL_VERSION | |
694 | WIN32LDAPP | |
b2ceabe8 | 695 | WIN32LIBS |
81ecdfbb RW |
696 | GUI_CFLAGS_X |
697 | LIBGUI | |
608e2dbb TT |
698 | LTLIBLZMA |
699 | LIBLZMA | |
700 | HAVE_LIBLZMA | |
81ecdfbb RW |
701 | SER_HARDWIRE |
702 | WERROR_CFLAGS | |
703 | WARN_CFLAGS | |
ed2a2229 | 704 | SYSTEM_GDBINIT_DIR |
81ecdfbb | 705 | SYSTEM_GDBINIT |
81ecdfbb RW |
706 | TARGET_SYSTEM_ROOT |
707 | CONFIG_LDFLAGS | |
f6528abd | 708 | RDYNAMIC |
05ea2a05 TT |
709 | LTLIBIPT |
710 | LIBIPT | |
711 | HAVE_LIBIPT | |
5e030278 TT |
712 | PTHREAD_CFLAGS |
713 | PTHREAD_LIBS | |
714 | PTHREAD_CC | |
715 | ax_pthread_config | |
716 | SED | |
81ecdfbb | 717 | ALLOCA |
62f29fda TT |
718 | SRCHIGH_CFLAGS |
719 | SRCHIGH_LIBS | |
4df42755 DE |
720 | HAVE_GUILE_FALSE |
721 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
722 | GUILE_LIBS |
723 | GUILE_CPPFLAGS | |
e76c5d17 DE |
724 | GUILD_TARGET_FLAG |
725 | GUILD | |
ed3ef339 | 726 | pkg_config_prog_path |
4df42755 DE |
727 | HAVE_PYTHON_FALSE |
728 | HAVE_PYTHON_TRUE | |
ac534cba JB |
729 | PYTHON_LIBS |
730 | PYTHON_CPPFLAGS | |
81ecdfbb | 731 | PYTHON_CFLAGS |
ec685c5e | 732 | python_prog_path |
2400729e UW |
733 | LTLIBMPFR |
734 | LIBMPFR | |
735 | HAVE_LIBMPFR | |
2c947d9b JB |
736 | LTLIBGMP |
737 | LIBGMP | |
738 | HAVE_LIBGMP | |
81ecdfbb RW |
739 | LTLIBEXPAT |
740 | LIBEXPAT | |
741 | HAVE_LIBEXPAT | |
b8e0a31c | 742 | JIT_READER_DIR |
f997c383 | 743 | TARGET_PTR |
39037522 | 744 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
745 | READLINE_CFLAGS |
746 | READLINE_DEPS | |
747 | READLINE | |
016a3251 DD |
748 | LTLIBICONV |
749 | LIBICONV | |
711a72d3 L |
750 | zlibinc |
751 | zlibdir | |
81ecdfbb RW |
752 | MIG |
753 | WINDRES | |
754 | DLLTOOL | |
c971b7fa | 755 | AR |
81ecdfbb RW |
756 | YFLAGS |
757 | YACC | |
c971b7fa | 758 | RANLIB |
81ecdfbb | 759 | LN_S |
c971b7fa PA |
760 | INSTALL_DATA |
761 | INSTALL_SCRIPT | |
762 | INSTALL_PROGRAM | |
763 | AWK | |
81ecdfbb RW |
764 | REPORT_BUGS_TEXI |
765 | REPORT_BUGS_TO | |
766 | PKGVERSION | |
44cee4fd | 767 | CODESIGN_CERT |
f6720b1c AM |
768 | DEBUGINFOD_LIBS |
769 | DEBUGINFOD_CFLAGS | |
770 | PKG_CONFIG_LIBDIR | |
771 | PKG_CONFIG_PATH | |
772 | PKG_CONFIG | |
b292c783 | 773 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb | 774 | TARGET_OBS |
1d5269c9 MF |
775 | ENABLE_BFD_64_BIT_FALSE |
776 | ENABLE_BFD_64_BIT_TRUE | |
a100a945 | 777 | subdirs |
81ecdfbb RW |
778 | GDB_DATADIR |
779 | DEBUGDIR | |
5048e516 JK |
780 | MAKEINFO_EXTRA_FLAGS |
781 | MAKEINFOFLAGS | |
782 | MAKEINFO | |
81ecdfbb | 783 | PACKAGE |
81ecdfbb RW |
784 | CATOBJEXT |
785 | GENCAT | |
786 | INSTOBJEXT | |
787 | DATADIRNAME | |
788 | CATALOGS | |
789 | POSUB | |
790 | GMSGFMT | |
791 | XGETTEXT | |
792 | INCINTL | |
793 | LIBINTL_DEP | |
794 | LIBINTL | |
795 | USE_NLS | |
81ecdfbb RW |
796 | CCDEPMODE |
797 | DEPDIR | |
798 | am__leading_dot | |
0bcda685 PA |
799 | CXX_DIALECT |
800 | HAVE_CXX11 | |
b316465f | 801 | target_noncanonical |
4869db5e RM |
802 | INSTALL_STRIP_PROGRAM |
803 | STRIP | |
804 | install_sh | |
c8693053 | 805 | LARGEFILE_CPPFLAGS |
81ecdfbb RW |
806 | target_os |
807 | target_vendor | |
808 | target_cpu | |
809 | target | |
810 | host_os | |
811 | host_vendor | |
812 | host_cpu | |
813 | host | |
814 | build_os | |
815 | build_vendor | |
816 | build_cpu | |
817 | build | |
c971b7fa PA |
818 | EGREP |
819 | GREP | |
820 | CPP | |
3bc3d82a PA |
821 | ac_ct_CXX |
822 | CXXFLAGS | |
823 | CXX | |
81ecdfbb RW |
824 | OBJEXT |
825 | EXEEXT | |
826 | ac_ct_CC | |
827 | CPPFLAGS | |
828 | LDFLAGS | |
829 | CFLAGS | |
830 | CC | |
831 | MAINT | |
832 | MAINTAINER_MODE_FALSE | |
833 | MAINTAINER_MODE_TRUE | |
834 | target_alias | |
835 | host_alias | |
836 | build_alias | |
837 | LIBS | |
838 | ECHO_T | |
839 | ECHO_N | |
840 | ECHO_C | |
841 | DEFS | |
842 | mandir | |
843 | localedir | |
844 | libdir | |
845 | psdir | |
846 | pdfdir | |
847 | dvidir | |
848 | htmldir | |
849 | infodir | |
850 | docdir | |
851 | oldincludedir | |
852 | includedir | |
853 | localstatedir | |
854 | sharedstatedir | |
855 | sysconfdir | |
856 | datadir | |
857 | datarootdir | |
858 | libexecdir | |
859 | sbindir | |
860 | bindir | |
861 | program_transform_name | |
862 | prefix | |
863 | exec_prefix | |
864 | PACKAGE_URL | |
865 | PACKAGE_BUGREPORT | |
866 | PACKAGE_STRING | |
867 | PACKAGE_VERSION | |
868 | PACKAGE_TARNAME | |
869 | PACKAGE_NAME | |
870 | PATH_SEPARATOR | |
871 | SHELL' | |
2b351b19 | 872 | ac_subst_files='nat_makefile_frag' |
81ecdfbb RW |
873 | ac_user_opts=' |
874 | enable_option_checking | |
875 | enable_maintainer_mode | |
da2f07f1 JK |
876 | enable_plugins |
877 | enable_largefile | |
81ecdfbb RW |
878 | with_separate_debug_dir |
879 | with_gdb_datadir | |
880 | with_relocated_sources | |
7349ff92 | 881 | with_auto_load_dir |
bccbefd2 | 882 | with_auto_load_safe_path |
81ecdfbb RW |
883 | enable_targets |
884 | enable_64_bit_bfd | |
81ecdfbb RW |
885 | enable_gdbmi |
886 | enable_tui | |
887 | enable_gdbtk | |
0d79cdc4 | 888 | with_debuginfod |
05e7c244 | 889 | with_libunwind_ia64 |
81ecdfbb RW |
890 | with_curses |
891 | enable_profiling | |
44cee4fd | 892 | enable_codesign |
81ecdfbb RW |
893 | with_pkgversion |
894 | with_bugurl | |
711a72d3 | 895 | with_system_zlib |
016a3251 DD |
896 | with_gnu_ld |
897 | enable_rpath | |
81ecdfbb | 898 | with_libiconv_prefix |
9f1528a1 | 899 | with_libiconv_type |
478aac75 | 900 | with_iconv_bin |
81ecdfbb | 901 | with_system_readline |
b8e0a31c | 902 | with_jit_reader_dir |
81ecdfbb | 903 | with_expat |
81ecdfbb | 904 | with_libexpat_prefix |
9f1528a1 | 905 | with_libexpat_type |
2c947d9b JB |
906 | with_libgmp_prefix |
907 | with_libgmp_type | |
2400729e UW |
908 | with_mpfr |
909 | with_libmpfr_prefix | |
9f1528a1 | 910 | with_libmpfr_type |
81ecdfbb | 911 | with_python |
d13c7322 | 912 | with_python_libdir |
ed3ef339 | 913 | with_guile |
189b8c2e | 914 | enable_source_highlight |
261b0748 | 915 | enable_threading |
58bfce93 MM |
916 | with_intel_pt |
917 | with_libipt_prefix | |
9f1528a1 | 918 | with_libipt_type |
81ecdfbb RW |
919 | with_sysroot |
920 | with_system_gdbinit | |
ed2a2229 | 921 | with_system_gdbinit_dir |
81ecdfbb RW |
922 | enable_werror |
923 | enable_build_warnings | |
924 | enable_gdb_build_warnings | |
f35d5ade | 925 | enable_ubsan |
608e2dbb TT |
926 | with_lzma |
927 | with_liblzma_prefix | |
9f1528a1 | 928 | with_liblzma_type |
81ecdfbb RW |
929 | with_tcl |
930 | with_tk | |
931 | with_x | |
932 | enable_sim | |
abbbd4a3 | 933 | enable_libbacktrace |
393fd4c3 YQ |
934 | with_babeltrace |
935 | with_libbabeltrace_prefix | |
9f1528a1 | 936 | with_libbabeltrace_type |
ccb1ba62 | 937 | with_xxhash |
1776e3e5 | 938 | enable_libctf |
ccb1ba62 | 939 | with_libxxhash_prefix |
9f1528a1 | 940 | with_libxxhash_type |
8ecfd7bd | 941 | enable_unit_tests |
81ecdfbb RW |
942 | ' |
943 | ac_precious_vars='build_alias | |
944 | host_alias | |
945 | target_alias | |
946 | CC | |
947 | CFLAGS | |
948 | LDFLAGS | |
949 | LIBS | |
950 | CPPFLAGS | |
3bc3d82a PA |
951 | CXX |
952 | CXXFLAGS | |
953 | CCC | |
81ecdfbb | 954 | CPP |
f06e05e0 JK |
955 | MAKEINFO |
956 | MAKEINFOFLAGS | |
f6720b1c AM |
957 | PKG_CONFIG |
958 | PKG_CONFIG_PATH | |
959 | PKG_CONFIG_LIBDIR | |
960 | DEBUGINFOD_CFLAGS | |
961 | DEBUGINFOD_LIBS | |
81ecdfbb RW |
962 | YACC |
963 | YFLAGS | |
964 | XMKMF' | |
a100a945 SM |
965 | ac_subdirs_all='testsuite |
966 | gdbtk' | |
c906108c SS |
967 | |
968 | # Initialize some variables set by options. | |
bec39cab AC |
969 | ac_init_help= |
970 | ac_init_version=false | |
81ecdfbb RW |
971 | ac_unrecognized_opts= |
972 | ac_unrecognized_sep= | |
c906108c SS |
973 | # The variables have the same names as the options, with |
974 | # dashes changed to underlines. | |
bec39cab | 975 | cache_file=/dev/null |
c906108c | 976 | exec_prefix=NONE |
c906108c | 977 | no_create= |
c906108c SS |
978 | no_recursion= |
979 | prefix=NONE | |
980 | program_prefix=NONE | |
981 | program_suffix=NONE | |
982 | program_transform_name=s,x,x, | |
983 | silent= | |
984 | site= | |
985 | srcdir= | |
c906108c SS |
986 | verbose= |
987 | x_includes=NONE | |
988 | x_libraries=NONE | |
bec39cab AC |
989 | |
990 | # Installation directory options. | |
991 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
992 | # and all the variables that are supposed to be based on exec_prefix | |
993 | # by default will actually change. | |
994 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 995 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
996 | bindir='${exec_prefix}/bin' |
997 | sbindir='${exec_prefix}/sbin' | |
998 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
999 | datarootdir='${prefix}/share' |
1000 | datadir='${datarootdir}' | |
c906108c SS |
1001 | sysconfdir='${prefix}/etc' |
1002 | sharedstatedir='${prefix}/com' | |
1003 | localstatedir='${prefix}/var' | |
c906108c SS |
1004 | includedir='${prefix}/include' |
1005 | oldincludedir='/usr/include' | |
81ecdfbb RW |
1006 | docdir='${datarootdir}/doc/${PACKAGE}' |
1007 | infodir='${datarootdir}/info' | |
1008 | htmldir='${docdir}' | |
1009 | dvidir='${docdir}' | |
1010 | pdfdir='${docdir}' | |
1011 | psdir='${docdir}' | |
1012 | libdir='${exec_prefix}/lib' | |
1013 | localedir='${datarootdir}/locale' | |
1014 | mandir='${datarootdir}/man' | |
c906108c | 1015 | |
c906108c | 1016 | ac_prev= |
81ecdfbb | 1017 | ac_dashdash= |
c906108c SS |
1018 | for ac_option |
1019 | do | |
c906108c SS |
1020 | # If the previous option needs an argument, assign it. |
1021 | if test -n "$ac_prev"; then | |
81ecdfbb | 1022 | eval $ac_prev=\$ac_option |
c906108c SS |
1023 | ac_prev= |
1024 | continue | |
1025 | fi | |
1026 | ||
81ecdfbb | 1027 | case $ac_option in |
d0ac1c44 SM |
1028 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1029 | *=) ac_optarg= ;; | |
1030 | *) ac_optarg=yes ;; | |
81ecdfbb | 1031 | esac |
c906108c SS |
1032 | |
1033 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1034 | ||
81ecdfbb RW |
1035 | case $ac_dashdash$ac_option in |
1036 | --) | |
1037 | ac_dashdash=yes ;; | |
c906108c SS |
1038 | |
1039 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1040 | ac_prev=bindir ;; | |
1041 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1042 | bindir=$ac_optarg ;; |
c906108c SS |
1043 | |
1044 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1045 | ac_prev=build_alias ;; |
c906108c | 1046 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1047 | build_alias=$ac_optarg ;; |
c906108c SS |
1048 | |
1049 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1050 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1051 | ac_prev=cache_file ;; | |
1052 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1053 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1054 | cache_file=$ac_optarg ;; |
1055 | ||
1056 | --config-cache | -C) | |
1057 | cache_file=config.cache ;; | |
c906108c | 1058 | |
81ecdfbb | 1059 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1060 | ac_prev=datadir ;; |
81ecdfbb | 1061 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1062 | datadir=$ac_optarg ;; |
c906108c | 1063 | |
81ecdfbb RW |
1064 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1065 | | --dataroo | --dataro | --datar) | |
1066 | ac_prev=datarootdir ;; | |
1067 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1068 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1069 | datarootdir=$ac_optarg ;; | |
1070 | ||
c906108c | 1071 | -disable-* | --disable-*) |
81ecdfbb | 1072 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1073 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1074 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1075 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1076 | ac_useropt_orig=$ac_useropt |
1077 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1078 | case $ac_user_opts in | |
1079 | *" | |
1080 | "enable_$ac_useropt" | |
1081 | "*) ;; | |
1082 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1083 | ac_unrecognized_sep=', ';; | |
1084 | esac | |
1085 | eval enable_$ac_useropt=no ;; | |
1086 | ||
1087 | -docdir | --docdir | --docdi | --doc | --do) | |
1088 | ac_prev=docdir ;; | |
1089 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1090 | docdir=$ac_optarg ;; | |
1091 | ||
1092 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1093 | ac_prev=dvidir ;; | |
1094 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1095 | dvidir=$ac_optarg ;; | |
c906108c SS |
1096 | |
1097 | -enable-* | --enable-*) | |
81ecdfbb | 1098 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1099 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1100 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1101 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1102 | ac_useropt_orig=$ac_useropt |
1103 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1104 | case $ac_user_opts in | |
1105 | *" | |
1106 | "enable_$ac_useropt" | |
1107 | "*) ;; | |
1108 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1109 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1110 | esac |
81ecdfbb | 1111 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1112 | |
1113 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1114 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1115 | | --exec | --exe | --ex) | |
1116 | ac_prev=exec_prefix ;; | |
1117 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1118 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1119 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1120 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1121 | |
1122 | -gas | --gas | --ga | --g) | |
1123 | # Obsolete; use --with-gas. | |
1124 | with_gas=yes ;; | |
1125 | ||
bec39cab AC |
1126 | -help | --help | --hel | --he | -h) |
1127 | ac_init_help=long ;; | |
1128 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1129 | ac_init_help=recursive ;; | |
1130 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1131 | ac_init_help=short ;; | |
c906108c SS |
1132 | |
1133 | -host | --host | --hos | --ho) | |
bec39cab | 1134 | ac_prev=host_alias ;; |
c906108c | 1135 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1136 | host_alias=$ac_optarg ;; |
c906108c | 1137 | |
81ecdfbb RW |
1138 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1139 | ac_prev=htmldir ;; | |
1140 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1141 | | --ht=*) | |
1142 | htmldir=$ac_optarg ;; | |
1143 | ||
c906108c SS |
1144 | -includedir | --includedir | --includedi | --included | --include \ |
1145 | | --includ | --inclu | --incl | --inc) | |
1146 | ac_prev=includedir ;; | |
1147 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1148 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1149 | includedir=$ac_optarg ;; |
c906108c SS |
1150 | |
1151 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1152 | ac_prev=infodir ;; | |
1153 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1154 | infodir=$ac_optarg ;; |
c906108c SS |
1155 | |
1156 | -libdir | --libdir | --libdi | --libd) | |
1157 | ac_prev=libdir ;; | |
1158 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1159 | libdir=$ac_optarg ;; |
c906108c SS |
1160 | |
1161 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1162 | | --libexe | --libex | --libe) | |
1163 | ac_prev=libexecdir ;; | |
1164 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1165 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1166 | libexecdir=$ac_optarg ;; |
c906108c | 1167 | |
81ecdfbb RW |
1168 | -localedir | --localedir | --localedi | --localed | --locale) |
1169 | ac_prev=localedir ;; | |
1170 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1171 | localedir=$ac_optarg ;; | |
1172 | ||
c906108c | 1173 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1174 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1175 | ac_prev=localstatedir ;; |
1176 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1177 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1178 | localstatedir=$ac_optarg ;; |
c906108c SS |
1179 | |
1180 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1181 | ac_prev=mandir ;; | |
1182 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1183 | mandir=$ac_optarg ;; |
c906108c SS |
1184 | |
1185 | -nfp | --nfp | --nf) | |
1186 | # Obsolete; use --without-fp. | |
1187 | with_fp=no ;; | |
1188 | ||
1189 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1190 | | --no-cr | --no-c | -n) |
c906108c SS |
1191 | no_create=yes ;; |
1192 | ||
1193 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1194 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1195 | no_recursion=yes ;; | |
1196 | ||
1197 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1198 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1199 | | --oldin | --oldi | --old | --ol | --o) | |
1200 | ac_prev=oldincludedir ;; | |
1201 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1202 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1203 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1204 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1205 | |
1206 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1207 | ac_prev=prefix ;; | |
1208 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1209 | prefix=$ac_optarg ;; |
c906108c SS |
1210 | |
1211 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1212 | | --program-pre | --program-pr | --program-p) | |
1213 | ac_prev=program_prefix ;; | |
1214 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1215 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1216 | program_prefix=$ac_optarg ;; |
c906108c SS |
1217 | |
1218 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1219 | | --program-suf | --program-su | --program-s) | |
1220 | ac_prev=program_suffix ;; | |
1221 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1222 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1223 | program_suffix=$ac_optarg ;; |
c906108c SS |
1224 | |
1225 | -program-transform-name | --program-transform-name \ | |
1226 | | --program-transform-nam | --program-transform-na \ | |
1227 | | --program-transform-n | --program-transform- \ | |
1228 | | --program-transform | --program-transfor \ | |
1229 | | --program-transfo | --program-transf \ | |
1230 | | --program-trans | --program-tran \ | |
1231 | | --progr-tra | --program-tr | --program-t) | |
1232 | ac_prev=program_transform_name ;; | |
1233 | -program-transform-name=* | --program-transform-name=* \ | |
1234 | | --program-transform-nam=* | --program-transform-na=* \ | |
1235 | | --program-transform-n=* | --program-transform-=* \ | |
1236 | | --program-transform=* | --program-transfor=* \ | |
1237 | | --program-transfo=* | --program-transf=* \ | |
1238 | | --program-trans=* | --program-tran=* \ | |
1239 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1240 | program_transform_name=$ac_optarg ;; |
c906108c | 1241 | |
81ecdfbb RW |
1242 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1243 | ac_prev=pdfdir ;; | |
1244 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1245 | pdfdir=$ac_optarg ;; | |
1246 | ||
1247 | -psdir | --psdir | --psdi | --psd | --ps) | |
1248 | ac_prev=psdir ;; | |
1249 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1250 | psdir=$ac_optarg ;; | |
1251 | ||
c906108c SS |
1252 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1253 | | -silent | --silent | --silen | --sile | --sil) | |
1254 | silent=yes ;; | |
1255 | ||
1256 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1257 | ac_prev=sbindir ;; | |
1258 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1259 | | --sbi=* | --sb=*) | |
bec39cab | 1260 | sbindir=$ac_optarg ;; |
c906108c SS |
1261 | |
1262 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1263 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1264 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1265 | | --sha | --sh) | |
1266 | ac_prev=sharedstatedir ;; | |
1267 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1268 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1269 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1270 | | --sha=* | --sh=*) | |
bec39cab | 1271 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1272 | |
1273 | -site | --site | --sit) | |
1274 | ac_prev=site ;; | |
1275 | -site=* | --site=* | --sit=*) | |
bec39cab | 1276 | site=$ac_optarg ;; |
3ace7edb | 1277 | |
c906108c SS |
1278 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1279 | ac_prev=srcdir ;; | |
1280 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1281 | srcdir=$ac_optarg ;; |
c906108c SS |
1282 | |
1283 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1284 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1285 | ac_prev=sysconfdir ;; | |
1286 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1287 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1288 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1289 | |
1290 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1291 | ac_prev=target_alias ;; |
c906108c | 1292 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1293 | target_alias=$ac_optarg ;; |
c906108c SS |
1294 | |
1295 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1296 | verbose=yes ;; | |
1297 | ||
bec39cab AC |
1298 | -version | --version | --versio | --versi | --vers | -V) |
1299 | ac_init_version=: ;; | |
c906108c SS |
1300 | |
1301 | -with-* | --with-*) | |
81ecdfbb | 1302 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1303 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1304 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1305 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1306 | ac_useropt_orig=$ac_useropt |
1307 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1308 | case $ac_user_opts in | |
1309 | *" | |
1310 | "with_$ac_useropt" | |
1311 | "*) ;; | |
1312 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1313 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1314 | esac |
81ecdfbb | 1315 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1316 | |
1317 | -without-* | --without-*) | |
81ecdfbb | 1318 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1319 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1320 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1321 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1322 | ac_useropt_orig=$ac_useropt |
1323 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1324 | case $ac_user_opts in | |
1325 | *" | |
1326 | "with_$ac_useropt" | |
1327 | "*) ;; | |
1328 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1329 | ac_unrecognized_sep=', ';; | |
1330 | esac | |
1331 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1332 | |
1333 | --x) | |
1334 | # Obsolete; use --with-x. | |
1335 | with_x=yes ;; | |
1336 | ||
1337 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1338 | | --x-incl | --x-inc | --x-in | --x-i) | |
1339 | ac_prev=x_includes ;; | |
1340 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1341 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1342 | x_includes=$ac_optarg ;; |
c906108c SS |
1343 | |
1344 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1345 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1346 | ac_prev=x_libraries ;; | |
1347 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1348 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1349 | x_libraries=$ac_optarg ;; |
c906108c | 1350 | |
d0ac1c44 SM |
1351 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1352 | Try \`$0 --help' for more information" | |
c906108c SS |
1353 | ;; |
1354 | ||
bec39cab AC |
1355 | *=*) |
1356 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1357 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1358 | case $ac_envvar in #( |
1359 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1360 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1361 | esac |
1362 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1363 | export $ac_envvar ;; |
1364 | ||
c906108c | 1365 | *) |
bec39cab | 1366 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1367 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1368 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1369 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1370 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
c906108c SS |
1371 | ;; |
1372 | ||
1373 | esac | |
1374 | done | |
1375 | ||
1376 | if test -n "$ac_prev"; then | |
bec39cab | 1377 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1378 | as_fn_error $? "missing argument to $ac_option" |
c906108c | 1379 | fi |
c906108c | 1380 | |
81ecdfbb RW |
1381 | if test -n "$ac_unrecognized_opts"; then |
1382 | case $enable_option_checking in | |
1383 | no) ;; | |
d0ac1c44 | 1384 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1385 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
b4e70030 | 1386 | esac |
81ecdfbb | 1387 | fi |
b4e70030 | 1388 | |
81ecdfbb RW |
1389 | # Check all directory arguments for consistency. |
1390 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1391 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1392 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1393 | libdir localedir mandir | |
b4e70030 | 1394 | do |
81ecdfbb RW |
1395 | eval ac_val=\$$ac_var |
1396 | # Remove trailing slashes. | |
1397 | case $ac_val in | |
1398 | */ ) | |
1399 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1400 | eval $ac_var=\$ac_val;; | |
1401 | esac | |
1402 | # Be sure to have absolute directory names. | |
b4e70030 | 1403 | case $ac_val in |
81ecdfbb RW |
1404 | [\\/$]* | ?:[\\/]* ) continue;; |
1405 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1406 | esac |
d0ac1c44 | 1407 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1408 | done |
1409 | ||
bec39cab AC |
1410 | # There might be people who depend on the old broken behavior: `$host' |
1411 | # used to hold the argument of --host etc. | |
1412 | # FIXME: To remove some day. | |
1413 | build=$build_alias | |
1414 | host=$host_alias | |
1415 | target=$target_alias | |
1416 | ||
1417 | # FIXME: To remove some day. | |
1418 | if test "x$host_alias" != x; then | |
1419 | if test "x$build_alias" = x; then | |
1420 | cross_compiling=maybe | |
bec39cab AC |
1421 | elif test "x$build_alias" != "x$host_alias"; then |
1422 | cross_compiling=yes | |
1423 | fi | |
1424 | fi | |
c906108c | 1425 | |
bec39cab AC |
1426 | ac_tool_prefix= |
1427 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1428 | ||
1429 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1430 | |
c906108c | 1431 | |
81ecdfbb RW |
1432 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1433 | ac_ls_di=`ls -di .` && | |
1434 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1435 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1436 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1437 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1438 | |
1439 | ||
c906108c SS |
1440 | # Find the source files, if location was not specified. |
1441 | if test -z "$srcdir"; then | |
1442 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1443 | # Try the directory containing this script, then the parent directory. |
1444 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1445 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1446 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1447 | X"$as_myself" : 'X\(//\)$' \| \ | |
1448 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1449 | $as_echo X"$as_myself" | | |
1450 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1451 | s//\1/ | |
1452 | q | |
1453 | } | |
1454 | /^X\(\/\/\)[^/].*/{ | |
1455 | s//\1/ | |
1456 | q | |
1457 | } | |
1458 | /^X\(\/\/\)$/{ | |
1459 | s//\1/ | |
1460 | q | |
1461 | } | |
1462 | /^X\(\/\).*/{ | |
1463 | s//\1/ | |
1464 | q | |
1465 | } | |
1466 | s/.*/./; q'` | |
c906108c | 1467 | srcdir=$ac_confdir |
81ecdfbb | 1468 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1469 | srcdir=.. |
1470 | fi | |
1471 | else | |
1472 | ac_srcdir_defaulted=no | |
1473 | fi | |
81ecdfbb RW |
1474 | if test ! -r "$srcdir/$ac_unique_file"; then |
1475 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1476 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1477 | fi |
1478 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1479 | ac_abs_confdir=`( | |
d0ac1c44 | 1480 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1481 | pwd)` |
1482 | # When building in place, set srcdir=. | |
1483 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1484 | srcdir=. | |
1485 | fi | |
1486 | # Remove unnecessary trailing slashes from srcdir. | |
1487 | # Double slashes in file names in object file debugging info | |
1488 | # mess up M-x gdb in Emacs. | |
1489 | case $srcdir in | |
1490 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1491 | esac | |
1492 | for ac_var in $ac_precious_vars; do | |
1493 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1494 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1495 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1496 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1497 | done | |
c906108c | 1498 | |
bec39cab AC |
1499 | # |
1500 | # Report the --help message. | |
1501 | # | |
1502 | if test "$ac_init_help" = "long"; then | |
1503 | # Omit some internal or obsolete options to make the list less imposing. | |
1504 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1505 | cat <<_ACEOF | |
1506 | \`configure' configures this package to adapt to many kinds of systems. | |
1507 | ||
1508 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1509 | ||
1510 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1511 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1512 | ||
1513 | Defaults for the options are specified in brackets. | |
1514 | ||
1515 | Configuration: | |
1516 | -h, --help display this help and exit | |
1517 | --help=short display options specific to this package | |
1518 | --help=recursive display the short help of all the included packages | |
1519 | -V, --version display version information and exit | |
d0ac1c44 | 1520 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1521 | --cache-file=FILE cache test results in FILE [disabled] |
1522 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1523 | -n, --no-create do not create output files | |
1524 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1525 | ||
bec39cab AC |
1526 | Installation directories: |
1527 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1528 | [$ac_default_prefix] |
bec39cab | 1529 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1530 | [PREFIX] |
bec39cab AC |
1531 | |
1532 | By default, \`make install' will install all the files in | |
1533 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1534 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1535 | for instance \`--prefix=\$HOME'. | |
1536 | ||
1537 | For better control, use the options below. | |
1538 | ||
1539 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1540 | --bindir=DIR user executables [EPREFIX/bin] |
1541 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1542 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1543 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1544 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1545 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1546 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1547 | --includedir=DIR C header files [PREFIX/include] | |
1548 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1549 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1550 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1551 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1552 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1553 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1554 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1555 | --htmldir=DIR html documentation [DOCDIR] | |
1556 | --dvidir=DIR dvi documentation [DOCDIR] | |
1557 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1558 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1559 | _ACEOF |
1560 | ||
1561 | cat <<\_ACEOF | |
1562 | ||
9009e1ae MR |
1563 | Program names: |
1564 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1565 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1566 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1567 | ||
bec39cab AC |
1568 | X features: |
1569 | --x-includes=DIR X include files are in DIR | |
1570 | --x-libraries=DIR X library files are in DIR | |
1571 | ||
1572 | System types: | |
1573 | --build=BUILD configure for building on BUILD [guessed] | |
1574 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1575 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1576 | _ACEOF | |
1577 | fi | |
1578 | ||
1579 | if test -n "$ac_init_help"; then | |
1580 | ||
1581 | cat <<\_ACEOF | |
1582 | ||
1583 | Optional Features: | |
81ecdfbb | 1584 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1585 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1586 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1587 | --enable-maintainer-mode |
1588 | enable make rules and dependencies not useful (and | |
1589 | sometimes confusing) to the casual installer | |
2974be62 | 1590 | --enable-plugins Enable support for plugins |
da2f07f1 | 1591 | --disable-largefile omit support for large files |
a1220294 TT |
1592 | --enable-targets=TARGETS |
1593 | alternative target configurations | |
c0993dbe | 1594 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1595 | --disable-gdbmi disable machine-interface (MI) |
1596 | --enable-tui enable full-screen terminal user interface (TUI) | |
1597 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1598 | --enable-profiling enable profiling of GDB | |
44cee4fd | 1599 | --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
3841debe | 1600 | --disable-rpath do not hardcode runtime library paths |
189b8c2e ST |
1601 | --enable-source-highlight |
1602 | enable source-highlight for source listings | |
261b0748 LM |
1603 | --enable-threading include support for parallel processing of data |
1604 | (yes/no) | |
a1220294 | 1605 | --enable-werror treat compile warnings as errors |
32c1c914 | 1606 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1607 | --enable-gdb-build-warnings |
32c1c914 | 1608 | enable GDB specific build-time compiler warnings if |
a1220294 | 1609 | gcc is used |
f35d5ade | 1610 | --enable-ubsan enable undefined behavior sanitizer (auto/yes/no) |
32c1c914 | 1611 | --enable-sim link gdb with simulator |
abbbd4a3 AB |
1612 | --enable-libbacktrace use libbacktrace to write a backtrace after a fatal |
1613 | signal. | |
1776e3e5 | 1614 | --enable-libctf Handle .ctf type-info sections [default=yes] |
8ecfd7bd SDJ |
1615 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1616 | GDB | |
bec39cab AC |
1617 | |
1618 | Optional Packages: | |
1619 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1620 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1621 | --with-separate-debug-dir=PATH |
32c1c914 | 1622 | look for global separate debug info in this path |
62e4f60c | 1623 | [LIBDIR/debug] |
b14b1491 TT |
1624 | --with-gdb-datadir=PATH look for global separate data files in this path |
1625 | [DATADIR/gdb] | |
29b0e8a2 | 1626 | --with-relocated-sources=PATH |
32c1c914 | 1627 | automatically relocate this path for source files |
7349ff92 | 1628 | --with-auto-load-dir=PATH |
aff139ff | 1629 | directories from which to load auto-loaded scripts |
1564a261 | 1630 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1631 | --with-auto-load-safe-path=PATH |
aff139ff | 1632 | directories safe to hold auto-loaded files |
7349ff92 | 1633 | [--with-auto-load-dir] |
bccbefd2 JK |
1634 | --without-auto-load-safe-path |
1635 | do not restrict auto-loaded files locations | |
0d79cdc4 AM |
1636 | --with-debuginfod Enable debuginfo lookups with debuginfod |
1637 | (auto/yes/no) | |
05e7c244 | 1638 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1639 | --with-curses use the curses library instead of the termcap |
1640 | library | |
c16158bc JM |
1641 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1642 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1643 | --with-system-zlib use installed libz |
016a3251 DD |
1644 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1645 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1646 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
9f1528a1 | 1647 | --with-libiconv-type=TYPE type of library to search for (auto/static/shared) |
478aac75 | 1648 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1649 | --with-system-readline use installed readline library |
b8e0a31c SD |
1650 | --with-jit-reader-dir=PATH |
1651 | directory to load the JIT readers from | |
5c39566f | 1652 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1653 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1654 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
9f1528a1 | 1655 | --with-libexpat-type=TYPE type of library to search for (auto/static/shared) |
2c947d9b JB |
1656 | --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib |
1657 | --without-libgmp-prefix don't search for libgmp in includedir and libdir | |
1658 | --with-libgmp-type=TYPE type of library to search for (auto/static/shared) | |
2400729e UW |
1659 | --with-mpfr include MPFR support (auto/yes/no) |
1660 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib | |
1661 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir | |
9f1528a1 | 1662 | --with-libmpfr-type=TYPE type of library to search for (auto/static/shared) |
0c4a4063 DE |
1663 | --with-python[=PYTHON] include python support |
1664 | (auto/yes/no/<python-program>) | |
d13c7322 AB |
1665 | --with-python-libdir[=DIR] |
1666 | search for python's libraries in DIR | |
ed3ef339 DE |
1667 | --with-guile[=GUILE] include guile support |
1668 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1669 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1670 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1671 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
9f1528a1 | 1672 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
81ecdfbb | 1673 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1674 | --with-system-gdbinit=PATH |
32c1c914 | 1675 | automatically load a system-wide gdbinit file |
ed2a2229 CB |
1676 | --with-system-gdbinit-dir=PATH |
1677 | automatically load system-wide gdbinit files from | |
1678 | this directory | |
608e2dbb TT |
1679 | --with-lzma support lzma compression (auto/yes/no) |
1680 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1681 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
9f1528a1 | 1682 | --with-liblzma-type=TYPE type of library to search for (auto/static/shared) |
5062cc19 KS |
1683 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1684 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1685 | --with-x use the X Window System |
393fd4c3 YQ |
1686 | --with-babeltrace include babeltrace support (auto/yes/no) |
1687 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1688 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
9f1528a1 | 1689 | --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared) |
ccb1ba62 CB |
1690 | --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) |
1691 | --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib | |
1692 | --without-libxxhash-prefix don't search for libxxhash in includedir and libdir | |
9f1528a1 | 1693 | --with-libxxhash-type=TYPE type of library to search for (auto/static/shared) |
bec39cab AC |
1694 | |
1695 | Some influential environment variables: | |
1696 | CC C compiler command | |
1697 | CFLAGS C compiler flags | |
1698 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1699 | nonstandard directory <lib dir> | |
81ecdfbb | 1700 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1701 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1702 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1703 | CXX C++ compiler command |
1704 | CXXFLAGS C++ compiler flags | |
bec39cab | 1705 | CPP C preprocessor |
f06e05e0 JK |
1706 | MAKEINFO Parent configure detects if it is of sufficient version. |
1707 | MAKEINFOFLAGS | |
1708 | Parameters for MAKEINFO. | |
f6720b1c AM |
1709 | PKG_CONFIG path to pkg-config utility |
1710 | PKG_CONFIG_PATH | |
1711 | directories to add to pkg-config's search path | |
1712 | PKG_CONFIG_LIBDIR | |
1713 | path overriding pkg-config's built-in search path | |
1714 | DEBUGINFOD_CFLAGS | |
1715 | C compiler flags for DEBUGINFOD, overriding pkg-config | |
1716 | DEBUGINFOD_LIBS | |
1717 | linker flags for DEBUGINFOD, overriding pkg-config | |
d0ac1c44 SM |
1718 | YACC The `Yet Another Compiler Compiler' implementation to use. |
1719 | Defaults to the first program found out of: `bison -y', `byacc', | |
1720 | `yacc'. | |
81ecdfbb RW |
1721 | YFLAGS The list of arguments that will be passed by default to $YACC. |
1722 | This script will default YFLAGS to the empty string to avoid a | |
1723 | default value of `-d' given by some make applications. | |
1724 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1725 | |
1726 | Use these variables to override the choices made by `configure' or to help | |
1727 | it to find libraries and programs with nonstandard names/locations. | |
1728 | ||
81ecdfbb | 1729 | Report bugs to the package provider. |
bec39cab | 1730 | _ACEOF |
81ecdfbb | 1731 | ac_status=$? |
bec39cab AC |
1732 | fi |
1733 | ||
1734 | if test "$ac_init_help" = "recursive"; then | |
1735 | # If there are subdirs, report their specific --help. | |
bec39cab | 1736 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1737 | test -d "$ac_dir" || |
1738 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1739 | continue | |
bec39cab AC |
1740 | ac_builddir=. |
1741 | ||
81ecdfbb RW |
1742 | case "$ac_dir" in |
1743 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1744 | *) | |
1745 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1746 | # A ".." for each directory in $ac_dir_suffix. | |
1747 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1748 | case $ac_top_builddir_sub in | |
1749 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1750 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1751 | esac ;; | |
1752 | esac | |
1753 | ac_abs_top_builddir=$ac_pwd | |
1754 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1755 | # for backward compatibility: | |
1756 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1757 | |
1758 | case $srcdir in | |
81ecdfbb | 1759 | .) # We are building in place. |
bec39cab | 1760 | ac_srcdir=. |
81ecdfbb RW |
1761 | ac_top_srcdir=$ac_top_builddir_sub |
1762 | ac_abs_top_srcdir=$ac_pwd ;; | |
1763 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1764 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1765 | ac_top_srcdir=$srcdir |
1766 | ac_abs_top_srcdir=$srcdir ;; | |
1767 | *) # Relative name. | |
1768 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1769 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1770 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1771 | esac |
81ecdfbb | 1772 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1773 | |
81ecdfbb RW |
1774 | cd "$ac_dir" || { ac_status=$?; continue; } |
1775 | # Check for guested configure. | |
1776 | if test -f "$ac_srcdir/configure.gnu"; then | |
1777 | echo && | |
1778 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1779 | elif test -f "$ac_srcdir/configure"; then | |
1780 | echo && | |
1781 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1782 | else |
81ecdfbb RW |
1783 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1784 | fi || ac_status=$? | |
1785 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1786 | done |
1787 | fi | |
1788 | ||
81ecdfbb | 1789 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1790 | if $ac_init_version; then |
1791 | cat <<\_ACEOF | |
81ecdfbb | 1792 | configure |
d0ac1c44 | 1793 | generated by GNU Autoconf 2.69 |
bec39cab | 1794 | |
d0ac1c44 | 1795 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1796 | This configure script is free software; the Free Software Foundation |
1797 | gives unlimited permission to copy, distribute and modify it. | |
1798 | _ACEOF | |
81ecdfbb | 1799 | exit |
bec39cab | 1800 | fi |
bec39cab | 1801 | |
81ecdfbb RW |
1802 | ## ------------------------ ## |
1803 | ## Autoconf initialization. ## | |
1804 | ## ------------------------ ## | |
bec39cab | 1805 | |
81ecdfbb RW |
1806 | # ac_fn_c_try_compile LINENO |
1807 | # -------------------------- | |
1808 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1809 | ac_fn_c_try_compile () | |
1810 | { | |
1811 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1812 | rm -f conftest.$ac_objext | |
1813 | if { { ac_try="$ac_compile" | |
1814 | case "(($ac_try" in | |
1815 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1816 | *) ac_try_echo=$ac_try;; | |
1817 | esac | |
1818 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1819 | $as_echo "$ac_try_echo"; } >&5 | |
1820 | (eval "$ac_compile") 2>conftest.err | |
1821 | ac_status=$? | |
1822 | if test -s conftest.err; then | |
1823 | grep -v '^ *+' conftest.err >conftest.er1 | |
1824 | cat conftest.er1 >&5 | |
1825 | mv -f conftest.er1 conftest.err | |
1826 | fi | |
1827 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1828 | test $ac_status = 0; } && { | |
1829 | test -z "$ac_c_werror_flag" || | |
1830 | test ! -s conftest.err | |
1831 | } && test -s conftest.$ac_objext; then : | |
1832 | ac_retval=0 | |
1833 | else | |
1834 | $as_echo "$as_me: failed program was:" >&5 | |
1835 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1836 | |
81ecdfbb RW |
1837 | ac_retval=1 |
1838 | fi | |
d0ac1c44 SM |
1839 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1840 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1841 | |
1842 | } # ac_fn_c_try_compile | |
1843 | ||
3bc3d82a PA |
1844 | # ac_fn_cxx_try_compile LINENO |
1845 | # ---------------------------- | |
1846 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1847 | ac_fn_cxx_try_compile () | |
1848 | { | |
1849 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1850 | rm -f conftest.$ac_objext | |
1851 | if { { ac_try="$ac_compile" | |
1852 | case "(($ac_try" in | |
1853 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1854 | *) ac_try_echo=$ac_try;; | |
1855 | esac | |
1856 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1857 | $as_echo "$ac_try_echo"; } >&5 | |
1858 | (eval "$ac_compile") 2>conftest.err | |
1859 | ac_status=$? | |
1860 | if test -s conftest.err; then | |
1861 | grep -v '^ *+' conftest.err >conftest.er1 | |
1862 | cat conftest.er1 >&5 | |
1863 | mv -f conftest.er1 conftest.err | |
1864 | fi | |
1865 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1866 | test $ac_status = 0; } && { | |
1867 | test -z "$ac_cxx_werror_flag" || | |
1868 | test ! -s conftest.err | |
1869 | } && test -s conftest.$ac_objext; then : | |
1870 | ac_retval=0 | |
1871 | else | |
1872 | $as_echo "$as_me: failed program was:" >&5 | |
1873 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1874 | ||
1875 | ac_retval=1 | |
1876 | fi | |
d0ac1c44 SM |
1877 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1878 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1879 | |
1880 | } # ac_fn_cxx_try_compile | |
1881 | ||
81ecdfbb RW |
1882 | # ac_fn_c_try_cpp LINENO |
1883 | # ---------------------- | |
1884 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1885 | ac_fn_c_try_cpp () | |
bec39cab | 1886 | { |
81ecdfbb RW |
1887 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1888 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1889 | case "(($ac_try" in | |
1890 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1891 | *) ac_try_echo=$ac_try;; | |
1892 | esac | |
1893 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1894 | $as_echo "$ac_try_echo"; } >&5 | |
1895 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1896 | ac_status=$? | |
1897 | if test -s conftest.err; then | |
1898 | grep -v '^ *+' conftest.err >conftest.er1 | |
1899 | cat conftest.er1 >&5 | |
1900 | mv -f conftest.er1 conftest.err | |
1901 | fi | |
1902 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1903 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1904 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1905 | test ! -s conftest.err | |
1906 | }; then : | |
1907 | ac_retval=0 | |
1908 | else | |
1909 | $as_echo "$as_me: failed program was:" >&5 | |
1910 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1911 | |
81ecdfbb RW |
1912 | ac_retval=1 |
1913 | fi | |
d0ac1c44 SM |
1914 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1915 | as_fn_set_status $ac_retval | |
bec39cab | 1916 | |
81ecdfbb | 1917 | } # ac_fn_c_try_cpp |
bec39cab | 1918 | |
81ecdfbb RW |
1919 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1920 | # ------------------------------------------------------- | |
1921 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1922 | # the include files in INCLUDES and setting the cache variable VAR | |
1923 | # accordingly. | |
1924 | ac_fn_c_check_header_mongrel () | |
1925 | { | |
1926 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1927 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1929 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1930 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1931 | $as_echo_n "(cached) " >&6 |
1932 | fi | |
1933 | eval ac_res=\$$3 | |
1934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1935 | $as_echo "$ac_res" >&6; } | |
1936 | else | |
1937 | # Is the header compilable? | |
1938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1939 | $as_echo_n "checking $2 usability... " >&6; } | |
1940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1941 | /* end confdefs.h. */ | |
1942 | $4 | |
1943 | #include <$2> | |
1944 | _ACEOF | |
1945 | if ac_fn_c_try_compile "$LINENO"; then : | |
1946 | ac_header_compiler=yes | |
1947 | else | |
1948 | ac_header_compiler=no | |
1949 | fi | |
1950 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1952 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1953 | |
81ecdfbb RW |
1954 | # Is the header present? |
1955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1956 | $as_echo_n "checking $2 presence... " >&6; } | |
1957 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1958 | /* end confdefs.h. */ | |
1959 | #include <$2> | |
1960 | _ACEOF | |
1961 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1962 | ac_header_preproc=yes | |
1963 | else | |
1964 | ac_header_preproc=no | |
1965 | fi | |
d0ac1c44 | 1966 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1968 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1969 | |
81ecdfbb RW |
1970 | # So? What about this header? |
1971 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1972 | yes:no: ) | |
1973 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1974 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1975 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1976 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1977 | ;; | |
1978 | no:yes:* ) | |
1979 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1980 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1981 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1982 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1983 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1984 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1985 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1986 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1987 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1988 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1989 | ;; | |
1990 | esac | |
1991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1992 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1993 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1994 | $as_echo_n "(cached) " >&6 |
1995 | else | |
1996 | eval "$3=\$ac_header_compiler" | |
1997 | fi | |
1998 | eval ac_res=\$$3 | |
1999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2000 | $as_echo "$ac_res" >&6; } | |
2001 | fi | |
d0ac1c44 | 2002 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 2003 | |
81ecdfbb | 2004 | } # ac_fn_c_check_header_mongrel |
bec39cab | 2005 | |
81ecdfbb RW |
2006 | # ac_fn_c_try_run LINENO |
2007 | # ---------------------- | |
2008 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2009 | # that executables *can* be run. | |
2010 | ac_fn_c_try_run () | |
2011 | { | |
2012 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2013 | if { { ac_try="$ac_link" | |
2014 | case "(($ac_try" in | |
2015 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2016 | *) ac_try_echo=$ac_try;; | |
2017 | esac | |
2018 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2019 | $as_echo "$ac_try_echo"; } >&5 | |
2020 | (eval "$ac_link") 2>&5 | |
2021 | ac_status=$? | |
2022 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2023 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2024 | { { case "(($ac_try" in | |
2025 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2026 | *) ac_try_echo=$ac_try;; | |
2027 | esac | |
2028 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2029 | $as_echo "$ac_try_echo"; } >&5 | |
2030 | (eval "$ac_try") 2>&5 | |
2031 | ac_status=$? | |
2032 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2033 | test $ac_status = 0; }; }; then : | |
2034 | ac_retval=0 | |
2035 | else | |
2036 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2037 | $as_echo "$as_me: failed program was:" >&5 | |
2038 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2039 | |
81ecdfbb RW |
2040 | ac_retval=$ac_status |
2041 | fi | |
2042 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2043 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2044 | as_fn_set_status $ac_retval | |
bec39cab | 2045 | |
81ecdfbb | 2046 | } # ac_fn_c_try_run |
bec39cab | 2047 | |
81ecdfbb RW |
2048 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2049 | # ------------------------------------------------------- | |
2050 | # Tests whether HEADER exists and can be compiled using the include files in | |
2051 | # INCLUDES, setting the cache variable VAR accordingly. | |
2052 | ac_fn_c_check_header_compile () | |
2053 | { | |
2054 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2056 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2057 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2058 | $as_echo_n "(cached) " >&6 |
2059 | else | |
2060 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2061 | /* end confdefs.h. */ | |
2062 | $4 | |
2063 | #include <$2> | |
bec39cab | 2064 | _ACEOF |
81ecdfbb RW |
2065 | if ac_fn_c_try_compile "$LINENO"; then : |
2066 | eval "$3=yes" | |
2067 | else | |
2068 | eval "$3=no" | |
2069 | fi | |
2070 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2071 | fi | |
2072 | eval ac_res=\$$3 | |
2073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2074 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2075 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 2076 | |
81ecdfbb | 2077 | } # ac_fn_c_check_header_compile |
bec39cab | 2078 | |
2974be62 AM |
2079 | # ac_fn_c_try_link LINENO |
2080 | # ----------------------- | |
2081 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2082 | ac_fn_c_try_link () | |
2083 | { | |
2084 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2085 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2086 | if { { ac_try="$ac_link" | |
2087 | case "(($ac_try" in | |
2088 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2089 | *) ac_try_echo=$ac_try;; | |
2090 | esac | |
2091 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2092 | $as_echo "$ac_try_echo"; } >&5 | |
2093 | (eval "$ac_link") 2>conftest.err | |
2094 | ac_status=$? | |
2095 | if test -s conftest.err; then | |
2096 | grep -v '^ *+' conftest.err >conftest.er1 | |
2097 | cat conftest.er1 >&5 | |
2098 | mv -f conftest.er1 conftest.err | |
2099 | fi | |
2100 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2101 | test $ac_status = 0; } && { | |
2102 | test -z "$ac_c_werror_flag" || | |
2103 | test ! -s conftest.err | |
2104 | } && test -s conftest$ac_exeext && { | |
2105 | test "$cross_compiling" = yes || | |
d0ac1c44 | 2106 | test -x conftest$ac_exeext |
2974be62 AM |
2107 | }; then : |
2108 | ac_retval=0 | |
2109 | else | |
2110 | $as_echo "$as_me: failed program was:" >&5 | |
2111 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2112 | ||
2113 | ac_retval=1 | |
2114 | fi | |
2115 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2116 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2117 | # interfere with the next link command; also delete a directory that is | |
2118 | # left behind by Apple's compiler. We do this before executing the actions. | |
2119 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2120 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2121 | as_fn_set_status $ac_retval | |
2974be62 AM |
2122 | |
2123 | } # ac_fn_c_try_link | |
2124 | ||
81ecdfbb RW |
2125 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2126 | # -------------------------------------------- | |
2127 | # Tries to find the compile-time value of EXPR in a program that includes | |
2128 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2129 | # computed | |
2130 | ac_fn_c_compute_int () | |
2131 | { | |
2132 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2133 | if test "$cross_compiling" = yes; then | |
2134 | # Depending upon the size, compute the lo and hi bounds. | |
2135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2136 | /* end confdefs.h. */ | |
2137 | $4 | |
2138 | int | |
2139 | main () | |
2140 | { | |
2141 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2142 | test_array [0] = 0; |
2143 | return test_array [0]; | |
bec39cab | 2144 | |
81ecdfbb RW |
2145 | ; |
2146 | return 0; | |
2147 | } | |
2148 | _ACEOF | |
2149 | if ac_fn_c_try_compile "$LINENO"; then : | |
2150 | ac_lo=0 ac_mid=0 | |
2151 | while :; do | |
2152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2153 | /* end confdefs.h. */ | |
2154 | $4 | |
2155 | int | |
2156 | main () | |
2157 | { | |
2158 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2159 | test_array [0] = 0; |
2160 | return test_array [0]; | |
bec39cab | 2161 | |
81ecdfbb RW |
2162 | ; |
2163 | return 0; | |
2164 | } | |
2165 | _ACEOF | |
2166 | if ac_fn_c_try_compile "$LINENO"; then : | |
2167 | ac_hi=$ac_mid; break | |
2168 | else | |
2169 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2170 | if test $ac_lo -le $ac_mid; then | |
2171 | ac_lo= ac_hi= | |
2172 | break | |
2173 | fi | |
2174 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2175 | fi |
81ecdfbb RW |
2176 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2177 | done | |
c906108c | 2178 | else |
81ecdfbb RW |
2179 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2180 | /* end confdefs.h. */ | |
2181 | $4 | |
2182 | int | |
2183 | main () | |
2184 | { | |
2185 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2186 | test_array [0] = 0; |
2187 | return test_array [0]; | |
bec39cab | 2188 | |
81ecdfbb RW |
2189 | ; |
2190 | return 0; | |
2191 | } | |
2192 | _ACEOF | |
2193 | if ac_fn_c_try_compile "$LINENO"; then : | |
2194 | ac_hi=-1 ac_mid=-1 | |
2195 | while :; do | |
2196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2197 | /* end confdefs.h. */ | |
2198 | $4 | |
2199 | int | |
2200 | main () | |
2201 | { | |
2202 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2203 | test_array [0] = 0; |
2204 | return test_array [0]; | |
bec39cab | 2205 | |
81ecdfbb RW |
2206 | ; |
2207 | return 0; | |
2208 | } | |
2209 | _ACEOF | |
2210 | if ac_fn_c_try_compile "$LINENO"; then : | |
2211 | ac_lo=$ac_mid; break | |
2212 | else | |
2213 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2214 | if test $ac_mid -le $ac_hi; then | |
2215 | ac_lo= ac_hi= | |
2216 | break | |
2217 | fi | |
2218 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2219 | fi | |
2220 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2221 | done | |
2222 | else | |
2223 | ac_lo= ac_hi= | |
2224 | fi | |
2225 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2226 | fi | |
2227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2228 | # Binary search between lo and hi bounds. | |
2229 | while test "x$ac_lo" != "x$ac_hi"; do | |
2230 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2232 | /* end confdefs.h. */ | |
2233 | $4 | |
2234 | int | |
2235 | main () | |
2236 | { | |
2237 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2238 | test_array [0] = 0; |
2239 | return test_array [0]; | |
bec39cab | 2240 | |
81ecdfbb RW |
2241 | ; |
2242 | return 0; | |
2243 | } | |
2244 | _ACEOF | |
2245 | if ac_fn_c_try_compile "$LINENO"; then : | |
2246 | ac_hi=$ac_mid | |
2247 | else | |
2248 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2249 | fi | |
2250 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2251 | done | |
2252 | case $ac_lo in #(( | |
2253 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2254 | '') ac_retval=1 ;; | |
2255 | esac | |
2256 | else | |
2257 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2258 | /* end confdefs.h. */ | |
2259 | $4 | |
2260 | static long int longval () { return $2; } | |
2261 | static unsigned long int ulongval () { return $2; } | |
2262 | #include <stdio.h> | |
2263 | #include <stdlib.h> | |
2264 | int | |
2265 | main () | |
2266 | { | |
bec39cab | 2267 | |
81ecdfbb RW |
2268 | FILE *f = fopen ("conftest.val", "w"); |
2269 | if (! f) | |
2270 | return 1; | |
2271 | if (($2) < 0) | |
2272 | { | |
2273 | long int i = longval (); | |
2274 | if (i != ($2)) | |
2275 | return 1; | |
2276 | fprintf (f, "%ld", i); | |
2277 | } | |
2278 | else | |
2279 | { | |
2280 | unsigned long int i = ulongval (); | |
2281 | if (i != ($2)) | |
2282 | return 1; | |
2283 | fprintf (f, "%lu", i); | |
2284 | } | |
2285 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2286 | on some platforms. */ | |
2287 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2288 | |
81ecdfbb RW |
2289 | ; |
2290 | return 0; | |
2291 | } | |
2292 | _ACEOF | |
2293 | if ac_fn_c_try_run "$LINENO"; then : | |
2294 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2295 | else | |
2296 | ac_retval=1 | |
2297 | fi | |
2298 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2299 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2300 | rm -f conftest.val | |
bec39cab | 2301 | |
81ecdfbb | 2302 | fi |
d0ac1c44 SM |
2303 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2304 | as_fn_set_status $ac_retval | |
bec39cab | 2305 | |
81ecdfbb | 2306 | } # ac_fn_c_compute_int |
bec39cab | 2307 | |
55a8c076 YQ |
2308 | # ac_fn_c_check_func LINENO FUNC VAR |
2309 | # ---------------------------------- | |
2310 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2311 | ac_fn_c_check_func () | |
81ecdfbb RW |
2312 | { |
2313 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2315 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2316 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2317 | $as_echo_n "(cached) " >&6 |
2318 | else | |
81ecdfbb RW |
2319 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2320 | /* end confdefs.h. */ | |
55a8c076 YQ |
2321 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2322 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2323 | #define $2 innocuous_$2 | |
2324 | ||
2325 | /* System header to define __stub macros and hopefully few prototypes, | |
2326 | which can conflict with char $2 (); below. | |
2327 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2328 | <limits.h> exists even on freestanding compilers. */ | |
2329 | ||
2330 | #ifdef __STDC__ | |
2331 | # include <limits.h> | |
2332 | #else | |
2333 | # include <assert.h> | |
2334 | #endif | |
2335 | ||
2336 | #undef $2 | |
2337 | ||
2338 | /* Override any GCC internal prototype to avoid an error. | |
2339 | Use char because int might match the return type of a GCC | |
2340 | builtin and then its argument prototype would still apply. */ | |
2341 | #ifdef __cplusplus | |
2342 | extern "C" | |
2343 | #endif | |
2344 | char $2 (); | |
2345 | /* The GNU C library defines this for functions which it implements | |
2346 | to always fail with ENOSYS. Some functions are actually named | |
2347 | something starting with __ and the normal name is an alias. */ | |
2348 | #if defined __stub_$2 || defined __stub___$2 | |
2349 | choke me | |
2350 | #endif | |
2351 | ||
2352 | int | |
2353 | main () | |
2354 | { | |
2355 | return $2 (); | |
2356 | ; | |
2357 | return 0; | |
2358 | } | |
2359 | _ACEOF | |
2360 | if ac_fn_c_try_link "$LINENO"; then : | |
2361 | eval "$3=yes" | |
2362 | else | |
2363 | eval "$3=no" | |
2364 | fi | |
2365 | rm -f core conftest.err conftest.$ac_objext \ | |
2366 | conftest$ac_exeext conftest.$ac_ext | |
2367 | fi | |
2368 | eval ac_res=\$$3 | |
2369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2370 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2371 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
55a8c076 YQ |
2372 | |
2373 | } # ac_fn_c_check_func | |
2374 | ||
0f8f2de1 TV |
2375 | # ac_fn_cxx_try_link LINENO |
2376 | # ------------------------- | |
2377 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2378 | ac_fn_cxx_try_link () | |
2379 | { | |
2380 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2381 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2382 | if { { ac_try="$ac_link" | |
2383 | case "(($ac_try" in | |
2384 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2385 | *) ac_try_echo=$ac_try;; | |
2386 | esac | |
2387 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2388 | $as_echo "$ac_try_echo"; } >&5 | |
2389 | (eval "$ac_link") 2>conftest.err | |
2390 | ac_status=$? | |
2391 | if test -s conftest.err; then | |
2392 | grep -v '^ *+' conftest.err >conftest.er1 | |
2393 | cat conftest.er1 >&5 | |
2394 | mv -f conftest.er1 conftest.err | |
2395 | fi | |
2396 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2397 | test $ac_status = 0; } && { | |
2398 | test -z "$ac_cxx_werror_flag" || | |
2399 | test ! -s conftest.err | |
2400 | } && test -s conftest$ac_exeext && { | |
2401 | test "$cross_compiling" = yes || | |
2402 | test -x conftest$ac_exeext | |
2403 | }; then : | |
2404 | ac_retval=0 | |
2405 | else | |
2406 | $as_echo "$as_me: failed program was:" >&5 | |
2407 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2408 | ||
2409 | ac_retval=1 | |
2410 | fi | |
2411 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2412 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2413 | # interfere with the next link command; also delete a directory that is | |
2414 | # left behind by Apple's compiler. We do this before executing the actions. | |
2415 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2416 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2417 | as_fn_set_status $ac_retval | |
2418 | ||
2419 | } # ac_fn_cxx_try_link | |
2420 | ||
07697489 PA |
2421 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2422 | # ------------------------------------------- | |
2423 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2424 | # variable VAR accordingly. | |
2425 | ac_fn_c_check_type () | |
2426 | { | |
2427 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2428 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2429 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2430 | if eval \${$3+:} false; then : |
07697489 PA |
2431 | $as_echo_n "(cached) " >&6 |
2432 | else | |
2433 | eval "$3=no" | |
2434 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2435 | /* end confdefs.h. */ | |
2436 | $4 | |
2437 | int | |
2438 | main () | |
2439 | { | |
2440 | if (sizeof ($2)) | |
2441 | return 0; | |
2442 | ; | |
2443 | return 0; | |
2444 | } | |
2445 | _ACEOF | |
2446 | if ac_fn_c_try_compile "$LINENO"; then : | |
2447 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2448 | /* end confdefs.h. */ | |
2449 | $4 | |
2450 | int | |
2451 | main () | |
2452 | { | |
2453 | if (sizeof (($2))) | |
2454 | return 0; | |
2455 | ; | |
2456 | return 0; | |
2457 | } | |
2458 | _ACEOF | |
2459 | if ac_fn_c_try_compile "$LINENO"; then : | |
2460 | ||
2461 | else | |
2462 | eval "$3=yes" | |
2463 | fi | |
2464 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2465 | fi | |
2466 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2467 | fi | |
2468 | eval ac_res=\$$3 | |
2469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2470 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2471 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
07697489 PA |
2472 | |
2473 | } # ac_fn_c_check_type | |
2474 | ||
f6720b1c AM |
2475 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2476 | # --------------------------------------------- | |
2477 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2478 | # accordingly. | |
2479 | ac_fn_c_check_decl () | |
2480 | { | |
2481 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2482 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2483 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2485 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2486 | if eval \${$3+:} false; then : | |
2487 | $as_echo_n "(cached) " >&6 | |
2488 | else | |
2489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2490 | /* end confdefs.h. */ | |
2491 | $4 | |
2492 | int | |
2493 | main () | |
2494 | { | |
2495 | #ifndef $as_decl_name | |
2496 | #ifdef __cplusplus | |
2497 | (void) $as_decl_use; | |
2498 | #else | |
2499 | (void) $as_decl_name; | |
2500 | #endif | |
2501 | #endif | |
2502 | ||
2503 | ; | |
2504 | return 0; | |
2505 | } | |
2506 | _ACEOF | |
2507 | if ac_fn_c_try_compile "$LINENO"; then : | |
2508 | eval "$3=yes" | |
2509 | else | |
2510 | eval "$3=no" | |
2511 | fi | |
2512 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2513 | fi | |
2514 | eval ac_res=\$$3 | |
2515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2516 | $as_echo "$ac_res" >&6; } | |
2517 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2518 | ||
2519 | } # ac_fn_c_check_decl | |
2520 | ||
05ea2a05 TT |
2521 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2522 | # ---------------------------------------------------- | |
2523 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2524 | # INCLUDES, setting cache variable VAR accordingly. | |
2525 | ac_fn_c_check_member () | |
2526 | { | |
2527 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2529 | $as_echo_n "checking for $2.$3... " >&6; } | |
2530 | if eval \${$4+:} false; then : | |
2531 | $as_echo_n "(cached) " >&6 | |
2532 | else | |
2533 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2534 | /* end confdefs.h. */ | |
2535 | $5 | |
2536 | int | |
2537 | main () | |
2538 | { | |
2539 | static $2 ac_aggr; | |
2540 | if (ac_aggr.$3) | |
2541 | return 0; | |
2542 | ; | |
2543 | return 0; | |
2544 | } | |
2545 | _ACEOF | |
2546 | if ac_fn_c_try_compile "$LINENO"; then : | |
2547 | eval "$4=yes" | |
2548 | else | |
2549 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2550 | /* end confdefs.h. */ | |
2551 | $5 | |
2552 | int | |
2553 | main () | |
2554 | { | |
2555 | static $2 ac_aggr; | |
2556 | if (sizeof ac_aggr.$3) | |
2557 | return 0; | |
2558 | ; | |
2559 | return 0; | |
2560 | } | |
2561 | _ACEOF | |
2562 | if ac_fn_c_try_compile "$LINENO"; then : | |
2563 | eval "$4=yes" | |
2564 | else | |
2565 | eval "$4=no" | |
2566 | fi | |
2567 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2568 | fi | |
2569 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2570 | fi | |
2571 | eval ac_res=\$$4 | |
2572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2573 | $as_echo "$ac_res" >&6; } | |
2574 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2575 | ||
2576 | } # ac_fn_c_check_member | |
2577 | ||
21987b9c TT |
2578 | # ac_fn_cxx_check_func LINENO FUNC VAR |
2579 | # ------------------------------------ | |
2580 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2581 | ac_fn_cxx_check_func () | |
2582 | { | |
2583 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2585 | $as_echo_n "checking for $2... " >&6; } | |
2586 | if eval \${$3+:} false; then : | |
2587 | $as_echo_n "(cached) " >&6 | |
2588 | else | |
2589 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2590 | /* end confdefs.h. */ | |
2591 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2592 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2593 | #define $2 innocuous_$2 | |
2594 | ||
2595 | /* System header to define __stub macros and hopefully few prototypes, | |
2596 | which can conflict with char $2 (); below. | |
2597 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2598 | <limits.h> exists even on freestanding compilers. */ | |
2599 | ||
2600 | #ifdef __STDC__ | |
2601 | # include <limits.h> | |
2602 | #else | |
2603 | # include <assert.h> | |
2604 | #endif | |
2605 | ||
2606 | #undef $2 | |
2607 | ||
2608 | /* Override any GCC internal prototype to avoid an error. | |
2609 | Use char because int might match the return type of a GCC | |
2610 | builtin and then its argument prototype would still apply. */ | |
2611 | #ifdef __cplusplus | |
2612 | extern "C" | |
2613 | #endif | |
2614 | char $2 (); | |
2615 | /* The GNU C library defines this for functions which it implements | |
2616 | to always fail with ENOSYS. Some functions are actually named | |
2617 | something starting with __ and the normal name is an alias. */ | |
2618 | #if defined __stub_$2 || defined __stub___$2 | |
2619 | choke me | |
2620 | #endif | |
2621 | ||
2622 | int | |
2623 | main () | |
2624 | { | |
2625 | return $2 (); | |
2626 | ; | |
2627 | return 0; | |
2628 | } | |
2629 | _ACEOF | |
2630 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2631 | eval "$3=yes" | |
2632 | else | |
2633 | eval "$3=no" | |
2634 | fi | |
2635 | rm -f core conftest.err conftest.$ac_objext \ | |
2636 | conftest$ac_exeext conftest.$ac_ext | |
2637 | fi | |
2638 | eval ac_res=\$$3 | |
2639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2640 | $as_echo "$ac_res" >&6; } | |
2641 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2642 | ||
2643 | } # ac_fn_cxx_check_func | |
81ecdfbb RW |
2644 | cat >config.log <<_ACEOF |
2645 | This file contains any messages produced by compilers while | |
2646 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2647 | |
81ecdfbb | 2648 | It was created by $as_me, which was |
d0ac1c44 | 2649 | generated by GNU Autoconf 2.69. Invocation command line was |
b4e70030 | 2650 | |
81ecdfbb | 2651 | $ $0 $@ |
413ccac7 | 2652 | |
81ecdfbb RW |
2653 | _ACEOF |
2654 | exec 5>>config.log | |
2655 | { | |
2656 | cat <<_ASUNAME | |
2657 | ## --------- ## | |
2658 | ## Platform. ## | |
2659 | ## --------- ## | |
413ccac7 | 2660 | |
81ecdfbb RW |
2661 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2662 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2663 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2664 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2665 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2666 | |
81ecdfbb RW |
2667 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2668 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2669 | |
81ecdfbb RW |
2670 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2671 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2672 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2673 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2674 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2675 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2676 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2677 | |
81ecdfbb | 2678 | _ASUNAME |
bec39cab | 2679 | |
bec39cab AC |
2680 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2681 | for as_dir in $PATH | |
2682 | do | |
2683 | IFS=$as_save_IFS | |
2684 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2685 | $as_echo "PATH: $as_dir" |
2686 | done | |
2687 | IFS=$as_save_IFS | |
bec39cab | 2688 | |
81ecdfbb | 2689 | } >&5 |
bec39cab | 2690 | |
81ecdfbb | 2691 | cat >&5 <<_ACEOF |
bec39cab | 2692 | |
bec39cab | 2693 | |
81ecdfbb RW |
2694 | ## ----------- ## |
2695 | ## Core tests. ## | |
2696 | ## ----------- ## | |
2697 | ||
2698 | _ACEOF | |
2699 | ||
2700 | ||
2701 | # Keep a trace of the command line. | |
2702 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2703 | # Strip out --silent because we don't want to record it for future runs. | |
2704 | # Also quote any args containing shell meta-characters. | |
2705 | # Make two passes to allow for proper duplicate-argument suppression. | |
2706 | ac_configure_args= | |
2707 | ac_configure_args0= | |
2708 | ac_configure_args1= | |
2709 | ac_must_keep_next=false | |
2710 | for ac_pass in 1 2 | |
2711 | do | |
2712 | for ac_arg | |
2713 | do | |
2714 | case $ac_arg in | |
2715 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2716 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2717 | | -silent | --silent | --silen | --sile | --sil) | |
2718 | continue ;; | |
2719 | *\'*) | |
2720 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2721 | esac | |
2722 | case $ac_pass in | |
2723 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2724 | 2) | |
2725 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2726 | if test $ac_must_keep_next = true; then | |
2727 | ac_must_keep_next=false # Got value, back to normal. | |
2728 | else | |
2729 | case $ac_arg in | |
2730 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2731 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2732 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2733 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2734 | case "$ac_configure_args0 " in | |
2735 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2736 | esac | |
2737 | ;; | |
2738 | -* ) ac_must_keep_next=true ;; | |
2739 | esac | |
2740 | fi | |
2741 | as_fn_append ac_configure_args " '$ac_arg'" | |
2742 | ;; | |
2743 | esac | |
2744 | done | |
2745 | done | |
2746 | { ac_configure_args0=; unset ac_configure_args0;} | |
2747 | { ac_configure_args1=; unset ac_configure_args1;} | |
2748 | ||
2749 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2750 | # config.log. We remove comments because anyway the quotes in there | |
2751 | # would cause problems or look ugly. | |
2752 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2753 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2754 | trap 'exit_status=$? | |
2755 | # Save into config.log some information that might help in debugging. | |
2756 | { | |
2757 | echo | |
2758 | ||
d0ac1c44 | 2759 | $as_echo "## ---------------- ## |
81ecdfbb | 2760 | ## Cache variables. ## |
d0ac1c44 | 2761 | ## ---------------- ##" |
81ecdfbb RW |
2762 | echo |
2763 | # The following way of writing the cache mishandles newlines in values, | |
2764 | ( | |
2765 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2766 | eval ac_val=\$$ac_var | |
2767 | case $ac_val in #( | |
2768 | *${as_nl}*) | |
2769 | case $ac_var in #( | |
2770 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2771 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2772 | esac | |
2773 | case $ac_var in #( | |
2774 | _ | IFS | as_nl) ;; #( | |
2775 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2776 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2777 | esac ;; | |
2778 | esac | |
2779 | done | |
2780 | (set) 2>&1 | | |
2781 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2782 | *${as_nl}ac_space=\ *) | |
2783 | sed -n \ | |
2784 | "s/'\''/'\''\\\\'\'''\''/g; | |
2785 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2786 | ;; #( | |
2787 | *) | |
2788 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2789 | ;; | |
2790 | esac | | |
2791 | sort | |
2792 | ) | |
2793 | echo | |
2794 | ||
d0ac1c44 | 2795 | $as_echo "## ----------------- ## |
81ecdfbb | 2796 | ## Output variables. ## |
d0ac1c44 | 2797 | ## ----------------- ##" |
81ecdfbb RW |
2798 | echo |
2799 | for ac_var in $ac_subst_vars | |
2800 | do | |
2801 | eval ac_val=\$$ac_var | |
2802 | case $ac_val in | |
2803 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2804 | esac | |
2805 | $as_echo "$ac_var='\''$ac_val'\''" | |
2806 | done | sort | |
2807 | echo | |
2808 | ||
2809 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2810 | $as_echo "## ------------------- ## |
81ecdfbb | 2811 | ## File substitutions. ## |
d0ac1c44 | 2812 | ## ------------------- ##" |
81ecdfbb RW |
2813 | echo |
2814 | for ac_var in $ac_subst_files | |
2815 | do | |
2816 | eval ac_val=\$$ac_var | |
2817 | case $ac_val in | |
2818 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2819 | esac | |
2820 | $as_echo "$ac_var='\''$ac_val'\''" | |
2821 | done | sort | |
2822 | echo | |
2823 | fi | |
2824 | ||
2825 | if test -s confdefs.h; then | |
d0ac1c44 | 2826 | $as_echo "## ----------- ## |
81ecdfbb | 2827 | ## confdefs.h. ## |
d0ac1c44 | 2828 | ## ----------- ##" |
81ecdfbb RW |
2829 | echo |
2830 | cat confdefs.h | |
2831 | echo | |
2832 | fi | |
2833 | test "$ac_signal" != 0 && | |
2834 | $as_echo "$as_me: caught signal $ac_signal" | |
2835 | $as_echo "$as_me: exit $exit_status" | |
2836 | } >&5 | |
2837 | rm -f core *.core core.conftest.* && | |
2838 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2839 | exit $exit_status | |
2840 | ' 0 | |
2841 | for ac_signal in 1 2 13 15; do | |
2842 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2843 | done | |
2844 | ac_signal=0 | |
2845 | ||
2846 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2847 | rm -f -r conftest* confdefs.h | |
2848 | ||
2849 | $as_echo "/* confdefs.h */" > confdefs.h | |
2850 | ||
2851 | # Predefined preprocessor variables. | |
2852 | ||
2853 | cat >>confdefs.h <<_ACEOF | |
2854 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2855 | _ACEOF | |
2856 | ||
2857 | cat >>confdefs.h <<_ACEOF | |
2858 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2859 | _ACEOF | |
2860 | ||
2861 | cat >>confdefs.h <<_ACEOF | |
2862 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2863 | _ACEOF | |
2864 | ||
2865 | cat >>confdefs.h <<_ACEOF | |
2866 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2867 | _ACEOF | |
2868 | ||
2869 | cat >>confdefs.h <<_ACEOF | |
2870 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2871 | _ACEOF | |
2872 | ||
2873 | cat >>confdefs.h <<_ACEOF | |
2874 | #define PACKAGE_URL "$PACKAGE_URL" | |
2875 | _ACEOF | |
2876 | ||
2877 | ||
2878 | # Let the site file select an alternate cache file if it wants to. | |
2879 | # Prefer an explicitly selected file to automatically selected ones. | |
2880 | ac_site_file1=NONE | |
2881 | ac_site_file2=NONE | |
2882 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2883 | # We do not want a PATH search for config.site. |
2884 | case $CONFIG_SITE in #(( | |
2885 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2886 | */*) ac_site_file1=$CONFIG_SITE;; | |
2887 | *) ac_site_file1=./$CONFIG_SITE;; | |
2888 | esac | |
81ecdfbb RW |
2889 | elif test "x$prefix" != xNONE; then |
2890 | ac_site_file1=$prefix/share/config.site | |
2891 | ac_site_file2=$prefix/etc/config.site | |
2892 | else | |
2893 | ac_site_file1=$ac_default_prefix/share/config.site | |
2894 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2895 | fi | |
2896 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2897 | do | |
2898 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2899 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2900 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2901 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2902 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
2903 | . "$ac_site_file" \ |
2904 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2905 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2906 | as_fn_error $? "failed to load site script $ac_site_file | |
2907 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
2908 | fi |
2909 | done | |
2910 | ||
2911 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2912 | # Some versions of bash will fail to source /dev/null (special files |
2913 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2914 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2915 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2916 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2917 | case $cache_file in | |
2918 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2919 | *) . "./$cache_file";; | |
2920 | esac | |
2921 | fi | |
2922 | else | |
2923 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2924 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2925 | >$cache_file | |
bec39cab AC |
2926 | fi |
2927 | ||
d0ac1c44 SM |
2928 | as_fn_append ac_header_list " stdlib.h" |
2929 | as_fn_append ac_header_list " unistd.h" | |
2930 | as_fn_append ac_header_list " sys/param.h" | |
81ecdfbb RW |
2931 | # Check that the precious variables saved in the cache have kept the same |
2932 | # value. | |
2933 | ac_cache_corrupted=false | |
2934 | for ac_var in $ac_precious_vars; do | |
2935 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2936 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2937 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2938 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2939 | case $ac_old_set,$ac_new_set in | |
2940 | set,) | |
2941 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2942 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2943 | ac_cache_corrupted=: ;; | |
2944 | ,set) | |
2945 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2946 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2947 | ac_cache_corrupted=: ;; | |
2948 | ,);; | |
2949 | *) | |
2950 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2951 | # differences in whitespace do not lead to failure. | |
2952 | ac_old_val_w=`echo x $ac_old_val` | |
2953 | ac_new_val_w=`echo x $ac_new_val` | |
2954 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2955 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2956 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2957 | ac_cache_corrupted=: | |
2958 | else | |
2959 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2960 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2961 | eval $ac_var=\$ac_old_val | |
2962 | fi | |
2963 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2964 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2965 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2966 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2967 | fi;; | |
2968 | esac | |
2969 | # Pass precious variables to config.status. | |
2970 | if test "$ac_new_set" = set; then | |
2971 | case $ac_new_val in | |
2972 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2973 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2974 | esac | |
2975 | case " $ac_configure_args " in | |
2976 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2977 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2978 | esac | |
2979 | fi | |
2980 | done | |
2981 | if $ac_cache_corrupted; then | |
2982 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2983 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2984 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2985 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2986 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
81ecdfbb RW |
2987 | fi |
2988 | ## -------------------- ## | |
2989 | ## Main body of script. ## | |
2990 | ## -------------------- ## | |
2991 | ||
2992 | ac_ext=c | |
2993 | ac_cpp='$CPP $CPPFLAGS' | |
2994 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2995 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2996 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2997 | ||
2998 | ||
2999 | ||
3000 | ||
3001 | ||
5593a99a | 3002 | |
7e3941ac | 3003 | |
81ecdfbb RW |
3004 | ac_config_headers="$ac_config_headers config.h:config.in" |
3005 | ||
3006 | ||
3007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
3008 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
3009 | # Check whether --enable-maintainer-mode was given. | |
3010 | if test "${enable_maintainer_mode+set}" = set; then : | |
3011 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3012 | else | |
3013 | USE_MAINTAINER_MODE=no | |
3014 | fi | |
3015 | ||
3016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
3017 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
3018 | if test $USE_MAINTAINER_MODE = yes; then | |
3019 | MAINTAINER_MODE_TRUE= | |
3020 | MAINTAINER_MODE_FALSE='#' | |
3021 | else | |
3022 | MAINTAINER_MODE_TRUE='#' | |
3023 | MAINTAINER_MODE_FALSE= | |
3024 | fi | |
3025 | ||
3026 | MAINT=$MAINTAINER_MODE_TRUE | |
3027 | ||
3028 | ||
3029 | ||
3030 | ac_ext=c | |
3031 | ac_cpp='$CPP $CPPFLAGS' | |
3032 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3033 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3034 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3035 | if test -n "$ac_tool_prefix"; then | |
3036 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3037 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3039 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3040 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3041 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3042 | else |
3043 | if test -n "$CC"; then | |
3044 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3045 | else | |
bec39cab AC |
3046 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3047 | for as_dir in $PATH | |
3048 | do | |
3049 | IFS=$as_save_IFS | |
3050 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3051 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3052 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3053 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
3054 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3055 | break 2 |
3056 | fi | |
3057 | done | |
81ecdfbb RW |
3058 | done |
3059 | IFS=$as_save_IFS | |
bec39cab | 3060 | |
c906108c SS |
3061 | fi |
3062 | fi | |
bec39cab | 3063 | CC=$ac_cv_prog_CC |
c906108c | 3064 | if test -n "$CC"; then |
81ecdfbb RW |
3065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3066 | $as_echo "$CC" >&6; } | |
c906108c | 3067 | else |
81ecdfbb RW |
3068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3069 | $as_echo "no" >&6; } | |
c906108c SS |
3070 | fi |
3071 | ||
81ecdfbb | 3072 | |
b4e70030 JB |
3073 | fi |
3074 | if test -z "$ac_cv_prog_CC"; then | |
3075 | ac_ct_CC=$CC | |
81ecdfbb RW |
3076 | # Extract the first word of "gcc", so it can be a program name with args. |
3077 | set dummy gcc; ac_word=$2 | |
3078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3079 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3080 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3081 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
3082 | else |
3083 | if test -n "$ac_ct_CC"; then | |
3084 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3085 | else | |
3086 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3087 | for as_dir in $PATH | |
3088 | do | |
3089 | IFS=$as_save_IFS | |
3090 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3091 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3092 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3093 | ac_cv_prog_ac_ct_CC="gcc" |
3094 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 3095 | break 2 |
4e8d927d | 3096 | fi |
b4e70030 | 3097 | done |
81ecdfbb RW |
3098 | done |
3099 | IFS=$as_save_IFS | |
b4e70030 JB |
3100 | |
3101 | fi | |
3102 | fi | |
3103 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3104 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3106 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 3107 | else |
81ecdfbb RW |
3108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3109 | $as_echo "no" >&6; } | |
b4e70030 JB |
3110 | fi |
3111 | ||
81ecdfbb RW |
3112 | if test "x$ac_ct_CC" = x; then |
3113 | CC="" | |
3114 | else | |
3115 | case $cross_compiling:$ac_tool_warned in | |
3116 | yes:) | |
3117 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3118 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3119 | ac_tool_warned=yes ;; | |
3120 | esac | |
3121 | CC=$ac_ct_CC | |
3122 | fi | |
b4e70030 JB |
3123 | else |
3124 | CC="$ac_cv_prog_CC" | |
3125 | fi | |
3126 | ||
c906108c | 3127 | if test -z "$CC"; then |
81ecdfbb RW |
3128 | if test -n "$ac_tool_prefix"; then |
3129 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3130 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3132 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3133 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3134 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3135 | else |
3136 | if test -n "$CC"; then | |
3137 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3138 | else | |
bec39cab AC |
3139 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3140 | for as_dir in $PATH | |
3141 | do | |
3142 | IFS=$as_save_IFS | |
3143 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3144 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3145 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3146 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
3147 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3148 | break 2 |
3149 | fi | |
3150 | done | |
81ecdfbb RW |
3151 | done |
3152 | IFS=$as_save_IFS | |
3153 | ||
3154 | fi | |
3155 | fi | |
3156 | CC=$ac_cv_prog_CC | |
3157 | if test -n "$CC"; then | |
3158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3159 | $as_echo "$CC" >&6; } | |
3160 | else | |
3161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3162 | $as_echo "no" >&6; } | |
3163 | fi | |
3164 | ||
3165 | ||
3166 | fi | |
3167 | fi | |
3168 | if test -z "$CC"; then | |
3169 | # Extract the first word of "cc", so it can be a program name with args. | |
3170 | set dummy cc; ac_word=$2 | |
3171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3172 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3173 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb RW |
3174 | $as_echo_n "(cached) " >&6 |
3175 | else | |
3176 | if test -n "$CC"; then | |
3177 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3178 | else | |
3179 | ac_prog_rejected=no | |
3180 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3181 | for as_dir in $PATH | |
3182 | do | |
3183 | IFS=$as_save_IFS | |
3184 | test -z "$as_dir" && as_dir=. | |
3185 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3186 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3187 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3188 | ac_prog_rejected=yes | |
3189 | continue | |
3190 | fi | |
3191 | ac_cv_prog_CC="cc" | |
3192 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3193 | break 2 | |
3194 | fi | |
3195 | done | |
3196 | done | |
3197 | IFS=$as_save_IFS | |
bec39cab | 3198 | |
c906108c SS |
3199 | if test $ac_prog_rejected = yes; then |
3200 | # We found a bogon in the path, so make sure we never use it. | |
3201 | set dummy $ac_cv_prog_CC | |
3202 | shift | |
bec39cab | 3203 | if test $# != 0; then |
c906108c SS |
3204 | # We chose a different compiler from the bogus one. |
3205 | # However, it has the same basename, so the bogon will be chosen | |
3206 | # first if we set CC to just the basename; use the full file name. | |
3207 | shift | |
bec39cab | 3208 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3209 | fi |
3210 | fi | |
3211 | fi | |
3212 | fi | |
bec39cab | 3213 | CC=$ac_cv_prog_CC |
c906108c | 3214 | if test -n "$CC"; then |
81ecdfbb RW |
3215 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3216 | $as_echo "$CC" >&6; } | |
c906108c | 3217 | else |
81ecdfbb RW |
3218 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3219 | $as_echo "no" >&6; } | |
c906108c SS |
3220 | fi |
3221 | ||
81ecdfbb | 3222 | |
bec39cab AC |
3223 | fi |
3224 | if test -z "$CC"; then | |
3225 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3226 | for ac_prog in cl.exe |
bec39cab AC |
3227 | do |
3228 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3229 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3231 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3232 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3233 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3234 | else |
3235 | if test -n "$CC"; then | |
3236 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3237 | else | |
bec39cab AC |
3238 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3239 | for as_dir in $PATH | |
3240 | do | |
3241 | IFS=$as_save_IFS | |
3242 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3243 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3244 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3245 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3246 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3247 | break 2 |
3248 | fi | |
3249 | done | |
81ecdfbb RW |
3250 | done |
3251 | IFS=$as_save_IFS | |
bec39cab | 3252 | |
c906108c SS |
3253 | fi |
3254 | fi | |
bec39cab | 3255 | CC=$ac_cv_prog_CC |
c906108c | 3256 | if test -n "$CC"; then |
81ecdfbb RW |
3257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3258 | $as_echo "$CC" >&6; } | |
c906108c | 3259 | else |
81ecdfbb RW |
3260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3261 | $as_echo "no" >&6; } | |
c906108c | 3262 | fi |
bec39cab | 3263 | |
81ecdfbb | 3264 | |
bec39cab AC |
3265 | test -n "$CC" && break |
3266 | done | |
3267 | fi | |
3268 | if test -z "$CC"; then | |
3269 | ac_ct_CC=$CC | |
81ecdfbb | 3270 | for ac_prog in cl.exe |
bec39cab AC |
3271 | do |
3272 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3273 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3274 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3275 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3276 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3277 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3278 | else |
3279 | if test -n "$ac_ct_CC"; then | |
3280 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3281 | else | |
3282 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3283 | for as_dir in $PATH | |
3284 | do | |
3285 | IFS=$as_save_IFS | |
3286 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3287 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3288 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3289 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3290 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3291 | break 2 |
c906108c | 3292 | fi |
bec39cab | 3293 | done |
81ecdfbb RW |
3294 | done |
3295 | IFS=$as_save_IFS | |
bec39cab AC |
3296 | |
3297 | fi | |
3298 | fi | |
3299 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3300 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3302 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3303 | else |
81ecdfbb RW |
3304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3305 | $as_echo "no" >&6; } | |
c906108c SS |
3306 | fi |
3307 | ||
81ecdfbb | 3308 | |
bec39cab AC |
3309 | test -n "$ac_ct_CC" && break |
3310 | done | |
c906108c | 3311 | |
81ecdfbb RW |
3312 | if test "x$ac_ct_CC" = x; then |
3313 | CC="" | |
3314 | else | |
3315 | case $cross_compiling:$ac_tool_warned in | |
3316 | yes:) | |
3317 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3318 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3319 | ac_tool_warned=yes ;; | |
3320 | esac | |
3321 | CC=$ac_ct_CC | |
3322 | fi | |
bec39cab AC |
3323 | fi |
3324 | ||
3325 | fi | |
3326 | ||
3327 | ||
81ecdfbb RW |
3328 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3329 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3330 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3331 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3332 | |
3333 | # Provide some information about the compiler. | |
81ecdfbb RW |
3334 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3335 | set X $ac_compile | |
3336 | ac_compiler=$2 | |
3337 | for ac_option in --version -v -V -qversion; do | |
3338 | { { ac_try="$ac_compiler $ac_option >&5" | |
3339 | case "(($ac_try" in | |
3340 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3341 | *) ac_try_echo=$ac_try;; | |
3342 | esac | |
3343 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3344 | $as_echo "$ac_try_echo"; } >&5 | |
3345 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3346 | ac_status=$? |
81ecdfbb RW |
3347 | if test -s conftest.err; then |
3348 | sed '10a\ | |
3349 | ... rest of stderr output deleted ... | |
3350 | 10q' conftest.err >conftest.er1 | |
3351 | cat conftest.er1 >&5 | |
81ecdfbb | 3352 | fi |
d0ac1c44 | 3353 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3354 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3355 | test $ac_status = 0; } | |
3356 | done | |
bec39cab | 3357 | |
81ecdfbb | 3358 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3359 | /* end confdefs.h. */ |
3360 | ||
3361 | int | |
3362 | main () | |
3363 | { | |
3364 | ||
3365 | ; | |
3366 | return 0; | |
3367 | } | |
3368 | _ACEOF | |
3369 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3370 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3371 | # Try to create an executable without -o first, disregard a.out. |
3372 | # It will help us diagnose broken compilers, and finding out an intuition | |
3373 | # of exeext. | |
d0ac1c44 SM |
3374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3375 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3376 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3377 | ||
3378 | # The possible output files: | |
3379 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3380 | ||
3381 | ac_rmfiles= | |
3382 | for ac_file in $ac_files | |
3383 | do | |
3384 | case $ac_file in | |
3385 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3386 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3387 | esac | |
3388 | done | |
3389 | rm -f $ac_rmfiles | |
3390 | ||
3391 | if { { ac_try="$ac_link_default" | |
3392 | case "(($ac_try" in | |
3393 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3394 | *) ac_try_echo=$ac_try;; | |
3395 | esac | |
3396 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3397 | $as_echo "$ac_try_echo"; } >&5 | |
3398 | (eval "$ac_link_default") 2>&5 | |
3399 | ac_status=$? | |
3400 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3401 | test $ac_status = 0; }; then : | |
3402 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3403 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3404 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3405 | # so that the user can short-circuit this test for compilers unknown to | |
3406 | # Autoconf. | |
3407 | for ac_file in $ac_files '' | |
bec39cab AC |
3408 | do |
3409 | test -f "$ac_file" || continue | |
3410 | case $ac_file in | |
81ecdfbb | 3411 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3412 | ;; |
3413 | [ab].out ) | |
3414 | # We found the default executable, but exeext='' is most | |
3415 | # certainly right. | |
3416 | break;; | |
3417 | *.* ) | |
81ecdfbb RW |
3418 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3419 | then :; else | |
3420 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3421 | fi | |
3422 | # We set ac_cv_exeext here because the later test for it is not | |
3423 | # safe: cross compilers may not add the suffix if given an `-o' | |
3424 | # argument, so we may need to know it at that point already. | |
3425 | # Even if this section looks crufty: it has the advantage of | |
3426 | # actually working. | |
b4e70030 JB |
3427 | break;; |
3428 | * ) | |
3429 | break;; | |
bec39cab AC |
3430 | esac |
3431 | done | |
81ecdfbb RW |
3432 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3433 | ||
bec39cab | 3434 | else |
81ecdfbb RW |
3435 | ac_file='' |
3436 | fi | |
81ecdfbb | 3437 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3439 | $as_echo "no" >&6; } | |
3440 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3441 | sed 's/^/| /' conftest.$ac_ext >&5 |
3442 | ||
81ecdfbb RW |
3443 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3444 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3445 | as_fn_error 77 "C compiler cannot create executables |
3446 | See \`config.log' for more details" "$LINENO" 5; } | |
3447 | else | |
3448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3449 | $as_echo "yes" >&6; } | |
bec39cab | 3450 | fi |
d0ac1c44 SM |
3451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3452 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3454 | $as_echo "$ac_file" >&6; } | |
b4e70030 | 3455 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3456 | |
d0ac1c44 | 3457 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
b4e70030 | 3458 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3460 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3461 | if { { ac_try="$ac_link" | |
3462 | case "(($ac_try" in | |
3463 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3464 | *) ac_try_echo=$ac_try;; | |
3465 | esac | |
3466 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3467 | $as_echo "$ac_try_echo"; } >&5 | |
3468 | (eval "$ac_link") 2>&5 | |
bec39cab | 3469 | ac_status=$? |
81ecdfbb RW |
3470 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3471 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3472 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3473 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3474 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3475 | # `rm'. | |
3476 | for ac_file in conftest.exe conftest conftest.*; do | |
3477 | test -f "$ac_file" || continue | |
3478 | case $ac_file in | |
81ecdfbb | 3479 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3480 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3481 | break;; |
3482 | * ) break;; | |
3483 | esac | |
3484 | done | |
c906108c | 3485 | else |
81ecdfbb RW |
3486 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3487 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3488 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3489 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3490 | fi |
d0ac1c44 | 3491 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3493 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3494 | |
b4e70030 | 3495 | rm -f conftest.$ac_ext |
bec39cab AC |
3496 | EXEEXT=$ac_cv_exeext |
3497 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3499 | /* end confdefs.h. */ | |
3500 | #include <stdio.h> | |
3501 | int | |
3502 | main () | |
3503 | { | |
3504 | FILE *f = fopen ("conftest.out", "w"); | |
3505 | return ferror (f) || fclose (f) != 0; | |
3506 | ||
3507 | ; | |
3508 | return 0; | |
3509 | } | |
3510 | _ACEOF | |
3511 | ac_clean_files="$ac_clean_files conftest.out" | |
3512 | # Check that the compiler produces executables we can run. If not, either | |
3513 | # the compiler is broken, or we cross compile. | |
3514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3515 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3516 | if test "$cross_compiling" != yes; then | |
3517 | { { ac_try="$ac_link" | |
3518 | case "(($ac_try" in | |
3519 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3520 | *) ac_try_echo=$ac_try;; | |
3521 | esac | |
3522 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3523 | $as_echo "$ac_try_echo"; } >&5 | |
3524 | (eval "$ac_link") 2>&5 | |
3525 | ac_status=$? | |
3526 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3527 | test $ac_status = 0; } | |
3528 | if { ac_try='./conftest$ac_cv_exeext' | |
3529 | { { case "(($ac_try" in | |
3530 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3531 | *) ac_try_echo=$ac_try;; | |
3532 | esac | |
3533 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3534 | $as_echo "$ac_try_echo"; } >&5 | |
3535 | (eval "$ac_try") 2>&5 | |
3536 | ac_status=$? | |
3537 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3538 | test $ac_status = 0; }; }; then | |
3539 | cross_compiling=no | |
3540 | else | |
3541 | if test "$cross_compiling" = maybe; then | |
3542 | cross_compiling=yes | |
3543 | else | |
3544 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3545 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3546 | as_fn_error $? "cannot run C compiled programs. | |
3547 | If you meant to cross compile, use \`--host'. | |
3548 | See \`config.log' for more details" "$LINENO" 5; } | |
3549 | fi | |
3550 | fi | |
3551 | fi | |
3552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3553 | $as_echo "$cross_compiling" >&6; } | |
3554 | ||
3555 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3556 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3558 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3559 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3560 | $as_echo_n "(cached) " >&6 |
bec39cab | 3561 | else |
81ecdfbb | 3562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3563 | /* end confdefs.h. */ |
3564 | ||
3565 | int | |
3566 | main () | |
3567 | { | |
3568 | ||
3569 | ; | |
3570 | return 0; | |
3571 | } | |
3572 | _ACEOF | |
3573 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3574 | if { { ac_try="$ac_compile" |
3575 | case "(($ac_try" in | |
3576 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3577 | *) ac_try_echo=$ac_try;; | |
3578 | esac | |
3579 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3580 | $as_echo "$ac_try_echo"; } >&5 | |
3581 | (eval "$ac_compile") 2>&5 | |
3582 | ac_status=$? | |
3583 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3584 | test $ac_status = 0; }; then : | |
3585 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3586 | test -f "$ac_file" || continue; | |
bec39cab | 3587 | case $ac_file in |
81ecdfbb | 3588 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3589 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3590 | break;; | |
3591 | esac | |
3592 | done | |
c906108c | 3593 | else |
81ecdfbb | 3594 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3595 | sed 's/^/| /' conftest.$ac_ext >&5 |
3596 | ||
81ecdfbb RW |
3597 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3598 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3599 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3600 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3601 | fi |
b4e70030 | 3602 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3603 | fi |
81ecdfbb RW |
3604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3605 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3606 | OBJEXT=$ac_cv_objext |
3607 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3609 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3610 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3611 | $as_echo_n "(cached) " >&6 |
c906108c | 3612 | else |
81ecdfbb | 3613 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3614 | /* end confdefs.h. */ |
3615 | ||
3616 | int | |
3617 | main () | |
3618 | { | |
3619 | #ifndef __GNUC__ | |
3620 | choke me | |
3621 | #endif | |
3622 | ||
3623 | ; | |
3624 | return 0; | |
3625 | } | |
3626 | _ACEOF | |
81ecdfbb | 3627 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3628 | ac_compiler_gnu=yes |
3629 | else | |
81ecdfbb | 3630 | ac_compiler_gnu=no |
bec39cab | 3631 | fi |
81ecdfbb | 3632 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3633 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3634 | ||
3635 | fi | |
81ecdfbb RW |
3636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3637 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3638 | if test $ac_compiler_gnu = yes; then | |
3639 | GCC=yes | |
3640 | else | |
3641 | GCC= | |
3642 | fi | |
bec39cab AC |
3643 | ac_test_CFLAGS=${CFLAGS+set} |
3644 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3646 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3647 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb | 3648 | $as_echo_n "(cached) " >&6 |
bec39cab | 3649 | else |
81ecdfbb RW |
3650 | ac_save_c_werror_flag=$ac_c_werror_flag |
3651 | ac_c_werror_flag=yes | |
3652 | ac_cv_prog_cc_g=no | |
3653 | CFLAGS="-g" | |
3654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3655 | /* end confdefs.h. */ |
3656 | ||
3657 | int | |
3658 | main () | |
3659 | { | |
3660 | ||
3661 | ; | |
3662 | return 0; | |
3663 | } | |
3664 | _ACEOF | |
81ecdfbb | 3665 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3666 | ac_cv_prog_cc_g=yes |
3667 | else | |
81ecdfbb RW |
3668 | CFLAGS="" |
3669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3670 | /* end confdefs.h. */ | |
3671 | ||
3672 | int | |
3673 | main () | |
3674 | { | |
3675 | ||
3676 | ; | |
3677 | return 0; | |
3678 | } | |
3679 | _ACEOF | |
3680 | if ac_fn_c_try_compile "$LINENO"; then : | |
3681 | ||
3682 | else | |
3683 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3684 | CFLAGS="-g" | |
3685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3686 | /* end confdefs.h. */ | |
3687 | ||
3688 | int | |
3689 | main () | |
3690 | { | |
c906108c | 3691 | |
81ecdfbb RW |
3692 | ; |
3693 | return 0; | |
3694 | } | |
3695 | _ACEOF | |
3696 | if ac_fn_c_try_compile "$LINENO"; then : | |
3697 | ac_cv_prog_cc_g=yes | |
3698 | fi | |
3699 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3700 | fi | |
3701 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3702 | fi |
81ecdfbb RW |
3703 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3704 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3705 | fi |
81ecdfbb RW |
3706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3707 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3708 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3709 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3710 | elif test $ac_cv_prog_cc_g = yes; then |
3711 | if test "$GCC" = yes; then | |
3712 | CFLAGS="-g -O2" | |
3713 | else | |
3714 | CFLAGS="-g" | |
3715 | fi | |
3716 | else | |
3717 | if test "$GCC" = yes; then | |
3718 | CFLAGS="-O2" | |
3719 | else | |
3720 | CFLAGS= | |
3721 | fi | |
3722 | fi | |
81ecdfbb RW |
3723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3724 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3725 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3726 | $as_echo_n "(cached) " >&6 |
bec39cab | 3727 | else |
81ecdfbb | 3728 | ac_cv_prog_cc_c89=no |
bec39cab | 3729 | ac_save_CC=$CC |
81ecdfbb | 3730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3731 | /* end confdefs.h. */ |
c906108c SS |
3732 | #include <stdarg.h> |
3733 | #include <stdio.h> | |
d0ac1c44 | 3734 | struct stat; |
c906108c SS |
3735 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3736 | struct buf { int x; }; | |
3737 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3738 | static char *e (p, i) | |
3739 | char **p; | |
3740 | int i; | |
3741 | { | |
3742 | return p[i]; | |
3743 | } | |
3744 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3745 | { | |
3746 | char *s; | |
3747 | va_list v; | |
3748 | va_start (v,p); | |
3749 | s = g (p, va_arg (v,int)); | |
3750 | va_end (v); | |
3751 | return s; | |
3752 | } | |
bec39cab AC |
3753 | |
3754 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3755 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3756 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3757 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3758 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3759 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3760 | that's true only with -std. */ |
bec39cab AC |
3761 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3762 | ||
81ecdfbb RW |
3763 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3764 | inside strings and character constants. */ | |
3765 | #define FOO(x) 'x' | |
3766 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3767 | ||
c906108c SS |
3768 | int test (int i, double x); |
3769 | struct s1 {int (*f) (int a);}; | |
3770 | struct s2 {int (*f) (double a);}; | |
3771 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3772 | int argc; | |
3773 | char **argv; | |
bec39cab AC |
3774 | int |
3775 | main () | |
3776 | { | |
c906108c | 3777 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3778 | ; |
3779 | return 0; | |
3780 | } | |
3781 | _ACEOF | |
81ecdfbb RW |
3782 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3783 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3784 | do |
3785 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3786 | if ac_fn_c_try_compile "$LINENO"; then : |
3787 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3788 | fi |
81ecdfbb RW |
3789 | rm -f core conftest.err conftest.$ac_objext |
3790 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3791 | done |
81ecdfbb | 3792 | rm -f conftest.$ac_ext |
bec39cab | 3793 | CC=$ac_save_CC |
c906108c SS |
3794 | |
3795 | fi | |
81ecdfbb RW |
3796 | # AC_CACHE_VAL |
3797 | case "x$ac_cv_prog_cc_c89" in | |
3798 | x) | |
3799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3800 | $as_echo "none needed" >&6; } ;; | |
3801 | xno) | |
3802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3803 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3804 | *) |
81ecdfbb RW |
3805 | CC="$CC $ac_cv_prog_cc_c89" |
3806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3807 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3808 | esac |
81ecdfbb | 3809 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3810 | |
b4e70030 JB |
3811 | fi |
3812 | ||
bec39cab AC |
3813 | ac_ext=c |
3814 | ac_cpp='$CPP $CPPFLAGS' | |
3815 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3816 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3817 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3818 | |
3bc3d82a PA |
3819 | ac_ext=cpp |
3820 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3821 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3822 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3823 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3824 | if test -z "$CXX"; then | |
3825 | if test -n "$CCC"; then | |
3826 | CXX=$CCC | |
3827 | else | |
3828 | if test -n "$ac_tool_prefix"; then | |
3829 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3830 | do | |
3831 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3832 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3834 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3835 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3836 | $as_echo_n "(cached) " >&6 |
3837 | else | |
3838 | if test -n "$CXX"; then | |
3839 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3840 | else | |
3841 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3842 | for as_dir in $PATH | |
3843 | do | |
3844 | IFS=$as_save_IFS | |
3845 | test -z "$as_dir" && as_dir=. | |
3846 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3847 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3848 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3849 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3850 | break 2 | |
3851 | fi | |
3852 | done | |
3853 | done | |
3854 | IFS=$as_save_IFS | |
3855 | ||
3856 | fi | |
3857 | fi | |
3858 | CXX=$ac_cv_prog_CXX | |
3859 | if test -n "$CXX"; then | |
3860 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3861 | $as_echo "$CXX" >&6; } | |
3862 | else | |
3863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3864 | $as_echo "no" >&6; } | |
3865 | fi | |
3866 | ||
3867 | ||
3868 | test -n "$CXX" && break | |
3869 | done | |
3870 | fi | |
3871 | if test -z "$CXX"; then | |
3872 | ac_ct_CXX=$CXX | |
3873 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3874 | do | |
3875 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3876 | set dummy $ac_prog; ac_word=$2 | |
3877 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3878 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3879 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3880 | $as_echo_n "(cached) " >&6 |
3881 | else | |
3882 | if test -n "$ac_ct_CXX"; then | |
3883 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3884 | else | |
3885 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3886 | for as_dir in $PATH | |
3887 | do | |
3888 | IFS=$as_save_IFS | |
3889 | test -z "$as_dir" && as_dir=. | |
3890 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3891 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3892 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3893 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3894 | break 2 | |
3895 | fi | |
3896 | done | |
3897 | done | |
3898 | IFS=$as_save_IFS | |
3899 | ||
3900 | fi | |
3901 | fi | |
3902 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3903 | if test -n "$ac_ct_CXX"; then | |
3904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3905 | $as_echo "$ac_ct_CXX" >&6; } | |
3906 | else | |
3907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3908 | $as_echo "no" >&6; } | |
3909 | fi | |
3910 | ||
3911 | ||
3912 | test -n "$ac_ct_CXX" && break | |
3913 | done | |
3914 | ||
3915 | if test "x$ac_ct_CXX" = x; then | |
3916 | CXX="g++" | |
3917 | else | |
3918 | case $cross_compiling:$ac_tool_warned in | |
3919 | yes:) | |
3920 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3921 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3922 | ac_tool_warned=yes ;; | |
3923 | esac | |
3924 | CXX=$ac_ct_CXX | |
3925 | fi | |
3926 | fi | |
3927 | ||
3928 | fi | |
3929 | fi | |
3930 | # Provide some information about the compiler. | |
3931 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3932 | set X $ac_compile | |
3933 | ac_compiler=$2 | |
3934 | for ac_option in --version -v -V -qversion; do | |
3935 | { { ac_try="$ac_compiler $ac_option >&5" | |
3936 | case "(($ac_try" in | |
3937 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3938 | *) ac_try_echo=$ac_try;; | |
3939 | esac | |
3940 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3941 | $as_echo "$ac_try_echo"; } >&5 | |
3942 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3943 | ac_status=$? | |
3944 | if test -s conftest.err; then | |
3945 | sed '10a\ | |
3946 | ... rest of stderr output deleted ... | |
3947 | 10q' conftest.err >conftest.er1 | |
3948 | cat conftest.er1 >&5 | |
3bc3d82a | 3949 | fi |
d0ac1c44 | 3950 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3951 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3952 | test $ac_status = 0; } | |
3953 | done | |
3954 | ||
3955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3956 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3957 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3958 | $as_echo_n "(cached) " >&6 |
3959 | else | |
3960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3961 | /* end confdefs.h. */ | |
3962 | ||
3963 | int | |
3964 | main () | |
3965 | { | |
3966 | #ifndef __GNUC__ | |
3967 | choke me | |
3968 | #endif | |
3969 | ||
3970 | ; | |
3971 | return 0; | |
3972 | } | |
3973 | _ACEOF | |
3974 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3975 | ac_compiler_gnu=yes | |
3976 | else | |
3977 | ac_compiler_gnu=no | |
3978 | fi | |
3979 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3980 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3981 | ||
3982 | fi | |
3983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3984 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3985 | if test $ac_compiler_gnu = yes; then | |
3986 | GXX=yes | |
3987 | else | |
3988 | GXX= | |
3989 | fi | |
3990 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3991 | ac_save_CXXFLAGS=$CXXFLAGS | |
3992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3993 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3994 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3995 | $as_echo_n "(cached) " >&6 |
3996 | else | |
3997 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3998 | ac_cxx_werror_flag=yes | |
3999 | ac_cv_prog_cxx_g=no | |
4000 | CXXFLAGS="-g" | |
4001 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4002 | /* end confdefs.h. */ | |
4003 | ||
4004 | int | |
4005 | main () | |
4006 | { | |
4007 | ||
4008 | ; | |
4009 | return 0; | |
4010 | } | |
4011 | _ACEOF | |
4012 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4013 | ac_cv_prog_cxx_g=yes | |
4014 | else | |
4015 | CXXFLAGS="" | |
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 | ||
4029 | else | |
4030 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4031 | CXXFLAGS="-g" | |
4032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4033 | /* end confdefs.h. */ | |
4034 | ||
4035 | int | |
4036 | main () | |
4037 | { | |
4038 | ||
4039 | ; | |
4040 | return 0; | |
4041 | } | |
4042 | _ACEOF | |
4043 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4044 | ac_cv_prog_cxx_g=yes | |
4045 | fi | |
4046 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4047 | fi | |
4048 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4049 | fi | |
4050 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4051 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4052 | fi | |
4053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
4054 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
4055 | if test "$ac_test_CXXFLAGS" = set; then | |
4056 | CXXFLAGS=$ac_save_CXXFLAGS | |
4057 | elif test $ac_cv_prog_cxx_g = yes; then | |
4058 | if test "$GXX" = yes; then | |
4059 | CXXFLAGS="-g -O2" | |
4060 | else | |
4061 | CXXFLAGS="-g" | |
4062 | fi | |
4063 | else | |
4064 | if test "$GXX" = yes; then | |
4065 | CXXFLAGS="-O2" | |
4066 | else | |
4067 | CXXFLAGS= | |
4068 | fi | |
4069 | fi | |
4070 | ac_ext=c | |
4071 | ac_cpp='$CPP $CPPFLAGS' | |
4072 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4073 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4074 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4075 | ||
4076 | ||
60ca704f | 4077 | |
bec39cab AC |
4078 | ac_ext=c |
4079 | ac_cpp='$CPP $CPPFLAGS' | |
4080 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4081 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4082 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
4083 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
4084 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
4085 | # On Suns, sometimes $CPP names a directory. |
4086 | if test -n "$CPP" && test -d "$CPP"; then | |
4087 | CPP= | |
8bb2c122 | 4088 | fi |
bec39cab | 4089 | if test -z "$CPP"; then |
d0ac1c44 | 4090 | if ${ac_cv_prog_CPP+:} false; then : |
81ecdfbb | 4091 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
4092 | else |
4093 | # Double quotes because CPP needs to be expanded | |
4094 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4095 | do | |
4096 | ac_preproc_ok=false | |
4097 | for ac_c_preproc_warn_flag in '' yes | |
4098 | do | |
4099 | # Use a header file that comes with gcc, so configuring glibc | |
4100 | # with a fresh cross-compiler works. | |
4101 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4102 | # <limits.h> exists even on freestanding compilers. | |
4103 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4104 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4106 | /* end confdefs.h. */ |
4107 | #ifdef __STDC__ | |
4108 | # include <limits.h> | |
4109 | #else | |
4110 | # include <assert.h> | |
4111 | #endif | |
4112 | Syntax error | |
4113 | _ACEOF | |
81ecdfbb | 4114 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4115 | |
81ecdfbb | 4116 | else |
bec39cab AC |
4117 | # Broken: fails on valid input. |
4118 | continue | |
4119 | fi | |
d0ac1c44 | 4120 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4121 | |
81ecdfbb | 4122 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4123 | # can be detected and how. |
81ecdfbb | 4124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4125 | /* end confdefs.h. */ |
4126 | #include <ac_nonexistent.h> | |
4127 | _ACEOF | |
81ecdfbb | 4128 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4129 | # Broken: success on invalid input. |
4130 | continue | |
8bb2c122 | 4131 | else |
bec39cab AC |
4132 | # Passes both tests. |
4133 | ac_preproc_ok=: | |
4134 | break | |
8bb2c122 | 4135 | fi |
d0ac1c44 | 4136 | rm -f conftest.err conftest.i conftest.$ac_ext |
8bb2c122 | 4137 | |
bec39cab AC |
4138 | done |
4139 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4140 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb | 4141 | if $ac_preproc_ok; then : |
bec39cab AC |
4142 | break |
4143 | fi | |
8bb2c122 | 4144 | |
bec39cab AC |
4145 | done |
4146 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 4147 | |
c906108c | 4148 | fi |
bec39cab AC |
4149 | CPP=$ac_cv_prog_CPP |
4150 | else | |
4151 | ac_cv_prog_CPP=$CPP | |
c906108c | 4152 | fi |
81ecdfbb RW |
4153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
4154 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
4155 | ac_preproc_ok=false |
4156 | for ac_c_preproc_warn_flag in '' yes | |
4157 | do | |
4158 | # Use a header file that comes with gcc, so configuring glibc | |
4159 | # with a fresh cross-compiler works. | |
4160 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4161 | # <limits.h> exists even on freestanding compilers. | |
4162 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4163 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4165 | /* end confdefs.h. */ |
4166 | #ifdef __STDC__ | |
4167 | # include <limits.h> | |
4168 | #else | |
4169 | # include <assert.h> | |
4170 | #endif | |
4171 | Syntax error | |
4172 | _ACEOF | |
81ecdfbb | 4173 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4174 | |
81ecdfbb | 4175 | else |
bec39cab AC |
4176 | # Broken: fails on valid input. |
4177 | continue | |
4178 | fi | |
d0ac1c44 | 4179 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4180 | |
81ecdfbb | 4181 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4182 | # can be detected and how. |
81ecdfbb | 4183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4184 | /* end confdefs.h. */ |
4185 | #include <ac_nonexistent.h> | |
4186 | _ACEOF | |
81ecdfbb | 4187 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4188 | # Broken: success on invalid input. |
4189 | continue | |
c906108c | 4190 | else |
bec39cab AC |
4191 | # Passes both tests. |
4192 | ac_preproc_ok=: | |
4193 | break | |
c906108c | 4194 | fi |
d0ac1c44 | 4195 | rm -f conftest.err conftest.i conftest.$ac_ext |
c906108c | 4196 | |
bec39cab AC |
4197 | done |
4198 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4199 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
4200 | if $ac_preproc_ok; then : |
4201 | ||
c906108c | 4202 | else |
81ecdfbb RW |
4203 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4204 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4205 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4206 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 4207 | fi |
c906108c | 4208 | |
bec39cab AC |
4209 | ac_ext=c |
4210 | ac_cpp='$CPP $CPPFLAGS' | |
4211 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4212 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4213 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4214 | ||
4215 | ||
81ecdfbb RW |
4216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4217 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 4218 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 4219 | $as_echo_n "(cached) " >&6 |
4e8d927d | 4220 | else |
81ecdfbb RW |
4221 | if test -z "$GREP"; then |
4222 | ac_path_GREP_found=false | |
4223 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4224 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4225 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4226 | do | |
4227 | IFS=$as_save_IFS | |
4228 | test -z "$as_dir" && as_dir=. | |
4229 | for ac_prog in grep ggrep; do | |
4230 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4231 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4232 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
4233 | # Check for GNU ac_path_GREP and select it if it is found. |
4234 | # Check for GNU $ac_path_GREP | |
4235 | case `"$ac_path_GREP" --version 2>&1` in | |
4236 | *GNU*) | |
4237 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4238 | *) | |
4239 | ac_count=0 | |
4240 | $as_echo_n 0123456789 >"conftest.in" | |
4241 | while : | |
4242 | do | |
4243 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4244 | mv "conftest.tmp" "conftest.in" | |
4245 | cp "conftest.in" "conftest.nl" | |
4246 | $as_echo 'GREP' >> "conftest.nl" | |
4247 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4248 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4249 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4250 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4251 | # Best one so far, save it but keep looking for a better one | |
4252 | ac_cv_path_GREP="$ac_path_GREP" | |
4253 | ac_path_GREP_max=$ac_count | |
bec39cab | 4254 | fi |
81ecdfbb RW |
4255 | # 10*(2^10) chars as input seems more than enough |
4256 | test $ac_count -gt 10 && break | |
4257 | done | |
4258 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4259 | esac | |
bec39cab | 4260 | |
81ecdfbb RW |
4261 | $ac_path_GREP_found && break 3 |
4262 | done | |
4263 | done | |
4264 | done | |
4265 | IFS=$as_save_IFS | |
4266 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 4267 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4268 | fi |
c906108c | 4269 | else |
81ecdfbb | 4270 | ac_cv_path_GREP=$GREP |
c906108c | 4271 | fi |
c906108c | 4272 | |
81ecdfbb RW |
4273 | fi |
4274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4275 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4276 | GREP="$ac_cv_path_GREP" | |
c906108c | 4277 | |
c906108c | 4278 | |
81ecdfbb RW |
4279 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4280 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 4281 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb | 4282 | $as_echo_n "(cached) " >&6 |
783e057b | 4283 | else |
81ecdfbb RW |
4284 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4285 | then ac_cv_path_EGREP="$GREP -E" | |
4286 | else | |
4287 | if test -z "$EGREP"; then | |
4288 | ac_path_EGREP_found=false | |
4289 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4290 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4291 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4292 | do |
4293 | IFS=$as_save_IFS | |
4294 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4295 | for ac_prog in egrep; do |
4296 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4297 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4298 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4299 | # Check for GNU ac_path_EGREP and select it if it is found. |
4300 | # Check for GNU $ac_path_EGREP | |
4301 | case `"$ac_path_EGREP" --version 2>&1` in | |
4302 | *GNU*) | |
4303 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4304 | *) | |
4305 | ac_count=0 | |
4306 | $as_echo_n 0123456789 >"conftest.in" | |
4307 | while : | |
4308 | do | |
4309 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4310 | mv "conftest.tmp" "conftest.in" | |
4311 | cp "conftest.in" "conftest.nl" | |
4312 | $as_echo 'EGREP' >> "conftest.nl" | |
4313 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4314 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4315 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4316 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4317 | # Best one so far, save it but keep looking for a better one | |
4318 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4319 | ac_path_EGREP_max=$ac_count | |
4320 | fi | |
4321 | # 10*(2^10) chars as input seems more than enough | |
4322 | test $ac_count -gt 10 && break | |
4323 | done | |
4324 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4325 | esac | |
bec39cab | 4326 | |
81ecdfbb RW |
4327 | $ac_path_EGREP_found && break 3 |
4328 | done | |
4329 | done | |
4330 | done | |
4331 | IFS=$as_save_IFS | |
4332 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4333 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
783e057b | 4334 | fi |
783e057b | 4335 | else |
81ecdfbb | 4336 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4337 | fi |
4338 | ||
81ecdfbb | 4339 | fi |
783e057b | 4340 | fi |
81ecdfbb RW |
4341 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4342 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4343 | EGREP="$ac_cv_path_EGREP" | |
4344 | ||
783e057b | 4345 | |
81ecdfbb RW |
4346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4347 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4348 | if ${ac_cv_header_stdc+:} false; then : |
81ecdfbb | 4349 | $as_echo_n "(cached) " >&6 |
783e057b | 4350 | else |
81ecdfbb | 4351 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4352 | /* end confdefs.h. */ |
783e057b | 4353 | #include <stdlib.h> |
bec39cab | 4354 | #include <stdarg.h> |
783e057b DJ |
4355 | #include <string.h> |
4356 | #include <float.h> | |
c906108c | 4357 | |
bec39cab AC |
4358 | int |
4359 | main () | |
4360 | { | |
c906108c | 4361 | |
bec39cab AC |
4362 | ; |
4363 | return 0; | |
4364 | } | |
4365 | _ACEOF | |
81ecdfbb | 4366 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4367 | ac_cv_header_stdc=yes |
c906108c | 4368 | else |
81ecdfbb | 4369 | ac_cv_header_stdc=no |
c906108c | 4370 | fi |
81ecdfbb | 4371 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4372 | |
783e057b DJ |
4373 | if test $ac_cv_header_stdc = yes; then |
4374 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4376 | /* end confdefs.h. */ |
4377 | #include <string.h> | |
c906108c | 4378 | |
783e057b DJ |
4379 | _ACEOF |
4380 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4381 | $EGREP "memchr" >/dev/null 2>&1; then : |
4382 | ||
c906108c | 4383 | else |
783e057b | 4384 | ac_cv_header_stdc=no |
c906108c | 4385 | fi |
783e057b | 4386 | rm -f conftest* |
c906108c SS |
4387 | |
4388 | fi | |
4389 | ||
783e057b DJ |
4390 | if test $ac_cv_header_stdc = yes; then |
4391 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4392 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4393 | /* end confdefs.h. */ |
4394 | #include <stdlib.h> | |
bec39cab | 4395 | |
783e057b DJ |
4396 | _ACEOF |
4397 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4398 | $EGREP "free" >/dev/null 2>&1; then : |
4399 | ||
bec39cab | 4400 | else |
783e057b | 4401 | ac_cv_header_stdc=no |
bec39cab | 4402 | fi |
783e057b | 4403 | rm -f conftest* |
bec39cab AC |
4404 | |
4405 | fi | |
bec39cab | 4406 | |
783e057b DJ |
4407 | if test $ac_cv_header_stdc = yes; then |
4408 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4409 | if test "$cross_compiling" = yes; then : |
783e057b | 4410 | : |
bec39cab | 4411 | else |
81ecdfbb | 4412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4413 | /* end confdefs.h. */ |
4414 | #include <ctype.h> | |
81ecdfbb | 4415 | #include <stdlib.h> |
783e057b DJ |
4416 | #if ((' ' & 0x0FF) == 0x020) |
4417 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4418 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4419 | #else | |
4420 | # define ISLOWER(c) \ | |
4421 | (('a' <= (c) && (c) <= 'i') \ | |
4422 | || ('j' <= (c) && (c) <= 'r') \ | |
4423 | || ('s' <= (c) && (c) <= 'z')) | |
4424 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4425 | #endif | |
4426 | ||
4427 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4428 | int | |
4429 | main () | |
4430 | { | |
4431 | int i; | |
4432 | for (i = 0; i < 256; i++) | |
4433 | if (XOR (islower (i), ISLOWER (i)) | |
4434 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4435 | return 2; |
4436 | return 0; | |
783e057b DJ |
4437 | } |
4438 | _ACEOF | |
81ecdfbb | 4439 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4440 | |
81ecdfbb RW |
4441 | else |
4442 | ac_cv_header_stdc=no | |
783e057b | 4443 | fi |
81ecdfbb RW |
4444 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4445 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4446 | fi |
81ecdfbb | 4447 | |
783e057b DJ |
4448 | fi |
4449 | fi | |
81ecdfbb RW |
4450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4451 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4452 | if test $ac_cv_header_stdc = yes; then |
4453 | ||
81ecdfbb | 4454 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4455 | |
4456 | fi | |
4457 | ||
4458 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4459 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4460 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4461 | do : |
4462 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4463 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4464 | " | |
d0ac1c44 | 4465 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
783e057b | 4466 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4467 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4468 | _ACEOF |
4469 | ||
4470 | fi | |
4471 | ||
4472 | done | |
4473 | ||
4474 | ||
4475 | ||
81ecdfbb | 4476 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4477 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
783e057b DJ |
4478 | MINIX=yes |
4479 | else | |
4480 | MINIX= | |
4481 | fi | |
4482 | ||
4483 | ||
4484 | if test "$MINIX" = yes; then | |
4485 | ||
81ecdfbb | 4486 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4487 | |
4488 | ||
81ecdfbb | 4489 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4490 | |
4491 | ||
81ecdfbb | 4492 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4493 | |
4494 | fi | |
4495 | ||
4496 | ||
81ecdfbb RW |
4497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4498 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4499 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
81ecdfbb | 4500 | $as_echo_n "(cached) " >&6 |
783e057b | 4501 | else |
81ecdfbb | 4502 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4503 | /* end confdefs.h. */ |
4504 | ||
d0ac1c44 SM |
4505 | # define __EXTENSIONS__ 1 |
4506 | $ac_includes_default | |
783e057b DJ |
4507 | int |
4508 | main () | |
4509 | { | |
4510 | ||
4511 | ; | |
4512 | return 0; | |
4513 | } | |
4514 | _ACEOF | |
81ecdfbb | 4515 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4516 | ac_cv_safe_to_define___extensions__=yes |
4517 | else | |
81ecdfbb | 4518 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4519 | fi |
81ecdfbb | 4520 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4521 | fi |
81ecdfbb RW |
4522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4523 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4524 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4525 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4526 | |
81ecdfbb | 4527 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4528 | |
81ecdfbb | 4529 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4530 | |
81ecdfbb | 4531 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4532 | |
81ecdfbb | 4533 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4534 | |
4535 | ||
c971b7fa PA |
4536 | ac_aux_dir= |
4537 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4538 | if test -f "$ac_dir/install-sh"; then |
4539 | ac_aux_dir=$ac_dir | |
4540 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4541 | break | |
4542 | elif test -f "$ac_dir/install.sh"; then | |
4543 | ac_aux_dir=$ac_dir | |
4544 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4545 | break | |
4546 | elif test -f "$ac_dir/shtool"; then | |
4547 | ac_aux_dir=$ac_dir | |
4548 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4549 | break | |
4550 | fi | |
c971b7fa PA |
4551 | done |
4552 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4553 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
c971b7fa | 4554 | fi |
770d76d7 | 4555 | |
c971b7fa PA |
4556 | # These three variables are undocumented and unsupported, |
4557 | # and are intended to be withdrawn in a future Autoconf release. | |
4558 | # They can cause serious problems if a builder's source tree is in a directory | |
4559 | # whose full name contains unusual characters. | |
4560 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4561 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4562 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4563 | |
770d76d7 | 4564 | |
c971b7fa PA |
4565 | # Make sure we can run config.sub. |
4566 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4567 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 | 4568 | |
c971b7fa PA |
4569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4570 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4571 | if ${ac_cv_build+:} false; then : |
c971b7fa | 4572 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4573 | else |
c971b7fa PA |
4574 | ac_build_alias=$build_alias |
4575 | test "x$ac_build_alias" = x && | |
4576 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4577 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4578 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
c971b7fa | 4579 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4580 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
c971b7fa | 4581 | |
770d76d7 | 4582 | fi |
c971b7fa PA |
4583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4584 | $as_echo "$ac_cv_build" >&6; } | |
4585 | case $ac_cv_build in | |
4586 | *-*-*) ;; | |
d0ac1c44 | 4587 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 | 4588 | esac |
c971b7fa PA |
4589 | build=$ac_cv_build |
4590 | ac_save_IFS=$IFS; IFS='-' | |
4591 | set x $ac_cv_build | |
4592 | shift | |
4593 | build_cpu=$1 | |
4594 | build_vendor=$2 | |
4595 | shift; shift | |
4596 | # Remember, the first character of IFS is used to create $*, | |
4597 | # except with old shells: | |
4598 | build_os=$* | |
4599 | IFS=$ac_save_IFS | |
4600 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4601 | |
4602 | ||
c971b7fa PA |
4603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4604 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4605 | if ${ac_cv_host+:} false; then : |
81ecdfbb RW |
4606 | $as_echo_n "(cached) " >&6 |
4607 | else | |
c971b7fa PA |
4608 | if test "x$host_alias" = x; then |
4609 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4610 | else |
c971b7fa | 4611 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
d0ac1c44 | 4612 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
81ecdfbb | 4613 | fi |
81ecdfbb RW |
4614 | |
4615 | fi | |
c971b7fa PA |
4616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4617 | $as_echo "$ac_cv_host" >&6; } | |
4618 | case $ac_cv_host in | |
4619 | *-*-*) ;; | |
d0ac1c44 | 4620 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
81ecdfbb | 4621 | esac |
c971b7fa PA |
4622 | host=$ac_cv_host |
4623 | ac_save_IFS=$IFS; IFS='-' | |
4624 | set x $ac_cv_host | |
4625 | shift | |
4626 | host_cpu=$1 | |
4627 | host_vendor=$2 | |
4628 | shift; shift | |
4629 | # Remember, the first character of IFS is used to create $*, | |
4630 | # except with old shells: | |
4631 | host_os=$* | |
4632 | IFS=$ac_save_IFS | |
4633 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4634 | |
4635 | ||
4636 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4637 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4638 | if ${ac_cv_target+:} false; then : |
3388710e JM |
4639 | $as_echo_n "(cached) " >&6 |
4640 | else | |
4641 | if test "x$target_alias" = x; then | |
4642 | ac_cv_target=$ac_cv_host | |
4643 | else | |
4644 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
d0ac1c44 | 4645 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
3388710e JM |
4646 | fi |
4647 | ||
4648 | fi | |
4649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4650 | $as_echo "$ac_cv_target" >&6; } | |
4651 | case $ac_cv_target in | |
4652 | *-*-*) ;; | |
d0ac1c44 | 4653 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
3388710e JM |
4654 | esac |
4655 | target=$ac_cv_target | |
4656 | ac_save_IFS=$IFS; IFS='-' | |
4657 | set x $ac_cv_target | |
4658 | shift | |
4659 | target_cpu=$1 | |
4660 | target_vendor=$2 | |
4661 | shift; shift | |
4662 | # Remember, the first character of IFS is used to create $*, | |
4663 | # except with old shells: | |
4664 | target_os=$* | |
4665 | IFS=$ac_save_IFS | |
4666 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4667 | ||
4668 | ||
4669 | # The aliases save the names the user supplied, while $host etc. | |
4670 | # will get canonicalized. | |
4671 | test -n "$target_alias" && | |
4672 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4673 | NONENONEs,x,x, && | |
4674 | program_prefix=${target_alias}- | |
4675 | ||
4676 | # The tests for host and target for $enable_largefile require | |
4677 | # canonical names. | |
4678 | ||
4679 | ||
81ecdfbb | 4680 | |
da2f07f1 JK |
4681 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4682 | # even in directories otherwise not depending on the $plugins option. | |
4683 | ||
4684 | ||
2974be62 AM |
4685 | maybe_plugins=no |
4686 | for ac_header in dlfcn.h | |
4687 | do : | |
4688 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4689 | " | |
d0ac1c44 | 4690 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : |
2974be62 AM |
4691 | cat >>confdefs.h <<_ACEOF |
4692 | #define HAVE_DLFCN_H 1 | |
4693 | _ACEOF | |
4694 | maybe_plugins=yes | |
4695 | fi | |
4696 | ||
4697 | done | |
4698 | ||
4699 | for ac_header in windows.h | |
4700 | do : | |
4701 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4702 | " | |
d0ac1c44 | 4703 | if test "x$ac_cv_header_windows_h" = xyes; then : |
2974be62 AM |
4704 | cat >>confdefs.h <<_ACEOF |
4705 | #define HAVE_WINDOWS_H 1 | |
4706 | _ACEOF | |
4707 | maybe_plugins=yes | |
4708 | fi | |
4709 | ||
4710 | done | |
4711 | ||
4712 | ||
4713 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4714 | if test "${enable_plugins+set}" = set; then : |
4715 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4716 | no) plugins=no ;; |
4717 | *) plugins=yes | |
4718 | if test "$maybe_plugins" != "yes" ; then | |
d0ac1c44 | 4719 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 |
2974be62 AM |
4720 | fi ;; |
4721 | esac | |
da2f07f1 | 4722 | else |
2974be62 AM |
4723 | plugins=$maybe_plugins |
4724 | ||
da2f07f1 JK |
4725 | fi |
4726 | ||
2974be62 | 4727 | if test "$plugins" = "yes"; then |
458412c3 TT |
4728 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
4729 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
d0ac1c44 | 4730 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4731 | $as_echo_n "(cached) " >&6 |
4732 | else | |
4733 | ac_func_search_save_LIBS=$LIBS | |
4734 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4735 | /* end confdefs.h. */ | |
4736 | ||
4737 | /* Override any GCC internal prototype to avoid an error. | |
4738 | Use char because int might match the return type of a GCC | |
4739 | builtin and then its argument prototype would still apply. */ | |
4740 | #ifdef __cplusplus | |
4741 | extern "C" | |
4742 | #endif | |
458412c3 | 4743 | char dlsym (); |
2974be62 AM |
4744 | int |
4745 | main () | |
4746 | { | |
458412c3 | 4747 | return dlsym (); |
2974be62 AM |
4748 | ; |
4749 | return 0; | |
4750 | } | |
4751 | _ACEOF | |
4752 | for ac_lib in '' dl; do | |
4753 | if test -z "$ac_lib"; then | |
4754 | ac_res="none required" | |
4755 | else | |
4756 | ac_res=-l$ac_lib | |
4757 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4758 | fi | |
4759 | if ac_fn_c_try_link "$LINENO"; then : | |
458412c3 | 4760 | ac_cv_search_dlsym=$ac_res |
2974be62 AM |
4761 | fi |
4762 | rm -f core conftest.err conftest.$ac_objext \ | |
4763 | conftest$ac_exeext | |
d0ac1c44 | 4764 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4765 | break |
4766 | fi | |
4767 | done | |
d0ac1c44 | 4768 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4769 | |
4770 | else | |
458412c3 | 4771 | ac_cv_search_dlsym=no |
2974be62 AM |
4772 | fi |
4773 | rm conftest.$ac_ext | |
4774 | LIBS=$ac_func_search_save_LIBS | |
4775 | fi | |
458412c3 TT |
4776 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
4777 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
4778 | ac_res=$ac_cv_search_dlsym | |
2974be62 AM |
4779 | if test "$ac_res" != no; then : |
4780 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4781 | ||
4782 | fi | |
4783 | ||
4784 | fi | |
da2f07f1 JK |
4785 | |
4786 | ||
4787 | case "${host}" in | |
c8693053 RO |
4788 | sparc-*-solaris*|i?86-*-solaris*) |
4789 | # On native 32-bit Solaris/SPARC and x86, large-file and procfs support | |
4790 | # were mutually exclusive until Solaris 11.3. Without procfs support, | |
4791 | # the bfd/ elf module cannot provide certain routines such as | |
4792 | # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user | |
4793 | # explicitly requested large-file support through the | |
4794 | # --enable-largefile switch, disable large-file support in favor of | |
4795 | # procfs support. | |
4796 | # | |
4797 | # Check if <sys/procfs.h> is incompatible with large-file support. | |
4798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4799 | /* end confdefs.h. */ | |
4800 | #define _FILE_OFFSET_BITS 64 | |
4801 | #define _STRUCTURED_PROC 1 | |
4802 | #include <sys/procfs.h> | |
4803 | int | |
4804 | main () | |
4805 | { | |
4806 | ||
4807 | ; | |
4808 | return 0; | |
4809 | } | |
4810 | _ACEOF | |
4811 | if ac_fn_c_try_compile "$LINENO"; then : | |
4812 | acx_cv_procfs_lfs=yes | |
4813 | else | |
4814 | acx_cv_procfs_lfs=no | |
4815 | fi | |
4816 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4817 | # | |
4818 | # Forcefully disable large-file support only if necessary, gdb is in | |
4819 | # tree and enabled. | |
4820 | if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \ | |
4821 | -a -d $srcdir/../gdb -a "$enable_gdb" != no; then | |
4822 | : ${enable_largefile="no"} | |
4823 | if test "$plugins" = yes; then | |
4824 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | |
4825 | plugin support disabled; require large-file support which is incompatible with GDB." >&5 | |
4826 | $as_echo "$as_me: WARNING: | |
4827 | plugin support disabled; require large-file support which is incompatible with GDB." >&2;} | |
4828 | plugins=no | |
4829 | fi | |
4830 | fi | |
4831 | # | |
4832 | # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the | |
4833 | # benefit of g++ 9+ which predefines it on Solaris. | |
4834 | if test "$enable_largefile" = no; then | |
4835 | LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS" | |
4836 | ||
4837 | fi | |
da2f07f1 JK |
4838 | ;; |
4839 | esac | |
4840 | ||
4841 | # Check whether --enable-largefile was given. | |
4842 | if test "${enable_largefile+set}" = set; then : | |
4843 | enableval=$enable_largefile; | |
4844 | fi | |
4845 | ||
4846 | if test "$enable_largefile" != no; then | |
4847 | ||
4848 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4849 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4850 | if ${ac_cv_sys_largefile_CC+:} false; then : |
da2f07f1 JK |
4851 | $as_echo_n "(cached) " >&6 |
4852 | else | |
4853 | ac_cv_sys_largefile_CC=no | |
4854 | if test "$GCC" != yes; then | |
4855 | ac_save_CC=$CC | |
4856 | while :; do | |
4857 | # IRIX 6.2 and later do not support large files by default, | |
4858 | # so use the C compiler's -n32 option if that helps. | |
4859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4860 | /* end confdefs.h. */ | |
4861 | #include <sys/types.h> | |
4862 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4863 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4864 | since some C++ compilers masquerading as C compilers | |
4865 | incorrectly reject 9223372036854775807. */ | |
4866 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4867 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4868 | && LARGE_OFF_T % 2147483647 == 1) | |
4869 | ? 1 : -1]; | |
4870 | int | |
4871 | main () | |
4872 | { | |
4873 | ||
4874 | ; | |
4875 | return 0; | |
4876 | } | |
4877 | _ACEOF | |
4878 | if ac_fn_c_try_compile "$LINENO"; then : | |
4879 | break | |
4880 | fi | |
4881 | rm -f core conftest.err conftest.$ac_objext | |
4882 | CC="$CC -n32" | |
4883 | if ac_fn_c_try_compile "$LINENO"; then : | |
4884 | ac_cv_sys_largefile_CC=' -n32'; break | |
4885 | fi | |
4886 | rm -f core conftest.err conftest.$ac_objext | |
4887 | break | |
4888 | done | |
4889 | CC=$ac_save_CC | |
4890 | rm -f conftest.$ac_ext | |
4891 | fi | |
4892 | fi | |
4893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4894 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4895 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4896 | CC=$CC$ac_cv_sys_largefile_CC | |
4897 | fi | |
4898 | ||
4899 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4900 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4901 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
da2f07f1 JK |
4902 | $as_echo_n "(cached) " >&6 |
4903 | else | |
4904 | while :; do | |
4905 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4906 | /* end confdefs.h. */ | |
4907 | #include <sys/types.h> | |
4908 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4909 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4910 | since some C++ compilers masquerading as C compilers | |
4911 | incorrectly reject 9223372036854775807. */ | |
4912 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4913 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4914 | && LARGE_OFF_T % 2147483647 == 1) | |
4915 | ? 1 : -1]; | |
4916 | int | |
4917 | main () | |
4918 | { | |
4919 | ||
4920 | ; | |
4921 | return 0; | |
4922 | } | |
4923 | _ACEOF | |
4924 | if ac_fn_c_try_compile "$LINENO"; then : | |
4925 | ac_cv_sys_file_offset_bits=no; break | |
4926 | fi | |
4927 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4929 | /* end confdefs.h. */ | |
4930 | #define _FILE_OFFSET_BITS 64 | |
4931 | #include <sys/types.h> | |
4932 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4933 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4934 | since some C++ compilers masquerading as C compilers | |
4935 | incorrectly reject 9223372036854775807. */ | |
4936 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4937 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4938 | && LARGE_OFF_T % 2147483647 == 1) | |
4939 | ? 1 : -1]; | |
4940 | int | |
4941 | main () | |
4942 | { | |
4943 | ||
4944 | ; | |
4945 | return 0; | |
4946 | } | |
4947 | _ACEOF | |
4948 | if ac_fn_c_try_compile "$LINENO"; then : | |
4949 | ac_cv_sys_file_offset_bits=64; break | |
4950 | fi | |
4951 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4952 | ac_cv_sys_file_offset_bits=unknown | |
4953 | break | |
4954 | done | |
4955 | fi | |
4956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4957 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4958 | case $ac_cv_sys_file_offset_bits in #( | |
4959 | no | unknown) ;; | |
4960 | *) | |
4961 | cat >>confdefs.h <<_ACEOF | |
4962 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4963 | _ACEOF | |
4964 | ;; | |
4965 | esac | |
4966 | rm -rf conftest* | |
4967 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4969 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4970 | if ${ac_cv_sys_large_files+:} false; then : |
da2f07f1 JK |
4971 | $as_echo_n "(cached) " >&6 |
4972 | else | |
4973 | while :; do | |
4974 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4975 | /* end confdefs.h. */ | |
4976 | #include <sys/types.h> | |
4977 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4978 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4979 | since some C++ compilers masquerading as C compilers | |
4980 | incorrectly reject 9223372036854775807. */ | |
4981 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4982 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4983 | && LARGE_OFF_T % 2147483647 == 1) | |
4984 | ? 1 : -1]; | |
4985 | int | |
4986 | main () | |
4987 | { | |
4988 | ||
4989 | ; | |
4990 | return 0; | |
4991 | } | |
4992 | _ACEOF | |
4993 | if ac_fn_c_try_compile "$LINENO"; then : | |
4994 | ac_cv_sys_large_files=no; break | |
4995 | fi | |
4996 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4998 | /* end confdefs.h. */ | |
4999 | #define _LARGE_FILES 1 | |
5000 | #include <sys/types.h> | |
5001 | /* Check that off_t can represent 2**63 - 1 correctly. | |
5002 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
5003 | since some C++ compilers masquerading as C compilers | |
5004 | incorrectly reject 9223372036854775807. */ | |
5005 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5006 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5007 | && LARGE_OFF_T % 2147483647 == 1) | |
5008 | ? 1 : -1]; | |
5009 | int | |
5010 | main () | |
5011 | { | |
5012 | ||
5013 | ; | |
5014 | return 0; | |
5015 | } | |
5016 | _ACEOF | |
5017 | if ac_fn_c_try_compile "$LINENO"; then : | |
5018 | ac_cv_sys_large_files=1; break | |
5019 | fi | |
5020 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5021 | ac_cv_sys_large_files=unknown | |
5022 | break | |
5023 | done | |
5024 | fi | |
5025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
5026 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
5027 | case $ac_cv_sys_large_files in #( | |
5028 | no | unknown) ;; | |
5029 | *) | |
5030 | cat >>confdefs.h <<_ACEOF | |
5031 | #define _LARGE_FILES $ac_cv_sys_large_files | |
5032 | _ACEOF | |
5033 | ;; | |
5034 | esac | |
5035 | rm -rf conftest* | |
5036 | fi | |
d0ac1c44 SM |
5037 | |
5038 | ||
da2f07f1 JK |
5039 | fi |
5040 | ||
5041 | ||
d0ac1c44 SM |
5042 | # Expand $ac_aux_dir to an absolute path. |
5043 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4869db5e | 5044 | |
d0ac1c44 | 5045 | if test x"${install_sh+set}" != xset; then |
4869db5e RM |
5046 | case $am_aux_dir in |
5047 | *\ * | *\ *) | |
5048 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
5049 | *) | |
5050 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
5051 | esac | |
5052 | fi | |
5053 | ||
d0ac1c44 SM |
5054 | # Installed binaries are usually stripped using 'strip' when the user |
5055 | # run "make install-strip". However 'strip' might not be the right | |
4869db5e | 5056 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 5057 | # will honor the 'STRIP' environment variable to overrule this program. |
4869db5e RM |
5058 | if test "$cross_compiling" != no; then |
5059 | if test -n "$ac_tool_prefix"; then | |
5060 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
5061 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
5062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5063 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5064 | if ${ac_cv_prog_STRIP+:} false; then : |
4869db5e RM |
5065 | $as_echo_n "(cached) " >&6 |
5066 | else | |
5067 | if test -n "$STRIP"; then | |
5068 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
5069 | else | |
5070 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5071 | for as_dir in $PATH | |
5072 | do | |
5073 | IFS=$as_save_IFS | |
5074 | test -z "$as_dir" && as_dir=. | |
5075 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5076 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5077 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
5078 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5079 | break 2 | |
5080 | fi | |
5081 | done | |
5082 | done | |
5083 | IFS=$as_save_IFS | |
5084 | ||
5085 | fi | |
5086 | fi | |
5087 | STRIP=$ac_cv_prog_STRIP | |
5088 | if test -n "$STRIP"; then | |
5089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
5090 | $as_echo "$STRIP" >&6; } | |
5091 | else | |
5092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5093 | $as_echo "no" >&6; } | |
5094 | fi | |
5095 | ||
5096 | ||
5097 | fi | |
5098 | if test -z "$ac_cv_prog_STRIP"; then | |
5099 | ac_ct_STRIP=$STRIP | |
5100 | # Extract the first word of "strip", so it can be a program name with args. | |
5101 | set dummy strip; ac_word=$2 | |
5102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5103 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5104 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
4869db5e RM |
5105 | $as_echo_n "(cached) " >&6 |
5106 | else | |
5107 | if test -n "$ac_ct_STRIP"; then | |
5108 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
5109 | else | |
5110 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5111 | for as_dir in $PATH | |
5112 | do | |
5113 | IFS=$as_save_IFS | |
5114 | test -z "$as_dir" && as_dir=. | |
5115 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5116 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5117 | ac_cv_prog_ac_ct_STRIP="strip" |
5118 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5119 | break 2 | |
5120 | fi | |
5121 | done | |
5122 | done | |
5123 | IFS=$as_save_IFS | |
5124 | ||
5125 | fi | |
5126 | fi | |
5127 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
5128 | if test -n "$ac_ct_STRIP"; then | |
5129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
5130 | $as_echo "$ac_ct_STRIP" >&6; } | |
5131 | else | |
5132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5133 | $as_echo "no" >&6; } | |
5134 | fi | |
5135 | ||
5136 | if test "x$ac_ct_STRIP" = x; then | |
5137 | STRIP=":" | |
5138 | else | |
5139 | case $cross_compiling:$ac_tool_warned in | |
5140 | yes:) | |
5141 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5142 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5143 | ac_tool_warned=yes ;; | |
5144 | esac | |
5145 | STRIP=$ac_ct_STRIP | |
5146 | fi | |
5147 | else | |
5148 | STRIP="$ac_cv_prog_STRIP" | |
5149 | fi | |
5150 | ||
5151 | fi | |
5152 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
5153 | ||
783e057b DJ |
5154 | |
5155 | ac_aux_dir= | |
81ecdfbb | 5156 | for ac_dir in .. "$srcdir"/..; do |
d0ac1c44 SM |
5157 | if test -f "$ac_dir/install-sh"; then |
5158 | ac_aux_dir=$ac_dir | |
5159 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5160 | break | |
5161 | elif test -f "$ac_dir/install.sh"; then | |
5162 | ac_aux_dir=$ac_dir | |
5163 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
5164 | break | |
5165 | elif test -f "$ac_dir/shtool"; then | |
5166 | ac_aux_dir=$ac_dir | |
5167 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5168 | break | |
5169 | fi | |
783e057b DJ |
5170 | done |
5171 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 5172 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 5173 | fi |
81ecdfbb RW |
5174 | |
5175 | # These three variables are undocumented and unsupported, | |
5176 | # and are intended to be withdrawn in a future Autoconf release. | |
5177 | # They can cause serious problems if a builder's source tree is in a directory | |
5178 | # whose full name contains unusual characters. | |
5179 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5180 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5181 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5182 | ||
783e057b | 5183 | |
783e057b | 5184 | |
91e1a0ed SM |
5185 | # Set build, build_cpu, build_vendor and build_os. |
5186 | ||
5187 | ||
5188 | # Set host, host_cpu, host_vendor, and host_os. | |
5189 | ||
5190 | ||
5191 | # Set target, target_cpu, target_vendor, and target_os. | |
5192 | ||
5193 | ||
b316465f TT |
5194 | case ${build_alias} in |
5195 | "") build_noncanonical=${build} ;; | |
5196 | *) build_noncanonical=${build_alias} ;; | |
5197 | esac | |
5198 | ||
5199 | case ${host_alias} in | |
5200 | "") host_noncanonical=${build_noncanonical} ;; | |
5201 | *) host_noncanonical=${host_alias} ;; | |
5202 | esac | |
5203 | ||
5204 | case ${target_alias} in | |
5205 | "") target_noncanonical=${host_noncanonical} ;; | |
5206 | *) target_noncanonical=${target_alias} ;; | |
5207 | esac | |
5208 | ||
5209 | ||
5210 | ||
5211 | ||
9009e1ae MR |
5212 | test "$program_prefix" != NONE && |
5213 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
5214 | # Use a double $ so make ignores it. | |
5215 | test "$program_suffix" != NONE && | |
5216 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
5217 | # Double any \ or $. | |
5218 | # By default was `s,x,x', remove it if useless. | |
5219 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
5220 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
5221 | ||
81ecdfbb | 5222 | |
0bcda685 PA |
5223 | # We require a C++11 compiler. Check if one is available, and if |
5224 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5225 | ||
41260ac2 | 5226 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
5227 | ac_ext=cpp |
5228 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5229 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5230 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5231 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5232 | CXX_DIALECT="" | |
5233 | ac_success=no | |
5234 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5235 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5236 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5237 | $as_echo_n "(cached) " >&6 |
5238 | else | |
5239 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5240 | /* end confdefs.h. */ | |
5241 | ||
5242 | ||
5243 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5244 | // Hopefully, this will speed up the test. | |
5245 | ||
5246 | #ifndef __cplusplus | |
5247 | ||
5248 | #error "This is not a C++ compiler" | |
5249 | ||
5250 | #elif __cplusplus < 201103L | |
5251 | ||
5252 | #error "This is not a C++11 compiler" | |
5253 | ||
5254 | #else | |
5255 | ||
5256 | namespace cxx11 | |
5257 | { | |
5258 | ||
5259 | namespace test_static_assert | |
5260 | { | |
5261 | ||
5262 | template <typename T> | |
5263 | struct check | |
5264 | { | |
5265 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5266 | }; | |
5267 | ||
5268 | } | |
5269 | ||
5270 | namespace test_final_override | |
5271 | { | |
5272 | ||
5273 | struct Base | |
5274 | { | |
5275 | virtual void f() {} | |
5276 | }; | |
5277 | ||
5278 | struct Derived : public Base | |
5279 | { | |
5280 | virtual void f() override {} | |
5281 | }; | |
5282 | ||
5283 | } | |
5284 | ||
5285 | namespace test_double_right_angle_brackets | |
5286 | { | |
5287 | ||
5288 | template < typename T > | |
5289 | struct check {}; | |
5290 | ||
5291 | typedef check<void> single_type; | |
5292 | typedef check<check<void>> double_type; | |
5293 | typedef check<check<check<void>>> triple_type; | |
5294 | typedef check<check<check<check<void>>>> quadruple_type; | |
5295 | ||
5296 | } | |
5297 | ||
5298 | namespace test_decltype | |
5299 | { | |
5300 | ||
5301 | int | |
5302 | f() | |
5303 | { | |
5304 | int a = 1; | |
5305 | decltype(a) b = 2; | |
5306 | return a + b; | |
5307 | } | |
5308 | ||
5309 | } | |
5310 | ||
5311 | namespace test_type_deduction | |
5312 | { | |
5313 | ||
5314 | template < typename T1, typename T2 > | |
5315 | struct is_same | |
5316 | { | |
5317 | static const bool value = false; | |
5318 | }; | |
5319 | ||
5320 | template < typename T > | |
5321 | struct is_same<T, T> | |
5322 | { | |
5323 | static const bool value = true; | |
5324 | }; | |
5325 | ||
5326 | template < typename T1, typename T2 > | |
5327 | auto | |
5328 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5329 | { | |
5330 | return a1 + a2; | |
5331 | } | |
5332 | ||
5333 | int | |
5334 | test(const int c, volatile int v) | |
5335 | { | |
5336 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5337 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5338 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5339 | auto ac = c; | |
5340 | auto av = v; | |
5341 | auto sumi = ac + av + 'x'; | |
5342 | auto sumf = ac + av + 1.0; | |
5343 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5344 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5345 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5346 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5347 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5348 | return (sumf > 0.0) ? sumi : add(c, v); | |
5349 | } | |
5350 | ||
5351 | } | |
5352 | ||
5353 | namespace test_noexcept | |
5354 | { | |
5355 | ||
5356 | int f() { return 0; } | |
5357 | int g() noexcept { return 0; } | |
5358 | ||
5359 | static_assert(noexcept(f()) == false, ""); | |
5360 | static_assert(noexcept(g()) == true, ""); | |
5361 | ||
5362 | } | |
5363 | ||
5364 | namespace test_constexpr | |
5365 | { | |
5366 | ||
5367 | template < typename CharT > | |
5368 | unsigned long constexpr | |
5369 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5370 | { | |
5371 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5372 | } | |
5373 | ||
5374 | template < typename CharT > | |
5375 | unsigned long constexpr | |
5376 | strlen_c(const CharT *const s) noexcept | |
5377 | { | |
5378 | return strlen_c_r(s, 0UL); | |
5379 | } | |
5380 | ||
5381 | static_assert(strlen_c("") == 0UL, ""); | |
5382 | static_assert(strlen_c("1") == 1UL, ""); | |
5383 | static_assert(strlen_c("example") == 7UL, ""); | |
5384 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5385 | ||
5386 | } | |
5387 | ||
5388 | namespace test_rvalue_references | |
5389 | { | |
5390 | ||
5391 | template < int N > | |
5392 | struct answer | |
5393 | { | |
5394 | static constexpr int value = N; | |
5395 | }; | |
5396 | ||
5397 | answer<1> f(int&) { return answer<1>(); } | |
5398 | answer<2> f(const int&) { return answer<2>(); } | |
5399 | answer<3> f(int&&) { return answer<3>(); } | |
5400 | ||
5401 | void | |
5402 | test() | |
5403 | { | |
5404 | int i = 0; | |
5405 | const int c = 0; | |
5406 | static_assert(decltype(f(i))::value == 1, ""); | |
5407 | static_assert(decltype(f(c))::value == 2, ""); | |
5408 | static_assert(decltype(f(0))::value == 3, ""); | |
5409 | } | |
5410 | ||
5411 | } | |
5412 | ||
5413 | namespace test_uniform_initialization | |
5414 | { | |
5415 | ||
5416 | struct test | |
5417 | { | |
5418 | static const int zero {}; | |
5419 | static const int one {1}; | |
5420 | }; | |
5421 | ||
5422 | static_assert(test::zero == 0, ""); | |
5423 | static_assert(test::one == 1, ""); | |
5424 | ||
5425 | } | |
5426 | ||
5427 | namespace test_lambdas | |
5428 | { | |
5429 | ||
5430 | void | |
5431 | test1() | |
5432 | { | |
5433 | auto lambda1 = [](){}; | |
5434 | auto lambda2 = lambda1; | |
5435 | lambda1(); | |
5436 | lambda2(); | |
5437 | } | |
5438 | ||
5439 | int | |
5440 | test2() | |
5441 | { | |
5442 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5443 | auto b = []() -> int { return '0'; }(); | |
5444 | auto c = [=](){ return a + b; }(); | |
5445 | auto d = [&](){ return c; }(); | |
5446 | auto e = [a, &b](int x) mutable { | |
5447 | const auto identity = [](int y){ return y; }; | |
5448 | for (auto i = 0; i < a; ++i) | |
5449 | a += b--; | |
5450 | return x + identity(a + b); | |
5451 | }(0); | |
5452 | return a + b + c + d + e; | |
5453 | } | |
5454 | ||
5455 | int | |
5456 | test3() | |
5457 | { | |
5458 | const auto nullary = [](){ return 0; }; | |
5459 | const auto unary = [](int x){ return x; }; | |
5460 | using nullary_t = decltype(nullary); | |
5461 | using unary_t = decltype(unary); | |
5462 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5463 | const auto higher2nd = [unary](nullary_t f1){ | |
5464 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5465 | }; | |
5466 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5467 | } | |
5468 | ||
5469 | } | |
5470 | ||
5471 | namespace test_variadic_templates | |
5472 | { | |
5473 | ||
5474 | template <int...> | |
5475 | struct sum; | |
5476 | ||
5477 | template <int N0, int... N1toN> | |
5478 | struct sum<N0, N1toN...> | |
5479 | { | |
5480 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5481 | }; | |
5482 | ||
5483 | template <> | |
5484 | struct sum<> | |
5485 | { | |
5486 | static constexpr auto value = 0; | |
5487 | }; | |
5488 | ||
5489 | static_assert(sum<>::value == 0, ""); | |
5490 | static_assert(sum<1>::value == 1, ""); | |
5491 | static_assert(sum<23>::value == 23, ""); | |
5492 | static_assert(sum<1, 2>::value == 3, ""); | |
5493 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5494 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5495 | ||
5496 | } | |
5497 | ||
5498 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5499 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5500 | // because of this. | |
5501 | namespace test_template_alias_sfinae | |
5502 | { | |
5503 | ||
5504 | struct foo {}; | |
5505 | ||
5506 | template<typename T> | |
5507 | using member = typename T::member_type; | |
5508 | ||
5509 | template<typename T> | |
5510 | void func(...) {} | |
5511 | ||
5512 | template<typename T> | |
5513 | void func(member<T>*) {} | |
5514 | ||
5515 | void test(); | |
5516 | ||
5517 | void test() { func<foo>(0); } | |
5518 | ||
5519 | } | |
5520 | ||
5521 | } // namespace cxx11 | |
5522 | ||
5523 | #endif // __cplusplus >= 201103L | |
5524 | ||
5525 | ||
5526 | ||
5527 | _ACEOF | |
5528 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5529 | ax_cv_cxx_compile_cxx11=yes | |
5530 | else | |
5531 | ax_cv_cxx_compile_cxx11=no | |
5532 | fi | |
5533 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5534 | fi | |
5535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5536 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5537 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5538 | ac_success=yes | |
5539 | fi | |
5540 | ||
5541 | if test x$ac_success = xno; then | |
41260ac2 SM |
5542 | for alternative in ${ax_cxx_compile_alternatives}; do |
5543 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5544 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5546 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5547 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5548 | $as_echo_n "(cached) " >&6 |
5549 | else | |
5550 | ac_save_CXX="$CXX" | |
5551 | CXX="$CXX $switch" | |
5552 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5553 | /* end confdefs.h. */ | |
5554 | ||
5555 | ||
5556 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5557 | // Hopefully, this will speed up the test. | |
5558 | ||
5559 | #ifndef __cplusplus | |
5560 | ||
5561 | #error "This is not a C++ compiler" | |
5562 | ||
5563 | #elif __cplusplus < 201103L | |
5564 | ||
5565 | #error "This is not a C++11 compiler" | |
5566 | ||
5567 | #else | |
5568 | ||
5569 | namespace cxx11 | |
5570 | { | |
5571 | ||
5572 | namespace test_static_assert | |
5573 | { | |
5574 | ||
5575 | template <typename T> | |
5576 | struct check | |
5577 | { | |
5578 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5579 | }; | |
5580 | ||
5581 | } | |
5582 | ||
5583 | namespace test_final_override | |
5584 | { | |
5585 | ||
5586 | struct Base | |
5587 | { | |
5588 | virtual void f() {} | |
5589 | }; | |
5590 | ||
5591 | struct Derived : public Base | |
5592 | { | |
5593 | virtual void f() override {} | |
5594 | }; | |
5595 | ||
5596 | } | |
5597 | ||
5598 | namespace test_double_right_angle_brackets | |
5599 | { | |
5600 | ||
5601 | template < typename T > | |
5602 | struct check {}; | |
5603 | ||
5604 | typedef check<void> single_type; | |
5605 | typedef check<check<void>> double_type; | |
5606 | typedef check<check<check<void>>> triple_type; | |
5607 | typedef check<check<check<check<void>>>> quadruple_type; | |
5608 | ||
5609 | } | |
5610 | ||
5611 | namespace test_decltype | |
5612 | { | |
5613 | ||
5614 | int | |
5615 | f() | |
5616 | { | |
5617 | int a = 1; | |
5618 | decltype(a) b = 2; | |
5619 | return a + b; | |
5620 | } | |
5621 | ||
5622 | } | |
5623 | ||
5624 | namespace test_type_deduction | |
5625 | { | |
5626 | ||
5627 | template < typename T1, typename T2 > | |
5628 | struct is_same | |
5629 | { | |
5630 | static const bool value = false; | |
5631 | }; | |
5632 | ||
5633 | template < typename T > | |
5634 | struct is_same<T, T> | |
5635 | { | |
5636 | static const bool value = true; | |
5637 | }; | |
5638 | ||
5639 | template < typename T1, typename T2 > | |
5640 | auto | |
5641 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5642 | { | |
5643 | return a1 + a2; | |
5644 | } | |
5645 | ||
5646 | int | |
5647 | test(const int c, volatile int v) | |
5648 | { | |
5649 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5650 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5651 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5652 | auto ac = c; | |
5653 | auto av = v; | |
5654 | auto sumi = ac + av + 'x'; | |
5655 | auto sumf = ac + av + 1.0; | |
5656 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5657 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5658 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5659 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5660 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5661 | return (sumf > 0.0) ? sumi : add(c, v); | |
5662 | } | |
5663 | ||
5664 | } | |
5665 | ||
5666 | namespace test_noexcept | |
5667 | { | |
5668 | ||
5669 | int f() { return 0; } | |
5670 | int g() noexcept { return 0; } | |
5671 | ||
5672 | static_assert(noexcept(f()) == false, ""); | |
5673 | static_assert(noexcept(g()) == true, ""); | |
5674 | ||
5675 | } | |
5676 | ||
5677 | namespace test_constexpr | |
5678 | { | |
5679 | ||
5680 | template < typename CharT > | |
5681 | unsigned long constexpr | |
5682 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5683 | { | |
5684 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5685 | } | |
5686 | ||
5687 | template < typename CharT > | |
5688 | unsigned long constexpr | |
5689 | strlen_c(const CharT *const s) noexcept | |
5690 | { | |
5691 | return strlen_c_r(s, 0UL); | |
5692 | } | |
5693 | ||
5694 | static_assert(strlen_c("") == 0UL, ""); | |
5695 | static_assert(strlen_c("1") == 1UL, ""); | |
5696 | static_assert(strlen_c("example") == 7UL, ""); | |
5697 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5698 | ||
5699 | } | |
5700 | ||
5701 | namespace test_rvalue_references | |
5702 | { | |
5703 | ||
5704 | template < int N > | |
5705 | struct answer | |
5706 | { | |
5707 | static constexpr int value = N; | |
5708 | }; | |
5709 | ||
5710 | answer<1> f(int&) { return answer<1>(); } | |
5711 | answer<2> f(const int&) { return answer<2>(); } | |
5712 | answer<3> f(int&&) { return answer<3>(); } | |
5713 | ||
5714 | void | |
5715 | test() | |
5716 | { | |
5717 | int i = 0; | |
5718 | const int c = 0; | |
5719 | static_assert(decltype(f(i))::value == 1, ""); | |
5720 | static_assert(decltype(f(c))::value == 2, ""); | |
5721 | static_assert(decltype(f(0))::value == 3, ""); | |
5722 | } | |
5723 | ||
5724 | } | |
5725 | ||
5726 | namespace test_uniform_initialization | |
5727 | { | |
5728 | ||
5729 | struct test | |
5730 | { | |
5731 | static const int zero {}; | |
5732 | static const int one {1}; | |
5733 | }; | |
5734 | ||
5735 | static_assert(test::zero == 0, ""); | |
5736 | static_assert(test::one == 1, ""); | |
5737 | ||
5738 | } | |
5739 | ||
5740 | namespace test_lambdas | |
5741 | { | |
5742 | ||
5743 | void | |
5744 | test1() | |
5745 | { | |
5746 | auto lambda1 = [](){}; | |
5747 | auto lambda2 = lambda1; | |
5748 | lambda1(); | |
5749 | lambda2(); | |
5750 | } | |
5751 | ||
5752 | int | |
5753 | test2() | |
5754 | { | |
5755 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5756 | auto b = []() -> int { return '0'; }(); | |
5757 | auto c = [=](){ return a + b; }(); | |
5758 | auto d = [&](){ return c; }(); | |
5759 | auto e = [a, &b](int x) mutable { | |
5760 | const auto identity = [](int y){ return y; }; | |
5761 | for (auto i = 0; i < a; ++i) | |
5762 | a += b--; | |
5763 | return x + identity(a + b); | |
5764 | }(0); | |
5765 | return a + b + c + d + e; | |
5766 | } | |
5767 | ||
5768 | int | |
5769 | test3() | |
5770 | { | |
5771 | const auto nullary = [](){ return 0; }; | |
5772 | const auto unary = [](int x){ return x; }; | |
5773 | using nullary_t = decltype(nullary); | |
5774 | using unary_t = decltype(unary); | |
5775 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5776 | const auto higher2nd = [unary](nullary_t f1){ | |
5777 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5778 | }; | |
5779 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5780 | } | |
5781 | ||
5782 | } | |
5783 | ||
5784 | namespace test_variadic_templates | |
5785 | { | |
5786 | ||
5787 | template <int...> | |
5788 | struct sum; | |
5789 | ||
5790 | template <int N0, int... N1toN> | |
5791 | struct sum<N0, N1toN...> | |
5792 | { | |
5793 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5794 | }; | |
5795 | ||
5796 | template <> | |
5797 | struct sum<> | |
5798 | { | |
5799 | static constexpr auto value = 0; | |
5800 | }; | |
5801 | ||
5802 | static_assert(sum<>::value == 0, ""); | |
5803 | static_assert(sum<1>::value == 1, ""); | |
5804 | static_assert(sum<23>::value == 23, ""); | |
5805 | static_assert(sum<1, 2>::value == 3, ""); | |
5806 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5807 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5808 | ||
5809 | } | |
5810 | ||
5811 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5812 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5813 | // because of this. | |
5814 | namespace test_template_alias_sfinae | |
5815 | { | |
5816 | ||
5817 | struct foo {}; | |
5818 | ||
5819 | template<typename T> | |
5820 | using member = typename T::member_type; | |
5821 | ||
5822 | template<typename T> | |
5823 | void func(...) {} | |
5824 | ||
5825 | template<typename T> | |
5826 | void func(member<T>*) {} | |
5827 | ||
5828 | void test(); | |
5829 | ||
5830 | void test() { func<foo>(0); } | |
5831 | ||
5832 | } | |
5833 | ||
5834 | } // namespace cxx11 | |
5835 | ||
5836 | #endif // __cplusplus >= 201103L | |
5837 | ||
5838 | ||
5839 | ||
5840 | _ACEOF | |
5841 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5842 | eval $cachevar=yes | |
5843 | else | |
5844 | eval $cachevar=no | |
5845 | fi | |
5846 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5847 | CXX="$ac_save_CXX" | |
5848 | fi | |
5849 | eval ac_res=\$$cachevar | |
5850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5851 | $as_echo "$ac_res" >&6; } | |
5852 | if eval test x\$$cachevar = xyes; then | |
5853 | CXX_DIALECT="$switch" | |
77252bf2 TV |
5854 | CXX="$CXX $switch" |
5855 | if test -n "$CXXCPP" ; then | |
5856 | CXXCPP="$CXXCPP $switch" | |
5857 | fi | |
0bcda685 PA |
5858 | ac_success=yes |
5859 | break | |
5860 | fi | |
5861 | done | |
5862 | fi | |
5863 | ||
5864 | if test x$ac_success = xno; then | |
41260ac2 SM |
5865 | for alternative in ${ax_cxx_compile_alternatives}; do |
5866 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5867 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5868 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5869 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5870 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5871 | $as_echo_n "(cached) " >&6 |
5872 | else | |
5873 | ac_save_CXX="$CXX" | |
41260ac2 SM |
5874 | CXX="$CXX $switch" |
5875 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5876 | /* end confdefs.h. */ |
5877 | ||
5878 | ||
5879 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5880 | // Hopefully, this will speed up the test. | |
5881 | ||
5882 | #ifndef __cplusplus | |
5883 | ||
5884 | #error "This is not a C++ compiler" | |
5885 | ||
5886 | #elif __cplusplus < 201103L | |
5887 | ||
5888 | #error "This is not a C++11 compiler" | |
5889 | ||
5890 | #else | |
5891 | ||
5892 | namespace cxx11 | |
5893 | { | |
5894 | ||
5895 | namespace test_static_assert | |
5896 | { | |
5897 | ||
5898 | template <typename T> | |
5899 | struct check | |
5900 | { | |
5901 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5902 | }; | |
5903 | ||
5904 | } | |
5905 | ||
5906 | namespace test_final_override | |
5907 | { | |
5908 | ||
5909 | struct Base | |
5910 | { | |
5911 | virtual void f() {} | |
5912 | }; | |
5913 | ||
5914 | struct Derived : public Base | |
5915 | { | |
5916 | virtual void f() override {} | |
5917 | }; | |
5918 | ||
5919 | } | |
5920 | ||
5921 | namespace test_double_right_angle_brackets | |
5922 | { | |
5923 | ||
5924 | template < typename T > | |
5925 | struct check {}; | |
5926 | ||
5927 | typedef check<void> single_type; | |
5928 | typedef check<check<void>> double_type; | |
5929 | typedef check<check<check<void>>> triple_type; | |
5930 | typedef check<check<check<check<void>>>> quadruple_type; | |
5931 | ||
5932 | } | |
5933 | ||
5934 | namespace test_decltype | |
5935 | { | |
5936 | ||
5937 | int | |
5938 | f() | |
5939 | { | |
5940 | int a = 1; | |
5941 | decltype(a) b = 2; | |
5942 | return a + b; | |
5943 | } | |
5944 | ||
5945 | } | |
5946 | ||
5947 | namespace test_type_deduction | |
5948 | { | |
5949 | ||
5950 | template < typename T1, typename T2 > | |
5951 | struct is_same | |
5952 | { | |
5953 | static const bool value = false; | |
5954 | }; | |
5955 | ||
5956 | template < typename T > | |
5957 | struct is_same<T, T> | |
5958 | { | |
5959 | static const bool value = true; | |
5960 | }; | |
5961 | ||
5962 | template < typename T1, typename T2 > | |
5963 | auto | |
5964 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5965 | { | |
5966 | return a1 + a2; | |
5967 | } | |
5968 | ||
5969 | int | |
5970 | test(const int c, volatile int v) | |
5971 | { | |
5972 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5973 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5974 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5975 | auto ac = c; | |
5976 | auto av = v; | |
5977 | auto sumi = ac + av + 'x'; | |
5978 | auto sumf = ac + av + 1.0; | |
5979 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5980 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5981 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5982 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5983 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5984 | return (sumf > 0.0) ? sumi : add(c, v); | |
5985 | } | |
5986 | ||
5987 | } | |
5988 | ||
5989 | namespace test_noexcept | |
5990 | { | |
5991 | ||
5992 | int f() { return 0; } | |
5993 | int g() noexcept { return 0; } | |
5994 | ||
5995 | static_assert(noexcept(f()) == false, ""); | |
5996 | static_assert(noexcept(g()) == true, ""); | |
5997 | ||
5998 | } | |
5999 | ||
6000 | namespace test_constexpr | |
6001 | { | |
6002 | ||
6003 | template < typename CharT > | |
6004 | unsigned long constexpr | |
6005 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
6006 | { | |
6007 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
6008 | } | |
6009 | ||
6010 | template < typename CharT > | |
6011 | unsigned long constexpr | |
6012 | strlen_c(const CharT *const s) noexcept | |
6013 | { | |
6014 | return strlen_c_r(s, 0UL); | |
6015 | } | |
6016 | ||
6017 | static_assert(strlen_c("") == 0UL, ""); | |
6018 | static_assert(strlen_c("1") == 1UL, ""); | |
6019 | static_assert(strlen_c("example") == 7UL, ""); | |
6020 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
6021 | ||
6022 | } | |
6023 | ||
6024 | namespace test_rvalue_references | |
6025 | { | |
6026 | ||
6027 | template < int N > | |
6028 | struct answer | |
6029 | { | |
6030 | static constexpr int value = N; | |
6031 | }; | |
6032 | ||
6033 | answer<1> f(int&) { return answer<1>(); } | |
6034 | answer<2> f(const int&) { return answer<2>(); } | |
6035 | answer<3> f(int&&) { return answer<3>(); } | |
6036 | ||
6037 | void | |
6038 | test() | |
6039 | { | |
6040 | int i = 0; | |
6041 | const int c = 0; | |
6042 | static_assert(decltype(f(i))::value == 1, ""); | |
6043 | static_assert(decltype(f(c))::value == 2, ""); | |
6044 | static_assert(decltype(f(0))::value == 3, ""); | |
6045 | } | |
6046 | ||
6047 | } | |
6048 | ||
6049 | namespace test_uniform_initialization | |
6050 | { | |
6051 | ||
6052 | struct test | |
6053 | { | |
6054 | static const int zero {}; | |
6055 | static const int one {1}; | |
6056 | }; | |
6057 | ||
6058 | static_assert(test::zero == 0, ""); | |
6059 | static_assert(test::one == 1, ""); | |
6060 | ||
6061 | } | |
6062 | ||
6063 | namespace test_lambdas | |
6064 | { | |
6065 | ||
6066 | void | |
6067 | test1() | |
6068 | { | |
6069 | auto lambda1 = [](){}; | |
6070 | auto lambda2 = lambda1; | |
6071 | lambda1(); | |
6072 | lambda2(); | |
6073 | } | |
6074 | ||
6075 | int | |
6076 | test2() | |
6077 | { | |
6078 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6079 | auto b = []() -> int { return '0'; }(); | |
6080 | auto c = [=](){ return a + b; }(); | |
6081 | auto d = [&](){ return c; }(); | |
6082 | auto e = [a, &b](int x) mutable { | |
6083 | const auto identity = [](int y){ return y; }; | |
6084 | for (auto i = 0; i < a; ++i) | |
6085 | a += b--; | |
6086 | return x + identity(a + b); | |
6087 | }(0); | |
6088 | return a + b + c + d + e; | |
6089 | } | |
6090 | ||
6091 | int | |
6092 | test3() | |
6093 | { | |
6094 | const auto nullary = [](){ return 0; }; | |
6095 | const auto unary = [](int x){ return x; }; | |
6096 | using nullary_t = decltype(nullary); | |
6097 | using unary_t = decltype(unary); | |
6098 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6099 | const auto higher2nd = [unary](nullary_t f1){ | |
6100 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6101 | }; | |
6102 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6103 | } | |
6104 | ||
6105 | } | |
6106 | ||
6107 | namespace test_variadic_templates | |
6108 | { | |
6109 | ||
6110 | template <int...> | |
6111 | struct sum; | |
6112 | ||
6113 | template <int N0, int... N1toN> | |
6114 | struct sum<N0, N1toN...> | |
6115 | { | |
6116 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6117 | }; | |
6118 | ||
6119 | template <> | |
6120 | struct sum<> | |
6121 | { | |
6122 | static constexpr auto value = 0; | |
6123 | }; | |
6124 | ||
6125 | static_assert(sum<>::value == 0, ""); | |
6126 | static_assert(sum<1>::value == 1, ""); | |
6127 | static_assert(sum<23>::value == 23, ""); | |
6128 | static_assert(sum<1, 2>::value == 3, ""); | |
6129 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6130 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6131 | ||
6132 | } | |
6133 | ||
6134 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6135 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6136 | // because of this. | |
6137 | namespace test_template_alias_sfinae | |
6138 | { | |
6139 | ||
6140 | struct foo {}; | |
6141 | ||
6142 | template<typename T> | |
6143 | using member = typename T::member_type; | |
6144 | ||
6145 | template<typename T> | |
6146 | void func(...) {} | |
6147 | ||
6148 | template<typename T> | |
6149 | void func(member<T>*) {} | |
6150 | ||
6151 | void test(); | |
6152 | ||
6153 | void test() { func<foo>(0); } | |
6154 | ||
6155 | } | |
6156 | ||
6157 | } // namespace cxx11 | |
6158 | ||
6159 | #endif // __cplusplus >= 201103L | |
6160 | ||
6161 | ||
6162 | ||
6163 | _ACEOF | |
6164 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6165 | eval $cachevar=yes | |
6166 | else | |
6167 | eval $cachevar=no | |
6168 | fi | |
6169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
41260ac2 | 6170 | CXX="$ac_save_CXX" |
0bcda685 PA |
6171 | fi |
6172 | eval ac_res=\$$cachevar | |
6173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6174 | $as_echo "$ac_res" >&6; } | |
41260ac2 SM |
6175 | if eval test x\$$cachevar = xyes; then |
6176 | CXX_DIALECT="$switch" | |
77252bf2 TV |
6177 | CXX="$CXX $switch" |
6178 | if test -n "$CXXCPP" ; then | |
6179 | CXXCPP="$CXXCPP $switch" | |
6180 | fi | |
41260ac2 SM |
6181 | ac_success=yes |
6182 | break | |
6183 | fi | |
6184 | done | |
6185 | if test x$ac_success = xyes; then | |
0bcda685 PA |
6186 | break |
6187 | fi | |
6188 | done | |
6189 | fi | |
6190 | ac_ext=c | |
6191 | ac_cpp='$CPP $CPPFLAGS' | |
6192 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6193 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6194 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6195 | ||
6196 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
6197 | if test x$ac_success = xno; then | |
d0ac1c44 | 6198 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
6199 | fi |
6200 | fi | |
6201 | if test x$ac_success = xno; then | |
6202 | HAVE_CXX11=0 | |
6203 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
6204 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
6205 | else | |
6206 | HAVE_CXX11=1 | |
6207 | ||
6208 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
6209 | ||
6210 | fi | |
6211 | ||
6212 | ||
6213 | ||
6214 | ||
a417dc56 RW |
6215 | # Dependency checking. |
6216 | rm -rf .tst 2>/dev/null | |
6217 | mkdir .tst 2>/dev/null | |
6218 | if test -d .tst; then | |
6219 | am__leading_dot=. | |
6220 | else | |
6221 | am__leading_dot=_ | |
6222 | fi | |
6223 | rmdir .tst 2>/dev/null | |
6224 | ||
6225 | DEPDIR="${am__leading_dot}deps" | |
6226 | ||
81ecdfbb | 6227 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
6228 | |
6229 | ||
6230 | depcc="$CC" am_compiler_list= | |
6231 | ||
6232 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
6233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
6234 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 6235 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
81ecdfbb | 6236 | $as_echo_n "(cached) " >&6 |
a417dc56 RW |
6237 | else |
6238 | if test -f "$am_depcomp"; then | |
6239 | # We make a subdir and do the tests there. Otherwise we can end up | |
6240 | # making bogus files that we don't know about and never remove. For | |
6241 | # instance it was reported that on HP-UX the gcc test will end up | |
6242 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6243 | # in D'. | |
6244 | mkdir conftest.dir | |
6245 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6246 | # using a relative directory. | |
6247 | cp "$am_depcomp" conftest.dir | |
6248 | cd conftest.dir | |
6249 | # We will build objects and dependencies in a subdirectory because | |
6250 | # it helps to detect inapplicable dependency modes. For instance | |
6251 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6252 | # side effect of compilation, but ICC will put the dependencies in | |
6253 | # the current directory while Tru64 will put them in the object | |
6254 | # directory. | |
6255 | mkdir sub | |
6256 | ||
6257 | am_cv_CC_dependencies_compiler_type=none | |
6258 | if test "$am_compiler_list" = ""; then | |
6259 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6260 | fi | |
6261 | for depmode in $am_compiler_list; do | |
6262 | if test $depmode = none; then break; fi | |
6263 | ||
81ecdfbb | 6264 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
6265 | # Setup a source with many dependencies, because some compilers |
6266 | # like to wrap large dependency lists on column 80 (with \), and | |
6267 | # we should not choose a depcomp mode which is confused by this. | |
6268 | # | |
6269 | # We need to recreate these files for each test, as the compiler may | |
6270 | # overwrite some of them when testing with obscure command lines. | |
6271 | # This happens at least with the AIX C compiler. | |
6272 | : > sub/conftest.c | |
6273 | for i in 1 2 3 4 5 6; do | |
6274 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6275 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6276 | # Solaris 8's {/usr,}/bin/sh. | |
6277 | touch sub/conftst$i.h | |
6278 | done | |
6279 | echo "include sub/conftest.Po" > confmf | |
6280 | ||
6281 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6282 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6283 | # handle `-M -o', and we need to detect this. | |
6284 | depcmd="depmode=$depmode \ | |
6285 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6286 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6287 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6288 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6289 | if env $depcmd > conftest.err 2>&1 && | |
6290 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6291 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6292 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6293 | # icc doesn't choke on unknown options, it will just issue warnings | |
6294 | # or remarks (even with -Werror). So we grep stderr for any message | |
6295 | # that says an option was ignored or not supported. | |
6296 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6297 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6298 | # The diagnosis changed in icc 8.0: | |
6299 | # icc: Command line remark: option '-MP' not supported | |
6300 | if (grep 'ignoring option' conftest.err || | |
6301 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6302 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6303 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6304 | break |
6305 | fi | |
6306 | fi | |
81ecdfbb | 6307 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6308 | sed -e 's/^/| /' < conftest.err >&5 |
6309 | done | |
6310 | ||
6311 | cd .. | |
6312 | rm -rf conftest.dir | |
6313 | else | |
6314 | am_cv_CC_dependencies_compiler_type=none | |
6315 | fi | |
6316 | ||
6317 | fi | |
81ecdfbb RW |
6318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6319 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6320 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
d0ac1c44 | 6321 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6322 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6323 | ||
6324 | fi | |
6325 | ||
6326 | ||
c971b7fa PA |
6327 | |
6328 | CONFIG_OBS= | |
6329 | CONFIG_DEPS= | |
6330 | CONFIG_SRCS= | |
6331 | ENABLE_CFLAGS= | |
6332 | ||
6333 | CONFIG_ALL= | |
6334 | CONFIG_CLEAN= | |
6335 | CONFIG_INSTALL= | |
6336 | CONFIG_UNINSTALL= | |
6337 | ||
6338 | # If we haven't got the data from the intl directory, | |
6339 | # assume NLS is disabled. | |
6340 | USE_NLS=no | |
6341 | LIBINTL= | |
6342 | LIBINTL_DEP= | |
6343 | INCINTL= | |
6344 | XGETTEXT= | |
6345 | GMSGFMT= | |
6346 | POSUB= | |
783e057b DJ |
6347 | |
6348 | if test -f ../intl/config.intl; then | |
6349 | . ../intl/config.intl | |
6350 | fi | |
81ecdfbb RW |
6351 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6352 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6353 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6355 | $as_echo "no" >&6; } | |
783e057b | 6356 | else |
81ecdfbb RW |
6357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6358 | $as_echo "yes" >&6; } | |
783e057b | 6359 | |
81ecdfbb | 6360 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6361 | |
6362 | ||
81ecdfbb RW |
6363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6364 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6365 | # Look for .po and .gmo files in the source directory. |
6366 | CATALOGS= | |
6367 | XLINGUAS= | |
6368 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6369 | # If there aren't any .gmo files the shell will give us the | |
6370 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6371 | # weeded out. | |
6372 | case "$cat" in *\**) | |
6373 | continue;; | |
6374 | esac | |
6375 | # The quadruple backslash is collapsed to a double backslash | |
6376 | # by the backticks, then collapsed again by the double quotes, | |
6377 | # leaving us with one backslash in the sed expression (right | |
6378 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6379 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6380 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6381 | # The user is allowed to set LINGUAS to a list of languages to | |
6382 | # install catalogs for. If it's empty that means "all of them." | |
6383 | if test "x$LINGUAS" = x; then | |
6384 | CATALOGS="$CATALOGS $cat" | |
6385 | XLINGUAS="$XLINGUAS $lang" | |
6386 | else | |
6387 | case "$LINGUAS" in *$lang*) | |
6388 | CATALOGS="$CATALOGS $cat" | |
6389 | XLINGUAS="$XLINGUAS $lang" | |
6390 | ;; | |
6391 | esac | |
e28b3332 DJ |
6392 | fi |
6393 | done | |
c971b7fa PA |
6394 | LINGUAS="$XLINGUAS" |
6395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6396 | $as_echo "$LINGUAS" >&6; } | |
6397 | ||
6398 | ||
6399 | DATADIRNAME=share | |
6400 | ||
6401 | INSTOBJEXT=.mo | |
6402 | ||
6403 | GENCAT=gencat | |
6404 | ||
6405 | CATOBJEXT=.gmo | |
e28b3332 | 6406 | |
e28b3332 DJ |
6407 | fi |
6408 | ||
c971b7fa PA |
6409 | localedir='${datadir}/locale' |
6410 | ||
6411 | ||
6412 | if test x"$USE_NLS" = xyes; then | |
6413 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6414 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6415 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6416 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6417 | fi |
e28b3332 | 6418 | |
c971b7fa PA |
6419 | PACKAGE=gdb |
6420 | ||
6421 | cat >>confdefs.h <<_ACEOF | |
6422 | #define PACKAGE "$PACKAGE" | |
6423 | _ACEOF | |
6424 | ||
6425 | ||
6426 | ||
6427 | # We never need to detect it in this sub-configure. | |
6428 | # But preserve it for config.status --recheck. | |
6429 | ||
6430 | ||
6431 | ||
6432 | MAKEINFO_EXTRA_FLAGS="" | |
6433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6434 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
d0ac1c44 | 6435 | if ${gdb_cv_have_makeinfo_click+:} false; then : |
c971b7fa PA |
6436 | $as_echo_n "(cached) " >&6 |
6437 | else | |
6438 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6439 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6440 | gdb_cv_have_makeinfo_click=yes | |
6441 | else | |
6442 | gdb_cv_have_makeinfo_click=no | |
6443 | fi | |
6444 | fi | |
6445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6446 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6447 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6448 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6449 | fi | |
e28b3332 DJ |
6450 | |
6451 | ||
bec39cab AC |
6452 | |
6453 | ||
81ecdfbb RW |
6454 | # Check whether --with-separate-debug-dir was given. |
6455 | if test "${with_separate_debug_dir+set}" = set; then : | |
6456 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6457 | DEBUGDIR=$withval |
6458 | else | |
6459 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6460 | fi |
6461 | ||
20e95c23 | 6462 | |
783e057b DJ |
6463 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6464 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6465 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6466 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6467 | |
783e057b DJ |
6468 | cat >>confdefs.h <<_ACEOF |
6469 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6470 | _ACEOF |
20e95c23 | 6471 | |
20e95c23 | 6472 | |
20e95c23 | 6473 | |
0c4a4063 | 6474 | |
b14b1491 TT |
6475 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6476 | if test "x$prefix" = xNONE; then | |
6477 | test_prefix=/usr/local | |
6478 | else | |
6479 | test_prefix=$prefix | |
6480 | fi | |
783e057b | 6481 | else |
b14b1491 | 6482 | test_prefix=$exec_prefix |
783e057b | 6483 | fi |
b14b1491 TT |
6484 | value=0 |
6485 | case ${ac_define_dir} in | |
6486 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6487 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6488 | value=1 | |
6489 | ;; | |
6490 | esac | |
6491 | ||
6492 | cat >>confdefs.h <<_ACEOF | |
6493 | #define DEBUGDIR_RELOCATABLE $value | |
6494 | _ACEOF | |
6495 | ||
6496 | ||
6497 | ||
0c4a4063 | 6498 | |
f83d8a90 DE |
6499 | # We can't pass paths as command line arguments. |
6500 | # Mingw32 tries to be clever and will convert the paths for us. | |
6501 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6502 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6503 | # This breaks GDB's relocatable path conversions since paths passed in | |
6504 | # config.h would not get so translated, the path prefixes no longer match. | |
6505 | ||
6506 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6507 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6508 | ac_define_dir=`eval echo $bindir` | |
6509 | ac_define_dir=`eval echo $ac_define_dir` | |
6510 | ||
6511 | cat >>confdefs.h <<_ACEOF | |
6512 | #define BINDIR "$ac_define_dir" | |
6513 | _ACEOF | |
6514 | ||
6515 | ||
6516 | ||
b14b1491 TT |
6517 | # GDB's datadir relocation |
6518 | ||
6519 | ||
6520 | ||
81ecdfbb RW |
6521 | # Check whether --with-gdb-datadir was given. |
6522 | if test "${with_gdb_datadir+set}" = set; then : | |
6523 | withval=$with_gdb_datadir; | |
b14b1491 | 6524 | GDB_DATADIR=$withval |
20e95c23 | 6525 | else |
b14b1491 | 6526 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6527 | fi |
6528 | ||
20e95c23 | 6529 | |
b14b1491 TT |
6530 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6531 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6532 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6533 | ac_define_dir=`eval echo $ac_define_dir` | |
6534 | ||
6535 | cat >>confdefs.h <<_ACEOF | |
6536 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6537 | _ACEOF |
6538 | ||
b14b1491 TT |
6539 | |
6540 | ||
0c4a4063 | 6541 | |
b14b1491 TT |
6542 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6543 | if test "x$prefix" = xNONE; then | |
6544 | test_prefix=/usr/local | |
6545 | else | |
6546 | test_prefix=$prefix | |
6547 | fi | |
6548 | else | |
6549 | test_prefix=$exec_prefix | |
6550 | fi | |
6551 | value=0 | |
6552 | case ${ac_define_dir} in | |
6553 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6554 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6555 | value=1 | |
6556 | ;; | |
6557 | esac | |
6558 | ||
6559 | cat >>confdefs.h <<_ACEOF | |
6560 | #define GDB_DATADIR_RELOCATABLE $value | |
6561 | _ACEOF | |
6562 | ||
6563 | ||
783e057b | 6564 | |
20e95c23 | 6565 | |
0c4a4063 | 6566 | |
81ecdfbb RW |
6567 | # Check whether --with-relocated-sources was given. |
6568 | if test "${with_relocated_sources+set}" = set; then : | |
6569 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6570 | |
6571 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6572 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6573 | ac_define_dir=`eval echo $reloc_srcdir` | |
6574 | ac_define_dir=`eval echo $ac_define_dir` | |
6575 | ||
6576 | cat >>confdefs.h <<_ACEOF | |
6577 | #define RELOC_SRCDIR "$ac_define_dir" | |
6578 | _ACEOF | |
6579 | ||
6580 | ||
6581 | ||
81ecdfbb RW |
6582 | fi |
6583 | ||
29b0e8a2 | 6584 | |
7349ff92 JK |
6585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6586 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6587 | ||
6588 | # Check whether --with-auto-load-dir was given. | |
6589 | if test "${with_auto_load_dir+set}" = set; then : | |
6590 | withval=$with_auto_load_dir; | |
6591 | else | |
1564a261 | 6592 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6593 | fi |
6594 | ||
2861ee4f | 6595 | escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6596 | |
6597 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6598 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6599 | ac_define_dir=`eval echo $escape_dir` | |
6600 | ac_define_dir=`eval echo $ac_define_dir` | |
6601 | ||
6602 | cat >>confdefs.h <<_ACEOF | |
6603 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6604 | _ACEOF | |
6605 | ||
6606 | ||
6607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6608 | $as_echo "$with_auto_load_dir" >&6; } | |
6609 | ||
bccbefd2 JK |
6610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6611 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6612 | ||
6613 | # Check whether --with-auto-load-safe-path was given. | |
6614 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6615 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6616 | with_auto_load_safe_path="/" |
6617 | fi | |
bccbefd2 | 6618 | else |
7349ff92 | 6619 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6620 | fi |
6621 | ||
2861ee4f | 6622 | escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6623 | |
6624 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6625 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6626 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6627 | ac_define_dir=`eval echo $ac_define_dir` |
6628 | ||
6629 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6630 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6631 | _ACEOF |
6632 | ||
6633 | ||
6634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6635 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6636 | ||
29b0e8a2 | 6637 | |
20e95c23 | 6638 | |
a100a945 | 6639 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
6640 | |
6641 | ||
783e057b | 6642 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6643 | # Check whether --enable-targets was given. |
6644 | if test "${enable_targets+set}" = set; then : | |
6645 | enableval=$enable_targets; case "${enableval}" in | |
d0ac1c44 | 6646 | yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 |
783e057b DJ |
6647 | ;; |
6648 | no) enable_targets= ;; | |
6649 | *) enable_targets=$enableval ;; | |
6650 | esac | |
81ecdfbb RW |
6651 | fi |
6652 | ||
20e95c23 | 6653 | |
81ecdfbb RW |
6654 | # Check whether --enable-64-bit-bfd was given. |
6655 | if test "${enable_64_bit_bfd+set}" = set; then : | |
1d5269c9 MF |
6656 | enableval=$enable_64_bit_bfd; case $enableval in #( |
6657 | yes|no) : | |
6658 | ;; #( | |
6659 | *) : | |
6660 | as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; #( | |
6661 | *) : | |
6662 | ;; | |
783e057b DJ |
6663 | esac |
6664 | else | |
1d5269c9 MF |
6665 | enable_64_bit_bfd=no |
6666 | fi | |
6667 | ||
6668 | ||
6669 | if test "x$enable_64_bit_bfd" = "xno"; then : | |
6670 | # The cast to long int works around a bug in the HP C Compiler | |
6671 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6672 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6673 | # This bug is HP SR number 8606223364. | |
6674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 | |
6675 | $as_echo_n "checking size of void *... " >&6; } | |
6676 | if ${ac_cv_sizeof_void_p+:} false; then : | |
6677 | $as_echo_n "(cached) " >&6 | |
6678 | else | |
6679 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : | |
6680 | ||
6681 | else | |
6682 | if test "$ac_cv_type_void_p" = yes; then | |
6683 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6684 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6685 | as_fn_error 77 "cannot compute sizeof (void *) | |
6686 | See \`config.log' for more details" "$LINENO" 5; } | |
6687 | else | |
6688 | ac_cv_sizeof_void_p=0 | |
6689 | fi | |
6690 | fi | |
6691 | ||
6692 | fi | |
6693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 | |
6694 | $as_echo "$ac_cv_sizeof_void_p" >&6; } | |
6695 | ||
6696 | ||
6697 | ||
6698 | cat >>confdefs.h <<_ACEOF | |
6699 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
6700 | _ACEOF | |
6701 | ||
6702 | ||
6703 | if test "x$ac_cv_sizeof_void_p" = "x8"; then : | |
6704 | enable_64_bit_bfd=yes | |
6705 | fi | |
6706 | ||
6707 | fi | |
6708 | ||
6709 | if test "x$enable_64_bit_bfd" = "xyes"; then | |
6710 | ENABLE_BFD_64_BIT_TRUE= | |
6711 | ENABLE_BFD_64_BIT_FALSE='#' | |
6712 | else | |
6713 | ENABLE_BFD_64_BIT_TRUE='#' | |
6714 | ENABLE_BFD_64_BIT_FALSE= | |
81ecdfbb RW |
6715 | fi |
6716 | ||
1d5269c9 MF |
6717 | |
6718 | ||
783e057b DJ |
6719 | # Provide defaults for some variables set by the per-host and per-target |
6720 | # configuration. | |
6721 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6722 | |
783e057b DJ |
6723 | if test "${target}" = "${host}"; then |
6724 | gdb_native=yes | |
6725 | else | |
6726 | gdb_native=no | |
6727 | fi | |
20e95c23 | 6728 | |
783e057b | 6729 | . $srcdir/configure.host |
20e95c23 | 6730 | |
783e057b | 6731 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6732 | |
783e057b DJ |
6733 | TARGET_OBS= |
6734 | all_targets= | |
b292c783 | 6735 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6736 | |
783e057b | 6737 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6738 | do |
783e057b DJ |
6739 | if test "$targ_alias" = "all"; then |
6740 | all_targets=true | |
6741 | else | |
6742 | # Canonicalize the secondary target names. | |
6743 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6744 | if test -n "$result"; then | |
6745 | targ=$result | |
6746 | else | |
6747 | targ=$targ_alias | |
6748 | fi | |
20e95c23 | 6749 | |
783e057b | 6750 | . ${srcdir}/configure.tgt |
20e95c23 | 6751 | |
bf307134 | 6752 | if test -z "${gdb_target_obs}"; then : |
d0ac1c44 | 6753 | as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 |
bf307134 JB |
6754 | fi |
6755 | ||
783e057b DJ |
6756 | # Target-specific object files |
6757 | for i in ${gdb_target_obs}; do | |
6758 | case " $TARGET_OBS " in | |
6759 | *" ${i} "*) ;; | |
6760 | *) | |
6761 | TARGET_OBS="$TARGET_OBS ${i}" | |
6762 | ;; | |
6763 | esac | |
6764 | done | |
20e95c23 | 6765 | |
783e057b | 6766 | # Check whether this target needs 64-bit CORE_ADDR |
1d5269c9 | 6767 | if test x${enable_64_bit_bfd} = xno; then |
783e057b DJ |
6768 | . ${srcdir}/../bfd/config.bfd |
6769 | fi | |
b292c783 JK |
6770 | |
6771 | # Check whether this target is native and supports gcore. | |
6772 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6773 | && $gdb_have_gcore; then | |
6774 | HAVE_NATIVE_GCORE_TARGET=1 | |
6775 | fi | |
783e057b | 6776 | fi |
20e95c23 DJ |
6777 | done |
6778 | ||
783e057b | 6779 | if test x${all_targets} = xtrue; then |
1d5269c9 | 6780 | if test x${enable_64_bit_bfd} = xyes; then |
c0993dbe UW |
6781 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' |
6782 | else | |
6783 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6784 | fi | |
6785 | fi | |
6786 | ||
6787 | ||
6788 | ||
b292c783 | 6789 | |
c0993dbe UW |
6790 | # For other settings, only the main target counts. |
6791 | gdb_sim= | |
6792 | gdb_osabi= | |
c0993dbe UW |
6793 | targ=$target; . ${srcdir}/configure.tgt |
6794 | ||
6795 | # Fetch the default architecture and default target vector from BFD. | |
6796 | targ=$target; . $srcdir/../bfd/config.bfd | |
6797 | ||
6798 | # We only want the first architecture, so strip off the others if | |
6799 | # there is more than one. | |
6800 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6801 | ||
6802 | if test "x$targ_archs" != x; then | |
6803 | ||
6804 | cat >>confdefs.h <<_ACEOF | |
6805 | #define DEFAULT_BFD_ARCH $targ_archs | |
6806 | _ACEOF | |
6807 | ||
6808 | fi | |
6809 | if test "x$targ_defvec" != x; then | |
6810 | ||
6811 | cat >>confdefs.h <<_ACEOF | |
6812 | #define DEFAULT_BFD_VEC $targ_defvec | |
6813 | _ACEOF | |
6814 | ||
6815 | fi | |
6816 | ||
c0993dbe | 6817 | # Enable MI. |
81ecdfbb RW |
6818 | # Check whether --enable-gdbmi was given. |
6819 | if test "${enable_gdbmi+set}" = set; then : | |
6820 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6821 | yes | no) |
6822 | ;; | |
6823 | *) | |
d0ac1c44 | 6824 | as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6825 | esac |
6826 | else | |
6827 | enable_gdbmi=yes | |
81ecdfbb RW |
6828 | fi |
6829 | ||
c0993dbe | 6830 | if test x"$enable_gdbmi" = xyes; then |
0ad6b8ee | 6831 | if test -d "$srcdir/mi"; then |
c0993dbe UW |
6832 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" |
6833 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6834 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6835 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6836 | fi | |
6837 | fi | |
6838 | ||
6839 | # Enable TUI. | |
81ecdfbb RW |
6840 | # Check whether --enable-tui was given. |
6841 | if test "${enable_tui+set}" = set; then : | |
6842 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6843 | yes | no | auto) |
c0993dbe UW |
6844 | ;; |
6845 | *) | |
d0ac1c44 | 6846 | as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6847 | esac |
6848 | else | |
3ca64bd3 | 6849 | enable_tui=auto |
81ecdfbb RW |
6850 | fi |
6851 | ||
c0993dbe UW |
6852 | |
6853 | # Enable gdbtk. | |
81ecdfbb RW |
6854 | # Check whether --enable-gdbtk was given. |
6855 | if test "${enable_gdbtk+set}" = set; then : | |
6856 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6857 | yes | no) |
6858 | ;; | |
6859 | *) | |
d0ac1c44 | 6860 | as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6861 | esac |
6862 | else | |
0ad6b8ee | 6863 | if test -d "$srcdir/gdbtk"; then |
c0993dbe UW |
6864 | enable_gdbtk=yes |
6865 | else | |
6866 | enable_gdbtk=no | |
6867 | fi | |
81ecdfbb RW |
6868 | fi |
6869 | ||
c0993dbe UW |
6870 | # We unconditionally disable gdbtk tests on selected platforms. |
6871 | case $host_os in | |
6872 | go32* | windows*) | |
81ecdfbb RW |
6873 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6874 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6875 | enable_gdbtk=no ;; |
6876 | esac | |
6877 | ||
0d79cdc4 AM |
6878 | # Handle optional debuginfod support |
6879 | ||
f6720b1c AM |
6880 | |
6881 | ||
6882 | ||
6883 | ||
6884 | ||
6885 | ||
6886 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
6887 | if test -n "$ac_tool_prefix"; then | |
6888 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
6889 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
6890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6891 | $as_echo_n "checking for $ac_word... " >&6; } | |
6892 | if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
6893 | $as_echo_n "(cached) " >&6 | |
6894 | else | |
6895 | case $PKG_CONFIG in | |
6896 | [\\/]* | ?:[\\/]*) | |
6897 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
6898 | ;; | |
6899 | *) | |
6900 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6901 | for as_dir in $PATH | |
6902 | do | |
6903 | IFS=$as_save_IFS | |
6904 | test -z "$as_dir" && as_dir=. | |
6905 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6906 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6907 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6908 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6909 | break 2 | |
6910 | fi | |
6911 | done | |
6912 | done | |
6913 | IFS=$as_save_IFS | |
6914 | ||
6915 | ;; | |
6916 | esac | |
6917 | fi | |
6918 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
6919 | if test -n "$PKG_CONFIG"; then | |
6920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
6921 | $as_echo "$PKG_CONFIG" >&6; } | |
6922 | else | |
6923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6924 | $as_echo "no" >&6; } | |
6925 | fi | |
6926 | ||
6927 | ||
6928 | fi | |
6929 | if test -z "$ac_cv_path_PKG_CONFIG"; then | |
6930 | ac_pt_PKG_CONFIG=$PKG_CONFIG | |
6931 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
6932 | set dummy pkg-config; ac_word=$2 | |
6933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6934 | $as_echo_n "checking for $ac_word... " >&6; } | |
6935 | if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
6936 | $as_echo_n "(cached) " >&6 | |
6937 | else | |
6938 | case $ac_pt_PKG_CONFIG in | |
6939 | [\\/]* | ?:[\\/]*) | |
6940 | ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
6941 | ;; | |
6942 | *) | |
6943 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6944 | for as_dir in $PATH | |
6945 | do | |
6946 | IFS=$as_save_IFS | |
6947 | test -z "$as_dir" && as_dir=. | |
6948 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6949 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6950 | ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6951 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6952 | break 2 | |
6953 | fi | |
6954 | done | |
6955 | done | |
6956 | IFS=$as_save_IFS | |
6957 | ||
6958 | ;; | |
6959 | esac | |
6960 | fi | |
6961 | ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
6962 | if test -n "$ac_pt_PKG_CONFIG"; then | |
6963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
6964 | $as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
6965 | else | |
6966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6967 | $as_echo "no" >&6; } | |
6968 | fi | |
6969 | ||
6970 | if test "x$ac_pt_PKG_CONFIG" = x; then | |
6971 | PKG_CONFIG="" | |
6972 | else | |
6973 | case $cross_compiling:$ac_tool_warned in | |
6974 | yes:) | |
6975 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6976 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6977 | ac_tool_warned=yes ;; | |
6978 | esac | |
6979 | PKG_CONFIG=$ac_pt_PKG_CONFIG | |
6980 | fi | |
6981 | else | |
6982 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
6983 | fi | |
6984 | ||
6985 | fi | |
6986 | if test -n "$PKG_CONFIG"; then | |
6987 | _pkg_min_version=0.9.0 | |
6988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
6989 | $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
6990 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
6991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6992 | $as_echo "yes" >&6; } | |
6993 | else | |
6994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6995 | $as_echo "no" >&6; } | |
6996 | PKG_CONFIG="" | |
6997 | fi | |
6998 | fi | |
6999 | ||
7000 | # Handle optional debuginfod support | |
0d79cdc4 AM |
7001 | |
7002 | # Check whether --with-debuginfod was given. | |
7003 | if test "${with_debuginfod+set}" = set; then : | |
7004 | withval=$with_debuginfod; | |
7005 | else | |
7006 | with_debuginfod=auto | |
7007 | fi | |
7008 | ||
7009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5 | |
7010 | $as_echo_n "checking whether to use debuginfod... " >&6; } | |
7011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5 | |
7012 | $as_echo "$with_debuginfod" >&6; } | |
7013 | ||
f6720b1c | 7014 | if test "x$with_debuginfod" != xno; then |
0d79cdc4 | 7015 | |
f6720b1c AM |
7016 | pkg_failed=no |
7017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5 | |
7018 | $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; } | |
7019 | ||
7020 | if test -n "$DEBUGINFOD_CFLAGS"; then | |
7021 | pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS" | |
7022 | elif test -n "$PKG_CONFIG"; then | |
7023 | if test -n "$PKG_CONFIG" && \ | |
7024 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7025 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7026 | ac_status=$? | |
7027 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7028 | test $ac_status = 0; }; then | |
7029 | pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null` | |
7030 | test "x$?" != "x0" && pkg_failed=yes | |
0d79cdc4 | 7031 | else |
f6720b1c | 7032 | pkg_failed=yes |
0d79cdc4 | 7033 | fi |
f6720b1c AM |
7034 | else |
7035 | pkg_failed=untried | |
0d79cdc4 | 7036 | fi |
f6720b1c AM |
7037 | if test -n "$DEBUGINFOD_LIBS"; then |
7038 | pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS" | |
7039 | elif test -n "$PKG_CONFIG"; then | |
7040 | if test -n "$PKG_CONFIG" && \ | |
7041 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7042 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7043 | ac_status=$? | |
7044 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7045 | test $ac_status = 0; }; then | |
7046 | pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null` | |
7047 | test "x$?" != "x0" && pkg_failed=yes | |
7048 | else | |
7049 | pkg_failed=yes | |
0d79cdc4 | 7050 | fi |
f6720b1c AM |
7051 | else |
7052 | pkg_failed=untried | |
0d79cdc4 | 7053 | fi |
bec39cab | 7054 | |
377170fa L |
7055 | if test $pkg_failed = no; then |
7056 | pkg_save_LDFLAGS="$LDFLAGS" | |
7057 | LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS" | |
7058 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d70f978b L |
7059 | /* end confdefs.h. */ |
7060 | ||
7061 | int | |
7062 | main () | |
7063 | { | |
377170fa | 7064 | |
d70f978b L |
7065 | ; |
7066 | return 0; | |
7067 | } | |
7068 | _ACEOF | |
7069 | if ac_fn_c_try_link "$LINENO"; then : | |
377170fa | 7070 | |
d70f978b L |
7071 | else |
7072 | pkg_failed=yes | |
7073 | fi | |
7074 | rm -f core conftest.err conftest.$ac_objext \ | |
7075 | conftest$ac_exeext conftest.$ac_ext | |
377170fa L |
7076 | LDFLAGS=$pkg_save_LDFLAGS |
7077 | fi | |
d70f978b | 7078 | |
0d79cdc4 | 7079 | |
0d79cdc4 | 7080 | |
f6720b1c AM |
7081 | if test $pkg_failed = yes; then |
7082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7083 | $as_echo "no" >&6; } | |
0d79cdc4 | 7084 | |
f6720b1c AM |
7085 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
7086 | _pkg_short_errors_supported=yes | |
7087 | else | |
7088 | _pkg_short_errors_supported=no | |
7089 | fi | |
7090 | if test $_pkg_short_errors_supported = yes; then | |
7091 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7092 | else | |
7093 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7094 | fi | |
7095 | # Put the nasty error message in config.log where it belongs | |
7096 | echo "$DEBUGINFOD_PKG_ERRORS" >&5 | |
0d79cdc4 | 7097 | |
f6720b1c AM |
7098 | if test "x$with_debuginfod" = xyes; then |
7099 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7100 | else | |
7101 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7102 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7103 | fi | |
7104 | elif test $pkg_failed = untried; then | |
7105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7106 | $as_echo "no" >&6; } | |
7107 | if test "x$with_debuginfod" = xyes; then | |
7108 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7109 | else | |
7110 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7111 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7112 | fi | |
7113 | else | |
7114 | DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS | |
7115 | DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS | |
7116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7117 | $as_echo "yes" >&6; } | |
7118 | ||
7119 | $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h | |
7120 | ||
7121 | fi | |
7122 | else | |
7123 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5 | |
7124 | $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;} | |
0d79cdc4 AM |
7125 | fi |
7126 | ||
7127 | ||
7128 | # Libunwind support for ia64. | |
05e7c244 JK |
7129 | |
7130 | # Check whether --with-libunwind-ia64 was given. | |
7131 | if test "${with_libunwind_ia64+set}" = set; then : | |
7132 | withval=$with_libunwind_ia64; | |
bec39cab | 7133 | else |
05e7c244 JK |
7134 | with_libunwind_ia64=auto |
7135 | fi | |
bec39cab | 7136 | |
05e7c244 JK |
7137 | |
7138 | # Backward compatibility option. | |
7139 | if test "${with_libunwind+set}" = set; then | |
7140 | if test x"$with_libunwind_ia64" != xauto; then | |
d0ac1c44 | 7141 | as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 |
05e7c244 JK |
7142 | fi |
7143 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
7144 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
7145 | with_libunwind_ia64="$with_libunwind" | |
7146 | fi | |
7147 | ||
7148 | case "$with_libunwind_ia64" in | |
7149 | yes | no) | |
7150 | ;; | |
7151 | auto) | |
7152 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 7153 | do : |
b54a8fd7 | 7154 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7155 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7156 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7157 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7158 | _ACEOF |
7159 | ||
7160 | fi | |
7161 | ||
7162 | done | |
7163 | ||
05e7c244 JK |
7164 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
7165 | ;; | |
7166 | *) | |
d0ac1c44 | 7167 | as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 |
05e7c244 JK |
7168 | ;; |
7169 | esac | |
bec39cab | 7170 | |
05e7c244 | 7171 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 7172 | for ac_header in libunwind-ia64.h |
81ecdfbb | 7173 | do : |
b54a8fd7 | 7174 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7175 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7176 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7177 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7178 | _ACEOF |
7179 | ||
7180 | fi | |
7181 | ||
7182 | done | |
7183 | ||
05e7c244 | 7184 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
d0ac1c44 | 7185 | as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 |
05e7c244 JK |
7186 | fi |
7187 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
7188 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
7189 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
7190 | fi |
7191 | ||
cb01cfba JB |
7192 | opt_curses=no |
7193 | ||
81ecdfbb RW |
7194 | # Check whether --with-curses was given. |
7195 | if test "${with_curses+set}" = set; then : | |
7196 | withval=$with_curses; opt_curses=$withval | |
7197 | fi | |
7198 | ||
cb01cfba | 7199 | |
76a39ba7 | 7200 | prefer_curses=no |
cb01cfba | 7201 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 7202 | prefer_curses=yes |
cb01cfba JB |
7203 | fi |
7204 | ||
a9322a30 | 7205 | # Profiling support. |
81ecdfbb RW |
7206 | # Check whether --enable-profiling was given. |
7207 | if test "${enable_profiling+set}" = set; then : | |
7208 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
7209 | yes | no) |
7210 | ;; | |
7211 | *) | |
d0ac1c44 | 7212 | as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
7213 | esac |
7214 | else | |
7215 | enable_profiling=no | |
81ecdfbb | 7216 | fi |
bec39cab | 7217 | |
a9322a30 TT |
7218 | |
7219 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
7220 | do : |
7221 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7222 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 7223 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
7224 | cat >>confdefs.h <<_ACEOF |
7225 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 7226 | _ACEOF |
a9322a30 | 7227 | |
81ecdfbb RW |
7228 | fi |
7229 | done | |
a9322a30 | 7230 | |
81ecdfbb RW |
7231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
7232 | $as_echo_n "checking for _etext... " >&6; } | |
d0ac1c44 | 7233 | if ${ac_cv_var__etext+:} false; then : |
81ecdfbb RW |
7234 | $as_echo_n "(cached) " >&6 |
7235 | else | |
7236 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7237 | /* end confdefs.h. */ | |
7238 | #include <stdlib.h> | |
5593a99a | 7239 | extern char _etext; |
a9322a30 TT |
7240 | int |
7241 | main () | |
7242 | { | |
7243 | free (&_etext); | |
5593a99a | 7244 | |
a9322a30 TT |
7245 | ; |
7246 | return 0; | |
7247 | } | |
bec39cab | 7248 | _ACEOF |
81ecdfbb | 7249 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7250 | ac_cv_var__etext=yes |
bec39cab | 7251 | else |
81ecdfbb | 7252 | ac_cv_var__etext=no |
5593a99a | 7253 | |
bec39cab | 7254 | fi |
81ecdfbb RW |
7255 | rm -f core conftest.err conftest.$ac_objext \ |
7256 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 7257 | |
bec39cab | 7258 | fi |
81ecdfbb RW |
7259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
7260 | $as_echo "$ac_cv_var__etext" >&6; } | |
0ad6b8ee | 7261 | if test "$ac_cv_var__etext" = yes; then |
60ca704f | 7262 | |
81ecdfbb | 7263 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 7264 | |
bec39cab | 7265 | fi |
81ecdfbb RW |
7266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
7267 | $as_echo_n "checking for etext... " >&6; } | |
d0ac1c44 | 7268 | if ${ac_cv_var_etext+:} false; then : |
81ecdfbb | 7269 | $as_echo_n "(cached) " >&6 |
bec39cab | 7270 | else |
81ecdfbb | 7271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7272 | /* end confdefs.h. */ |
a9322a30 | 7273 | #include <stdlib.h> |
5593a99a | 7274 | extern char etext; |
bec39cab AC |
7275 | int |
7276 | main () | |
7277 | { | |
a9322a30 | 7278 | free (&etext); |
5593a99a | 7279 | |
bec39cab AC |
7280 | ; |
7281 | return 0; | |
7282 | } | |
7283 | _ACEOF | |
81ecdfbb | 7284 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7285 | ac_cv_var_etext=yes |
bec39cab | 7286 | else |
81ecdfbb | 7287 | ac_cv_var_etext=no |
5593a99a | 7288 | |
bec39cab | 7289 | fi |
81ecdfbb RW |
7290 | rm -f core conftest.err conftest.$ac_objext \ |
7291 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 7292 | |
bec39cab | 7293 | fi |
81ecdfbb RW |
7294 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
7295 | $as_echo "$ac_cv_var_etext" >&6; } | |
0ad6b8ee | 7296 | if test "$ac_cv_var_etext" = yes; then |
a9322a30 | 7297 | |
81ecdfbb | 7298 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
7299 | |
7300 | fi | |
a9322a30 | 7301 | if test "$enable_profiling" = yes ; then |
0ad6b8ee | 7302 | if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then |
d0ac1c44 | 7303 | as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
7304 | fi |
7305 | PROFILE_CFLAGS=-pg | |
7306 | OLD_CFLAGS="$CFLAGS" | |
7307 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 7308 | |
81ecdfbb RW |
7309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
7310 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
d0ac1c44 | 7311 | if ${ac_cv_cc_supports_pg+:} false; then : |
81ecdfbb | 7312 | $as_echo_n "(cached) " >&6 |
bec39cab | 7313 | else |
81ecdfbb | 7314 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7315 | /* end confdefs.h. */ |
bec39cab AC |
7316 | |
7317 | int | |
7318 | main () | |
7319 | { | |
a9322a30 | 7320 | int x; |
bec39cab AC |
7321 | ; |
7322 | return 0; | |
7323 | } | |
7324 | _ACEOF | |
81ecdfbb | 7325 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7326 | ac_cv_cc_supports_pg=yes |
bec39cab | 7327 | else |
81ecdfbb | 7328 | ac_cv_cc_supports_pg=no |
5593a99a | 7329 | |
bec39cab | 7330 | fi |
81ecdfbb | 7331 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 7332 | |
bec39cab | 7333 | fi |
81ecdfbb RW |
7334 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7335 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7336 | |
0ad6b8ee | 7337 | if test "$ac_cv_cc_supports_pg" = no; then |
d0ac1c44 | 7338 | as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7339 | fi |
bec39cab | 7340 | |
a9322a30 | 7341 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7342 | fi |
7343 | ||
44cee4fd TT |
7344 | CODESIGN_CERT= |
7345 | # Check whether --enable-codesign was given. | |
7346 | if test "${enable_codesign+set}" = set; then : | |
7347 | enableval=$enable_codesign; CODESIGN_CERT=$enableval | |
7348 | fi | |
7349 | ||
7350 | ||
7351 | ||
c16158bc JM |
7352 | |
7353 | ||
81ecdfbb RW |
7354 | # Check whether --with-pkgversion was given. |
7355 | if test "${with_pkgversion+set}" = set; then : | |
7356 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 7357 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
7358 | no) PKGVERSION= ;; |
7359 | *) PKGVERSION="($withval) " ;; | |
7360 | esac | |
7361 | else | |
7362 | PKGVERSION="(GDB) " | |
7363 | ||
81ecdfbb | 7364 | fi |
c16158bc JM |
7365 | |
7366 | ||
7367 | ||
7368 | ||
81ecdfbb RW |
7369 | |
7370 | # Check whether --with-bugurl was given. | |
7371 | if test "${with_bugurl+set}" = set; then : | |
7372 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 7373 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
7374 | no) BUGURL= |
7375 | ;; | |
7376 | *) BUGURL="$withval" | |
7377 | ;; | |
7378 | esac | |
7379 | else | |
112c22ed | 7380 | BUGURL="https://www.gnu.org/software/gdb/bugs/" |
c16158bc | 7381 | |
81ecdfbb RW |
7382 | fi |
7383 | ||
c16158bc JM |
7384 | case ${BUGURL} in |
7385 | "") | |
7386 | REPORT_BUGS_TO= | |
7387 | REPORT_BUGS_TEXI= | |
7388 | ;; | |
7389 | *) | |
7390 | REPORT_BUGS_TO="<$BUGURL>" | |
7391 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7392 | ;; | |
7393 | esac; | |
7394 | ||
7395 | ||
7396 | ||
7397 | ||
7398 | cat >>confdefs.h <<_ACEOF | |
7399 | #define PKGVERSION "$PKGVERSION" | |
7400 | _ACEOF | |
7401 | ||
7402 | ||
7403 | cat >>confdefs.h <<_ACEOF | |
7404 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7405 | _ACEOF | |
7406 | ||
7407 | ||
bec39cab AC |
7408 | # --------------------- # |
7409 | # Checks for programs. # | |
7410 | # --------------------- # | |
7411 | ||
7412 | for ac_prog in gawk mawk nawk awk | |
7413 | do | |
7414 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7415 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7417 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7418 | if ${ac_cv_prog_AWK+:} false; then : |
81ecdfbb | 7419 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7420 | else |
7421 | if test -n "$AWK"; then | |
7422 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7423 | else | |
7424 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7425 | for as_dir in $PATH | |
7426 | do | |
7427 | IFS=$as_save_IFS | |
7428 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7429 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7430 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7431 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7432 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7433 | break 2 |
7434 | fi | |
7435 | done | |
81ecdfbb RW |
7436 | done |
7437 | IFS=$as_save_IFS | |
bec39cab AC |
7438 | |
7439 | fi | |
7440 | fi | |
7441 | AWK=$ac_cv_prog_AWK | |
7442 | if test -n "$AWK"; then | |
81ecdfbb RW |
7443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7444 | $as_echo "$AWK" >&6; } | |
bec39cab | 7445 | else |
81ecdfbb RW |
7446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7447 | $as_echo "no" >&6; } | |
bec39cab AC |
7448 | fi |
7449 | ||
bec39cab | 7450 | |
81ecdfbb | 7451 | test -n "$AWK" && break |
bec39cab AC |
7452 | done |
7453 | ||
c971b7fa PA |
7454 | # Find a good install program. We prefer a C program (faster), |
7455 | # so one script is as good as another. But avoid the broken or | |
7456 | # incompatible versions: | |
7457 | # SysV /etc/install, /usr/sbin/install | |
7458 | # SunOS /usr/etc/install | |
7459 | # IRIX /sbin/install | |
7460 | # AIX /bin/install | |
7461 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7462 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7463 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7464 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7465 | # OS/2's system install, which has a completely different semantic | |
7466 | # ./install, which can be erroneously created by make from ./install.sh. | |
7467 | # Reject install programs that cannot install multiple files. | |
7468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7469 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7470 | if test -z "$INSTALL"; then | |
d0ac1c44 | 7471 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
7472 | $as_echo_n "(cached) " >&6 |
7473 | else | |
7474 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7475 | for as_dir in $PATH | |
7476 | do | |
7477 | IFS=$as_save_IFS | |
7478 | test -z "$as_dir" && as_dir=. | |
7479 | # Account for people who put trailing slashes in PATH elements. | |
7480 | case $as_dir/ in #(( | |
7481 | ./ | .// | /[cC]/* | \ | |
7482 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7483 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7484 | /usr/ucb/* ) ;; | |
7485 | *) | |
7486 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7487 | # Don't use installbsd from OSF since it installs stuff as root | |
7488 | # by default. | |
7489 | for ac_prog in ginstall scoinst install; do | |
7490 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 7491 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
7492 | if test $ac_prog = install && |
7493 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7494 | # AIX install. It has an incompatible calling convention. | |
7495 | : | |
7496 | elif test $ac_prog = install && | |
7497 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7498 | # program-specific install script used by HP pwplus--don't use. | |
7499 | : | |
7500 | else | |
7501 | rm -rf conftest.one conftest.two conftest.dir | |
7502 | echo one > conftest.one | |
7503 | echo two > conftest.two | |
7504 | mkdir conftest.dir | |
7505 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7506 | test -s conftest.one && test -s conftest.two && | |
7507 | test -s conftest.dir/conftest.one && | |
7508 | test -s conftest.dir/conftest.two | |
7509 | then | |
7510 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7511 | break 3 | |
7512 | fi | |
7513 | fi | |
7514 | fi | |
7515 | done | |
7516 | done | |
7517 | ;; | |
7518 | esac | |
7519 | ||
7520 | done | |
7521 | IFS=$as_save_IFS | |
7522 | ||
7523 | rm -rf conftest.one conftest.two conftest.dir | |
7524 | ||
7525 | fi | |
7526 | if test "${ac_cv_path_install+set}" = set; then | |
7527 | INSTALL=$ac_cv_path_install | |
7528 | else | |
7529 | # As a last resort, use the slow shell script. Don't cache a | |
7530 | # value for INSTALL within a source directory, because that will | |
7531 | # break other packages using the cache if that directory is | |
7532 | # removed, or if the value is a relative name. | |
7533 | INSTALL=$ac_install_sh | |
7534 | fi | |
7535 | fi | |
7536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7537 | $as_echo "$INSTALL" >&6; } | |
7538 | ||
7539 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7540 | # It thinks the first close brace ends the variable substitution. | |
7541 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7542 | ||
7543 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7544 | ||
7545 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7546 | |
81ecdfbb RW |
7547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7548 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7549 | LN_S=$as_ln_s |
7550 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7552 | $as_echo "yes" >&6; } | |
bec39cab | 7553 | else |
81ecdfbb RW |
7554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7555 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7556 | fi |
7557 | ||
7558 | if test -n "$ac_tool_prefix"; then | |
7559 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7560 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7562 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7563 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb | 7564 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7565 | else |
7566 | if test -n "$RANLIB"; then | |
7567 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7568 | else | |
7569 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7570 | for as_dir in $PATH | |
7571 | do | |
7572 | IFS=$as_save_IFS | |
7573 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7574 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7575 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7576 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7577 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7578 | break 2 |
7579 | fi | |
7580 | done | |
81ecdfbb RW |
7581 | done |
7582 | IFS=$as_save_IFS | |
bec39cab AC |
7583 | |
7584 | fi | |
7585 | fi | |
7586 | RANLIB=$ac_cv_prog_RANLIB | |
7587 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7589 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7590 | else |
81ecdfbb RW |
7591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7592 | $as_echo "no" >&6; } | |
bec39cab AC |
7593 | fi |
7594 | ||
81ecdfbb | 7595 | |
bec39cab AC |
7596 | fi |
7597 | if test -z "$ac_cv_prog_RANLIB"; then | |
7598 | ac_ct_RANLIB=$RANLIB | |
7599 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7600 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7602 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7603 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
81ecdfbb | 7604 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7605 | else |
7606 | if test -n "$ac_ct_RANLIB"; then | |
7607 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7608 | else | |
7609 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7610 | for as_dir in $PATH | |
7611 | do | |
7612 | IFS=$as_save_IFS | |
7613 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7614 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7615 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7616 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7617 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7618 | break 2 |
7619 | fi | |
7620 | done | |
81ecdfbb RW |
7621 | done |
7622 | IFS=$as_save_IFS | |
bec39cab | 7623 | |
bec39cab AC |
7624 | fi |
7625 | fi | |
7626 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7627 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7629 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7630 | else |
81ecdfbb RW |
7631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7632 | $as_echo "no" >&6; } | |
bec39cab AC |
7633 | fi |
7634 | ||
81ecdfbb RW |
7635 | if test "x$ac_ct_RANLIB" = x; then |
7636 | RANLIB=":" | |
7637 | else | |
7638 | case $cross_compiling:$ac_tool_warned in | |
7639 | yes:) | |
7640 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7641 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7642 | ac_tool_warned=yes ;; | |
7643 | esac | |
7644 | RANLIB=$ac_ct_RANLIB | |
7645 | fi | |
bec39cab AC |
7646 | else |
7647 | RANLIB="$ac_cv_prog_RANLIB" | |
7648 | fi | |
7649 | ||
7650 | for ac_prog in 'bison -y' byacc | |
7651 | do | |
7652 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7653 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7655 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7656 | if ${ac_cv_prog_YACC+:} false; then : |
81ecdfbb | 7657 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7658 | else |
7659 | if test -n "$YACC"; then | |
7660 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7661 | else | |
7662 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7663 | for as_dir in $PATH | |
7664 | do | |
7665 | IFS=$as_save_IFS | |
7666 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7667 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7668 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7669 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7670 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7671 | break 2 |
7672 | fi | |
7673 | done | |
81ecdfbb RW |
7674 | done |
7675 | IFS=$as_save_IFS | |
bec39cab AC |
7676 | |
7677 | fi | |
7678 | fi | |
7679 | YACC=$ac_cv_prog_YACC | |
7680 | if test -n "$YACC"; then | |
81ecdfbb RW |
7681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7682 | $as_echo "$YACC" >&6; } | |
bec39cab | 7683 | else |
81ecdfbb RW |
7684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7685 | $as_echo "no" >&6; } | |
bec39cab AC |
7686 | fi |
7687 | ||
81ecdfbb | 7688 | |
bec39cab AC |
7689 | test -n "$YACC" && break |
7690 | done | |
7691 | test -n "$YACC" || YACC="yacc" | |
7692 | ||
7693 | ||
7694 | if test -n "$ac_tool_prefix"; then | |
7695 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7696 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7698 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7699 | if ${ac_cv_prog_AR+:} false; then : |
81ecdfbb | 7700 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7701 | else |
7702 | if test -n "$AR"; then | |
7703 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7704 | else | |
7705 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7706 | for as_dir in $PATH | |
7707 | do | |
7708 | IFS=$as_save_IFS | |
7709 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7710 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7711 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7712 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7713 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7714 | break 2 |
7715 | fi | |
7716 | done | |
81ecdfbb RW |
7717 | done |
7718 | IFS=$as_save_IFS | |
bec39cab AC |
7719 | |
7720 | fi | |
7721 | fi | |
7722 | AR=$ac_cv_prog_AR | |
7723 | if test -n "$AR"; then | |
81ecdfbb RW |
7724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7725 | $as_echo "$AR" >&6; } | |
bec39cab | 7726 | else |
81ecdfbb RW |
7727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7728 | $as_echo "no" >&6; } | |
bec39cab AC |
7729 | fi |
7730 | ||
81ecdfbb | 7731 | |
bec39cab AC |
7732 | fi |
7733 | if test -z "$ac_cv_prog_AR"; then | |
7734 | ac_ct_AR=$AR | |
7735 | # Extract the first word of "ar", so it can be a program name with args. | |
7736 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7738 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7739 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
81ecdfbb | 7740 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7741 | else |
7742 | if test -n "$ac_ct_AR"; then | |
7743 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7744 | else | |
7745 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7746 | for as_dir in $PATH | |
7747 | do | |
7748 | IFS=$as_save_IFS | |
7749 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7750 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7751 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7752 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7753 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7754 | break 2 |
7755 | fi | |
7756 | done | |
81ecdfbb RW |
7757 | done |
7758 | IFS=$as_save_IFS | |
bec39cab AC |
7759 | |
7760 | fi | |
7761 | fi | |
7762 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7763 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7765 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7766 | else |
81ecdfbb RW |
7767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7768 | $as_echo "no" >&6; } | |
bec39cab AC |
7769 | fi |
7770 | ||
81ecdfbb RW |
7771 | if test "x$ac_ct_AR" = x; then |
7772 | AR="" | |
7773 | else | |
7774 | case $cross_compiling:$ac_tool_warned in | |
7775 | yes:) | |
7776 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7777 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7778 | ac_tool_warned=yes ;; | |
7779 | esac | |
7780 | AR=$ac_ct_AR | |
7781 | fi | |
bec39cab AC |
7782 | else |
7783 | AR="$ac_cv_prog_AR" | |
7784 | fi | |
7785 | ||
7786 | if test -n "$ac_tool_prefix"; then | |
7787 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7788 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7790 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7791 | if ${ac_cv_prog_DLLTOOL+:} false; then : |
81ecdfbb | 7792 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7793 | else |
7794 | if test -n "$DLLTOOL"; then | |
7795 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7796 | else | |
7797 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7798 | for as_dir in $PATH | |
7799 | do | |
7800 | IFS=$as_save_IFS | |
7801 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7802 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7803 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7804 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7805 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7806 | break 2 |
7807 | fi | |
7808 | done | |
81ecdfbb RW |
7809 | done |
7810 | IFS=$as_save_IFS | |
bec39cab AC |
7811 | |
7812 | fi | |
7813 | fi | |
7814 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7815 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7816 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7817 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7818 | else |
81ecdfbb RW |
7819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7820 | $as_echo "no" >&6; } | |
bec39cab AC |
7821 | fi |
7822 | ||
81ecdfbb | 7823 | |
bec39cab AC |
7824 | fi |
7825 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7826 | ac_ct_DLLTOOL=$DLLTOOL | |
7827 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7828 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7830 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7831 | if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : |
81ecdfbb | 7832 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7833 | else |
7834 | if test -n "$ac_ct_DLLTOOL"; then | |
7835 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7836 | else | |
7837 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7838 | for as_dir in $PATH | |
7839 | do | |
7840 | IFS=$as_save_IFS | |
7841 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7842 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7843 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7844 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7845 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7846 | break 2 |
7847 | fi | |
7848 | done | |
81ecdfbb RW |
7849 | done |
7850 | IFS=$as_save_IFS | |
bec39cab AC |
7851 | |
7852 | fi | |
7853 | fi | |
7854 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7855 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7857 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7858 | else |
81ecdfbb RW |
7859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7860 | $as_echo "no" >&6; } | |
bec39cab AC |
7861 | fi |
7862 | ||
81ecdfbb RW |
7863 | if test "x$ac_ct_DLLTOOL" = x; then |
7864 | DLLTOOL="" | |
7865 | else | |
7866 | case $cross_compiling:$ac_tool_warned in | |
7867 | yes:) | |
7868 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7869 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7870 | ac_tool_warned=yes ;; | |
7871 | esac | |
7872 | DLLTOOL=$ac_ct_DLLTOOL | |
7873 | fi | |
bec39cab AC |
7874 | else |
7875 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7876 | fi | |
7877 | ||
7878 | if test -n "$ac_tool_prefix"; then | |
7879 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7880 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7881 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7882 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7883 | if ${ac_cv_prog_WINDRES+:} false; then : |
81ecdfbb | 7884 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7885 | else |
7886 | if test -n "$WINDRES"; then | |
7887 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7888 | else | |
7889 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7890 | for as_dir in $PATH | |
7891 | do | |
7892 | IFS=$as_save_IFS | |
7893 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7894 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7895 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7896 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7897 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7898 | break 2 |
7899 | fi | |
7900 | done | |
81ecdfbb RW |
7901 | done |
7902 | IFS=$as_save_IFS | |
bec39cab AC |
7903 | |
7904 | fi | |
7905 | fi | |
7906 | WINDRES=$ac_cv_prog_WINDRES | |
7907 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7909 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7910 | else |
81ecdfbb RW |
7911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7912 | $as_echo "no" >&6; } | |
bec39cab AC |
7913 | fi |
7914 | ||
81ecdfbb | 7915 | |
bec39cab AC |
7916 | fi |
7917 | if test -z "$ac_cv_prog_WINDRES"; then | |
7918 | ac_ct_WINDRES=$WINDRES | |
7919 | # Extract the first word of "windres", so it can be a program name with args. | |
7920 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7922 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7923 | if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : |
81ecdfbb | 7924 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7925 | else |
7926 | if test -n "$ac_ct_WINDRES"; then | |
7927 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7928 | else | |
7929 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7930 | for as_dir in $PATH | |
7931 | do | |
7932 | IFS=$as_save_IFS | |
7933 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7934 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7935 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7936 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7937 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7938 | break 2 |
7939 | fi | |
7940 | done | |
81ecdfbb RW |
7941 | done |
7942 | IFS=$as_save_IFS | |
bec39cab AC |
7943 | |
7944 | fi | |
7945 | fi | |
7946 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7947 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7949 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7950 | else |
81ecdfbb RW |
7951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7952 | $as_echo "no" >&6; } | |
c906108c | 7953 | fi |
bec39cab | 7954 | |
81ecdfbb RW |
7955 | if test "x$ac_ct_WINDRES" = x; then |
7956 | WINDRES="" | |
7957 | else | |
7958 | case $cross_compiling:$ac_tool_warned in | |
7959 | yes:) | |
7960 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7961 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7962 | ac_tool_warned=yes ;; | |
7963 | esac | |
7964 | WINDRES=$ac_ct_WINDRES | |
7965 | fi | |
c906108c | 7966 | else |
bec39cab | 7967 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7968 | fi |
7969 | ||
bec39cab | 7970 | |
036c3acb TS |
7971 | case $host_os in |
7972 | gnu*) | |
7973 | # Needed for GNU Hurd hosts. | |
7974 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7975 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7976 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7978 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7979 | if ${ac_cv_prog_MIG+:} false; then : |
81ecdfbb | 7980 | $as_echo_n "(cached) " >&6 |
c906108c | 7981 | else |
bec39cab AC |
7982 | if test -n "$MIG"; then |
7983 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7984 | else | |
7985 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7986 | for as_dir in $PATH | |
7987 | do | |
7988 | IFS=$as_save_IFS | |
7989 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7990 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7991 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7992 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7993 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7994 | break 2 |
7995 | fi | |
7996 | done | |
81ecdfbb RW |
7997 | done |
7998 | IFS=$as_save_IFS | |
bec39cab | 7999 | |
c906108c | 8000 | fi |
bec39cab AC |
8001 | fi |
8002 | MIG=$ac_cv_prog_MIG | |
8003 | if test -n "$MIG"; then | |
81ecdfbb RW |
8004 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
8005 | $as_echo "$MIG" >&6; } | |
c906108c | 8006 | else |
81ecdfbb RW |
8007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8008 | $as_echo "no" >&6; } | |
c906108c SS |
8009 | fi |
8010 | ||
81ecdfbb | 8011 | |
bec39cab AC |
8012 | fi |
8013 | if test -z "$ac_cv_prog_MIG"; then | |
8014 | ac_ct_MIG=$MIG | |
8015 | # Extract the first word of "mig", so it can be a program name with args. | |
8016 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
8017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8018 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 8019 | if ${ac_cv_prog_ac_ct_MIG+:} false; then : |
81ecdfbb | 8020 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8021 | else |
8022 | if test -n "$ac_ct_MIG"; then | |
8023 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
8024 | else | |
8025 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8026 | for as_dir in $PATH | |
8027 | do | |
8028 | IFS=$as_save_IFS | |
8029 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 8030 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 8031 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 8032 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 8033 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8034 | break 2 |
8035 | fi | |
8036 | done | |
81ecdfbb RW |
8037 | done |
8038 | IFS=$as_save_IFS | |
c906108c | 8039 | |
bec39cab AC |
8040 | fi |
8041 | fi | |
8042 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
8043 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
8044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
8045 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 8046 | else |
81ecdfbb RW |
8047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8048 | $as_echo "no" >&6; } | |
bec39cab | 8049 | fi |
c906108c | 8050 | |
81ecdfbb RW |
8051 | if test "x$ac_ct_MIG" = x; then |
8052 | MIG="" | |
8053 | else | |
8054 | case $cross_compiling:$ac_tool_warned in | |
8055 | yes:) | |
8056 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8057 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8058 | ac_tool_warned=yes ;; | |
8059 | esac | |
8060 | MIG=$ac_ct_MIG | |
8061 | fi | |
bec39cab AC |
8062 | else |
8063 | MIG="$ac_cv_prog_MIG" | |
8064 | fi | |
c906108c | 8065 | |
036c3acb | 8066 | if test x"$MIG" = x; then |
d0ac1c44 | 8067 | as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 |
036c3acb TS |
8068 | fi |
8069 | ;; | |
8070 | esac | |
c906108c | 8071 | |
bec39cab AC |
8072 | # ---------------------- # |
8073 | # Checks for libraries. # | |
8074 | # ---------------------- # | |
c906108c | 8075 | |
bec39cab | 8076 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
8077 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
8078 | $as_echo_n "checking for main in -lm... " >&6; } | |
d0ac1c44 | 8079 | if ${ac_cv_lib_m_main+:} false; then : |
81ecdfbb | 8080 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8081 | else |
8082 | ac_check_lib_save_LIBS=$LIBS | |
8083 | LIBS="-lm $LIBS" | |
81ecdfbb | 8084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8085 | /* end confdefs.h. */ |
c906108c | 8086 | |
c906108c | 8087 | |
bec39cab AC |
8088 | int |
8089 | main () | |
8090 | { | |
81ecdfbb | 8091 | return main (); |
bec39cab AC |
8092 | ; |
8093 | return 0; | |
8094 | } | |
8095 | _ACEOF | |
81ecdfbb | 8096 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
8097 | ac_cv_lib_m_main=yes |
8098 | else | |
81ecdfbb | 8099 | ac_cv_lib_m_main=no |
bec39cab | 8100 | fi |
81ecdfbb RW |
8101 | rm -f core conftest.err conftest.$ac_objext \ |
8102 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
8103 | LIBS=$ac_check_lib_save_LIBS |
8104 | fi | |
81ecdfbb RW |
8105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
8106 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
d0ac1c44 | 8107 | if test "x$ac_cv_lib_m_main" = xyes; then : |
bec39cab AC |
8108 | cat >>confdefs.h <<_ACEOF |
8109 | #define HAVE_LIBM 1 | |
8110 | _ACEOF | |
8111 | ||
8112 | LIBS="-lm $LIBS" | |
c906108c | 8113 | |
c906108c | 8114 | fi |
bec39cab AC |
8115 | |
8116 | ||
bec39cab | 8117 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
8118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
8119 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
d0ac1c44 | 8120 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb | 8121 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8122 | else |
8123 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8125 | /* end confdefs.h. */ |
ddc9cd0f | 8126 | |
81ecdfbb RW |
8127 | /* Override any GCC internal prototype to avoid an error. |
8128 | Use char because int might match the return type of a GCC | |
8129 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
8130 | #ifdef __cplusplus |
8131 | extern "C" | |
8132 | #endif | |
bec39cab AC |
8133 | char gethostbyname (); |
8134 | int | |
8135 | main () | |
8136 | { | |
81ecdfbb | 8137 | return gethostbyname (); |
bec39cab AC |
8138 | ; |
8139 | return 0; | |
8140 | } | |
8141 | _ACEOF | |
81ecdfbb RW |
8142 | for ac_lib in '' nsl; do |
8143 | if test -z "$ac_lib"; then | |
8144 | ac_res="none required" | |
8145 | else | |
8146 | ac_res=-l$ac_lib | |
b4e70030 | 8147 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8148 | fi |
8149 | if ac_fn_c_try_link "$LINENO"; then : | |
8150 | ac_cv_search_gethostbyname=$ac_res | |
8151 | fi | |
8152 | rm -f core conftest.err conftest.$ac_objext \ | |
8153 | conftest$ac_exeext | |
d0ac1c44 | 8154 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb RW |
8155 | break |
8156 | fi | |
8157 | done | |
d0ac1c44 | 8158 | if ${ac_cv_search_gethostbyname+:} false; then : |
ddc9cd0f | 8159 | |
bec39cab | 8160 | else |
81ecdfbb | 8161 | ac_cv_search_gethostbyname=no |
bec39cab | 8162 | fi |
81ecdfbb | 8163 | rm conftest.$ac_ext |
bec39cab AC |
8164 | LIBS=$ac_func_search_save_LIBS |
8165 | fi | |
81ecdfbb RW |
8166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
8167 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
8168 | ac_res=$ac_cv_search_gethostbyname | |
8169 | if test "$ac_res" != no; then : | |
8170 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 8171 | |
bec39cab | 8172 | fi |
96baa820 | 8173 | |
c906108c | 8174 | |
b4e70030 | 8175 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
8176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
8177 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
d0ac1c44 | 8178 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb | 8179 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
8180 | else |
8181 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8183 | /* end confdefs.h. */ |
8184 | ||
81ecdfbb RW |
8185 | /* Override any GCC internal prototype to avoid an error. |
8186 | Use char because int might match the return type of a GCC | |
8187 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
8188 | #ifdef __cplusplus |
8189 | extern "C" | |
8190 | #endif | |
b4e70030 JB |
8191 | char socketpair (); |
8192 | int | |
8193 | main () | |
8194 | { | |
81ecdfbb | 8195 | return socketpair (); |
b4e70030 JB |
8196 | ; |
8197 | return 0; | |
8198 | } | |
8199 | _ACEOF | |
81ecdfbb RW |
8200 | for ac_lib in '' socket; do |
8201 | if test -z "$ac_lib"; then | |
8202 | ac_res="none required" | |
8203 | else | |
8204 | ac_res=-l$ac_lib | |
b4e70030 | 8205 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8206 | fi |
8207 | if ac_fn_c_try_link "$LINENO"; then : | |
8208 | ac_cv_search_socketpair=$ac_res | |
8209 | fi | |
8210 | rm -f core conftest.err conftest.$ac_objext \ | |
8211 | conftest$ac_exeext | |
d0ac1c44 | 8212 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb RW |
8213 | break |
8214 | fi | |
8215 | done | |
d0ac1c44 | 8216 | if ${ac_cv_search_socketpair+:} false; then : |
b4e70030 | 8217 | |
b4e70030 | 8218 | else |
81ecdfbb | 8219 | ac_cv_search_socketpair=no |
b4e70030 | 8220 | fi |
81ecdfbb | 8221 | rm conftest.$ac_ext |
b4e70030 JB |
8222 | LIBS=$ac_func_search_save_LIBS |
8223 | fi | |
81ecdfbb RW |
8224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
8225 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
8226 | ac_res=$ac_cv_search_socketpair | |
8227 | if test "$ac_res" != no; then : | |
8228 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
8229 | |
8230 | fi | |
8231 | ||
8232 | ||
233a11ab | 8233 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 8234 | |
711a72d3 | 8235 | # Use the system's zlib library. |
39f3de7c L |
8236 | zlibdir="-L\$(top_builddir)/../zlib" |
8237 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 8238 | |
711a72d3 L |
8239 | # Check whether --with-system-zlib was given. |
8240 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
8241 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
8242 | zlibdir= | |
8243 | zlibinc= | |
8244 | fi | |
b040ad30 | 8245 | |
233a11ab | 8246 | fi |
233a11ab | 8247 | |
233a11ab | 8248 | |
233a11ab | 8249 | |
b040ad30 | 8250 | |
233a11ab | 8251 | |
77f120bf | 8252 | |
016a3251 DD |
8253 | if test "X$prefix" = "XNONE"; then |
8254 | acl_final_prefix="$ac_default_prefix" | |
8255 | else | |
8256 | acl_final_prefix="$prefix" | |
8257 | fi | |
8258 | if test "X$exec_prefix" = "XNONE"; then | |
8259 | acl_final_exec_prefix='${prefix}' | |
8260 | else | |
8261 | acl_final_exec_prefix="$exec_prefix" | |
8262 | fi | |
8263 | acl_save_prefix="$prefix" | |
8264 | prefix="$acl_final_prefix" | |
8265 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8266 | prefix="$acl_save_prefix" | |
8267 | ||
8268 | ||
8269 | # Check whether --with-gnu-ld was given. | |
8270 | if test "${with_gnu_ld+set}" = set; then : | |
8271 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8272 | else | |
8273 | with_gnu_ld=no | |
8274 | fi | |
8275 | ||
8276 | # Prepare PATH_SEPARATOR. | |
8277 | # The user is always right. | |
8278 | if test "${PATH_SEPARATOR+set}" != set; then | |
8279 | echo "#! /bin/sh" >conf$$.sh | |
8280 | echo "exit 0" >>conf$$.sh | |
8281 | chmod +x conf$$.sh | |
8282 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8283 | PATH_SEPARATOR=';' | |
8284 | else | |
8285 | PATH_SEPARATOR=: | |
8286 | fi | |
8287 | rm -f conf$$.sh | |
8288 | fi | |
8289 | ac_prog=ld | |
8290 | if test "$GCC" = yes; then | |
8291 | # Check if gcc -print-prog-name=ld gives a path. | |
8292 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8293 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8294 | case $host in | |
8295 | *-*-mingw*) | |
8296 | # gcc leaves a trailing carriage return which upsets mingw | |
8297 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8298 | *) | |
8299 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8300 | esac | |
8301 | case $ac_prog in | |
8302 | # Accept absolute paths. | |
8303 | [\\/]* | [A-Za-z]:[\\/]*) | |
8304 | re_direlt='/[^/][^/]*/\.\./' | |
8305 | # Canonicalize the path of ld | |
8306 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8307 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8308 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8309 | done | |
8310 | test -z "$LD" && LD="$ac_prog" | |
8311 | ;; | |
8312 | "") | |
8313 | # If it fails, then pretend we aren't using GCC. | |
8314 | ac_prog=ld | |
8315 | ;; | |
8316 | *) | |
8317 | # If it is relative, then search for the first ld in PATH. | |
8318 | with_gnu_ld=unknown | |
8319 | ;; | |
8320 | esac | |
8321 | elif test "$with_gnu_ld" = yes; then | |
8322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8323 | $as_echo_n "checking for GNU ld... " >&6; } | |
8324 | else | |
8325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8326 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8327 | fi | |
d0ac1c44 | 8328 | if ${acl_cv_path_LD+:} false; then : |
016a3251 DD |
8329 | $as_echo_n "(cached) " >&6 |
8330 | else | |
8331 | if test -z "$LD"; then | |
8332 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8333 | for ac_dir in $PATH; do | |
8334 | test -z "$ac_dir" && ac_dir=. | |
8335 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8336 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8337 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8338 | # but apparently some GNU ld's only accept -v. | |
8339 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8340 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8341 | test "$with_gnu_ld" != no && break | |
8342 | else | |
8343 | test "$with_gnu_ld" != yes && break | |
8344 | fi | |
8345 | fi | |
8346 | done | |
8347 | IFS="$ac_save_ifs" | |
8348 | else | |
8349 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8350 | fi | |
8351 | fi | |
8352 | ||
8353 | LD="$acl_cv_path_LD" | |
8354 | if test -n "$LD"; then | |
8355 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8356 | $as_echo "$LD" >&6; } | |
8357 | else | |
8358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8359 | $as_echo "no" >&6; } | |
8360 | fi | |
d0ac1c44 | 8361 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
016a3251 DD |
8362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
8363 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
d0ac1c44 | 8364 | if ${acl_cv_prog_gnu_ld+:} false; then : |
016a3251 DD |
8365 | $as_echo_n "(cached) " >&6 |
8366 | else | |
8367 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8368 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8369 | acl_cv_prog_gnu_ld=yes | |
8370 | else | |
8371 | acl_cv_prog_gnu_ld=no | |
8372 | fi | |
8373 | fi | |
8374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8375 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8376 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8377 | ||
8378 | ||
8379 | ||
8380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8381 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
d0ac1c44 | 8382 | if ${acl_cv_rpath+:} false; then : |
016a3251 DD |
8383 | $as_echo_n "(cached) " >&6 |
8384 | else | |
8385 | ||
8386 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8387 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8388 | . ./conftest.sh | |
8389 | rm -f ./conftest.sh | |
8390 | acl_cv_rpath=done | |
8391 | ||
8392 | fi | |
8393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8394 | $as_echo "$acl_cv_rpath" >&6; } | |
8395 | wl="$acl_cv_wl" | |
8396 | libext="$acl_cv_libext" | |
8397 | shlibext="$acl_cv_shlibext" | |
8398 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8399 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8400 | hardcode_direct="$acl_cv_hardcode_direct" | |
8401 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8402 | # Check whether --enable-rpath was given. | |
8403 | if test "${enable_rpath+set}" = set; then : | |
8404 | enableval=$enable_rpath; : | |
8405 | else | |
8406 | enable_rpath=yes | |
8407 | fi | |
8408 | ||
8409 | ||
8410 | ||
8411 | ||
8412 | ||
8413 | ||
8414 | ||
8415 | ||
8416 | use_additional=yes | |
8417 | ||
8418 | acl_save_prefix="$prefix" | |
8419 | prefix="$acl_final_prefix" | |
8420 | acl_save_exec_prefix="$exec_prefix" | |
8421 | exec_prefix="$acl_final_exec_prefix" | |
8422 | ||
8423 | eval additional_includedir=\"$includedir\" | |
8424 | eval additional_libdir=\"$libdir\" | |
8425 | ||
8426 | exec_prefix="$acl_save_exec_prefix" | |
8427 | prefix="$acl_save_prefix" | |
77f120bf | 8428 | |
6c7a06a3 | 8429 | |
81ecdfbb RW |
8430 | # Check whether --with-libiconv-prefix was given. |
8431 | if test "${with_libiconv_prefix+set}" = set; then : | |
8432 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8433 | if test "X$withval" = "Xno"; then |
8434 | use_additional=no | |
8435 | else | |
8436 | if test "X$withval" = "X"; then | |
8437 | ||
8438 | acl_save_prefix="$prefix" | |
8439 | prefix="$acl_final_prefix" | |
8440 | acl_save_exec_prefix="$exec_prefix" | |
8441 | exec_prefix="$acl_final_exec_prefix" | |
8442 | ||
8443 | eval additional_includedir=\"$includedir\" | |
8444 | eval additional_libdir=\"$libdir\" | |
8445 | ||
8446 | exec_prefix="$acl_save_exec_prefix" | |
8447 | prefix="$acl_save_prefix" | |
8448 | ||
8449 | else | |
8450 | additional_includedir="$withval/include" | |
8451 | additional_libdir="$withval/lib" | |
8452 | fi | |
8453 | fi | |
6c7a06a3 | 8454 | |
81ecdfbb RW |
8455 | fi |
8456 | ||
9f1528a1 AB |
8457 | |
8458 | # Check whether --with-libiconv-type was given. | |
8459 | if test "${with_libiconv_type+set}" = set; then : | |
8460 | withval=$with_libiconv_type; with_libiconv_type=$withval | |
8461 | else | |
8462 | with_libiconv_type=auto | |
8463 | fi | |
8464 | ||
8465 | lib_type=`eval echo \$with_libiconv_type` | |
8466 | ||
016a3251 DD |
8467 | LIBICONV= |
8468 | LTLIBICONV= | |
8469 | INCICONV= | |
8470 | rpathdirs= | |
8471 | ltrpathdirs= | |
8472 | names_already_handled= | |
8473 | names_next_round='iconv ' | |
8474 | while test -n "$names_next_round"; do | |
8475 | names_this_round="$names_next_round" | |
8476 | names_next_round= | |
8477 | for name in $names_this_round; do | |
8478 | already_handled= | |
8479 | for n in $names_already_handled; do | |
8480 | if test "$n" = "$name"; then | |
8481 | already_handled=yes | |
8482 | break | |
8483 | fi | |
8484 | done | |
8485 | if test -z "$already_handled"; then | |
8486 | names_already_handled="$names_already_handled $name" | |
8487 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8488 | eval value=\"\$HAVE_LIB$uppername\" | |
8489 | if test -n "$value"; then | |
8490 | if test "$value" = yes; then | |
8491 | eval value=\"\$LIB$uppername\" | |
8492 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8493 | eval value=\"\$LTLIB$uppername\" | |
8494 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8495 | else | |
8496 | : | |
8497 | fi | |
8498 | else | |
8499 | found_dir= | |
8500 | found_la= | |
8501 | found_so= | |
8502 | found_a= | |
8503 | if test $use_additional = yes; then | |
9f1528a1 | 8504 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8505 | found_dir="$additional_libdir" |
8506 | found_so="$additional_libdir/lib$name.$shlibext" | |
8507 | if test -f "$additional_libdir/lib$name.la"; then | |
8508 | found_la="$additional_libdir/lib$name.la" | |
8509 | fi | |
9f1528a1 | 8510 | elif test x$lib_type != xshared; then |
016a3251 DD |
8511 | if test -f "$additional_libdir/lib$name.$libext"; then |
8512 | found_dir="$additional_libdir" | |
8513 | found_a="$additional_libdir/lib$name.$libext" | |
8514 | if test -f "$additional_libdir/lib$name.la"; then | |
8515 | found_la="$additional_libdir/lib$name.la" | |
8516 | fi | |
8517 | fi | |
8518 | fi | |
8519 | fi | |
8520 | if test "X$found_dir" = "X"; then | |
8521 | for x in $LDFLAGS $LTLIBICONV; do | |
8522 | ||
8523 | acl_save_prefix="$prefix" | |
8524 | prefix="$acl_final_prefix" | |
8525 | acl_save_exec_prefix="$exec_prefix" | |
8526 | exec_prefix="$acl_final_exec_prefix" | |
8527 | eval x=\"$x\" | |
8528 | exec_prefix="$acl_save_exec_prefix" | |
8529 | prefix="$acl_save_prefix" | |
8530 | ||
8531 | case "$x" in | |
8532 | -L*) | |
8533 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 8534 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8535 | found_dir="$dir" |
8536 | found_so="$dir/lib$name.$shlibext" | |
8537 | if test -f "$dir/lib$name.la"; then | |
8538 | found_la="$dir/lib$name.la" | |
8539 | fi | |
9f1528a1 | 8540 | elif test x$lib_type != xshared; then |
016a3251 DD |
8541 | if test -f "$dir/lib$name.$libext"; then |
8542 | found_dir="$dir" | |
8543 | found_a="$dir/lib$name.$libext" | |
8544 | if test -f "$dir/lib$name.la"; then | |
8545 | found_la="$dir/lib$name.la" | |
8546 | fi | |
8547 | fi | |
8548 | fi | |
8549 | ;; | |
8550 | esac | |
8551 | if test "X$found_dir" != "X"; then | |
8552 | break | |
8553 | fi | |
8554 | done | |
8555 | fi | |
8556 | if test "X$found_dir" != "X"; then | |
8557 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8558 | if test "X$found_so" != "X"; then | |
8559 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8560 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8561 | else | |
8562 | haveit= | |
8563 | for x in $ltrpathdirs; do | |
8564 | if test "X$x" = "X$found_dir"; then | |
8565 | haveit=yes | |
8566 | break | |
8567 | fi | |
8568 | done | |
8569 | if test -z "$haveit"; then | |
8570 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8571 | fi | |
8572 | if test "$hardcode_direct" = yes; then | |
8573 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8574 | else | |
8575 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8576 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8577 | haveit= | |
8578 | for x in $rpathdirs; do | |
8579 | if test "X$x" = "X$found_dir"; then | |
8580 | haveit=yes | |
8581 | break | |
8582 | fi | |
8583 | done | |
8584 | if test -z "$haveit"; then | |
8585 | rpathdirs="$rpathdirs $found_dir" | |
8586 | fi | |
8587 | else | |
8588 | haveit= | |
8589 | for x in $LDFLAGS $LIBICONV; do | |
8590 | ||
8591 | acl_save_prefix="$prefix" | |
8592 | prefix="$acl_final_prefix" | |
8593 | acl_save_exec_prefix="$exec_prefix" | |
8594 | exec_prefix="$acl_final_exec_prefix" | |
8595 | eval x=\"$x\" | |
8596 | exec_prefix="$acl_save_exec_prefix" | |
8597 | prefix="$acl_save_prefix" | |
8598 | ||
8599 | if test "X$x" = "X-L$found_dir"; then | |
8600 | haveit=yes | |
8601 | break | |
8602 | fi | |
8603 | done | |
8604 | if test -z "$haveit"; then | |
8605 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8606 | fi | |
8607 | if test "$hardcode_minus_L" != no; then | |
8608 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8609 | else | |
8610 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8611 | fi | |
8612 | fi | |
8613 | fi | |
8614 | fi | |
8615 | else | |
8616 | if test "X$found_a" != "X"; then | |
8617 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8618 | else | |
8619 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8620 | fi | |
8621 | fi | |
8622 | additional_includedir= | |
8623 | case "$found_dir" in | |
8624 | */lib | */lib/) | |
8625 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8626 | additional_includedir="$basedir/include" | |
8627 | ;; | |
8628 | esac | |
8629 | if test "X$additional_includedir" != "X"; then | |
8630 | if test "X$additional_includedir" != "X/usr/include"; then | |
8631 | haveit= | |
8632 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8633 | if test -n "$GCC"; then | |
8634 | case $host_os in | |
8635 | linux*) haveit=yes;; | |
8636 | esac | |
8637 | fi | |
8638 | fi | |
8639 | if test -z "$haveit"; then | |
8640 | for x in $CPPFLAGS $INCICONV; do | |
8641 | ||
8642 | acl_save_prefix="$prefix" | |
8643 | prefix="$acl_final_prefix" | |
8644 | acl_save_exec_prefix="$exec_prefix" | |
8645 | exec_prefix="$acl_final_exec_prefix" | |
8646 | eval x=\"$x\" | |
8647 | exec_prefix="$acl_save_exec_prefix" | |
8648 | prefix="$acl_save_prefix" | |
8649 | ||
8650 | if test "X$x" = "X-I$additional_includedir"; then | |
8651 | haveit=yes | |
8652 | break | |
8653 | fi | |
8654 | done | |
8655 | if test -z "$haveit"; then | |
8656 | if test -d "$additional_includedir"; then | |
8657 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8658 | fi | |
8659 | fi | |
8660 | fi | |
8661 | fi | |
8662 | fi | |
8663 | if test -n "$found_la"; then | |
8664 | save_libdir="$libdir" | |
8665 | case "$found_la" in | |
8666 | */* | *\\*) . "$found_la" ;; | |
8667 | *) . "./$found_la" ;; | |
8668 | esac | |
8669 | libdir="$save_libdir" | |
8670 | for dep in $dependency_libs; do | |
8671 | case "$dep" in | |
8672 | -L*) | |
8673 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8674 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8675 | haveit= | |
8676 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8677 | if test -n "$GCC"; then | |
8678 | case $host_os in | |
8679 | linux*) haveit=yes;; | |
8680 | esac | |
8681 | fi | |
8682 | fi | |
8683 | if test -z "$haveit"; then | |
8684 | haveit= | |
8685 | for x in $LDFLAGS $LIBICONV; do | |
8686 | ||
8687 | acl_save_prefix="$prefix" | |
8688 | prefix="$acl_final_prefix" | |
8689 | acl_save_exec_prefix="$exec_prefix" | |
8690 | exec_prefix="$acl_final_exec_prefix" | |
8691 | eval x=\"$x\" | |
8692 | exec_prefix="$acl_save_exec_prefix" | |
8693 | prefix="$acl_save_prefix" | |
8694 | ||
8695 | if test "X$x" = "X-L$additional_libdir"; then | |
8696 | haveit=yes | |
8697 | break | |
8698 | fi | |
8699 | done | |
8700 | if test -z "$haveit"; then | |
8701 | if test -d "$additional_libdir"; then | |
8702 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8703 | fi | |
8704 | fi | |
8705 | haveit= | |
8706 | for x in $LDFLAGS $LTLIBICONV; do | |
8707 | ||
8708 | acl_save_prefix="$prefix" | |
8709 | prefix="$acl_final_prefix" | |
8710 | acl_save_exec_prefix="$exec_prefix" | |
8711 | exec_prefix="$acl_final_exec_prefix" | |
8712 | eval x=\"$x\" | |
8713 | exec_prefix="$acl_save_exec_prefix" | |
8714 | prefix="$acl_save_prefix" | |
8715 | ||
8716 | if test "X$x" = "X-L$additional_libdir"; then | |
8717 | haveit=yes | |
8718 | break | |
8719 | fi | |
8720 | done | |
8721 | if test -z "$haveit"; then | |
8722 | if test -d "$additional_libdir"; then | |
8723 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8724 | fi | |
8725 | fi | |
8726 | fi | |
8727 | fi | |
8728 | ;; | |
8729 | -R*) | |
8730 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8731 | if test "$enable_rpath" != no; then | |
8732 | haveit= | |
8733 | for x in $rpathdirs; do | |
8734 | if test "X$x" = "X$dir"; then | |
8735 | haveit=yes | |
8736 | break | |
8737 | fi | |
8738 | done | |
8739 | if test -z "$haveit"; then | |
8740 | rpathdirs="$rpathdirs $dir" | |
8741 | fi | |
8742 | haveit= | |
8743 | for x in $ltrpathdirs; do | |
8744 | if test "X$x" = "X$dir"; then | |
8745 | haveit=yes | |
8746 | break | |
8747 | fi | |
8748 | done | |
8749 | if test -z "$haveit"; then | |
8750 | ltrpathdirs="$ltrpathdirs $dir" | |
8751 | fi | |
8752 | fi | |
8753 | ;; | |
8754 | -l*) | |
8755 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8756 | ;; | |
8757 | *.la) | |
8758 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8759 | ;; | |
8760 | *) | |
8761 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8762 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8763 | ;; | |
8764 | esac | |
8765 | done | |
8766 | fi | |
8767 | else | |
9f1528a1 AB |
8768 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
8769 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8770 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8771 | else | |
8772 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext" | |
8773 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext" | |
8774 | fi | |
016a3251 DD |
8775 | fi |
8776 | fi | |
8777 | fi | |
8778 | done | |
8779 | done | |
8780 | if test "X$rpathdirs" != "X"; then | |
8781 | if test -n "$hardcode_libdir_separator"; then | |
8782 | alldirs= | |
8783 | for found_dir in $rpathdirs; do | |
8784 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8785 | done | |
8786 | acl_save_libdir="$libdir" | |
8787 | libdir="$alldirs" | |
8788 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8789 | libdir="$acl_save_libdir" | |
8790 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8791 | else | |
8792 | for found_dir in $rpathdirs; do | |
8793 | acl_save_libdir="$libdir" | |
8794 | libdir="$found_dir" | |
8795 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8796 | libdir="$acl_save_libdir" | |
8797 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8798 | done | |
8799 | fi | |
8800 | fi | |
8801 | if test "X$ltrpathdirs" != "X"; then | |
8802 | for found_dir in $ltrpathdirs; do | |
8803 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8804 | done | |
8805 | fi | |
8806 | ||
8807 | ||
8808 | ||
8809 | ||
8810 | ||
6c7a06a3 | 8811 | |
6c7a06a3 | 8812 | |
81ecdfbb RW |
8813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8814 | $as_echo_n "checking for iconv... " >&6; } | |
d0ac1c44 | 8815 | if ${am_cv_func_iconv+:} false; then : |
81ecdfbb | 8816 | $as_echo_n "(cached) " >&6 |
d542061a | 8817 | else |
6c7a06a3 TT |
8818 | |
8819 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8820 | am_cv_lib_iconv=no | |
016a3251 DD |
8821 | am_save_CPPFLAGS="$CPPFLAGS" |
8822 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8824 | /* end confdefs.h. */ |
6c7a06a3 TT |
8825 | #include <stdlib.h> |
8826 | #include <iconv.h> | |
d542061a UW |
8827 | int |
8828 | main () | |
8829 | { | |
6c7a06a3 | 8830 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8831 | iconv(cd,NULL,NULL,NULL,NULL); |
8832 | iconv_close(cd); | |
d542061a UW |
8833 | ; |
8834 | return 0; | |
8835 | } | |
8836 | _ACEOF | |
81ecdfbb | 8837 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8838 | am_cv_func_iconv=yes |
d542061a | 8839 | fi |
81ecdfbb RW |
8840 | rm -f core conftest.err conftest.$ac_objext \ |
8841 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8842 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8843 | |
016a3251 DD |
8844 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8845 | for _libs in .libs _libs; do | |
8846 | am_save_CPPFLAGS="$CPPFLAGS" | |
8847 | am_save_LIBS="$LIBS" | |
8848 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8849 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8851 | /* end confdefs.h. */ |
6c7a06a3 TT |
8852 | #include <stdlib.h> |
8853 | #include <iconv.h> | |
d542061a UW |
8854 | int |
8855 | main () | |
8856 | { | |
6c7a06a3 | 8857 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8858 | iconv(cd,NULL,NULL,NULL,NULL); |
8859 | iconv_close(cd); | |
d542061a UW |
8860 | ; |
8861 | return 0; | |
8862 | } | |
8863 | _ACEOF | |
81ecdfbb | 8864 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8865 | INCICONV="-I../libiconv/include" |
8866 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8867 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8868 | am_cv_lib_iconv=yes | |
8869 | am_cv_func_iconv=yes | |
d542061a | 8870 | fi |
81ecdfbb RW |
8871 | rm -f core conftest.err conftest.$ac_objext \ |
8872 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8873 | CPPFLAGS="$am_save_CPPFLAGS" |
8874 | LIBS="$am_save_LIBS" | |
8875 | if test "$am_cv_func_iconv" = "yes"; then | |
8876 | break | |
8877 | fi | |
8878 | done | |
77f120bf | 8879 | fi |
94ae1714 | 8880 | |
4edb1e84 | 8881 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8882 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8883 | am_save_LIBS="$LIBS" |
5d762de0 | 8884 | CPPFLAGS="$CPPFLAGS $INCICONV" |
016a3251 | 8885 | LIBS="$LIBS $LIBICONV" |
81ecdfbb | 8886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8887 | /* end confdefs.h. */ |
6c7a06a3 TT |
8888 | #include <stdlib.h> |
8889 | #include <iconv.h> | |
bec39cab AC |
8890 | int |
8891 | main () | |
8892 | { | |
6c7a06a3 TT |
8893 | iconv_t cd = iconv_open("",""); |
8894 | iconv(cd,NULL,NULL,NULL,NULL); | |
8895 | iconv_close(cd); | |
bec39cab AC |
8896 | ; |
8897 | return 0; | |
8898 | } | |
8899 | _ACEOF | |
81ecdfbb | 8900 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8901 | am_cv_lib_iconv=yes |
6c7a06a3 | 8902 | am_cv_func_iconv=yes |
627af7ea | 8903 | fi |
81ecdfbb RW |
8904 | rm -f core conftest.err conftest.$ac_objext \ |
8905 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8906 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8907 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8908 | fi |
8909 | ||
8910 | fi | |
81ecdfbb RW |
8911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8912 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8913 | if test "$am_cv_func_iconv" = yes; then |
8914 | ||
8915 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8916 | |
016a3251 | 8917 | fi |
fc3b640d | 8918 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8919 | |
8920 | for element in $INCICONV; do | |
8921 | haveit= | |
8922 | for x in $CPPFLAGS; do | |
8923 | ||
8924 | acl_save_prefix="$prefix" | |
8925 | prefix="$acl_final_prefix" | |
8926 | acl_save_exec_prefix="$exec_prefix" | |
8927 | exec_prefix="$acl_final_exec_prefix" | |
8928 | eval x=\"$x\" | |
8929 | exec_prefix="$acl_save_exec_prefix" | |
8930 | prefix="$acl_save_prefix" | |
8931 | ||
8932 | if test "X$x" = "X$element"; then | |
8933 | haveit=yes | |
8934 | break | |
8935 | fi | |
8936 | done | |
8937 | if test -z "$haveit"; then | |
8938 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8939 | fi | |
8940 | done | |
8941 | ||
8942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8943 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8945 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8946 | else |
016a3251 DD |
8947 | LIBICONV= |
8948 | LTLIBICONV= | |
fc3b640d | 8949 | fi |
94ae1714 | 8950 | |
6c7a06a3 | 8951 | |
6c7a06a3 | 8952 | |
016a3251 | 8953 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8955 | $as_echo_n "checking for iconv declaration... " >&6; } | |
d0ac1c44 | 8956 | if ${am_cv_proto_iconv+:} false; then : |
81ecdfbb | 8957 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8958 | else |
8959 | ||
81ecdfbb | 8960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8961 | /* end confdefs.h. */ |
8962 | ||
6c7a06a3 TT |
8963 | #include <stdlib.h> |
8964 | #include <iconv.h> | |
8965 | extern | |
b4e70030 | 8966 | #ifdef __cplusplus |
6c7a06a3 | 8967 | "C" |
b4e70030 | 8968 | #endif |
6c7a06a3 TT |
8969 | #if defined(__STDC__) || defined(__cplusplus) |
8970 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8971 | #else | |
8972 | size_t iconv(); | |
8973 | #endif | |
8974 | ||
b4e70030 JB |
8975 | int |
8976 | main () | |
8977 | { | |
6c7a06a3 | 8978 | |
b4e70030 JB |
8979 | ; |
8980 | return 0; | |
8981 | } | |
8982 | _ACEOF | |
81ecdfbb | 8983 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8984 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8985 | else |
81ecdfbb | 8986 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8987 | fi |
81ecdfbb | 8988 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8989 | 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);" |
8990 | fi | |
8991 | ||
8992 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8994 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8995 | $as_echo "${ac_t:- |
8996 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8997 | |
8998 | cat >>confdefs.h <<_ACEOF | |
8999 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
9000 | _ACEOF | |
9001 | ||
9002 | fi | |
6c7a06a3 TT |
9003 | |
9004 | ||
478aac75 DE |
9005 | # GDB may fork/exec the iconv program to get the list of supported character |
9006 | # sets. Allow the user to specify where to find it. | |
9007 | # There are several factors affecting the choice of option name: | |
9008 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
9009 | # the build-time location of libiconv files. | |
9010 | # - The program we need to find is iconv, which comes with glibc. The user | |
9011 | # doesn't necessarily have libiconv installed. Therefore naming this | |
9012 | # --with-libiconv-foo feels wrong. | |
9013 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
9014 | # defined to work on directories not files (though it really doesn't know | |
9015 | # the difference). | |
9016 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
9017 | # with --with-libiconv-prefix. | |
9018 | # Putting these together is why the option name is --with-iconv-bin. | |
9019 | ||
9020 | ||
9021 | # Check whether --with-iconv-bin was given. | |
9022 | if test "${with_iconv_bin+set}" = set; then : | |
9023 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
9024 | ||
9025 | cat >>confdefs.h <<_ACEOF | |
9026 | #define ICONV_BIN "${iconv_bin}" | |
9027 | _ACEOF | |
9028 | ||
9029 | ||
9030 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9031 | if test "x$prefix" = xNONE; then | |
9032 | test_prefix=/usr/local | |
9033 | else | |
9034 | test_prefix=$prefix | |
9035 | fi | |
9036 | else | |
9037 | test_prefix=$exec_prefix | |
9038 | fi | |
9039 | value=0 | |
9040 | case ${iconv_bin} in | |
9041 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9042 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9043 | value=1 | |
9044 | ;; | |
9045 | esac | |
9046 | ||
9047 | cat >>confdefs.h <<_ACEOF | |
9048 | #define ICONV_BIN_RELOCATABLE $value | |
9049 | _ACEOF | |
9050 | ||
9051 | ||
9052 | ||
9053 | fi | |
9054 | ||
9055 | ||
cb01cfba | 9056 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9057 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9058 | prefer_curses=yes |
9059 | fi | |
9060 | ||
9061 | curses_found=no | |
9062 | if test x"$prefer_curses" = xyes; then | |
9063 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9064 | # curses library because the latter might not provide all the | |
9065 | # functionality we need. However, this leads to problems on systems | |
9066 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9067 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9068 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9069 | # a situation. | |
81ecdfbb RW |
9070 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9071 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
d0ac1c44 | 9072 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9073 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9074 | else |
9075 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9076 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9077 | /* end confdefs.h. */ |
9078 | ||
81ecdfbb RW |
9079 | /* Override any GCC internal prototype to avoid an error. |
9080 | Use char because int might match the return type of a GCC | |
9081 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9082 | #ifdef __cplusplus |
9083 | extern "C" | |
9084 | #endif | |
6c7a06a3 TT |
9085 | char waddstr (); |
9086 | int | |
9087 | main () | |
9088 | { | |
81ecdfbb | 9089 | return waddstr (); |
6c7a06a3 TT |
9090 | ; |
9091 | return 0; | |
9092 | } | |
9093 | _ACEOF | |
5007d765 | 9094 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
9095 | if test -z "$ac_lib"; then |
9096 | ac_res="none required" | |
9097 | else | |
9098 | ac_res=-l$ac_lib | |
9099 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9100 | fi | |
9101 | if ac_fn_c_try_link "$LINENO"; then : | |
9102 | ac_cv_search_waddstr=$ac_res | |
9103 | fi | |
9104 | rm -f core conftest.err conftest.$ac_objext \ | |
9105 | conftest$ac_exeext | |
d0ac1c44 | 9106 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb RW |
9107 | break |
9108 | fi | |
9109 | done | |
d0ac1c44 | 9110 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9111 | |
6c7a06a3 | 9112 | else |
81ecdfbb RW |
9113 | ac_cv_search_waddstr=no |
9114 | fi | |
9115 | rm conftest.$ac_ext | |
9116 | LIBS=$ac_func_search_save_LIBS | |
9117 | fi | |
9118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9119 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9120 | ac_res=$ac_cv_search_waddstr | |
9121 | if test "$ac_res" != no; then : | |
9122 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9123 | |
9124 | fi | |
9125 | ||
9126 | ||
cb01cfba JB |
9127 | if test "$ac_cv_search_waddstr" != no; then |
9128 | curses_found=yes | |
9129 | fi | |
9130 | fi | |
9131 | ||
9132 | # Check whether we should enable the TUI, but only do so if we really | |
9133 | # can. | |
9134 | if test x"$enable_tui" != xno; then | |
0ad6b8ee | 9135 | if test -d "$srcdir/tui"; then |
cb01cfba | 9136 | if test "$curses_found" != no; then |
6c7a06a3 TT |
9137 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9138 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9139 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9140 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
9141 | else |
9142 | if test x"$enable_tui" = xyes; then | |
d0ac1c44 | 9143 | as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9144 | else |
81ecdfbb RW |
9145 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9146 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9147 | fi |
9148 | fi | |
9149 | fi | |
9150 | fi | |
9151 | ||
9152 | # Since GDB uses Readline, we need termcap functionality. In many | |
9153 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 9154 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
9155 | |
9156 | case $host_os in | |
9157 | cygwin*) | |
0ad6b8ee | 9158 | if test -d "$srcdir/libtermcap"; then |
6c7a06a3 TT |
9159 | LIBS="../libtermcap/libtermcap.a $LIBS" |
9160 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9161 | fi ;; | |
9162 | go32* | *djgpp*) | |
9163 | ac_cv_search_tgetent="none required" | |
9164 | ;; | |
6c7a06a3 TT |
9165 | esac |
9166 | ||
9167 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9169 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
d0ac1c44 | 9170 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb | 9171 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9172 | else |
9173 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9175 | /* end confdefs.h. */ |
9176 | ||
81ecdfbb RW |
9177 | /* Override any GCC internal prototype to avoid an error. |
9178 | Use char because int might match the return type of a GCC | |
9179 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9180 | #ifdef __cplusplus |
9181 | extern "C" | |
9182 | #endif | |
6c7a06a3 TT |
9183 | char tgetent (); |
9184 | int | |
9185 | main () | |
9186 | { | |
81ecdfbb | 9187 | return tgetent (); |
6c7a06a3 TT |
9188 | ; |
9189 | return 0; | |
9190 | } | |
9191 | _ACEOF | |
2578ecb1 | 9192 | for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
9193 | if test -z "$ac_lib"; then |
9194 | ac_res="none required" | |
9195 | else | |
9196 | ac_res=-l$ac_lib | |
6c7a06a3 | 9197 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9198 | fi |
9199 | if ac_fn_c_try_link "$LINENO"; then : | |
9200 | ac_cv_search_tgetent=$ac_res | |
9201 | fi | |
9202 | rm -f core conftest.err conftest.$ac_objext \ | |
9203 | conftest$ac_exeext | |
d0ac1c44 | 9204 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb RW |
9205 | break |
9206 | fi | |
9207 | done | |
d0ac1c44 | 9208 | if ${ac_cv_search_tgetent+:} false; then : |
6c7a06a3 | 9209 | |
6c7a06a3 | 9210 | else |
81ecdfbb | 9211 | ac_cv_search_tgetent=no |
6c7a06a3 | 9212 | fi |
81ecdfbb | 9213 | rm conftest.$ac_ext |
6c7a06a3 TT |
9214 | LIBS=$ac_func_search_save_LIBS |
9215 | fi | |
81ecdfbb RW |
9216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9217 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9218 | ac_res=$ac_cv_search_tgetent | |
9219 | if test "$ac_res" != no; then : | |
9220 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9221 | |
06825bd1 MK |
9222 | fi |
9223 | ||
06825bd1 | 9224 | |
bec39cab | 9225 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 9226 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
9227 | fi |
9228 | ||
3841debe | 9229 | |
81ecdfbb RW |
9230 | # Check whether --with-system-readline was given. |
9231 | if test "${with_system_readline+set}" = set; then : | |
9232 | withval=$with_system_readline; | |
9233 | fi | |
6a30b0a5 | 9234 | |
6a30b0a5 AS |
9235 | |
9236 | if test "$with_system_readline" = yes; then | |
7c26f8da AH |
9237 | for ac_header in readline/readline.h |
9238 | do : | |
9239 | ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" | |
9240 | if test "x$ac_cv_header_readline_readline_h" = xyes; then : | |
9241 | cat >>confdefs.h <<_ACEOF | |
9242 | #define HAVE_READLINE_READLINE_H 1 | |
9243 | _ACEOF | |
9244 | readline_h=yes | |
9245 | else | |
9246 | readline_h=no | |
9247 | fi | |
9248 | ||
9249 | done | |
9250 | ||
9251 | if test "$readline_h" = "no"; then | |
9252 | as_fn_error $? "readline development packages are probably missing" "$LINENO" 5 | |
9253 | fi | |
5593a99a | 9254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 |
86c6b807 TT |
9255 | $as_echo_n "checking whether system readline is new enough... " >&6; } |
9256 | if ${gdb_cv_readline_ok+:} false; then : | |
9257 | $as_echo_n "(cached) " >&6 | |
9258 | else | |
9259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9260 | /* end confdefs.h. */ | |
9261 | #include <stdio.h> | |
5593a99a | 9262 | #include <readline/readline.h> |
86c6b807 TT |
9263 | int |
9264 | main () | |
9265 | { | |
9266 | #if RL_VERSION_MAJOR < 7 | |
5593a99a SM |
9267 | # error "readline version 7 required" |
9268 | #endif | |
9269 | ||
86c6b807 TT |
9270 | ; |
9271 | return 0; | |
9272 | } | |
9273 | _ACEOF | |
9274 | if ac_fn_c_try_compile "$LINENO"; then : | |
9275 | gdb_cv_readline_ok=yes | |
9276 | else | |
9277 | gdb_cv_readline_ok=no | |
5593a99a | 9278 | |
86c6b807 TT |
9279 | fi |
9280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5593a99a | 9281 | |
86c6b807 TT |
9282 | fi |
9283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 | |
9284 | $as_echo "$gdb_cv_readline_ok" >&6; } | |
9285 | if test "$gdb_cv_readline_ok" != yes; then | |
9286 | as_fn_error $? "system readline is not new enough" "$LINENO" 5 | |
9287 | fi | |
9288 | ||
6a30b0a5 AS |
9289 | READLINE=-lreadline |
9290 | READLINE_DEPS= | |
9291 | READLINE_CFLAGS= | |
39037522 | 9292 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9293 | else |
9294 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9295 | READLINE_DEPS='$(READLINE)' | |
9296 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9297 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9298 | fi |
9299 | ||
9300 | ||
9301 | ||
9302 | ||
9303 | ||
f997c383 SD |
9304 | # Generate jit-reader.h |
9305 | ||
9306 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9307 | TARGET_PTR= | |
9308 | ||
9309 | # The cast to long int works around a bug in the HP C Compiler | |
9310 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9311 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9312 | # This bug is HP SR number 8606223364. | |
9313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
9314 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
d0ac1c44 | 9315 | if ${ac_cv_sizeof_unsigned_long_long+:} false; then : |
f997c383 SD |
9316 | $as_echo_n "(cached) " >&6 |
9317 | else | |
9318 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9319 | ||
9320 | else | |
9321 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
9322 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9323 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9324 | as_fn_error 77 "cannot compute sizeof (unsigned long long) |
9325 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9326 | else |
9327 | ac_cv_sizeof_unsigned_long_long=0 | |
9328 | fi | |
9329 | fi | |
9330 | ||
9331 | fi | |
9332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9333 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9334 | ||
9335 | ||
9336 | ||
9337 | cat >>confdefs.h <<_ACEOF | |
9338 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9339 | _ACEOF | |
9340 | ||
9341 | ||
9342 | # The cast to long int works around a bug in the HP C Compiler | |
9343 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9344 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9345 | # This bug is HP SR number 8606223364. | |
9346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9347 | $as_echo_n "checking size of unsigned long... " >&6; } | |
d0ac1c44 | 9348 | if ${ac_cv_sizeof_unsigned_long+:} false; then : |
f997c383 SD |
9349 | $as_echo_n "(cached) " >&6 |
9350 | else | |
9351 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9352 | ||
9353 | else | |
9354 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9355 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9356 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9357 | as_fn_error 77 "cannot compute sizeof (unsigned long) |
9358 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9359 | else |
9360 | ac_cv_sizeof_unsigned_long=0 | |
9361 | fi | |
9362 | fi | |
9363 | ||
9364 | fi | |
9365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9366 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9367 | ||
9368 | ||
9369 | ||
9370 | cat >>confdefs.h <<_ACEOF | |
9371 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9372 | _ACEOF | |
9373 | ||
9374 | ||
9375 | # The cast to long int works around a bug in the HP C Compiler | |
9376 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9377 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9378 | # This bug is HP SR number 8606223364. | |
9379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9380 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
d0ac1c44 | 9381 | if ${ac_cv_sizeof_unsigned___int128+:} false; then : |
f997c383 SD |
9382 | $as_echo_n "(cached) " >&6 |
9383 | else | |
9384 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9385 | ||
9386 | else | |
9387 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9388 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9389 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9390 | as_fn_error 77 "cannot compute sizeof (unsigned __int128) |
9391 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9392 | else |
9393 | ac_cv_sizeof_unsigned___int128=0 | |
9394 | fi | |
9395 | fi | |
9396 | ||
9397 | fi | |
9398 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9399 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9400 | ||
9401 | ||
9402 | ||
9403 | cat >>confdefs.h <<_ACEOF | |
9404 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9405 | _ACEOF | |
9406 | ||
9407 | ||
9408 | ||
9409 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9410 | TARGET_PTR="unsigned long" | |
9411 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9412 | TARGET_PTR="unsigned long long" | |
9413 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9414 | TARGET_PTR="unsigned __int128" | |
9415 | else | |
9416 | TARGET_PTR="unsigned long" | |
9417 | fi | |
9418 | ||
9419 | ||
9420 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9421 | ||
9422 | ||
a2d08b9e SD |
9423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9424 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 9425 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9426 | $as_echo_n "(cached) " >&6 |
9427 | else | |
9428 | ac_func_search_save_LIBS=$LIBS | |
9429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9430 | /* end confdefs.h. */ | |
9431 | ||
9432 | /* Override any GCC internal prototype to avoid an error. | |
9433 | Use char because int might match the return type of a GCC | |
9434 | builtin and then its argument prototype would still apply. */ | |
9435 | #ifdef __cplusplus | |
9436 | extern "C" | |
9437 | #endif | |
9438 | char dlopen (); | |
9439 | int | |
9440 | main () | |
9441 | { | |
9442 | return dlopen (); | |
9443 | ; | |
9444 | return 0; | |
9445 | } | |
9446 | _ACEOF | |
9447 | for ac_lib in '' dl; do | |
9448 | if test -z "$ac_lib"; then | |
9449 | ac_res="none required" | |
9450 | else | |
9451 | ac_res=-l$ac_lib | |
9452 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9453 | fi | |
9454 | if ac_fn_c_try_link "$LINENO"; then : | |
9455 | ac_cv_search_dlopen=$ac_res | |
9456 | fi | |
9457 | rm -f core conftest.err conftest.$ac_objext \ | |
9458 | conftest$ac_exeext | |
d0ac1c44 | 9459 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9460 | break |
9461 | fi | |
9462 | done | |
d0ac1c44 | 9463 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9464 | |
9465 | else | |
9466 | ac_cv_search_dlopen=no | |
9467 | fi | |
9468 | rm conftest.$ac_ext | |
9469 | LIBS=$ac_func_search_save_LIBS | |
9470 | fi | |
9471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9472 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9473 | ac_res=$ac_cv_search_dlopen | |
9474 | if test "$ac_res" != no; then : | |
9475 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9476 | ||
9477 | fi | |
9478 | ||
9479 | ||
39037522 | 9480 | |
b8e0a31c SD |
9481 | |
9482 | # Check whether --with-jit-reader-dir was given. | |
9483 | if test "${with_jit_reader_dir+set}" = set; then : | |
9484 | withval=$with_jit_reader_dir; | |
9485 | JIT_READER_DIR=$withval | |
9486 | else | |
9487 | JIT_READER_DIR=${libdir}/gdb | |
9488 | fi | |
9489 | ||
9490 | ||
9491 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9492 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9493 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9494 | ac_define_dir=`eval echo $ac_define_dir` | |
9495 | ||
9496 | cat >>confdefs.h <<_ACEOF | |
9497 | #define JIT_READER_DIR "$ac_define_dir" | |
9498 | _ACEOF | |
9499 | ||
9500 | ||
9501 | ||
9502 | ||
9503 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9504 | if test "x$prefix" = xNONE; then | |
9505 | test_prefix=/usr/local | |
9506 | else | |
9507 | test_prefix=$prefix | |
9508 | fi | |
9509 | else | |
9510 | test_prefix=$exec_prefix | |
9511 | fi | |
9512 | value=0 | |
9513 | case ${ac_define_dir} in | |
9514 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9515 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9516 | value=1 | |
9517 | ;; | |
9518 | esac | |
9519 | ||
9520 | cat >>confdefs.h <<_ACEOF | |
9521 | #define JIT_READER_DIR_RELOCATABLE $value | |
9522 | _ACEOF | |
9523 | ||
9524 | ||
9525 | ||
9526 | ||
9527 | ||
81ecdfbb RW |
9528 | # Check whether --with-expat was given. |
9529 | if test "${with_expat+set}" = set; then : | |
9530 | withval=$with_expat; | |
5c39566f DJ |
9531 | else |
9532 | with_expat=auto | |
81ecdfbb RW |
9533 | fi |
9534 | ||
9535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9536 | $as_echo_n "checking whether to use expat... " >&6; } | |
9537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9538 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9539 | |
9540 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9541 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9542 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9543 | HAVE_LIBEXPAT=no |
9544 | else | |
9545 | ||
3841debe DJ |
9546 | |
9547 | ||
9548 | ||
9549 | ||
9550 | ||
9551 | ||
9552 | ||
9553 | use_additional=yes | |
9554 | ||
9555 | acl_save_prefix="$prefix" | |
9556 | prefix="$acl_final_prefix" | |
9557 | acl_save_exec_prefix="$exec_prefix" | |
9558 | exec_prefix="$acl_final_exec_prefix" | |
9559 | ||
9560 | eval additional_includedir=\"$includedir\" | |
9561 | eval additional_libdir=\"$libdir\" | |
9562 | ||
9563 | exec_prefix="$acl_save_exec_prefix" | |
9564 | prefix="$acl_save_prefix" | |
9565 | ||
9566 | ||
81ecdfbb RW |
9567 | # Check whether --with-libexpat-prefix was given. |
9568 | if test "${with_libexpat_prefix+set}" = set; then : | |
9569 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9570 | if test "X$withval" = "Xno"; then |
9571 | use_additional=no | |
9572 | else | |
9573 | if test "X$withval" = "X"; then | |
9574 | ||
9575 | acl_save_prefix="$prefix" | |
9576 | prefix="$acl_final_prefix" | |
9577 | acl_save_exec_prefix="$exec_prefix" | |
9578 | exec_prefix="$acl_final_exec_prefix" | |
9579 | ||
9580 | eval additional_includedir=\"$includedir\" | |
9581 | eval additional_libdir=\"$libdir\" | |
9582 | ||
9583 | exec_prefix="$acl_save_exec_prefix" | |
9584 | prefix="$acl_save_prefix" | |
9585 | ||
9586 | else | |
9587 | additional_includedir="$withval/include" | |
9588 | additional_libdir="$withval/lib" | |
9589 | fi | |
9590 | fi | |
9591 | ||
81ecdfbb RW |
9592 | fi |
9593 | ||
9f1528a1 AB |
9594 | |
9595 | # Check whether --with-libexpat-type was given. | |
9596 | if test "${with_libexpat_type+set}" = set; then : | |
9597 | withval=$with_libexpat_type; with_libexpat_type=$withval | |
9598 | else | |
9599 | with_libexpat_type=auto | |
9600 | fi | |
9601 | ||
9602 | lib_type=`eval echo \$with_libexpat_type` | |
9603 | ||
3841debe DJ |
9604 | LIBEXPAT= |
9605 | LTLIBEXPAT= | |
9606 | INCEXPAT= | |
9607 | rpathdirs= | |
9608 | ltrpathdirs= | |
9609 | names_already_handled= | |
9610 | names_next_round='expat ' | |
9611 | while test -n "$names_next_round"; do | |
9612 | names_this_round="$names_next_round" | |
9613 | names_next_round= | |
9614 | for name in $names_this_round; do | |
9615 | already_handled= | |
9616 | for n in $names_already_handled; do | |
9617 | if test "$n" = "$name"; then | |
9618 | already_handled=yes | |
9619 | break | |
9620 | fi | |
9621 | done | |
9622 | if test -z "$already_handled"; then | |
9623 | names_already_handled="$names_already_handled $name" | |
9624 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9625 | eval value=\"\$HAVE_LIB$uppername\" | |
9626 | if test -n "$value"; then | |
9627 | if test "$value" = yes; then | |
9628 | eval value=\"\$LIB$uppername\" | |
9629 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9630 | eval value=\"\$LTLIB$uppername\" | |
9631 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9632 | else | |
9633 | : | |
9634 | fi | |
9635 | else | |
9636 | found_dir= | |
9637 | found_la= | |
9638 | found_so= | |
9639 | found_a= | |
9640 | if test $use_additional = yes; then | |
9f1528a1 | 9641 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9642 | found_dir="$additional_libdir" |
9643 | found_so="$additional_libdir/lib$name.$shlibext" | |
9644 | if test -f "$additional_libdir/lib$name.la"; then | |
9645 | found_la="$additional_libdir/lib$name.la" | |
9646 | fi | |
9f1528a1 | 9647 | elif test x$lib_type != xshared; then |
3841debe DJ |
9648 | if test -f "$additional_libdir/lib$name.$libext"; then |
9649 | found_dir="$additional_libdir" | |
9650 | found_a="$additional_libdir/lib$name.$libext" | |
9651 | if test -f "$additional_libdir/lib$name.la"; then | |
9652 | found_la="$additional_libdir/lib$name.la" | |
9653 | fi | |
9654 | fi | |
9655 | fi | |
9656 | fi | |
9657 | if test "X$found_dir" = "X"; then | |
9658 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9659 | ||
9660 | acl_save_prefix="$prefix" | |
9661 | prefix="$acl_final_prefix" | |
9662 | acl_save_exec_prefix="$exec_prefix" | |
9663 | exec_prefix="$acl_final_exec_prefix" | |
9664 | eval x=\"$x\" | |
9665 | exec_prefix="$acl_save_exec_prefix" | |
9666 | prefix="$acl_save_prefix" | |
9667 | ||
9668 | case "$x" in | |
9669 | -L*) | |
9670 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 9671 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9672 | found_dir="$dir" |
9673 | found_so="$dir/lib$name.$shlibext" | |
9674 | if test -f "$dir/lib$name.la"; then | |
9675 | found_la="$dir/lib$name.la" | |
9676 | fi | |
9f1528a1 | 9677 | elif test x$lib_type != xshared; then |
3841debe DJ |
9678 | if test -f "$dir/lib$name.$libext"; then |
9679 | found_dir="$dir" | |
9680 | found_a="$dir/lib$name.$libext" | |
9681 | if test -f "$dir/lib$name.la"; then | |
9682 | found_la="$dir/lib$name.la" | |
9683 | fi | |
9684 | fi | |
9685 | fi | |
9686 | ;; | |
9687 | esac | |
9688 | if test "X$found_dir" != "X"; then | |
9689 | break | |
9690 | fi | |
9691 | done | |
9692 | fi | |
9693 | if test "X$found_dir" != "X"; then | |
9694 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9695 | if test "X$found_so" != "X"; then | |
9696 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9697 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9698 | else | |
9699 | haveit= | |
9700 | for x in $ltrpathdirs; do | |
9701 | if test "X$x" = "X$found_dir"; then | |
9702 | haveit=yes | |
9703 | break | |
9704 | fi | |
9705 | done | |
9706 | if test -z "$haveit"; then | |
9707 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9708 | fi | |
9709 | if test "$hardcode_direct" = yes; then | |
9710 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9711 | else | |
9712 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9713 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9714 | haveit= | |
9715 | for x in $rpathdirs; do | |
9716 | if test "X$x" = "X$found_dir"; then | |
9717 | haveit=yes | |
9718 | break | |
9719 | fi | |
9720 | done | |
9721 | if test -z "$haveit"; then | |
9722 | rpathdirs="$rpathdirs $found_dir" | |
9723 | fi | |
9724 | else | |
9725 | haveit= | |
9726 | for x in $LDFLAGS $LIBEXPAT; do | |
9727 | ||
9728 | acl_save_prefix="$prefix" | |
9729 | prefix="$acl_final_prefix" | |
9730 | acl_save_exec_prefix="$exec_prefix" | |
9731 | exec_prefix="$acl_final_exec_prefix" | |
9732 | eval x=\"$x\" | |
9733 | exec_prefix="$acl_save_exec_prefix" | |
9734 | prefix="$acl_save_prefix" | |
9735 | ||
9736 | if test "X$x" = "X-L$found_dir"; then | |
9737 | haveit=yes | |
9738 | break | |
9739 | fi | |
9740 | done | |
9741 | if test -z "$haveit"; then | |
9742 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9743 | fi | |
9744 | if test "$hardcode_minus_L" != no; then | |
9745 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9746 | else | |
9747 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9748 | fi | |
9749 | fi | |
9750 | fi | |
9751 | fi | |
9752 | else | |
9753 | if test "X$found_a" != "X"; then | |
9754 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9755 | else | |
9756 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9757 | fi | |
9758 | fi | |
9759 | additional_includedir= | |
9760 | case "$found_dir" in | |
9761 | */lib | */lib/) | |
9762 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9763 | additional_includedir="$basedir/include" | |
9764 | ;; | |
9765 | esac | |
9766 | if test "X$additional_includedir" != "X"; then | |
9767 | if test "X$additional_includedir" != "X/usr/include"; then | |
9768 | haveit= | |
9769 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9770 | if test -n "$GCC"; then | |
9771 | case $host_os in | |
9772 | linux*) haveit=yes;; | |
9773 | esac | |
9774 | fi | |
9775 | fi | |
9776 | if test -z "$haveit"; then | |
9777 | for x in $CPPFLAGS $INCEXPAT; do | |
9778 | ||
9779 | acl_save_prefix="$prefix" | |
9780 | prefix="$acl_final_prefix" | |
9781 | acl_save_exec_prefix="$exec_prefix" | |
9782 | exec_prefix="$acl_final_exec_prefix" | |
9783 | eval x=\"$x\" | |
9784 | exec_prefix="$acl_save_exec_prefix" | |
9785 | prefix="$acl_save_prefix" | |
9786 | ||
9787 | if test "X$x" = "X-I$additional_includedir"; then | |
9788 | haveit=yes | |
9789 | break | |
9790 | fi | |
9791 | done | |
9792 | if test -z "$haveit"; then | |
9793 | if test -d "$additional_includedir"; then | |
9794 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9795 | fi | |
9796 | fi | |
9797 | fi | |
9798 | fi | |
9799 | fi | |
9800 | if test -n "$found_la"; then | |
9801 | save_libdir="$libdir" | |
9802 | case "$found_la" in | |
9803 | */* | *\\*) . "$found_la" ;; | |
9804 | *) . "./$found_la" ;; | |
9805 | esac | |
9806 | libdir="$save_libdir" | |
9807 | for dep in $dependency_libs; do | |
9808 | case "$dep" in | |
9809 | -L*) | |
9810 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9811 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9812 | haveit= | |
9813 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9814 | if test -n "$GCC"; then | |
9815 | case $host_os in | |
9816 | linux*) haveit=yes;; | |
9817 | esac | |
9818 | fi | |
9819 | fi | |
9820 | if test -z "$haveit"; then | |
9821 | haveit= | |
9822 | for x in $LDFLAGS $LIBEXPAT; do | |
9823 | ||
9824 | acl_save_prefix="$prefix" | |
9825 | prefix="$acl_final_prefix" | |
9826 | acl_save_exec_prefix="$exec_prefix" | |
9827 | exec_prefix="$acl_final_exec_prefix" | |
9828 | eval x=\"$x\" | |
9829 | exec_prefix="$acl_save_exec_prefix" | |
9830 | prefix="$acl_save_prefix" | |
9831 | ||
9832 | if test "X$x" = "X-L$additional_libdir"; then | |
9833 | haveit=yes | |
9834 | break | |
9835 | fi | |
9836 | done | |
9837 | if test -z "$haveit"; then | |
9838 | if test -d "$additional_libdir"; then | |
9839 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9840 | fi | |
9841 | fi | |
9842 | haveit= | |
9843 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9844 | ||
9845 | acl_save_prefix="$prefix" | |
9846 | prefix="$acl_final_prefix" | |
9847 | acl_save_exec_prefix="$exec_prefix" | |
9848 | exec_prefix="$acl_final_exec_prefix" | |
9849 | eval x=\"$x\" | |
9850 | exec_prefix="$acl_save_exec_prefix" | |
9851 | prefix="$acl_save_prefix" | |
9852 | ||
9853 | if test "X$x" = "X-L$additional_libdir"; then | |
9854 | haveit=yes | |
9855 | break | |
9856 | fi | |
9857 | done | |
9858 | if test -z "$haveit"; then | |
9859 | if test -d "$additional_libdir"; then | |
9860 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9861 | fi | |
9862 | fi | |
9863 | fi | |
9864 | fi | |
9865 | ;; | |
9866 | -R*) | |
9867 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9868 | if test "$enable_rpath" != no; then | |
9869 | haveit= | |
9870 | for x in $rpathdirs; do | |
9871 | if test "X$x" = "X$dir"; then | |
9872 | haveit=yes | |
9873 | break | |
9874 | fi | |
9875 | done | |
9876 | if test -z "$haveit"; then | |
9877 | rpathdirs="$rpathdirs $dir" | |
9878 | fi | |
9879 | haveit= | |
9880 | for x in $ltrpathdirs; do | |
9881 | if test "X$x" = "X$dir"; then | |
9882 | haveit=yes | |
9883 | break | |
9884 | fi | |
9885 | done | |
9886 | if test -z "$haveit"; then | |
9887 | ltrpathdirs="$ltrpathdirs $dir" | |
9888 | fi | |
9889 | fi | |
9890 | ;; | |
9891 | -l*) | |
9892 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9893 | ;; | |
9894 | *.la) | |
9895 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9896 | ;; | |
9897 | *) | |
9898 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9899 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9900 | ;; | |
81ecdfbb RW |
9901 | esac |
9902 | done | |
9903 | fi | |
9904 | else | |
9f1528a1 AB |
9905 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
9906 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9907 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9908 | else | |
9909 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext" | |
9910 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext" | |
9911 | fi | |
81ecdfbb RW |
9912 | fi |
9913 | fi | |
9914 | fi | |
9915 | done | |
9916 | done | |
9917 | if test "X$rpathdirs" != "X"; then | |
9918 | if test -n "$hardcode_libdir_separator"; then | |
9919 | alldirs= | |
9920 | for found_dir in $rpathdirs; do | |
9921 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9922 | done | |
9923 | acl_save_libdir="$libdir" | |
9924 | libdir="$alldirs" | |
9925 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9926 | libdir="$acl_save_libdir" | |
9927 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9928 | else | |
9929 | for found_dir in $rpathdirs; do | |
9930 | acl_save_libdir="$libdir" | |
9931 | libdir="$found_dir" | |
9932 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9933 | libdir="$acl_save_libdir" | |
9934 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9935 | done | |
9936 | fi | |
9937 | fi | |
9938 | if test "X$ltrpathdirs" != "X"; then | |
9939 | for found_dir in $ltrpathdirs; do | |
9940 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9941 | done | |
9942 | fi | |
a9322a30 TT |
9943 | |
9944 | ||
81ecdfbb | 9945 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9946 | |
81ecdfbb RW |
9947 | for element in $INCEXPAT; do |
9948 | haveit= | |
9949 | for x in $CPPFLAGS; do | |
a9322a30 | 9950 | |
81ecdfbb RW |
9951 | acl_save_prefix="$prefix" |
9952 | prefix="$acl_final_prefix" | |
9953 | acl_save_exec_prefix="$exec_prefix" | |
9954 | exec_prefix="$acl_final_exec_prefix" | |
9955 | eval x=\"$x\" | |
9956 | exec_prefix="$acl_save_exec_prefix" | |
9957 | prefix="$acl_save_prefix" | |
a8111142 | 9958 | |
81ecdfbb RW |
9959 | if test "X$x" = "X$element"; then |
9960 | haveit=yes | |
9961 | break | |
9962 | fi | |
9963 | done | |
9964 | if test -z "$haveit"; then | |
9965 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9966 | fi | |
9967 | done | |
a9322a30 TT |
9968 | |
9969 | ||
81ecdfbb RW |
9970 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9971 | $as_echo_n "checking for libexpat... " >&6; } | |
d0ac1c44 | 9972 | if ${ac_cv_libexpat+:} false; then : |
81ecdfbb | 9973 | $as_echo_n "(cached) " >&6 |
bec39cab | 9974 | else |
bec39cab | 9975 | |
81ecdfbb RW |
9976 | ac_save_LIBS="$LIBS" |
9977 | LIBS="$LIBS $LIBEXPAT" | |
9978 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9979 | /* end confdefs.h. */ |
81ecdfbb RW |
9980 | #include "expat.h" |
9981 | int | |
9982 | main () | |
9983 | { | |
9984 | XML_Parser p = XML_ParserCreate (0); | |
9985 | ; | |
9986 | return 0; | |
9987 | } | |
bec39cab | 9988 | _ACEOF |
81ecdfbb RW |
9989 | if ac_fn_c_try_link "$LINENO"; then : |
9990 | ac_cv_libexpat=yes | |
c906108c | 9991 | else |
81ecdfbb | 9992 | ac_cv_libexpat=no |
bec39cab | 9993 | fi |
81ecdfbb RW |
9994 | rm -f core conftest.err conftest.$ac_objext \ |
9995 | conftest$ac_exeext conftest.$ac_ext | |
9996 | LIBS="$ac_save_LIBS" | |
c906108c | 9997 | |
95ca63c4 | 9998 | fi |
81ecdfbb RW |
9999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
10000 | $as_echo "$ac_cv_libexpat" >&6; } | |
10001 | if test "$ac_cv_libexpat" = yes; then | |
10002 | HAVE_LIBEXPAT=yes | |
bec39cab | 10003 | |
81ecdfbb | 10004 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 10005 | |
81ecdfbb RW |
10006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
10007 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
10008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
10009 | $as_echo "$LIBEXPAT" >&6; } | |
10010 | else | |
10011 | HAVE_LIBEXPAT=no | |
10012 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10013 | LIBEXPAT= | |
10014 | LTLIBEXPAT= | |
10015 | fi | |
95ca63c4 CF |
10016 | |
10017 | ||
10018 | ||
7cb9022a MK |
10019 | |
10020 | ||
bec39cab | 10021 | |
81ecdfbb RW |
10022 | if test "$HAVE_LIBEXPAT" != yes; then |
10023 | if test "$with_expat" = yes; then | |
d0ac1c44 | 10024 | as_fn_error $? "expat is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
10025 | else |
10026 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
10027 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
10028 | fi | |
10029 | else | |
10030 | save_LIBS=$LIBS | |
10031 | LIBS="$LIBS $LIBEXPAT" | |
10032 | for ac_func in XML_StopParser | |
10033 | do : | |
10034 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
d0ac1c44 | 10035 | if test "x$ac_cv_func_XML_StopParser" = xyes; then : |
bec39cab | 10036 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10037 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10038 | _ACEOF |
95ca63c4 | 10039 | |
bec39cab | 10040 | fi |
bec39cab | 10041 | done |
95ca63c4 | 10042 | |
81ecdfbb RW |
10043 | LIBS=$save_LIBS |
10044 | fi | |
a9322a30 TT |
10045 | fi |
10046 | ||
2c947d9b JB |
10047 | # Verify that we have a usable GMP library. |
10048 | ||
10049 | ||
10050 | ||
10051 | ||
10052 | ||
10053 | ||
10054 | ||
10055 | ||
10056 | use_additional=yes | |
10057 | ||
10058 | acl_save_prefix="$prefix" | |
10059 | prefix="$acl_final_prefix" | |
10060 | acl_save_exec_prefix="$exec_prefix" | |
10061 | exec_prefix="$acl_final_exec_prefix" | |
10062 | ||
10063 | eval additional_includedir=\"$includedir\" | |
10064 | eval additional_libdir=\"$libdir\" | |
10065 | ||
10066 | exec_prefix="$acl_save_exec_prefix" | |
10067 | prefix="$acl_save_prefix" | |
10068 | ||
10069 | ||
10070 | # Check whether --with-libgmp-prefix was given. | |
10071 | if test "${with_libgmp_prefix+set}" = set; then : | |
10072 | withval=$with_libgmp_prefix; | |
10073 | if test "X$withval" = "Xno"; then | |
10074 | use_additional=no | |
10075 | else | |
10076 | if test "X$withval" = "X"; then | |
10077 | ||
10078 | acl_save_prefix="$prefix" | |
10079 | prefix="$acl_final_prefix" | |
10080 | acl_save_exec_prefix="$exec_prefix" | |
10081 | exec_prefix="$acl_final_exec_prefix" | |
10082 | ||
10083 | eval additional_includedir=\"$includedir\" | |
10084 | eval additional_libdir=\"$libdir\" | |
10085 | ||
10086 | exec_prefix="$acl_save_exec_prefix" | |
10087 | prefix="$acl_save_prefix" | |
10088 | ||
10089 | else | |
10090 | additional_includedir="$withval/include" | |
10091 | additional_libdir="$withval/lib" | |
10092 | fi | |
10093 | fi | |
10094 | ||
10095 | fi | |
10096 | ||
10097 | ||
10098 | # Check whether --with-libgmp-type was given. | |
10099 | if test "${with_libgmp_type+set}" = set; then : | |
10100 | withval=$with_libgmp_type; with_libgmp_type=$withval | |
10101 | else | |
10102 | with_libgmp_type=auto | |
10103 | fi | |
10104 | ||
10105 | lib_type=`eval echo \$with_libgmp_type` | |
10106 | ||
10107 | LIBGMP= | |
10108 | LTLIBGMP= | |
10109 | INCGMP= | |
10110 | rpathdirs= | |
10111 | ltrpathdirs= | |
10112 | names_already_handled= | |
10113 | names_next_round='gmp ' | |
10114 | while test -n "$names_next_round"; do | |
10115 | names_this_round="$names_next_round" | |
10116 | names_next_round= | |
10117 | for name in $names_this_round; do | |
10118 | already_handled= | |
10119 | for n in $names_already_handled; do | |
10120 | if test "$n" = "$name"; then | |
10121 | already_handled=yes | |
10122 | break | |
10123 | fi | |
10124 | done | |
10125 | if test -z "$already_handled"; then | |
10126 | names_already_handled="$names_already_handled $name" | |
10127 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10128 | eval value=\"\$HAVE_LIB$uppername\" | |
10129 | if test -n "$value"; then | |
10130 | if test "$value" = yes; then | |
10131 | eval value=\"\$LIB$uppername\" | |
10132 | test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value" | |
10133 | eval value=\"\$LTLIB$uppername\" | |
10134 | test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value" | |
10135 | else | |
10136 | : | |
10137 | fi | |
10138 | else | |
10139 | found_dir= | |
10140 | found_la= | |
10141 | found_so= | |
10142 | found_a= | |
10143 | if test $use_additional = yes; then | |
10144 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
10145 | found_dir="$additional_libdir" | |
10146 | found_so="$additional_libdir/lib$name.$shlibext" | |
10147 | if test -f "$additional_libdir/lib$name.la"; then | |
10148 | found_la="$additional_libdir/lib$name.la" | |
10149 | fi | |
10150 | elif test x$lib_type != xshared; then | |
10151 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10152 | found_dir="$additional_libdir" | |
10153 | found_a="$additional_libdir/lib$name.$libext" | |
10154 | if test -f "$additional_libdir/lib$name.la"; then | |
10155 | found_la="$additional_libdir/lib$name.la" | |
10156 | fi | |
10157 | fi | |
10158 | fi | |
10159 | fi | |
10160 | if test "X$found_dir" = "X"; then | |
10161 | for x in $LDFLAGS $LTLIBGMP; do | |
10162 | ||
10163 | acl_save_prefix="$prefix" | |
10164 | prefix="$acl_final_prefix" | |
10165 | acl_save_exec_prefix="$exec_prefix" | |
10166 | exec_prefix="$acl_final_exec_prefix" | |
10167 | eval x=\"$x\" | |
10168 | exec_prefix="$acl_save_exec_prefix" | |
10169 | prefix="$acl_save_prefix" | |
10170 | ||
10171 | case "$x" in | |
10172 | -L*) | |
10173 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10174 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
10175 | found_dir="$dir" | |
10176 | found_so="$dir/lib$name.$shlibext" | |
10177 | if test -f "$dir/lib$name.la"; then | |
10178 | found_la="$dir/lib$name.la" | |
10179 | fi | |
10180 | elif test x$lib_type != xshared; then | |
10181 | if test -f "$dir/lib$name.$libext"; then | |
10182 | found_dir="$dir" | |
10183 | found_a="$dir/lib$name.$libext" | |
10184 | if test -f "$dir/lib$name.la"; then | |
10185 | found_la="$dir/lib$name.la" | |
10186 | fi | |
10187 | fi | |
10188 | fi | |
10189 | ;; | |
10190 | esac | |
10191 | if test "X$found_dir" != "X"; then | |
10192 | break | |
10193 | fi | |
10194 | done | |
10195 | fi | |
10196 | if test "X$found_dir" != "X"; then | |
10197 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name" | |
10198 | if test "X$found_so" != "X"; then | |
10199 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10200 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10201 | else | |
10202 | haveit= | |
10203 | for x in $ltrpathdirs; do | |
10204 | if test "X$x" = "X$found_dir"; then | |
10205 | haveit=yes | |
10206 | break | |
10207 | fi | |
10208 | done | |
10209 | if test -z "$haveit"; then | |
10210 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10211 | fi | |
10212 | if test "$hardcode_direct" = yes; then | |
10213 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10214 | else | |
10215 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10216 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10217 | haveit= | |
10218 | for x in $rpathdirs; do | |
10219 | if test "X$x" = "X$found_dir"; then | |
10220 | haveit=yes | |
10221 | break | |
10222 | fi | |
10223 | done | |
10224 | if test -z "$haveit"; then | |
10225 | rpathdirs="$rpathdirs $found_dir" | |
10226 | fi | |
10227 | else | |
10228 | haveit= | |
10229 | for x in $LDFLAGS $LIBGMP; do | |
10230 | ||
10231 | acl_save_prefix="$prefix" | |
10232 | prefix="$acl_final_prefix" | |
10233 | acl_save_exec_prefix="$exec_prefix" | |
10234 | exec_prefix="$acl_final_exec_prefix" | |
10235 | eval x=\"$x\" | |
10236 | exec_prefix="$acl_save_exec_prefix" | |
10237 | prefix="$acl_save_prefix" | |
10238 | ||
10239 | if test "X$x" = "X-L$found_dir"; then | |
10240 | haveit=yes | |
10241 | break | |
10242 | fi | |
10243 | done | |
10244 | if test -z "$haveit"; then | |
10245 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir" | |
10246 | fi | |
10247 | if test "$hardcode_minus_L" != no; then | |
10248 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10249 | else | |
10250 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name" | |
10251 | fi | |
10252 | fi | |
10253 | fi | |
10254 | fi | |
10255 | else | |
10256 | if test "X$found_a" != "X"; then | |
10257 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a" | |
10258 | else | |
10259 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name" | |
10260 | fi | |
10261 | fi | |
10262 | additional_includedir= | |
10263 | case "$found_dir" in | |
10264 | */lib | */lib/) | |
10265 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10266 | additional_includedir="$basedir/include" | |
10267 | ;; | |
10268 | esac | |
10269 | if test "X$additional_includedir" != "X"; then | |
10270 | if test "X$additional_includedir" != "X/usr/include"; then | |
10271 | haveit= | |
10272 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10273 | if test -n "$GCC"; then | |
10274 | case $host_os in | |
10275 | linux*) haveit=yes;; | |
10276 | esac | |
10277 | fi | |
10278 | fi | |
10279 | if test -z "$haveit"; then | |
10280 | for x in $CPPFLAGS $INCGMP; do | |
10281 | ||
10282 | acl_save_prefix="$prefix" | |
10283 | prefix="$acl_final_prefix" | |
10284 | acl_save_exec_prefix="$exec_prefix" | |
10285 | exec_prefix="$acl_final_exec_prefix" | |
10286 | eval x=\"$x\" | |
10287 | exec_prefix="$acl_save_exec_prefix" | |
10288 | prefix="$acl_save_prefix" | |
10289 | ||
10290 | if test "X$x" = "X-I$additional_includedir"; then | |
10291 | haveit=yes | |
10292 | break | |
10293 | fi | |
10294 | done | |
10295 | if test -z "$haveit"; then | |
10296 | if test -d "$additional_includedir"; then | |
10297 | INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir" | |
10298 | fi | |
10299 | fi | |
10300 | fi | |
10301 | fi | |
10302 | fi | |
10303 | if test -n "$found_la"; then | |
10304 | save_libdir="$libdir" | |
10305 | case "$found_la" in | |
10306 | */* | *\\*) . "$found_la" ;; | |
10307 | *) . "./$found_la" ;; | |
10308 | esac | |
10309 | libdir="$save_libdir" | |
10310 | for dep in $dependency_libs; do | |
10311 | case "$dep" in | |
10312 | -L*) | |
10313 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10314 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10315 | haveit= | |
10316 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10317 | if test -n "$GCC"; then | |
10318 | case $host_os in | |
10319 | linux*) haveit=yes;; | |
10320 | esac | |
10321 | fi | |
10322 | fi | |
10323 | if test -z "$haveit"; then | |
10324 | haveit= | |
10325 | for x in $LDFLAGS $LIBGMP; do | |
10326 | ||
10327 | acl_save_prefix="$prefix" | |
10328 | prefix="$acl_final_prefix" | |
10329 | acl_save_exec_prefix="$exec_prefix" | |
10330 | exec_prefix="$acl_final_exec_prefix" | |
10331 | eval x=\"$x\" | |
10332 | exec_prefix="$acl_save_exec_prefix" | |
10333 | prefix="$acl_save_prefix" | |
10334 | ||
10335 | if test "X$x" = "X-L$additional_libdir"; then | |
10336 | haveit=yes | |
10337 | break | |
10338 | fi | |
10339 | done | |
10340 | if test -z "$haveit"; then | |
10341 | if test -d "$additional_libdir"; then | |
10342 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir" | |
10343 | fi | |
10344 | fi | |
10345 | haveit= | |
10346 | for x in $LDFLAGS $LTLIBGMP; do | |
10347 | ||
10348 | acl_save_prefix="$prefix" | |
10349 | prefix="$acl_final_prefix" | |
10350 | acl_save_exec_prefix="$exec_prefix" | |
10351 | exec_prefix="$acl_final_exec_prefix" | |
10352 | eval x=\"$x\" | |
10353 | exec_prefix="$acl_save_exec_prefix" | |
10354 | prefix="$acl_save_prefix" | |
10355 | ||
10356 | if test "X$x" = "X-L$additional_libdir"; then | |
10357 | haveit=yes | |
10358 | break | |
10359 | fi | |
10360 | done | |
10361 | if test -z "$haveit"; then | |
10362 | if test -d "$additional_libdir"; then | |
10363 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir" | |
10364 | fi | |
10365 | fi | |
10366 | fi | |
10367 | fi | |
10368 | ;; | |
10369 | -R*) | |
10370 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10371 | if test "$enable_rpath" != no; then | |
10372 | haveit= | |
10373 | for x in $rpathdirs; do | |
10374 | if test "X$x" = "X$dir"; then | |
10375 | haveit=yes | |
10376 | break | |
10377 | fi | |
10378 | done | |
10379 | if test -z "$haveit"; then | |
10380 | rpathdirs="$rpathdirs $dir" | |
10381 | fi | |
10382 | haveit= | |
10383 | for x in $ltrpathdirs; do | |
10384 | if test "X$x" = "X$dir"; then | |
10385 | haveit=yes | |
10386 | break | |
10387 | fi | |
10388 | done | |
10389 | if test -z "$haveit"; then | |
10390 | ltrpathdirs="$ltrpathdirs $dir" | |
10391 | fi | |
10392 | fi | |
10393 | ;; | |
10394 | -l*) | |
10395 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10396 | ;; | |
10397 | *.la) | |
10398 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10399 | ;; | |
10400 | *) | |
10401 | LIBGMP="${LIBGMP}${LIBGMP:+ }$dep" | |
10402 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep" | |
10403 | ;; | |
10404 | esac | |
10405 | done | |
10406 | fi | |
10407 | else | |
10408 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then | |
10409 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name" | |
10410 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name" | |
10411 | else | |
10412 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext" | |
10413 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext" | |
10414 | fi | |
10415 | fi | |
10416 | fi | |
10417 | fi | |
10418 | done | |
10419 | done | |
10420 | if test "X$rpathdirs" != "X"; then | |
10421 | if test -n "$hardcode_libdir_separator"; then | |
10422 | alldirs= | |
10423 | for found_dir in $rpathdirs; do | |
10424 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10425 | done | |
10426 | acl_save_libdir="$libdir" | |
10427 | libdir="$alldirs" | |
10428 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10429 | libdir="$acl_save_libdir" | |
10430 | LIBGMP="${LIBGMP}${LIBGMP:+ }$flag" | |
10431 | else | |
10432 | for found_dir in $rpathdirs; do | |
10433 | acl_save_libdir="$libdir" | |
10434 | libdir="$found_dir" | |
10435 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10436 | libdir="$acl_save_libdir" | |
10437 | LIBGMP="${LIBGMP}${LIBGMP:+ }$flag" | |
10438 | done | |
10439 | fi | |
10440 | fi | |
10441 | if test "X$ltrpathdirs" != "X"; then | |
10442 | for found_dir in $ltrpathdirs; do | |
10443 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir" | |
10444 | done | |
10445 | fi | |
10446 | ||
10447 | ||
10448 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10449 | ||
10450 | for element in $INCGMP; do | |
10451 | haveit= | |
10452 | for x in $CPPFLAGS; do | |
10453 | ||
10454 | acl_save_prefix="$prefix" | |
10455 | prefix="$acl_final_prefix" | |
10456 | acl_save_exec_prefix="$exec_prefix" | |
10457 | exec_prefix="$acl_final_exec_prefix" | |
10458 | eval x=\"$x\" | |
10459 | exec_prefix="$acl_save_exec_prefix" | |
10460 | prefix="$acl_save_prefix" | |
10461 | ||
10462 | if test "X$x" = "X$element"; then | |
10463 | haveit=yes | |
10464 | break | |
10465 | fi | |
10466 | done | |
10467 | if test -z "$haveit"; then | |
10468 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10469 | fi | |
10470 | done | |
10471 | ||
10472 | ||
10473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5 | |
10474 | $as_echo_n "checking for libgmp... " >&6; } | |
10475 | if ${ac_cv_libgmp+:} false; then : | |
10476 | $as_echo_n "(cached) " >&6 | |
10477 | else | |
10478 | ||
10479 | ac_save_LIBS="$LIBS" | |
10480 | LIBS="$LIBS $LIBGMP" | |
10481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10482 | /* end confdefs.h. */ | |
10483 | #include <gmp.h> | |
10484 | int | |
10485 | main () | |
10486 | { | |
10487 | mpz_t n; | |
10488 | mpz_init (n); | |
10489 | ; | |
10490 | return 0; | |
10491 | } | |
10492 | _ACEOF | |
10493 | if ac_fn_c_try_link "$LINENO"; then : | |
10494 | ac_cv_libgmp=yes | |
10495 | else | |
10496 | ac_cv_libgmp=no | |
10497 | fi | |
10498 | rm -f core conftest.err conftest.$ac_objext \ | |
10499 | conftest$ac_exeext conftest.$ac_ext | |
10500 | LIBS="$ac_save_LIBS" | |
10501 | ||
10502 | fi | |
10503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5 | |
10504 | $as_echo "$ac_cv_libgmp" >&6; } | |
10505 | if test "$ac_cv_libgmp" = yes; then | |
10506 | HAVE_LIBGMP=yes | |
10507 | ||
10508 | $as_echo "#define HAVE_LIBGMP 1" >>confdefs.h | |
10509 | ||
10510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5 | |
10511 | $as_echo_n "checking how to link with libgmp... " >&6; } | |
10512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5 | |
10513 | $as_echo "$LIBGMP" >&6; } | |
10514 | else | |
10515 | HAVE_LIBGMP=no | |
10516 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10517 | LIBGMP= | |
10518 | LTLIBGMP= | |
10519 | fi | |
10520 | ||
10521 | ||
10522 | ||
10523 | ||
10524 | ||
10525 | ||
1b4ac058 JB |
10526 | if test "$HAVE_LIBGMP" != yes; then |
10527 | as_fn_error $? "GMP is missing or unusable" "$LINENO" 5 | |
10528 | fi | |
2c947d9b | 10529 | |
2400729e UW |
10530 | |
10531 | # Check whether --with-mpfr was given. | |
10532 | if test "${with_mpfr+set}" = set; then : | |
10533 | withval=$with_mpfr; | |
10534 | else | |
10535 | with_mpfr=auto | |
10536 | fi | |
10537 | ||
10538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
10539 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
10540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
10541 | $as_echo "$with_mpfr" >&6; } | |
10542 | ||
10543 | if test "${with_mpfr}" = no; then | |
10544 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
10545 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
10546 | HAVE_LIBMPFR=no | |
10547 | else | |
10548 | ||
10549 | ||
10550 | ||
10551 | ||
10552 | ||
10553 | ||
10554 | ||
10555 | ||
10556 | use_additional=yes | |
10557 | ||
10558 | acl_save_prefix="$prefix" | |
10559 | prefix="$acl_final_prefix" | |
10560 | acl_save_exec_prefix="$exec_prefix" | |
10561 | exec_prefix="$acl_final_exec_prefix" | |
10562 | ||
10563 | eval additional_includedir=\"$includedir\" | |
10564 | eval additional_libdir=\"$libdir\" | |
10565 | ||
10566 | exec_prefix="$acl_save_exec_prefix" | |
10567 | prefix="$acl_save_prefix" | |
10568 | ||
10569 | ||
10570 | # Check whether --with-libmpfr-prefix was given. | |
10571 | if test "${with_libmpfr_prefix+set}" = set; then : | |
10572 | withval=$with_libmpfr_prefix; | |
10573 | if test "X$withval" = "Xno"; then | |
10574 | use_additional=no | |
10575 | else | |
10576 | if test "X$withval" = "X"; then | |
10577 | ||
10578 | acl_save_prefix="$prefix" | |
10579 | prefix="$acl_final_prefix" | |
10580 | acl_save_exec_prefix="$exec_prefix" | |
10581 | exec_prefix="$acl_final_exec_prefix" | |
10582 | ||
10583 | eval additional_includedir=\"$includedir\" | |
10584 | eval additional_libdir=\"$libdir\" | |
10585 | ||
10586 | exec_prefix="$acl_save_exec_prefix" | |
10587 | prefix="$acl_save_prefix" | |
10588 | ||
10589 | else | |
10590 | additional_includedir="$withval/include" | |
10591 | additional_libdir="$withval/lib" | |
10592 | fi | |
10593 | fi | |
10594 | ||
10595 | fi | |
10596 | ||
9f1528a1 AB |
10597 | |
10598 | # Check whether --with-libmpfr-type was given. | |
10599 | if test "${with_libmpfr_type+set}" = set; then : | |
10600 | withval=$with_libmpfr_type; with_libmpfr_type=$withval | |
10601 | else | |
10602 | with_libmpfr_type=auto | |
10603 | fi | |
10604 | ||
10605 | lib_type=`eval echo \$with_libmpfr_type` | |
10606 | ||
2400729e UW |
10607 | LIBMPFR= |
10608 | LTLIBMPFR= | |
10609 | INCMPFR= | |
10610 | rpathdirs= | |
10611 | ltrpathdirs= | |
10612 | names_already_handled= | |
da658607 | 10613 | names_next_round='mpfr gmp' |
2400729e UW |
10614 | while test -n "$names_next_round"; do |
10615 | names_this_round="$names_next_round" | |
10616 | names_next_round= | |
10617 | for name in $names_this_round; do | |
10618 | already_handled= | |
10619 | for n in $names_already_handled; do | |
10620 | if test "$n" = "$name"; then | |
10621 | already_handled=yes | |
10622 | break | |
10623 | fi | |
10624 | done | |
10625 | if test -z "$already_handled"; then | |
10626 | names_already_handled="$names_already_handled $name" | |
10627 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10628 | eval value=\"\$HAVE_LIB$uppername\" | |
10629 | if test -n "$value"; then | |
10630 | if test "$value" = yes; then | |
10631 | eval value=\"\$LIB$uppername\" | |
10632 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
10633 | eval value=\"\$LTLIB$uppername\" | |
10634 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
10635 | else | |
10636 | : | |
10637 | fi | |
10638 | else | |
10639 | found_dir= | |
10640 | found_la= | |
10641 | found_so= | |
10642 | found_a= | |
10643 | if test $use_additional = yes; then | |
9f1528a1 | 10644 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10645 | found_dir="$additional_libdir" |
10646 | found_so="$additional_libdir/lib$name.$shlibext" | |
10647 | if test -f "$additional_libdir/lib$name.la"; then | |
10648 | found_la="$additional_libdir/lib$name.la" | |
10649 | fi | |
9f1528a1 | 10650 | elif test x$lib_type != xshared; then |
2400729e UW |
10651 | if test -f "$additional_libdir/lib$name.$libext"; then |
10652 | found_dir="$additional_libdir" | |
10653 | found_a="$additional_libdir/lib$name.$libext" | |
10654 | if test -f "$additional_libdir/lib$name.la"; then | |
10655 | found_la="$additional_libdir/lib$name.la" | |
10656 | fi | |
10657 | fi | |
10658 | fi | |
10659 | fi | |
10660 | if test "X$found_dir" = "X"; then | |
10661 | for x in $LDFLAGS $LTLIBMPFR; do | |
10662 | ||
10663 | acl_save_prefix="$prefix" | |
10664 | prefix="$acl_final_prefix" | |
10665 | acl_save_exec_prefix="$exec_prefix" | |
10666 | exec_prefix="$acl_final_exec_prefix" | |
10667 | eval x=\"$x\" | |
10668 | exec_prefix="$acl_save_exec_prefix" | |
10669 | prefix="$acl_save_prefix" | |
10670 | ||
10671 | case "$x" in | |
10672 | -L*) | |
10673 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 10674 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10675 | found_dir="$dir" |
10676 | found_so="$dir/lib$name.$shlibext" | |
10677 | if test -f "$dir/lib$name.la"; then | |
10678 | found_la="$dir/lib$name.la" | |
10679 | fi | |
9f1528a1 | 10680 | elif test x$lib_type != xshared; then |
2400729e UW |
10681 | if test -f "$dir/lib$name.$libext"; then |
10682 | found_dir="$dir" | |
10683 | found_a="$dir/lib$name.$libext" | |
10684 | if test -f "$dir/lib$name.la"; then | |
10685 | found_la="$dir/lib$name.la" | |
10686 | fi | |
10687 | fi | |
10688 | fi | |
10689 | ;; | |
10690 | esac | |
10691 | if test "X$found_dir" != "X"; then | |
10692 | break | |
10693 | fi | |
10694 | done | |
10695 | fi | |
10696 | if test "X$found_dir" != "X"; then | |
10697 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
10698 | if test "X$found_so" != "X"; then | |
10699 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10700 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10701 | else | |
10702 | haveit= | |
10703 | for x in $ltrpathdirs; do | |
10704 | if test "X$x" = "X$found_dir"; then | |
10705 | haveit=yes | |
10706 | break | |
10707 | fi | |
10708 | done | |
10709 | if test -z "$haveit"; then | |
10710 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10711 | fi | |
10712 | if test "$hardcode_direct" = yes; then | |
10713 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10714 | else | |
10715 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10716 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10717 | haveit= | |
10718 | for x in $rpathdirs; do | |
10719 | if test "X$x" = "X$found_dir"; then | |
10720 | haveit=yes | |
10721 | break | |
10722 | fi | |
10723 | done | |
10724 | if test -z "$haveit"; then | |
10725 | rpathdirs="$rpathdirs $found_dir" | |
10726 | fi | |
10727 | else | |
10728 | haveit= | |
10729 | for x in $LDFLAGS $LIBMPFR; do | |
10730 | ||
10731 | acl_save_prefix="$prefix" | |
10732 | prefix="$acl_final_prefix" | |
10733 | acl_save_exec_prefix="$exec_prefix" | |
10734 | exec_prefix="$acl_final_exec_prefix" | |
10735 | eval x=\"$x\" | |
10736 | exec_prefix="$acl_save_exec_prefix" | |
10737 | prefix="$acl_save_prefix" | |
10738 | ||
10739 | if test "X$x" = "X-L$found_dir"; then | |
10740 | haveit=yes | |
10741 | break | |
10742 | fi | |
10743 | done | |
10744 | if test -z "$haveit"; then | |
10745 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
10746 | fi | |
10747 | if test "$hardcode_minus_L" != no; then | |
10748 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10749 | else | |
10750 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10751 | fi | |
10752 | fi | |
10753 | fi | |
10754 | fi | |
10755 | else | |
10756 | if test "X$found_a" != "X"; then | |
10757 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
10758 | else | |
10759 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
10760 | fi | |
10761 | fi | |
10762 | additional_includedir= | |
10763 | case "$found_dir" in | |
10764 | */lib | */lib/) | |
10765 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10766 | additional_includedir="$basedir/include" | |
10767 | ;; | |
10768 | esac | |
10769 | if test "X$additional_includedir" != "X"; then | |
10770 | if test "X$additional_includedir" != "X/usr/include"; then | |
10771 | haveit= | |
10772 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10773 | if test -n "$GCC"; then | |
10774 | case $host_os in | |
10775 | linux*) haveit=yes;; | |
10776 | esac | |
10777 | fi | |
10778 | fi | |
10779 | if test -z "$haveit"; then | |
10780 | for x in $CPPFLAGS $INCMPFR; do | |
10781 | ||
10782 | acl_save_prefix="$prefix" | |
10783 | prefix="$acl_final_prefix" | |
10784 | acl_save_exec_prefix="$exec_prefix" | |
10785 | exec_prefix="$acl_final_exec_prefix" | |
10786 | eval x=\"$x\" | |
10787 | exec_prefix="$acl_save_exec_prefix" | |
10788 | prefix="$acl_save_prefix" | |
10789 | ||
10790 | if test "X$x" = "X-I$additional_includedir"; then | |
10791 | haveit=yes | |
10792 | break | |
10793 | fi | |
10794 | done | |
10795 | if test -z "$haveit"; then | |
10796 | if test -d "$additional_includedir"; then | |
10797 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
10798 | fi | |
10799 | fi | |
10800 | fi | |
10801 | fi | |
10802 | fi | |
10803 | if test -n "$found_la"; then | |
10804 | save_libdir="$libdir" | |
10805 | case "$found_la" in | |
10806 | */* | *\\*) . "$found_la" ;; | |
10807 | *) . "./$found_la" ;; | |
10808 | esac | |
10809 | libdir="$save_libdir" | |
10810 | for dep in $dependency_libs; do | |
10811 | case "$dep" in | |
10812 | -L*) | |
10813 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10814 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10815 | haveit= | |
10816 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10817 | if test -n "$GCC"; then | |
10818 | case $host_os in | |
10819 | linux*) haveit=yes;; | |
10820 | esac | |
10821 | fi | |
10822 | fi | |
10823 | if test -z "$haveit"; then | |
10824 | haveit= | |
10825 | for x in $LDFLAGS $LIBMPFR; do | |
10826 | ||
10827 | acl_save_prefix="$prefix" | |
10828 | prefix="$acl_final_prefix" | |
10829 | acl_save_exec_prefix="$exec_prefix" | |
10830 | exec_prefix="$acl_final_exec_prefix" | |
10831 | eval x=\"$x\" | |
10832 | exec_prefix="$acl_save_exec_prefix" | |
10833 | prefix="$acl_save_prefix" | |
10834 | ||
10835 | if test "X$x" = "X-L$additional_libdir"; then | |
10836 | haveit=yes | |
10837 | break | |
10838 | fi | |
10839 | done | |
10840 | if test -z "$haveit"; then | |
10841 | if test -d "$additional_libdir"; then | |
10842 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
10843 | fi | |
10844 | fi | |
10845 | haveit= | |
10846 | for x in $LDFLAGS $LTLIBMPFR; do | |
10847 | ||
10848 | acl_save_prefix="$prefix" | |
10849 | prefix="$acl_final_prefix" | |
10850 | acl_save_exec_prefix="$exec_prefix" | |
10851 | exec_prefix="$acl_final_exec_prefix" | |
10852 | eval x=\"$x\" | |
10853 | exec_prefix="$acl_save_exec_prefix" | |
10854 | prefix="$acl_save_prefix" | |
10855 | ||
10856 | if test "X$x" = "X-L$additional_libdir"; then | |
10857 | haveit=yes | |
10858 | break | |
10859 | fi | |
10860 | done | |
10861 | if test -z "$haveit"; then | |
10862 | if test -d "$additional_libdir"; then | |
10863 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
10864 | fi | |
10865 | fi | |
10866 | fi | |
10867 | fi | |
10868 | ;; | |
10869 | -R*) | |
10870 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10871 | if test "$enable_rpath" != no; then | |
10872 | haveit= | |
10873 | for x in $rpathdirs; do | |
10874 | if test "X$x" = "X$dir"; then | |
10875 | haveit=yes | |
10876 | break | |
10877 | fi | |
10878 | done | |
10879 | if test -z "$haveit"; then | |
10880 | rpathdirs="$rpathdirs $dir" | |
10881 | fi | |
10882 | haveit= | |
10883 | for x in $ltrpathdirs; do | |
10884 | if test "X$x" = "X$dir"; then | |
10885 | haveit=yes | |
10886 | break | |
10887 | fi | |
10888 | done | |
10889 | if test -z "$haveit"; then | |
10890 | ltrpathdirs="$ltrpathdirs $dir" | |
10891 | fi | |
10892 | fi | |
10893 | ;; | |
10894 | -l*) | |
10895 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10896 | ;; | |
10897 | *.la) | |
10898 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10899 | ;; | |
10900 | *) | |
10901 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10902 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10903 | ;; | |
10904 | esac | |
10905 | done | |
10906 | fi | |
10907 | else | |
9f1528a1 AB |
10908 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
10909 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10910 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10911 | else | |
10912 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext" | |
10913 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext" | |
10914 | fi | |
2400729e UW |
10915 | fi |
10916 | fi | |
10917 | fi | |
10918 | done | |
10919 | done | |
10920 | if test "X$rpathdirs" != "X"; then | |
10921 | if test -n "$hardcode_libdir_separator"; then | |
10922 | alldirs= | |
10923 | for found_dir in $rpathdirs; do | |
10924 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10925 | done | |
10926 | acl_save_libdir="$libdir" | |
10927 | libdir="$alldirs" | |
10928 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10929 | libdir="$acl_save_libdir" | |
10930 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10931 | else | |
10932 | for found_dir in $rpathdirs; do | |
10933 | acl_save_libdir="$libdir" | |
10934 | libdir="$found_dir" | |
10935 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10936 | libdir="$acl_save_libdir" | |
10937 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10938 | done | |
10939 | fi | |
10940 | fi | |
10941 | if test "X$ltrpathdirs" != "X"; then | |
10942 | for found_dir in $ltrpathdirs; do | |
10943 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10944 | done | |
10945 | fi | |
10946 | ||
10947 | ||
10948 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10949 | ||
10950 | for element in $INCMPFR; do | |
10951 | haveit= | |
10952 | for x in $CPPFLAGS; do | |
10953 | ||
10954 | acl_save_prefix="$prefix" | |
10955 | prefix="$acl_final_prefix" | |
10956 | acl_save_exec_prefix="$exec_prefix" | |
10957 | exec_prefix="$acl_final_exec_prefix" | |
10958 | eval x=\"$x\" | |
10959 | exec_prefix="$acl_save_exec_prefix" | |
10960 | prefix="$acl_save_prefix" | |
10961 | ||
10962 | if test "X$x" = "X$element"; then | |
10963 | haveit=yes | |
10964 | break | |
10965 | fi | |
10966 | done | |
10967 | if test -z "$haveit"; then | |
10968 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10969 | fi | |
10970 | done | |
10971 | ||
10972 | ||
10973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10974 | $as_echo_n "checking for libmpfr... " >&6; } | |
d0ac1c44 | 10975 | if ${ac_cv_libmpfr+:} false; then : |
2400729e UW |
10976 | $as_echo_n "(cached) " >&6 |
10977 | else | |
10978 | ||
10979 | ac_save_LIBS="$LIBS" | |
10980 | LIBS="$LIBS $LIBMPFR" | |
10981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10982 | /* end confdefs.h. */ | |
10983 | #include <mpfr.h> | |
10984 | int | |
10985 | main () | |
10986 | { | |
10987 | mpfr_exp_t exp; mpfr_t x; | |
10988 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10989 | ; | |
10990 | return 0; | |
10991 | } | |
10992 | _ACEOF | |
10993 | if ac_fn_c_try_link "$LINENO"; then : | |
10994 | ac_cv_libmpfr=yes | |
10995 | else | |
10996 | ac_cv_libmpfr=no | |
10997 | fi | |
10998 | rm -f core conftest.err conftest.$ac_objext \ | |
10999 | conftest$ac_exeext conftest.$ac_ext | |
11000 | LIBS="$ac_save_LIBS" | |
11001 | ||
11002 | fi | |
11003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
11004 | $as_echo "$ac_cv_libmpfr" >&6; } | |
11005 | if test "$ac_cv_libmpfr" = yes; then | |
11006 | HAVE_LIBMPFR=yes | |
11007 | ||
11008 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
11009 | ||
11010 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
11011 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
11012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
11013 | $as_echo "$LIBMPFR" >&6; } | |
11014 | else | |
11015 | HAVE_LIBMPFR=no | |
11016 | CPPFLAGS="$ac_save_CPPFLAGS" | |
11017 | LIBMPFR= | |
11018 | LTLIBMPFR= | |
11019 | fi | |
11020 | ||
11021 | ||
11022 | ||
11023 | ||
11024 | ||
11025 | ||
11026 | if test "$HAVE_LIBMPFR" != yes; then | |
11027 | if test "$with_mpfr" = yes; then | |
d0ac1c44 | 11028 | as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 |
2400729e UW |
11029 | else |
11030 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
11031 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
11032 | fi | |
11033 | fi | |
11034 | fi | |
11035 | ||
d344e670 DE |
11036 | # --------------------- # |
11037 | # Check for libpython. # | |
11038 | # --------------------- # | |
11039 | ||
a9322a30 | 11040 | |
a9322a30 TT |
11041 | |
11042 | ||
ec685c5e | 11043 | |
0c4a4063 | 11044 | |
81ecdfbb RW |
11045 | # Check whether --with-python was given. |
11046 | if test "${with_python+set}" = set; then : | |
11047 | withval=$with_python; | |
bec39cab | 11048 | else |
81ecdfbb | 11049 | with_python=auto |
bec39cab | 11050 | fi |
bec39cab | 11051 | |
81ecdfbb RW |
11052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
11053 | $as_echo_n "checking whether to use python... " >&6; } | |
11054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
11055 | $as_echo "$with_python" >&6; } | |
9a156167 | 11056 | |
81ecdfbb RW |
11057 | if test "${with_python}" = no; then |
11058 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
11059 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
11060 | have_libpython=no | |
bec39cab | 11061 | else |
81ecdfbb | 11062 | case "${with_python}" in |
8c85a4e2 | 11063 | [\\/]* | ?:[\\/]*) |
0ad6b8ee | 11064 | if test -d "${with_python}"; then |
ec685c5e | 11065 | # Assume the python binary is ${with_python}/bin/python. |
ec685c5e | 11066 | python_prog="${with_python}/bin/python" |
0c4a4063 | 11067 | python_prefix= |
9c4ea6c5 JB |
11068 | # If python does not exit ${with_python}/bin, then try in |
11069 | # ${with_python}. On Windows/MinGW, this is where the Python | |
11070 | # executable is. | |
11071 | if test ! -x "${python_prog}"; then | |
11072 | python_prog="${with_python}/python" | |
11073 | python_prefix= | |
11074 | fi | |
e7a30f46 | 11075 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
11076 | # Fall back to gdb 7.0/7.1 behaviour. |
11077 | python_prog=missing | |
0c4a4063 | 11078 | python_prefix=${with_python} |
ec685c5e | 11079 | fi |
e7a30f46 | 11080 | elif test -x "${with_python}"; then |
ec685c5e DE |
11081 | # While we can't run python compiled for $host (unless host == build), |
11082 | # the user could write a script that provides the needed information, | |
11083 | # so we support that. | |
ec685c5e | 11084 | python_prog=${with_python} |
0c4a4063 | 11085 | python_prefix= |
ec685c5e | 11086 | else |
d0ac1c44 | 11087 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
ec685c5e | 11088 | fi |
81ecdfbb | 11089 | ;; |
ec685c5e DE |
11090 | */*) |
11091 | # Disallow --with-python=foo/bar. | |
d0ac1c44 | 11092 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
81ecdfbb | 11093 | ;; |
ec685c5e DE |
11094 | *) |
11095 | # The user has either specified auto, yes, or the name of the python | |
11096 | # program assumed to be in $PATH. | |
11097 | python_prefix= | |
11098 | case "${with_python}" in | |
11099 | yes | auto) | |
0ad6b8ee | 11100 | if test "${build}" = "${host}"; then |
ec685c5e DE |
11101 | # Extract the first word of "python", so it can be a program name with args. |
11102 | set dummy python; 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_python_prog_path+:} false; then : |
ec685c5e DE |
11106 | $as_echo_n "(cached) " >&6 |
11107 | else | |
11108 | case $python_prog_path in | |
11109 | [\\/]* | ?:[\\/]*) | |
11110 | ac_cv_path_python_prog_path="$python_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 |
ec685c5e DE |
11120 | ac_cv_path_python_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_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
11129 | ;; | |
11130 | esac | |
11131 | fi | |
11132 | python_prog_path=$ac_cv_path_python_prog_path | |
11133 | if test -n "$python_prog_path"; then | |
11134 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
11135 | $as_echo "$python_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 | if test "${python_prog_path}" = missing; then | |
11143 | python_prog=missing | |
11144 | else | |
11145 | python_prog=${python_prog_path} | |
11146 | fi | |
11147 | else | |
11148 | # Not much we can do except assume the cross-compiler will find the | |
11149 | # right files. | |
11150 | python_prog=missing | |
11151 | fi | |
11152 | ;; | |
11153 | *) | |
11154 | # While we can't run python compiled for $host (unless host == build), | |
11155 | # the user could write a script that provides the needed information, | |
11156 | # so we support that. | |
11157 | python_prog="${with_python}" | |
11158 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
11159 | set dummy ${python_prog}; ac_word=$2 | |
11160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11161 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11162 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
11163 | $as_echo_n "(cached) " >&6 |
11164 | else | |
11165 | case $python_prog_path in | |
11166 | [\\/]* | ?:[\\/]*) | |
11167 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
11168 | ;; | |
11169 | *) | |
11170 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11171 | for as_dir in $PATH | |
11172 | do | |
11173 | IFS=$as_save_IFS | |
11174 | test -z "$as_dir" && as_dir=. | |
11175 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11176 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
11177 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11178 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11179 | break 2 | |
11180 | fi | |
11181 | done | |
11182 | done | |
11183 | IFS=$as_save_IFS | |
11184 | ||
11185 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
11186 | ;; | |
11187 | esac | |
11188 | fi | |
11189 | python_prog_path=$ac_cv_path_python_prog_path | |
11190 | if test -n "$python_prog_path"; then | |
11191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
11192 | $as_echo "$python_prog_path" >&6; } | |
11193 | else | |
11194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11195 | $as_echo "no" >&6; } | |
11196 | fi | |
11197 | ||
11198 | ||
11199 | if test "${python_prog_path}" = missing; then | |
5593a99a | 11200 | as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 |
ec685c5e DE |
11201 | fi |
11202 | ;; | |
11203 | esac | |
81ecdfbb RW |
11204 | esac |
11205 | ||
ec685c5e | 11206 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
11207 | # We have a python program to use, but it may be too old. |
11208 | # Don't flag an error for --with-python=auto (the default). | |
11209 | have_python_config=yes | |
ec685c5e DE |
11210 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
11211 | if test $? != 0; then | |
e7a30f46 DE |
11212 | have_python_config=failed |
11213 | if test "${with_python}" != auto; then | |
5593a99a | 11214 | as_fn_error $? "failure running python-config --includes" "$LINENO" 5 |
e7a30f46 | 11215 | fi |
ec685c5e DE |
11216 | fi |
11217 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
11218 | if test $? != 0; then | |
e7a30f46 DE |
11219 | have_python_config=failed |
11220 | if test "${with_python}" != auto; then | |
5593a99a | 11221 | as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 |
e7a30f46 | 11222 | fi |
ec685c5e | 11223 | fi |
0c4a4063 DE |
11224 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
11225 | if test $? != 0; then | |
e7a30f46 DE |
11226 | have_python_config=failed |
11227 | if test "${with_python}" != auto; then | |
5593a99a | 11228 | as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 |
e7a30f46 | 11229 | fi |
0c4a4063 | 11230 | fi |
ec685c5e | 11231 | else |
ac534cba JB |
11232 | # We do not have a python executable we can use to determine where |
11233 | # to find the Python headers and libs. We cannot guess the include | |
11234 | # path from the python_prefix either, because that include path | |
11235 | # depends on the Python version. So, there is nothing much we can | |
11236 | # do except assume that the compiler will be able to find those files. | |
11237 | python_includes= | |
11238 | python_libs= | |
0c4a4063 | 11239 | have_python_config=no |
ec685c5e | 11240 | fi |
bec39cab | 11241 | |
ec685c5e DE |
11242 | # If we have python-config, only try the configuration it provides. |
11243 | # Otherwise fallback on the old way of trying different versions of | |
11244 | # python in turn. | |
81ecdfbb | 11245 | |
ec685c5e DE |
11246 | have_libpython=no |
11247 | if test "${have_python_config}" = yes; then | |
71737c43 | 11248 | |
ec685c5e DE |
11249 | |
11250 | new_CPPFLAGS=${python_includes} | |
11251 | new_LIBS=${python_libs} | |
71737c43 CB |
11252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11253 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e | 11254 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 11255 | save_LIBS=$LIBS |
ec685c5e | 11256 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 11257 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 11258 | found_usable_python=no |
81ecdfbb | 11259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11260 | /* end confdefs.h. */ |
ac534cba | 11261 | #include "Python.h" |
81ecdfbb RW |
11262 | int |
11263 | main () | |
11264 | { | |
11265 | Py_Initialize (); | |
11266 | ; | |
11267 | return 0; | |
11268 | } | |
bec39cab | 11269 | _ACEOF |
81ecdfbb | 11270 | if ac_fn_c_try_link "$LINENO"; then : |
71737c43 | 11271 | have_libpython=yes |
ec685c5e | 11272 | found_usable_python=yes |
ac534cba JB |
11273 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11274 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 11275 | fi |
81ecdfbb RW |
11276 | rm -f core conftest.err conftest.$ac_objext \ |
11277 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11278 | CPPFLAGS=$save_CPPFLAGS |
11279 | LIBS=$save_LIBS | |
ec685c5e DE |
11280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11281 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 11282 | |
e7a30f46 | 11283 | elif test "${have_python_config}" != failed; then |
ec685c5e | 11284 | if test "${have_libpython}" = no; then |
9a156167 | 11285 | |
420697bb TT |
11286 | |
11287 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 11288 | new_LIBS="-lpython2.7 ${python_libs}" |
71737c43 CB |
11289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11290 | $as_echo_n "checking for python... " >&6; } | |
420697bb TT |
11291 | save_CPPFLAGS=$CPPFLAGS |
11292 | save_LIBS=$LIBS | |
11293 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 11294 | LIBS="$new_LIBS $LIBS" |
420697bb TT |
11295 | found_usable_python=no |
11296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11297 | /* end confdefs.h. */ | |
ac534cba | 11298 | #include "Python.h" |
420697bb TT |
11299 | int |
11300 | main () | |
11301 | { | |
11302 | Py_Initialize (); | |
11303 | ; | |
11304 | return 0; | |
11305 | } | |
11306 | _ACEOF | |
11307 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 11308 | have_libpython=yes |
420697bb | 11309 | found_usable_python=yes |
ac534cba JB |
11310 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11311 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
11312 | fi |
11313 | rm -f core conftest.err conftest.$ac_objext \ | |
11314 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11315 | CPPFLAGS=$save_CPPFLAGS |
11316 | LIBS=$save_LIBS | |
420697bb TT |
11317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11318 | $as_echo "${found_usable_python}" >&6; } | |
11319 | ||
11320 | fi | |
11321 | if test "${have_libpython}" = no; then | |
11322 | ||
ec685c5e DE |
11323 | |
11324 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 11325 | new_LIBS="-lpython2.6 ${python_libs}" |
71737c43 CB |
11326 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11327 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e DE |
11328 | save_CPPFLAGS=$CPPFLAGS |
11329 | save_LIBS=$LIBS | |
11330 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 11331 | LIBS="$new_LIBS $LIBS" |
ec685c5e DE |
11332 | found_usable_python=no |
11333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11334 | /* end confdefs.h. */ | |
ac534cba | 11335 | #include "Python.h" |
ec685c5e DE |
11336 | int |
11337 | main () | |
11338 | { | |
11339 | Py_Initialize (); | |
11340 | ; | |
11341 | return 0; | |
11342 | } | |
11343 | _ACEOF | |
11344 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 11345 | have_libpython=yes |
ec685c5e | 11346 | found_usable_python=yes |
ac534cba JB |
11347 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11348 | PYTHON_LIBS=$new_LIBS | |
ec685c5e | 11349 | fi |
81ecdfbb RW |
11350 | rm -f core conftest.err conftest.$ac_objext \ |
11351 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11352 | CPPFLAGS=$save_CPPFLAGS |
11353 | LIBS=$save_LIBS | |
ec685c5e DE |
11354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11355 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 11356 | |
ec685c5e DE |
11357 | fi |
11358 | fi | |
ec685c5e DE |
11359 | |
11360 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
11361 | case "${with_python}" in |
11362 | yes) | |
d0ac1c44 | 11363 | as_fn_error $? "python is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
11364 | ;; |
11365 | auto) | |
11366 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
11367 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
11368 | ;; | |
11369 | *) | |
d0ac1c44 | 11370 | as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 |
81ecdfbb RW |
11371 | ;; |
11372 | esac | |
0c4a4063 DE |
11373 | else |
11374 | if test -n "${python_prefix}"; then | |
11375 | ||
11376 | cat >>confdefs.h <<_ACEOF | |
11377 | #define WITH_PYTHON_PATH "${python_prefix}" | |
11378 | _ACEOF | |
11379 | ||
11380 | ||
11381 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11382 | if test "x$prefix" = xNONE; then | |
11383 | test_prefix=/usr/local | |
11384 | else | |
11385 | test_prefix=$prefix | |
11386 | fi | |
11387 | else | |
11388 | test_prefix=$exec_prefix | |
11389 | fi | |
11390 | value=0 | |
11391 | case ${python_prefix} in | |
11392 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11393 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11394 | value=1 | |
11395 | ;; | |
11396 | esac | |
11397 | ||
11398 | cat >>confdefs.h <<_ACEOF | |
11399 | #define PYTHON_PATH_RELOCATABLE $value | |
11400 | _ACEOF | |
11401 | ||
11402 | ||
11403 | fi | |
81ecdfbb | 11404 | fi |
436868fb | 11405 | fi |
436868fb | 11406 | |
d13c7322 AB |
11407 | |
11408 | # Check whether --with-python-libdir was given. | |
11409 | if test "${with_python_libdir+set}" = set; then : | |
11410 | withval=$with_python_libdir; | |
11411 | else | |
11412 | ||
11413 | # If no python libdir is specified then select one based on | |
11414 | # python's prefix path. | |
11415 | if test -n "${python_prefix}"; then | |
11416 | with_python_libdir=${python_prefix}/lib | |
11417 | fi | |
11418 | ||
11419 | fi | |
11420 | ||
11421 | ||
ec685c5e | 11422 | if test "${have_libpython}" != no; then |
436868fb | 11423 | |
81ecdfbb | 11424 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 11425 | |
81ecdfbb RW |
11426 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
11427 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
11428 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 11429 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 11430 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 11431 | |
d13c7322 AB |
11432 | if test -n "${with_python_libdir}"; then |
11433 | ||
11434 | cat >>confdefs.h <<_ACEOF | |
11435 | #define WITH_PYTHON_LIBDIR "${with_python_libdir}" | |
11436 | _ACEOF | |
11437 | ||
11438 | ||
11439 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11440 | if test "x$prefix" = xNONE; then | |
11441 | test_prefix=/usr/local | |
11442 | else | |
11443 | test_prefix=$prefix | |
11444 | fi | |
11445 | else | |
11446 | test_prefix=$exec_prefix | |
11447 | fi | |
11448 | value=0 | |
11449 | case ${with_python_libdir} in | |
11450 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11451 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11452 | value=1 | |
11453 | ;; | |
11454 | esac | |
11455 | ||
11456 | cat >>confdefs.h <<_ACEOF | |
11457 | #define PYTHON_LIBDIR_RELOCATABLE $value | |
11458 | _ACEOF | |
11459 | ||
11460 | ||
11461 | fi | |
11462 | ||
81ecdfbb RW |
11463 | # Flags needed to compile Python code (taken from python-config --cflags). |
11464 | # We cannot call python-config directly because it will output whatever was | |
11465 | # used when compiling the Python interpreter itself, including flags which | |
11466 | # would make the python-related objects be compiled differently from the | |
11467 | # rest of GDB (e.g., -O2 and -fPIC). | |
11468 | if test "${GCC}" = yes; then | |
ae292b3a TT |
11469 | tentative_python_cflags="-fno-strict-aliasing -fwrapv" |
11470 | # Python headers recommend -DNDEBUG, but it's unclear if that just | |
11471 | # refers to building Python itself. In release mode, though, it | |
11472 | # doesn't hurt for the Python code in gdb to follow. | |
11473 | $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG" | |
81ecdfbb | 11474 | fi |
436868fb | 11475 | |
81ecdfbb RW |
11476 | if test "x${tentative_python_cflags}" != x; then |
11477 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
11478 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
11479 | for flag in ${tentative_python_cflags}; do | |
11480 | # Check that the compiler accepts it | |
11481 | saved_CFLAGS="$CFLAGS" | |
11482 | CFLAGS="$CFLAGS $flag" | |
11483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11484 | /* end confdefs.h. */ |
81ecdfbb | 11485 | |
a9322a30 TT |
11486 | int |
11487 | main () | |
11488 | { | |
a9322a30 TT |
11489 | |
11490 | ; | |
11491 | return 0; | |
11492 | } | |
bec39cab | 11493 | _ACEOF |
81ecdfbb RW |
11494 | if ac_fn_c_try_compile "$LINENO"; then : |
11495 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 11496 | fi |
81ecdfbb RW |
11497 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11498 | CFLAGS="$saved_CFLAGS" | |
11499 | done | |
11500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
11501 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
11502 | fi | |
043b6510 | 11503 | |
c83393b9 JB |
11504 | # On x64 Windows, Python's include headers, and pyconfig.h in |
11505 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
11506 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
11507 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
11508 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
11509 | # The issue was reported to the Python community, but still isn't | |
11510 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
11511 | ||
043b6510 | 11512 | case "$gdb_host" in |
c83393b9 JB |
11513 | mingw64) |
11514 | if test "${GCC}" = yes; then | |
11515 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
11516 | fi | |
11517 | ;; | |
043b6510 | 11518 | esac |
81ecdfbb | 11519 | else |
6dddc817 DE |
11520 | # Even if Python support is not compiled in, we need to have this file |
11521 | # included so that the "python" command, et.al., still exists. | |
8fd8d003 | 11522 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
6dddc817 | 11523 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
a9322a30 | 11524 | fi |
9a156167 | 11525 | |
a4a1c157 PA |
11526 | # Work around Python http://bugs.python.org/issue10112. See also |
11527 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
11528 | # no effect. Note that the only test after this that uses Python is | |
11529 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
11530 | # run without -export-dynamic too. | |
11531 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
11532 | ||
11533 | ||
ed3ef339 DE |
11534 | |
11535 | ||
4df42755 DE |
11536 | if test "${have_libpython}" != no; then |
11537 | HAVE_PYTHON_TRUE= | |
11538 | HAVE_PYTHON_FALSE='#' | |
11539 | else | |
11540 | HAVE_PYTHON_TRUE='#' | |
11541 | HAVE_PYTHON_FALSE= | |
11542 | fi | |
11543 | ||
ed3ef339 DE |
11544 | |
11545 | # -------------------- # | |
11546 | # Check for libguile. # | |
11547 | # -------------------- # | |
11548 | ||
11549 | ||
e1402065 DE |
11550 | |
11551 | ||
11552 | ||
11553 | ||
11554 | # Check whether --with-guile was given. | |
11555 | if test "${with_guile+set}" = set; then : | |
11556 | withval=$with_guile; | |
11557 | else | |
11558 | with_guile=auto | |
11559 | fi | |
11560 | ||
11561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
11562 | $as_echo_n "checking whether to use guile... " >&6; } | |
11563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
11564 | $as_echo "$with_guile" >&6; } | |
11565 | ||
ed3ef339 DE |
11566 | # Extract the first word of "pkg-config", so it can be a program name with args. |
11567 | set dummy pkg-config; ac_word=$2 | |
11568 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11569 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11570 | if ${ac_cv_path_pkg_config_prog_path+:} false; then : |
ed3ef339 DE |
11571 | $as_echo_n "(cached) " >&6 |
11572 | else | |
11573 | case $pkg_config_prog_path in | |
11574 | [\\/]* | ?:[\\/]*) | |
11575 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
11576 | ;; | |
11577 | *) | |
11578 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11579 | for as_dir in $PATH | |
11580 | do | |
11581 | IFS=$as_save_IFS | |
11582 | test -z "$as_dir" && as_dir=. | |
11583 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11584 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ed3ef339 DE |
11585 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11586 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11587 | break 2 | |
11588 | fi | |
11589 | done | |
11590 | done | |
11591 | IFS=$as_save_IFS | |
11592 | ||
11593 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
11594 | ;; | |
11595 | esac | |
11596 | fi | |
11597 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
11598 | if test -n "$pkg_config_prog_path"; then | |
11599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
11600 | $as_echo "$pkg_config_prog_path" >&6; } | |
11601 | else | |
11602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11603 | $as_echo "no" >&6; } | |
11604 | fi | |
11605 | ||
11606 | ||
11607 | ||
ae5369e7 | 11608 | try_guile_versions="guile-3.0 guile-2.2 guile-2.0" |
ed3ef339 DE |
11609 | have_libguile=no |
11610 | case "${with_guile}" in | |
11611 | no) | |
11612 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
11613 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
11614 | ;; | |
11615 | auto) | |
e1402065 DE |
11616 | if test "${pkg_config_prog_path}" = "missing"; then |
11617 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
11618 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
11619 | else | |
ed3ef339 DE |
11620 | |
11621 | pkg_config=${pkg_config_prog_path} | |
11622 | guile_version_list=${try_guile_versions} | |
11623 | flag_errors=no | |
11624 | ||
ed3ef339 DE |
11625 | found_usable_guile=checking |
11626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11627 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11628 | for guile_version in ${guile_version_list}; do | |
11629 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11630 | if test $? != 0; then | |
11631 | continue | |
11632 | fi | |
11633 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11634 | if test $? != 0; then | |
d0ac1c44 | 11635 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11636 | fi |
11637 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11638 | if test $? != 0; then | |
d0ac1c44 | 11639 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11640 | fi |
11641 | found_usable_guile=${guile_version} | |
11642 | break | |
11643 | done | |
11644 | if test "${found_usable_guile}" = "checking"; then | |
11645 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11646 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11647 | else |
11648 | found_usable_guile=no | |
11649 | fi | |
11650 | fi | |
11651 | if test "${found_usable_guile}" != no; then | |
11652 | save_CPPFLAGS=$CPPFLAGS | |
11653 | save_LIBS=$LIBS | |
11654 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11655 | LIBS="$LIBS $new_LIBS" | |
11656 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11657 | /* end confdefs.h. */ | |
11658 | #include "libguile.h" | |
11659 | int | |
11660 | main () | |
11661 | { | |
11662 | scm_init_guile (); | |
11663 | ; | |
11664 | return 0; | |
11665 | } | |
11666 | _ACEOF | |
11667 | if ac_fn_c_try_link "$LINENO"; then : | |
11668 | have_libguile=yes | |
11669 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11670 | GUILE_LIBS=$new_LIBS | |
11671 | else | |
11672 | found_usable_guile=no | |
11673 | fi | |
11674 | rm -f core conftest.err conftest.$ac_objext \ | |
11675 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11676 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11677 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11678 | |
11679 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11680 | ||
11681 | ||
11682 | fi | |
11683 | ||
ed3ef339 DE |
11684 | CPPFLAGS=$save_CPPFLAGS |
11685 | LIBS=$save_LIBS | |
11686 | if test "${found_usable_guile}" = no; then | |
11687 | if test "${flag_errors}" = yes; then | |
11688 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11689 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11690 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11691 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11692 | fi |
11693 | fi | |
11694 | fi | |
11695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11696 | $as_echo "${found_usable_guile}" >&6; } | |
11697 | ||
e1402065 | 11698 | fi |
ed3ef339 DE |
11699 | ;; |
11700 | yes) | |
e1402065 | 11701 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11702 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11703 | fi |
ed3ef339 DE |
11704 | |
11705 | pkg_config=${pkg_config_prog_path} | |
11706 | guile_version_list=${try_guile_versions} | |
11707 | flag_errors=yes | |
11708 | ||
ed3ef339 DE |
11709 | found_usable_guile=checking |
11710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11711 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11712 | for guile_version in ${guile_version_list}; do | |
11713 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11714 | if test $? != 0; then | |
11715 | continue | |
11716 | fi | |
11717 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11718 | if test $? != 0; then | |
d0ac1c44 | 11719 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11720 | fi |
11721 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11722 | if test $? != 0; then | |
d0ac1c44 | 11723 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11724 | fi |
11725 | found_usable_guile=${guile_version} | |
11726 | break | |
11727 | done | |
11728 | if test "${found_usable_guile}" = "checking"; then | |
11729 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11730 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11731 | else |
11732 | found_usable_guile=no | |
11733 | fi | |
11734 | fi | |
11735 | if test "${found_usable_guile}" != no; then | |
11736 | save_CPPFLAGS=$CPPFLAGS | |
11737 | save_LIBS=$LIBS | |
11738 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11739 | LIBS="$LIBS $new_LIBS" | |
11740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11741 | /* end confdefs.h. */ | |
11742 | #include "libguile.h" | |
11743 | int | |
11744 | main () | |
11745 | { | |
11746 | scm_init_guile (); | |
11747 | ; | |
11748 | return 0; | |
11749 | } | |
11750 | _ACEOF | |
11751 | if ac_fn_c_try_link "$LINENO"; then : | |
11752 | have_libguile=yes | |
11753 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11754 | GUILE_LIBS=$new_LIBS | |
11755 | else | |
11756 | found_usable_guile=no | |
11757 | fi | |
11758 | rm -f core conftest.err conftest.$ac_objext \ | |
11759 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11760 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11761 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11762 | |
11763 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11764 | ||
11765 | ||
11766 | fi | |
11767 | ||
ed3ef339 DE |
11768 | CPPFLAGS=$save_CPPFLAGS |
11769 | LIBS=$save_LIBS | |
11770 | if test "${found_usable_guile}" = no; then | |
11771 | if test "${flag_errors}" = yes; then | |
11772 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11773 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11774 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11775 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11776 | fi |
11777 | fi | |
11778 | fi | |
11779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11780 | $as_echo "${found_usable_guile}" >&6; } | |
11781 | ||
11782 | ;; | |
11783 | [\\/]* | ?:[\\/]*) | |
e1402065 | 11784 | if test -x "${with_guile}"; then |
ed3ef339 DE |
11785 | |
11786 | pkg_config=${with_guile} | |
11787 | guile_version_list=${try_guile_versions} | |
11788 | flag_errors=yes | |
11789 | ||
ed3ef339 DE |
11790 | found_usable_guile=checking |
11791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11792 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11793 | for guile_version in ${guile_version_list}; do | |
11794 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11795 | if test $? != 0; then | |
11796 | continue | |
11797 | fi | |
11798 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11799 | if test $? != 0; then | |
d0ac1c44 | 11800 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11801 | fi |
11802 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11803 | if test $? != 0; then | |
d0ac1c44 | 11804 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11805 | fi |
11806 | found_usable_guile=${guile_version} | |
11807 | break | |
11808 | done | |
11809 | if test "${found_usable_guile}" = "checking"; then | |
11810 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11811 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11812 | else |
11813 | found_usable_guile=no | |
11814 | fi | |
11815 | fi | |
11816 | if test "${found_usable_guile}" != no; then | |
11817 | save_CPPFLAGS=$CPPFLAGS | |
11818 | save_LIBS=$LIBS | |
11819 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11820 | LIBS="$LIBS $new_LIBS" | |
11821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11822 | /* end confdefs.h. */ | |
11823 | #include "libguile.h" | |
11824 | int | |
11825 | main () | |
11826 | { | |
11827 | scm_init_guile (); | |
11828 | ; | |
11829 | return 0; | |
11830 | } | |
11831 | _ACEOF | |
11832 | if ac_fn_c_try_link "$LINENO"; then : | |
11833 | have_libguile=yes | |
11834 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11835 | GUILE_LIBS=$new_LIBS | |
11836 | else | |
11837 | found_usable_guile=no | |
11838 | fi | |
11839 | rm -f core conftest.err conftest.$ac_objext \ | |
11840 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11841 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11842 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11843 | |
11844 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11845 | ||
11846 | ||
11847 | fi | |
11848 | ||
ed3ef339 DE |
11849 | CPPFLAGS=$save_CPPFLAGS |
11850 | LIBS=$save_LIBS | |
11851 | if test "${found_usable_guile}" = no; then | |
11852 | if test "${flag_errors}" = yes; then | |
11853 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11854 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11855 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11856 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11857 | fi |
11858 | fi | |
11859 | fi | |
11860 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11861 | $as_echo "${found_usable_guile}" >&6; } | |
11862 | ||
e1402065 | 11863 | else |
d0ac1c44 | 11864 | as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 |
e1402065 | 11865 | fi |
ed3ef339 DE |
11866 | ;; |
11867 | "" | */*) | |
11868 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
d0ac1c44 | 11869 | as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 |
ed3ef339 DE |
11870 | ;; |
11871 | *) | |
11872 | # A space separate list of guile versions to try, in order. | |
e1402065 | 11873 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11874 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11875 | fi |
ed3ef339 DE |
11876 | |
11877 | pkg_config=${pkg_config_prog_path} | |
11878 | guile_version_list=${with_guile} | |
11879 | flag_errors=yes | |
11880 | ||
ed3ef339 DE |
11881 | found_usable_guile=checking |
11882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11883 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11884 | for guile_version in ${guile_version_list}; do | |
11885 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11886 | if test $? != 0; then | |
11887 | continue | |
11888 | fi | |
11889 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11890 | if test $? != 0; then | |
d0ac1c44 | 11891 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11892 | fi |
11893 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11894 | if test $? != 0; then | |
d0ac1c44 | 11895 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11896 | fi |
11897 | found_usable_guile=${guile_version} | |
11898 | break | |
11899 | done | |
11900 | if test "${found_usable_guile}" = "checking"; then | |
11901 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11902 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11903 | else |
11904 | found_usable_guile=no | |
11905 | fi | |
11906 | fi | |
11907 | if test "${found_usable_guile}" != no; then | |
11908 | save_CPPFLAGS=$CPPFLAGS | |
11909 | save_LIBS=$LIBS | |
11910 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11911 | LIBS="$LIBS $new_LIBS" | |
11912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11913 | /* end confdefs.h. */ | |
11914 | #include "libguile.h" | |
11915 | int | |
11916 | main () | |
11917 | { | |
11918 | scm_init_guile (); | |
11919 | ; | |
11920 | return 0; | |
11921 | } | |
11922 | _ACEOF | |
11923 | if ac_fn_c_try_link "$LINENO"; then : | |
11924 | have_libguile=yes | |
11925 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11926 | GUILE_LIBS=$new_LIBS | |
11927 | else | |
11928 | found_usable_guile=no | |
11929 | fi | |
11930 | rm -f core conftest.err conftest.$ac_objext \ | |
11931 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11932 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11933 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11934 | |
11935 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11936 | ||
11937 | ||
11938 | fi | |
11939 | ||
ed3ef339 DE |
11940 | CPPFLAGS=$save_CPPFLAGS |
11941 | LIBS=$save_LIBS | |
11942 | if test "${found_usable_guile}" = no; then | |
11943 | if test "${flag_errors}" = yes; then | |
11944 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11945 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11946 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11947 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11948 | fi |
11949 | fi | |
11950 | fi | |
11951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11952 | $as_echo "${found_usable_guile}" >&6; } | |
11953 | ||
11954 | ;; | |
11955 | esac | |
11956 | ||
e76c5d17 | 11957 | if test "${have_libguile}" != no; then |
d342a0da DE |
11958 | case "${with_guile}" in |
11959 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11960 | |
11961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11962 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11963 | if ${ac_cv_guild_program_name+:} false; then : |
e76c5d17 DE |
11964 | $as_echo_n "(cached) " >&6 |
11965 | else | |
d342a0da | 11966 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11967 | |
11968 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11969 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11970 | # what the program name is, at the risk of getting it wrong if | |
11971 | # Guile was configured with '--program-suffix' or similar. | |
11972 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11973 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11974 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11975 | fi | |
11976 | ||
11977 | fi | |
11978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11979 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11980 | ||
11981 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11982 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
e76c5d17 DE |
11983 | fi |
11984 | ||
11985 | GUILD="$ac_cv_guild_program_name" | |
11986 | ||
11987 | ||
d342a0da DE |
11988 | ;; |
11989 | *) | |
11990 | ||
11991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11992 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11993 | if ${ac_cv_guild_program_name+:} false; then : |
d342a0da DE |
11994 | $as_echo_n "(cached) " >&6 |
11995 | else | |
11996 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11997 | ||
11998 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11999 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
12000 | # what the program name is, at the risk of getting it wrong if | |
12001 | # Guile was configured with '--program-suffix' or similar. | |
12002 | if test "x$ac_cv_guild_program_name" = "x"; then | |
12003 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
12004 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
12005 | fi | |
12006 | ||
12007 | fi | |
12008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
12009 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
12010 | ||
12011 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 12012 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
d342a0da DE |
12013 | fi |
12014 | ||
12015 | GUILD="$ac_cv_guild_program_name" | |
12016 | ||
12017 | ||
12018 | ;; | |
12019 | esac | |
e76c5d17 DE |
12020 | |
12021 | ||
12022 | if test "$cross_compiling" = no; then | |
12023 | GUILD_TARGET_FLAG= | |
12024 | else | |
12025 | GUILD_TARGET_FLAG="--target=$host" | |
12026 | fi | |
12027 | ||
12028 | ||
12029 | ||
12030 | ||
12031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
12032 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
d0ac1c44 | 12033 | if ${ac_cv_guild_ok+:} false; then : |
e76c5d17 DE |
12034 | $as_echo_n "(cached) " >&6 |
12035 | else | |
12036 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
12037 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
12038 | ac_cv_guild_ok=yes | |
12039 | else | |
12040 | ac_cv_guild_ok=no | |
12041 | fi | |
12042 | fi | |
12043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
12044 | $as_echo "$ac_cv_guild_ok" >&6; } | |
12045 | ||
12046 | if test "$ac_cv_guild_ok" = no; then | |
12047 | have_libguile=no | |
12048 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
12049 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
12050 | fi | |
12051 | fi | |
12052 | ||
ed3ef339 DE |
12053 | if test "${have_libguile}" != no; then |
12054 | ||
12055 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
12056 | ||
12057 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
12058 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
12059 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
12060 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
12061 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
12062 | |
12063 | save_LIBS="$LIBS" | |
12064 | save_CPPFLAGS="$CPPFLAGS" | |
12065 | LIBS="$GUILE_LIBS" | |
12066 | CPPFLAGS="$GUILE_CPPFLAGS" | |
12067 | for ac_func in scm_new_smob | |
12068 | do : | |
12069 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
d0ac1c44 | 12070 | if test "x$ac_cv_func_scm_new_smob" = xyes; then : |
16954d5d LC |
12071 | cat >>confdefs.h <<_ACEOF |
12072 | #define HAVE_SCM_NEW_SMOB 1 | |
12073 | _ACEOF | |
12074 | ||
12075 | fi | |
12076 | done | |
12077 | ||
12078 | LIBS="$save_LIBS" | |
12079 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
12080 | else |
12081 | # Even if Guile support is not compiled in, we need to have these files | |
12082 | # included. | |
bd810fff | 12083 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
ed3ef339 DE |
12084 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
12085 | fi | |
9a156167 | 12086 | |
ac534cba | 12087 | |
4df42755 DE |
12088 | if test "${have_libguile}" != no; then |
12089 | HAVE_GUILE_TRUE= | |
12090 | HAVE_GUILE_FALSE='#' | |
12091 | else | |
12092 | HAVE_GUILE_TRUE='#' | |
12093 | HAVE_GUILE_FALSE= | |
12094 | fi | |
12095 | ||
ac534cba | 12096 | |
62f29fda TT |
12097 | # ---------------------------- # |
12098 | # Check for source highlight. # | |
12099 | # ---------------------------- # | |
12100 | ||
12101 | SRCHIGH_LIBS= | |
12102 | SRCHIGH_CFLAGS= | |
189b8c2e ST |
12103 | |
12104 | # Check whether --enable-source-highlight was given. | |
12105 | if test "${enable_source_highlight+set}" = set; then : | |
12106 | enableval=$enable_source_highlight; case "${enableval}" in | |
12107 | yes) enable_source_highlight=yes ;; | |
12108 | no) enable_source_highlight=no ;; | |
12109 | *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; | |
12110 | esac | |
12111 | else | |
12112 | enable_source_highlight=auto | |
12113 | fi | |
12114 | ||
12115 | ||
12116 | if test "${enable_source_highlight}" != "no"; then | |
12117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 | |
6c28e44a | 12118 | $as_echo_n "checking for the source-highlight library... " >&6; } |
189b8c2e ST |
12119 | if test "${pkg_config_prog_path}" = "missing"; then |
12120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 | |
62f29fda | 12121 | $as_echo "no - pkg-config not found" >&6; } |
189b8c2e ST |
12122 | if test "${enable_source_highlight}" = "yes"; then |
12123 | as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 | |
12124 | fi | |
12125 | else | |
12126 | if ${pkg_config_prog_path} --exists source-highlight; then | |
0455b7d3 BE |
12127 | case "$LDFLAGS" in |
12128 | *static-libstdc*) | |
12129 | as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 | |
12130 | ;; | |
12131 | esac | |
12132 | ||
0f8f2de1 TV |
12133 | srchigh_pkg_cflags=`${pkg_config_prog_path} --cflags source-highlight` |
12134 | srchigh_pkg_libs=`${pkg_config_prog_path} --libs source-highlight` | |
12135 | ||
12136 | # Now that we have found a source-highlight library, check if we can use | |
12137 | # it. In particular, we're trying to detect the situation that the | |
12138 | # library is using the new libstdc++ library abi ( see | |
12139 | # https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html ) | |
12140 | # while the compiler being used to compile gdb is using the old abi. | |
12141 | # Such a situation will result in an undefined reference to | |
12142 | # srchilite::SourceHighlight::SourceHighlight(std::string const&). | |
12143 | # This situation can occur for instance when using a source highlight | |
12144 | # library compiled with g++ 7.5.0 while building gdb with g++ 4.8.5. | |
12145 | ac_ext=cpp | |
12146 | ac_cpp='$CXXCPP $CPPFLAGS' | |
12147 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
12148 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
12149 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
12150 | ||
87bf1445 SM |
12151 | save_CFLAGS="$CFLAGS" |
12152 | save_LDFLAGS="$LDFLAGS" | |
0f8f2de1 TV |
12153 | CFLAGS="$CFLAGS $srchigh_pkg_cflags" |
12154 | LDFLAGS="$LDFLAGS $srchigh_pkg_libs" | |
12155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12156 | /* end confdefs.h. */ | |
12157 | #include <srchilite/sourcehighlight.h> | |
12158 | int | |
12159 | main () | |
12160 | { | |
12161 | std::string outlang = "esc.outlang"; | |
12162 | new srchilite::SourceHighlight (outlang); | |
12163 | ||
12164 | ; | |
12165 | return 0; | |
12166 | } | |
12167 | _ACEOF | |
12168 | if ac_fn_cxx_try_link "$LINENO"; then : | |
12169 | have_usable_source_highlight=yes | |
12170 | else | |
12171 | have_usable_source_highlight=no | |
12172 | ||
12173 | fi | |
12174 | rm -f core conftest.err conftest.$ac_objext \ | |
12175 | conftest$ac_exeext conftest.$ac_ext | |
87bf1445 SM |
12176 | CFLAGS="$save_CFLAGS" |
12177 | LDFLAGS="$save_LDFLAGS" | |
0f8f2de1 TV |
12178 | ac_ext=c |
12179 | ac_cpp='$CPP $CPPFLAGS' | |
12180 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
12181 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
12182 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
12183 | ||
12184 | ||
12185 | if test "${have_usable_source_highlight}" = "yes"; then | |
62f29fda TT |
12186 | |
12187 | $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h | |
12188 | ||
0f8f2de1 | 12189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
62f29fda | 12190 | $as_echo "yes" >&6; } |
0f8f2de1 TV |
12191 | SRCHIGH_CFLAGS="$srchigh_pkg_cflags" |
12192 | SRCHIGH_LIBS="$srchigh_pkg_libs" | |
12193 | else | |
12194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12195 | $as_echo "no" >&6; } | |
12196 | if test "${enable_source_highlight}" = "yes"; then | |
12197 | as_fn_error $? "source-highlight in your system could not be used" "$LINENO" 5 | |
12198 | fi | |
12199 | fi | |
189b8c2e | 12200 | else |
62f29fda TT |
12201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12202 | $as_echo "no" >&6; } | |
189b8c2e ST |
12203 | if test "${enable_source_highlight}" = "yes"; then |
12204 | as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 | |
12205 | fi | |
12206 | fi | |
12207 | fi | |
62f29fda TT |
12208 | fi |
12209 | ||
12210 | ||
12211 | ||
05ea2a05 TT |
12212 | # ------------------------- # |
12213 | # Checks for header files. # | |
12214 | # ------------------------- # | |
58bfce93 | 12215 | |
05ea2a05 TT |
12216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
12217 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
12218 | if ${ac_cv_header_stdc+:} false; then : | |
12219 | $as_echo_n "(cached) " >&6 | |
58bfce93 | 12220 | else |
5599c404 MM |
12221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12222 | /* end confdefs.h. */ | |
05ea2a05 TT |
12223 | #include <stdlib.h> |
12224 | #include <stdarg.h> | |
12225 | #include <string.h> | |
12226 | #include <float.h> | |
5599c404 | 12227 | |
05ea2a05 TT |
12228 | int |
12229 | main () | |
12230 | { | |
5599c404 | 12231 | |
05ea2a05 TT |
12232 | ; |
12233 | return 0; | |
12234 | } | |
5599c404 | 12235 | _ACEOF |
05ea2a05 TT |
12236 | if ac_fn_c_try_compile "$LINENO"; then : |
12237 | ac_cv_header_stdc=yes | |
5599c404 | 12238 | else |
05ea2a05 | 12239 | ac_cv_header_stdc=no |
5599c404 | 12240 | fi |
05ea2a05 | 12241 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58bfce93 | 12242 | |
05ea2a05 TT |
12243 | if test $ac_cv_header_stdc = yes; then |
12244 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12246 | /* end confdefs.h. */ | |
12247 | #include <string.h> | |
58bfce93 | 12248 | |
05ea2a05 TT |
12249 | _ACEOF |
12250 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12251 | $EGREP "memchr" >/dev/null 2>&1; then : | |
58bfce93 | 12252 | |
05ea2a05 TT |
12253 | else |
12254 | ac_cv_header_stdc=no | |
12255 | fi | |
12256 | rm -f conftest* | |
58bfce93 | 12257 | |
05ea2a05 | 12258 | fi |
58bfce93 | 12259 | |
05ea2a05 TT |
12260 | if test $ac_cv_header_stdc = yes; then |
12261 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12262 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12263 | /* end confdefs.h. */ | |
12264 | #include <stdlib.h> | |
58bfce93 | 12265 | |
05ea2a05 TT |
12266 | _ACEOF |
12267 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12268 | $EGREP "free" >/dev/null 2>&1; then : | |
58bfce93 | 12269 | |
05ea2a05 TT |
12270 | else |
12271 | ac_cv_header_stdc=no | |
12272 | fi | |
12273 | rm -f conftest* | |
58bfce93 | 12274 | |
05ea2a05 | 12275 | fi |
58bfce93 | 12276 | |
05ea2a05 TT |
12277 | if test $ac_cv_header_stdc = yes; then |
12278 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12279 | if test "$cross_compiling" = yes; then : | |
12280 | : | |
12281 | else | |
12282 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12283 | /* end confdefs.h. */ | |
12284 | #include <ctype.h> | |
12285 | #include <stdlib.h> | |
12286 | #if ((' ' & 0x0FF) == 0x020) | |
12287 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12288 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12289 | #else | |
12290 | # define ISLOWER(c) \ | |
12291 | (('a' <= (c) && (c) <= 'i') \ | |
12292 | || ('j' <= (c) && (c) <= 'r') \ | |
12293 | || ('s' <= (c) && (c) <= 'z')) | |
12294 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12295 | #endif | |
58bfce93 | 12296 | |
05ea2a05 TT |
12297 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
12298 | int | |
12299 | main () | |
12300 | { | |
12301 | int i; | |
12302 | for (i = 0; i < 256; i++) | |
12303 | if (XOR (islower (i), ISLOWER (i)) | |
12304 | || toupper (i) != TOUPPER (i)) | |
12305 | return 2; | |
12306 | return 0; | |
12307 | } | |
12308 | _ACEOF | |
12309 | if ac_fn_c_try_run "$LINENO"; then : | |
58bfce93 | 12310 | |
05ea2a05 TT |
12311 | else |
12312 | ac_cv_header_stdc=no | |
12313 | fi | |
12314 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12315 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12316 | fi | |
58bfce93 | 12317 | |
05ea2a05 TT |
12318 | fi |
12319 | fi | |
12320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
12321 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12322 | if test $ac_cv_header_stdc = yes; then | |
58bfce93 | 12323 | |
05ea2a05 | 12324 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
58bfce93 | 12325 | |
05ea2a05 | 12326 | fi |
58bfce93 | 12327 | |
05ea2a05 | 12328 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8ae8e197 | 12329 | for ac_header in nlist.h machine/reg.h \ |
05ea2a05 TT |
12330 | thread_db.h \ |
12331 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
09db4332 | 12332 | sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \ |
8ae8e197 | 12333 | sys/reg.h sys/debugreg.h \ |
05ea2a05 TT |
12334 | termios.h elf_hp.h |
12335 | do : | |
12336 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12337 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12338 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12339 | cat >>confdefs.h <<_ACEOF | |
12340 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12341 | _ACEOF | |
58bfce93 MM |
12342 | |
12343 | fi | |
12344 | ||
05ea2a05 | 12345 | done |
58bfce93 | 12346 | |
05ea2a05 TT |
12347 | for ac_header in sys/user.h |
12348 | do : | |
12349 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
12350 | # include <sys/param.h> | |
12351 | #endif | |
58bfce93 | 12352 | |
05ea2a05 TT |
12353 | " |
12354 | if test "x$ac_cv_header_sys_user_h" = xyes; then : | |
12355 | cat >>confdefs.h <<_ACEOF | |
12356 | #define HAVE_SYS_USER_H 1 | |
12357 | _ACEOF | |
58bfce93 | 12358 | |
05ea2a05 | 12359 | fi |
58bfce93 | 12360 | |
05ea2a05 | 12361 | done |
58bfce93 | 12362 | |
58bfce93 | 12363 | |
05ea2a05 TT |
12364 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
12365 | do : | |
12366 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12367 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12368 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12369 | cat >>confdefs.h <<_ACEOF | |
12370 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12371 | _ACEOF | |
58bfce93 | 12372 | |
05ea2a05 | 12373 | fi |
58bfce93 | 12374 | |
05ea2a05 | 12375 | done |
58bfce93 | 12376 | |
05ea2a05 TT |
12377 | for ac_header in term.h |
12378 | do : | |
12379 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
12380 | # include <curses.h> | |
12381 | #endif | |
58bfce93 | 12382 | |
05ea2a05 TT |
12383 | " |
12384 | if test "x$ac_cv_header_term_h" = xyes; then : | |
12385 | cat >>confdefs.h <<_ACEOF | |
12386 | #define HAVE_TERM_H 1 | |
12387 | _ACEOF | |
58bfce93 | 12388 | |
05ea2a05 | 12389 | fi |
58bfce93 | 12390 | |
05ea2a05 | 12391 | done |
58bfce93 | 12392 | |
58bfce93 | 12393 | |
95420d30 | 12394 | for ac_header in sys/socket.h |
05a6b8c2 | 12395 | do : |
95420d30 TV |
12396 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" |
12397 | if test "x$ac_cv_header_sys_socket_h" = xyes; then : | |
05a6b8c2 | 12398 | cat >>confdefs.h <<_ACEOF |
95420d30 | 12399 | #define HAVE_SYS_SOCKET_H 1 |
05a6b8c2 EZ |
12400 | _ACEOF |
12401 | ||
12402 | fi | |
12403 | ||
12404 | done | |
12405 | ||
12406 | for ac_header in ws2tcpip.h | |
12407 | do : | |
12408 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
12409 | if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : | |
12410 | cat >>confdefs.h <<_ACEOF | |
12411 | #define HAVE_WS2TCPIP_H 1 | |
12412 | _ACEOF | |
12413 | ||
12414 | fi | |
12415 | ||
12416 | done | |
12417 | ||
6aa4f97c AB |
12418 | for ac_header in execinfo.h |
12419 | do : | |
12420 | ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" | |
12421 | if test "x$ac_cv_header_execinfo_h" = xyes; then : | |
12422 | cat >>confdefs.h <<_ACEOF | |
12423 | #define HAVE_EXECINFO_H 1 | |
12424 | _ACEOF | |
12425 | ||
12426 | fi | |
12427 | ||
12428 | done | |
12429 | ||
05a6b8c2 | 12430 | |
05ea2a05 TT |
12431 | # ------------------------- # |
12432 | # Checks for declarations. # | |
12433 | # ------------------------- # | |
58bfce93 | 12434 | |
58bfce93 | 12435 | |
05ea2a05 TT |
12436 | # Check for presence and size of long long. |
12437 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
12438 | if test "x$ac_cv_type_long_long" = xyes; then : | |
58bfce93 | 12439 | |
05ea2a05 TT |
12440 | cat >>confdefs.h <<_ACEOF |
12441 | #define HAVE_LONG_LONG 1 | |
12442 | _ACEOF | |
12443 | ||
12444 | # The cast to long int works around a bug in the HP C Compiler | |
12445 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12446 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12447 | # This bug is HP SR number 8606223364. | |
12448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
12449 | $as_echo_n "checking size of long long... " >&6; } | |
12450 | if ${ac_cv_sizeof_long_long+:} false; then : | |
58bfce93 MM |
12451 | $as_echo_n "(cached) " >&6 |
12452 | else | |
05ea2a05 | 12453 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
58bfce93 | 12454 | |
58bfce93 | 12455 | else |
05ea2a05 TT |
12456 | if test "$ac_cv_type_long_long" = yes; then |
12457 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12458 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12459 | as_fn_error 77 "cannot compute sizeof (long long) | |
12460 | See \`config.log' for more details" "$LINENO" 5; } | |
12461 | else | |
12462 | ac_cv_sizeof_long_long=0 | |
12463 | fi | |
58bfce93 | 12464 | fi |
58bfce93 MM |
12465 | |
12466 | fi | |
05ea2a05 TT |
12467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
12468 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
58bfce93 | 12469 | |
58bfce93 | 12470 | |
58bfce93 | 12471 | |
05ea2a05 TT |
12472 | cat >>confdefs.h <<_ACEOF |
12473 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
12474 | _ACEOF | |
58bfce93 MM |
12475 | |
12476 | ||
05ea2a05 | 12477 | fi |
58bfce93 MM |
12478 | |
12479 | ||
05ea2a05 TT |
12480 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
12481 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
12482 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
12483 | ac_have_decl=1 | |
12484 | else | |
12485 | ac_have_decl=0 | |
12486 | fi | |
58bfce93 | 12487 | |
05ea2a05 TT |
12488 | cat >>confdefs.h <<_ACEOF |
12489 | #define HAVE_DECL_BASENAME $ac_have_decl | |
c56ccc05 | 12490 | _ACEOF |
05ea2a05 TT |
12491 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
12492 | if test "x$ac_cv_have_decl_ffs" = xyes; then : | |
12493 | ac_have_decl=1 | |
12494 | else | |
12495 | ac_have_decl=0 | |
c56ccc05 | 12496 | fi |
c56ccc05 MM |
12497 | |
12498 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12499 | #define HAVE_DECL_FFS $ac_have_decl |
c56ccc05 | 12500 | _ACEOF |
05ea2a05 TT |
12501 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" |
12502 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : | |
12503 | ac_have_decl=1 | |
12504 | else | |
12505 | ac_have_decl=0 | |
c56ccc05 | 12506 | fi |
c56ccc05 MM |
12507 | |
12508 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12509 | #define HAVE_DECL_ASPRINTF $ac_have_decl |
c56ccc05 | 12510 | _ACEOF |
05ea2a05 TT |
12511 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
12512 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : | |
12513 | ac_have_decl=1 | |
12514 | else | |
12515 | ac_have_decl=0 | |
12516 | fi | |
c56ccc05 | 12517 | |
05ea2a05 TT |
12518 | cat >>confdefs.h <<_ACEOF |
12519 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
12520 | _ACEOF | |
12521 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
12522 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12523 | ac_have_decl=1 | |
12524 | else | |
12525 | ac_have_decl=0 | |
c56ccc05 MM |
12526 | fi |
12527 | ||
05ea2a05 TT |
12528 | cat >>confdefs.h <<_ACEOF |
12529 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12530 | _ACEOF | |
12531 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
12532 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : | |
12533 | ac_have_decl=1 | |
12534 | else | |
12535 | ac_have_decl=0 | |
58bfce93 MM |
12536 | fi |
12537 | ||
05ea2a05 TT |
12538 | cat >>confdefs.h <<_ACEOF |
12539 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
12540 | _ACEOF | |
c890192f | 12541 | |
05ea2a05 TT |
12542 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
12543 | if test "x$ac_cv_have_decl_strtol" = xyes; then : | |
12544 | ac_have_decl=1 | |
bec39cab | 12545 | else |
05ea2a05 TT |
12546 | ac_have_decl=0 |
12547 | fi | |
81ecdfbb | 12548 | |
05ea2a05 TT |
12549 | cat >>confdefs.h <<_ACEOF |
12550 | #define HAVE_DECL_STRTOL $ac_have_decl | |
12551 | _ACEOF | |
12552 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
12553 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : | |
12554 | ac_have_decl=1 | |
12555 | else | |
12556 | ac_have_decl=0 | |
12557 | fi | |
a9322a30 | 12558 | |
05ea2a05 TT |
12559 | cat >>confdefs.h <<_ACEOF |
12560 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
bec39cab | 12561 | _ACEOF |
05ea2a05 TT |
12562 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
12563 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : | |
12564 | ac_have_decl=1 | |
bec39cab | 12565 | else |
05ea2a05 | 12566 | ac_have_decl=0 |
a9322a30 | 12567 | fi |
bec39cab | 12568 | |
05ea2a05 TT |
12569 | cat >>confdefs.h <<_ACEOF |
12570 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
12571 | _ACEOF | |
12572 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
12573 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : | |
12574 | ac_have_decl=1 | |
12575 | else | |
12576 | ac_have_decl=0 | |
12577 | fi | |
bec39cab | 12578 | |
05ea2a05 TT |
12579 | cat >>confdefs.h <<_ACEOF |
12580 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
81ecdfbb | 12581 | _ACEOF |
bec39cab | 12582 | |
05ea2a05 TT |
12583 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" |
12584 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : | |
12585 | ac_have_decl=1 | |
bec39cab | 12586 | else |
05ea2a05 | 12587 | ac_have_decl=0 |
81ecdfbb | 12588 | fi |
81ecdfbb | 12589 | |
05ea2a05 TT |
12590 | cat >>confdefs.h <<_ACEOF |
12591 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
12592 | _ACEOF | |
81ecdfbb | 12593 | |
81ecdfbb | 12594 | |
06825bd1 | 12595 | |
05ea2a05 TT |
12596 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
12597 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12598 | ac_have_decl=1 | |
81ecdfbb | 12599 | else |
05ea2a05 | 12600 | ac_have_decl=0 |
81ecdfbb | 12601 | fi |
bec39cab | 12602 | |
05ea2a05 TT |
12603 | cat >>confdefs.h <<_ACEOF |
12604 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12605 | _ACEOF | |
81ecdfbb | 12606 | |
05ea2a05 TT |
12607 | |
12608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 | |
12609 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
12610 | if ${am_cv_val_LC_MESSAGES+:} false; then : | |
12611 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12612 | else |
81ecdfbb | 12613 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12614 | /* end confdefs.h. */ |
05ea2a05 | 12615 | #include <locale.h> |
a9322a30 TT |
12616 | int |
12617 | main () | |
12618 | { | |
05ea2a05 TT |
12619 | return LC_MESSAGES |
12620 | ; | |
a9322a30 TT |
12621 | return 0; |
12622 | } | |
bec39cab | 12623 | _ACEOF |
05ea2a05 TT |
12624 | if ac_fn_c_try_link "$LINENO"; then : |
12625 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 12626 | else |
05ea2a05 | 12627 | am_cv_val_LC_MESSAGES=no |
81ecdfbb | 12628 | fi |
05ea2a05 TT |
12629 | rm -f core conftest.err conftest.$ac_objext \ |
12630 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 12631 | fi |
05ea2a05 TT |
12632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
12633 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
12634 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 12635 | |
05ea2a05 | 12636 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
bec39cab | 12637 | |
05ea2a05 | 12638 | fi |
5ee754fc | 12639 | |
bec39cab | 12640 | |
05ea2a05 TT |
12641 | # ------------------ # |
12642 | # Checks for types. # | |
12643 | # ------------------ # | |
12644 | ||
12645 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | |
05a6b8c2 EZ |
12646 | #if HAVE_SYS_SOCKET_H |
12647 | # include <sys/socket.h> | |
12648 | #elif HAVE_WS2TCPIP_H | |
12649 | # include <ws2tcpip.h> | |
12650 | #endif | |
05ea2a05 TT |
12651 | |
12652 | " | |
12653 | if test "x$ac_cv_type_socklen_t" = xyes; then : | |
12654 | ||
12655 | cat >>confdefs.h <<_ACEOF | |
12656 | #define HAVE_SOCKLEN_T 1 | |
bec39cab | 12657 | _ACEOF |
c906108c | 12658 | |
05ea2a05 | 12659 | |
bec39cab | 12660 | fi |
81ecdfbb | 12661 | |
81ecdfbb | 12662 | |
05ea2a05 TT |
12663 | # ------------------------------------- # |
12664 | # Checks for compiler characteristics. # | |
12665 | # ------------------------------------- # | |
a9322a30 | 12666 | |
05ea2a05 TT |
12667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12668 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
12669 | if ${ac_cv_c_const+:} false; then : | |
12670 | $as_echo_n "(cached) " >&6 | |
12671 | else | |
12672 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12673 | /* end confdefs.h. */ | |
bec39cab | 12674 | |
05ea2a05 TT |
12675 | int |
12676 | main () | |
12677 | { | |
bec39cab | 12678 | |
05ea2a05 TT |
12679 | #ifndef __cplusplus |
12680 | /* Ultrix mips cc rejects this sort of thing. */ | |
12681 | typedef int charset[2]; | |
12682 | const charset cs = { 0, 0 }; | |
12683 | /* SunOS 4.1.1 cc rejects this. */ | |
12684 | char const *const *pcpcc; | |
12685 | char **ppc; | |
12686 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
12687 | struct point {int x, y;}; | |
12688 | static struct point const zero = {0,0}; | |
12689 | /* AIX XL C 1.02.0.0 rejects this. | |
12690 | It does not let you subtract one const X* pointer from another in | |
12691 | an arm of an if-expression whose if-part is not a constant | |
12692 | expression */ | |
12693 | const char *g = "string"; | |
12694 | pcpcc = &g + (g ? g-g : 0); | |
12695 | /* HPUX 7.0 cc rejects these. */ | |
12696 | ++pcpcc; | |
12697 | ppc = (char**) pcpcc; | |
12698 | pcpcc = (char const *const *) ppc; | |
12699 | { /* SCO 3.2v4 cc rejects this sort of thing. */ | |
12700 | char tx; | |
12701 | char *t = &tx; | |
12702 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5ee754fc | 12703 | |
05ea2a05 TT |
12704 | *t++ = 0; |
12705 | if (s) return 0; | |
12706 | } | |
12707 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12708 | int x[] = {25, 17}; | |
12709 | const int *foo = &x[0]; | |
12710 | ++foo; | |
12711 | } | |
12712 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12713 | typedef const int *iptr; | |
12714 | iptr p = 0; | |
12715 | ++p; | |
12716 | } | |
12717 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying | |
12718 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12719 | struct s { int j; const int *ap[3]; } bx; | |
12720 | struct s *b = &bx; b->j = 5; | |
12721 | } | |
12722 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12723 | const int foo = 10; | |
12724 | if (!foo) return 0; | |
12725 | } | |
12726 | return !cs[0] && !zero.x; | |
12727 | #endif | |
5ee754fc | 12728 | |
05ea2a05 TT |
12729 | ; |
12730 | return 0; | |
12731 | } | |
bec39cab | 12732 | _ACEOF |
05ea2a05 TT |
12733 | if ac_fn_c_try_compile "$LINENO"; then : |
12734 | ac_cv_c_const=yes | |
12735 | else | |
12736 | ac_cv_c_const=no | |
12737 | fi | |
12738 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ee754fc | 12739 | fi |
05ea2a05 TT |
12740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12741 | $as_echo "$ac_cv_c_const" >&6; } | |
12742 | if test $ac_cv_c_const = no; then | |
5ee754fc | 12743 | |
05ea2a05 | 12744 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12745 | |
05ea2a05 TT |
12746 | fi |
12747 | ||
12748 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
12749 | $as_echo_n "checking for inline... " >&6; } | |
12750 | if ${ac_cv_c_inline+:} false; then : | |
12751 | $as_echo_n "(cached) " >&6 | |
12752 | else | |
12753 | ac_cv_c_inline=no | |
12754 | for ac_kw in inline __inline__ __inline; do | |
12755 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12756 | /* end confdefs.h. */ | |
12757 | #ifndef __cplusplus | |
12758 | typedef int foo_t; | |
12759 | static $ac_kw foo_t static_foo () {return 0; } | |
12760 | $ac_kw foo_t foo () {return 0; } | |
81ecdfbb | 12761 | #endif |
bec39cab | 12762 | |
a8111142 | 12763 | _ACEOF |
05ea2a05 TT |
12764 | if ac_fn_c_try_compile "$LINENO"; then : |
12765 | ac_cv_c_inline=$ac_kw | |
a8111142 | 12766 | fi |
05ea2a05 TT |
12767 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12768 | test "$ac_cv_c_inline" != no && break | |
81ecdfbb | 12769 | done |
a8111142 | 12770 | |
05ea2a05 TT |
12771 | fi |
12772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
12773 | $as_echo "$ac_cv_c_inline" >&6; } | |
a8111142 | 12774 | |
05ea2a05 TT |
12775 | case $ac_cv_c_inline in |
12776 | inline | yes) ;; | |
12777 | *) | |
12778 | case $ac_cv_c_inline in | |
12779 | no) ac_val=;; | |
12780 | *) ac_val=$ac_cv_c_inline;; | |
12781 | esac | |
12782 | cat >>confdefs.h <<_ACEOF | |
12783 | #ifndef __cplusplus | |
12784 | #define inline $ac_val | |
12785 | #endif | |
07697489 | 12786 | _ACEOF |
05ea2a05 TT |
12787 | ;; |
12788 | esac | |
07697489 | 12789 | |
05ea2a05 TT |
12790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12791 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12792 | if ${ac_cv_c_bigendian+:} false; then : | |
07697489 PA |
12793 | $as_echo_n "(cached) " >&6 |
12794 | else | |
05ea2a05 TT |
12795 | ac_cv_c_bigendian=unknown |
12796 | # See if we're dealing with a universal compiler. | |
12797 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12798 | /* end confdefs.h. */ | |
12799 | #ifndef __APPLE_CC__ | |
12800 | not a universal capable compiler | |
12801 | #endif | |
12802 | typedef int dummy; | |
07697489 | 12803 | |
05ea2a05 TT |
12804 | _ACEOF |
12805 | if ac_fn_c_try_compile "$LINENO"; then : | |
07697489 | 12806 | |
05ea2a05 TT |
12807 | # Check for potential -arch flags. It is not universal unless |
12808 | # there are at least two -arch flags with different values. | |
12809 | ac_arch= | |
12810 | ac_prev= | |
12811 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12812 | if test -n "$ac_prev"; then | |
12813 | case $ac_word in | |
12814 | i?86 | x86_64 | ppc | ppc64) | |
12815 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12816 | ac_arch=$ac_word | |
12817 | else | |
12818 | ac_cv_c_bigendian=universal | |
12819 | break | |
12820 | fi | |
12821 | ;; | |
12822 | esac | |
12823 | ac_prev= | |
12824 | elif test "x$ac_word" = "x-arch"; then | |
12825 | ac_prev=arch | |
12826 | fi | |
12827 | done | |
07697489 | 12828 | fi |
05ea2a05 TT |
12829 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12830 | if test $ac_cv_c_bigendian = unknown; then | |
12831 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12833 | /* end confdefs.h. */ | |
12834 | #include <sys/types.h> | |
12835 | #include <sys/param.h> | |
07697489 | 12836 | |
05ea2a05 TT |
12837 | int |
12838 | main () | |
12839 | { | |
12840 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
12841 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12842 | && LITTLE_ENDIAN) | |
12843 | bogus endian macros | |
12844 | #endif | |
07697489 | 12845 | |
05ea2a05 TT |
12846 | ; |
12847 | return 0; | |
12848 | } | |
07697489 | 12849 | _ACEOF |
05ea2a05 TT |
12850 | if ac_fn_c_try_compile "$LINENO"; then : |
12851 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
12852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12853 | /* end confdefs.h. */ | |
12854 | #include <sys/types.h> | |
12855 | #include <sys/param.h> | |
07697489 | 12856 | |
05ea2a05 TT |
12857 | int |
12858 | main () | |
12859 | { | |
12860 | #if BYTE_ORDER != BIG_ENDIAN | |
12861 | not big endian | |
12862 | #endif | |
07697489 | 12863 | |
05ea2a05 TT |
12864 | ; |
12865 | return 0; | |
12866 | } | |
07697489 | 12867 | _ACEOF |
05ea2a05 TT |
12868 | if ac_fn_c_try_compile "$LINENO"; then : |
12869 | ac_cv_c_bigendian=yes | |
07697489 | 12870 | else |
05ea2a05 | 12871 | ac_cv_c_bigendian=no |
07697489 | 12872 | fi |
05ea2a05 | 12873 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12874 | fi |
05ea2a05 TT |
12875 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12876 | fi | |
12877 | if test $ac_cv_c_bigendian = unknown; then | |
12878 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12880 | /* end confdefs.h. */ | |
12881 | #include <limits.h> | |
07697489 | 12882 | |
05ea2a05 TT |
12883 | int |
12884 | main () | |
12885 | { | |
12886 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12887 | bogus endian macros | |
12888 | #endif | |
07697489 | 12889 | |
05ea2a05 TT |
12890 | ; |
12891 | return 0; | |
12892 | } | |
07697489 | 12893 | _ACEOF |
05ea2a05 TT |
12894 | if ac_fn_c_try_compile "$LINENO"; then : |
12895 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12897 | /* end confdefs.h. */ | |
12898 | #include <limits.h> | |
07697489 | 12899 | |
05ea2a05 TT |
12900 | int |
12901 | main () | |
12902 | { | |
12903 | #ifndef _BIG_ENDIAN | |
12904 | not big endian | |
12905 | #endif | |
07697489 | 12906 | |
05ea2a05 TT |
12907 | ; |
12908 | return 0; | |
12909 | } | |
07697489 | 12910 | _ACEOF |
05ea2a05 TT |
12911 | if ac_fn_c_try_compile "$LINENO"; then : |
12912 | ac_cv_c_bigendian=yes | |
07697489 | 12913 | else |
05ea2a05 | 12914 | ac_cv_c_bigendian=no |
07697489 | 12915 | fi |
05ea2a05 | 12916 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12917 | fi |
05ea2a05 TT |
12918 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12919 | fi | |
12920 | if test $ac_cv_c_bigendian = unknown; then | |
12921 | # Compile a test program. | |
12922 | if test "$cross_compiling" = yes; then : | |
12923 | # Try to guess by grepping values from an object file. | |
12924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12925 | /* end confdefs.h. */ | |
12926 | short int ascii_mm[] = | |
12927 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12928 | short int ascii_ii[] = | |
12929 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12930 | int use_ascii (int i) { | |
12931 | return ascii_mm[i] + ascii_ii[i]; | |
12932 | } | |
12933 | short int ebcdic_ii[] = | |
12934 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12935 | short int ebcdic_mm[] = | |
12936 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12937 | int use_ebcdic (int i) { | |
12938 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12939 | } | |
12940 | extern int foo; | |
07697489 | 12941 | |
05ea2a05 TT |
12942 | int |
12943 | main () | |
12944 | { | |
12945 | return use_ascii (foo) == use_ebcdic (foo); | |
12946 | ; | |
12947 | return 0; | |
12948 | } | |
07697489 | 12949 | _ACEOF |
05ea2a05 TT |
12950 | if ac_fn_c_try_compile "$LINENO"; then : |
12951 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12952 | ac_cv_c_bigendian=yes | |
12953 | fi | |
12954 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12955 | if test "$ac_cv_c_bigendian" = unknown; then | |
12956 | ac_cv_c_bigendian=no | |
12957 | else | |
12958 | # finding both strings is unlikely to happen, but who knows? | |
12959 | ac_cv_c_bigendian=unknown | |
12960 | fi | |
12961 | fi | |
07697489 | 12962 | fi |
05ea2a05 TT |
12963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12964 | else | |
12965 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12966 | /* end confdefs.h. */ | |
12967 | $ac_includes_default | |
12968 | int | |
12969 | main () | |
12970 | { | |
07697489 | 12971 | |
05ea2a05 TT |
12972 | /* Are we little or big endian? From Harbison&Steele. */ |
12973 | union | |
12974 | { | |
12975 | long int l; | |
12976 | char c[sizeof (long int)]; | |
12977 | } u; | |
12978 | u.l = 1; | |
12979 | return u.c[sizeof (long int) - 1] == 1; | |
12980 | ||
12981 | ; | |
12982 | return 0; | |
12983 | } | |
07697489 | 12984 | _ACEOF |
05ea2a05 TT |
12985 | if ac_fn_c_try_run "$LINENO"; then : |
12986 | ac_cv_c_bigendian=no | |
07697489 | 12987 | else |
05ea2a05 TT |
12988 | ac_cv_c_bigendian=yes |
12989 | fi | |
12990 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12991 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
07697489 PA |
12992 | fi |
12993 | ||
05ea2a05 | 12994 | fi |
07697489 | 12995 | fi |
05ea2a05 TT |
12996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
12997 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12998 | case $ac_cv_c_bigendian in #( | |
12999 | yes) | |
13000 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
13001 | ;; #( | |
13002 | no) | |
13003 | ;; #( | |
13004 | universal) | |
07697489 | 13005 | |
05ea2a05 | 13006 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
07697489 | 13007 | |
05ea2a05 TT |
13008 | ;; #( |
13009 | *) | |
13010 | as_fn_error $? "unknown endianness | |
13011 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
13012 | esac | |
07697489 PA |
13013 | |
13014 | ||
05ea2a05 TT |
13015 | # ------------------------------ # |
13016 | # Checks for library functions. # | |
13017 | # ------------------------------ # | |
81ecdfbb | 13018 | |
05ea2a05 | 13019 | for ac_func in getuid getgid \ |
8ae8e197 | 13020 | pipe pread pread64 pwrite resize_term \ |
05ea2a05 TT |
13021 | getpgid setsid \ |
13022 | sigaction sigsetmask socketpair \ | |
13023 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ | |
13024 | setrlimit getrlimit posix_madvise waitpid \ | |
13025 | use_default_colors | |
13026 | do : | |
13027 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13028 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13029 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
13030 | cat >>confdefs.h <<_ACEOF | |
13031 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
a9322a30 | 13032 | _ACEOF |
5ee754fc | 13033 | |
05ea2a05 TT |
13034 | fi |
13035 | done | |
5ee754fc | 13036 | |
05ea2a05 TT |
13037 | |
13038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13039 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13040 | if ${am_cv_langinfo_codeset+:} false; then : | |
81ecdfbb | 13041 | $as_echo_n "(cached) " >&6 |
bec39cab | 13042 | else |
81ecdfbb | 13043 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13044 | /* end confdefs.h. */ |
05ea2a05 | 13045 | #include <langinfo.h> |
a9322a30 TT |
13046 | int |
13047 | main () | |
13048 | { | |
05ea2a05 | 13049 | char* cs = nl_langinfo(CODESET); |
a9322a30 TT |
13050 | ; |
13051 | return 0; | |
13052 | } | |
bec39cab | 13053 | _ACEOF |
81ecdfbb | 13054 | if ac_fn_c_try_link "$LINENO"; then : |
05ea2a05 | 13055 | am_cv_langinfo_codeset=yes |
bec39cab | 13056 | else |
05ea2a05 | 13057 | am_cv_langinfo_codeset=no |
81ecdfbb RW |
13058 | fi |
13059 | rm -f core conftest.err conftest.$ac_objext \ | |
13060 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 13061 | |
81ecdfbb | 13062 | fi |
05ea2a05 TT |
13063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
13064 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13065 | if test $am_cv_langinfo_codeset = yes; then | |
bec39cab | 13066 | |
05ea2a05 | 13067 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
81ecdfbb RW |
13068 | |
13069 | fi | |
13070 | ||
05ea2a05 TT |
13071 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
13072 | if test "x$ac_cv_type_size_t" = xyes; then : | |
81ecdfbb | 13073 | |
05ea2a05 | 13074 | else |
81ecdfbb RW |
13075 | |
13076 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 13077 | #define size_t unsigned int |
7eb368b3 | 13078 | _ACEOF |
7eb368b3 | 13079 | |
7eb368b3 | 13080 | fi |
7eb368b3 | 13081 | |
7eb368b3 | 13082 | |
a9322a30 | 13083 | |
7eb368b3 | 13084 | |
05ea2a05 TT |
13085 | for ac_header in $ac_header_list |
13086 | do : | |
13087 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13088 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
13089 | " | |
13090 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
13091 | cat >>confdefs.h <<_ACEOF | |
13092 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13093 | _ACEOF | |
7eb368b3 | 13094 | |
05ea2a05 | 13095 | fi |
7eb368b3 | 13096 | |
05ea2a05 | 13097 | done |
a9322a30 | 13098 | |
05ea2a05 TT |
13099 | |
13100 | ||
13101 | ||
13102 | ||
13103 | ||
13104 | ||
13105 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
13106 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
13107 | ||
13108 | else | |
bec39cab | 13109 | |
a9322a30 | 13110 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 13111 | #define pid_t int |
a9322a30 TT |
13112 | _ACEOF |
13113 | ||
05ea2a05 TT |
13114 | fi |
13115 | ||
13116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
13117 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
13118 | if ${ac_cv_path_SED+:} false; then : | |
13119 | $as_echo_n "(cached) " >&6 | |
13120 | else | |
13121 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
13122 | for ac_i in 1 2 3 4 5 6 7; do | |
13123 | ac_script="$ac_script$as_nl$ac_script" | |
13124 | done | |
13125 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
13126 | { ac_script=; unset ac_script;} | |
13127 | if test -z "$SED"; then | |
13128 | ac_path_SED_found=false | |
13129 | # Loop through the user's path and test for each of PROGNAME-LIST | |
13130 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13131 | for as_dir in $PATH | |
13132 | do | |
13133 | IFS=$as_save_IFS | |
13134 | test -z "$as_dir" && as_dir=. | |
13135 | for ac_prog in sed gsed; do | |
13136 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13137 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
13138 | as_fn_executable_p "$ac_path_SED" || continue | |
13139 | # Check for GNU ac_path_SED and select it if it is found. | |
13140 | # Check for GNU $ac_path_SED | |
13141 | case `"$ac_path_SED" --version 2>&1` in | |
13142 | *GNU*) | |
13143 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
13144 | *) | |
13145 | ac_count=0 | |
13146 | $as_echo_n 0123456789 >"conftest.in" | |
13147 | while : | |
13148 | do | |
13149 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
13150 | mv "conftest.tmp" "conftest.in" | |
13151 | cp "conftest.in" "conftest.nl" | |
13152 | $as_echo '' >> "conftest.nl" | |
13153 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
13154 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
13155 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
13156 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
13157 | # Best one so far, save it but keep looking for a better one | |
13158 | ac_cv_path_SED="$ac_path_SED" | |
13159 | ac_path_SED_max=$ac_count | |
13160 | fi | |
13161 | # 10*(2^10) chars as input seems more than enough | |
13162 | test $ac_count -gt 10 && break | |
13163 | done | |
13164 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
13165 | esac | |
a9322a30 | 13166 | |
05ea2a05 TT |
13167 | $ac_path_SED_found && break 3 |
13168 | done | |
13169 | done | |
13170 | done | |
13171 | IFS=$as_save_IFS | |
13172 | if test -z "$ac_cv_path_SED"; then | |
13173 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
13174 | fi | |
13175 | else | |
13176 | ac_cv_path_SED=$SED | |
a9322a30 TT |
13177 | fi |
13178 | ||
05ea2a05 TT |
13179 | fi |
13180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
13181 | $as_echo "$ac_cv_path_SED" >&6; } | |
13182 | SED="$ac_cv_path_SED" | |
13183 | rm -f conftest.sed | |
a9322a30 | 13184 | |
a9322a30 | 13185 | |
db6878ac SM |
13186 | # Set the 'development' global. |
13187 | . $srcdir/../bfd/development.sh | |
13188 | ||
05ea2a05 TT |
13189 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
13190 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
13191 | if ${ac_cv_header_stdc+:} false; then : | |
81ecdfbb | 13192 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13193 | else |
81ecdfbb | 13194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13195 | /* end confdefs.h. */ |
05ea2a05 TT |
13196 | #include <stdlib.h> |
13197 | #include <stdarg.h> | |
13198 | #include <string.h> | |
13199 | #include <float.h> | |
a9322a30 TT |
13200 | |
13201 | int | |
13202 | main () | |
13203 | { | |
d0ac1c44 | 13204 | |
a9322a30 TT |
13205 | ; |
13206 | return 0; | |
13207 | } | |
bec39cab | 13208 | _ACEOF |
81ecdfbb | 13209 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 13210 | ac_cv_header_stdc=yes |
5ee754fc | 13211 | else |
05ea2a05 | 13212 | ac_cv_header_stdc=no |
5ee754fc | 13213 | fi |
81ecdfbb | 13214 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 13215 | |
05ea2a05 TT |
13216 | if test $ac_cv_header_stdc = yes; then |
13217 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
13218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13219 | /* end confdefs.h. */ | |
13220 | #include <string.h> | |
bec39cab | 13221 | |
05ea2a05 TT |
13222 | _ACEOF |
13223 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13224 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 13225 | |
bec39cab | 13226 | else |
05ea2a05 TT |
13227 | ac_cv_header_stdc=no |
13228 | fi | |
13229 | rm -f conftest* | |
13230 | ||
13231 | fi | |
13232 | ||
13233 | if test $ac_cv_header_stdc = yes; then | |
13234 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 13235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13236 | /* end confdefs.h. */ |
05ea2a05 | 13237 | #include <stdlib.h> |
a9322a30 | 13238 | |
bec39cab | 13239 | _ACEOF |
05ea2a05 TT |
13240 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13241 | $EGREP "free" >/dev/null 2>&1; then : | |
bec39cab | 13242 | |
05ea2a05 TT |
13243 | else |
13244 | ac_cv_header_stdc=no | |
5ee754fc | 13245 | fi |
05ea2a05 | 13246 | rm -f conftest* |
5ee754fc | 13247 | |
05ea2a05 | 13248 | fi |
bec39cab | 13249 | |
05ea2a05 TT |
13250 | if test $ac_cv_header_stdc = yes; then |
13251 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
13252 | if test "$cross_compiling" = yes; then : | |
13253 | : | |
bec39cab | 13254 | else |
05ea2a05 | 13255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
81ecdfbb | 13256 | /* end confdefs.h. */ |
05ea2a05 TT |
13257 | #include <ctype.h> |
13258 | #include <stdlib.h> | |
13259 | #if ((' ' & 0x0FF) == 0x020) | |
13260 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
13261 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
13262 | #else | |
13263 | # define ISLOWER(c) \ | |
13264 | (('a' <= (c) && (c) <= 'i') \ | |
13265 | || ('j' <= (c) && (c) <= 'r') \ | |
13266 | || ('s' <= (c) && (c) <= 'z')) | |
13267 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
13268 | #endif | |
a9322a30 | 13269 | |
05ea2a05 | 13270 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
a9322a30 TT |
13271 | int |
13272 | main () | |
13273 | { | |
05ea2a05 TT |
13274 | int i; |
13275 | for (i = 0; i < 256; i++) | |
13276 | if (XOR (islower (i), ISLOWER (i)) | |
13277 | || toupper (i) != TOUPPER (i)) | |
13278 | return 2; | |
a9322a30 TT |
13279 | return 0; |
13280 | } | |
bec39cab | 13281 | _ACEOF |
05ea2a05 | 13282 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13283 | |
5ee754fc | 13284 | else |
05ea2a05 | 13285 | ac_cv_header_stdc=no |
5ee754fc | 13286 | fi |
05ea2a05 TT |
13287 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13288 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
81ecdfbb | 13289 | fi |
bec39cab | 13290 | |
05ea2a05 TT |
13291 | fi |
13292 | fi | |
13293 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
13294 | $as_echo "$ac_cv_header_stdc" >&6; } | |
13295 | if test $ac_cv_header_stdc = yes; then | |
81ecdfbb | 13296 | |
05ea2a05 TT |
13297 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
13298 | ||
13299 | fi | |
81ecdfbb | 13300 | |
05ea2a05 TT |
13301 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
13302 | # for constant arguments. Useless! | |
13303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
13304 | $as_echo_n "checking for working alloca.h... " >&6; } | |
13305 | if ${ac_cv_working_alloca_h+:} false; then : | |
13306 | $as_echo_n "(cached) " >&6 | |
13307 | else | |
13308 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13309 | /* end confdefs.h. */ | |
13310 | #include <alloca.h> | |
7eb368b3 NR |
13311 | int |
13312 | main () | |
13313 | { | |
05ea2a05 TT |
13314 | char *p = (char *) alloca (2 * sizeof (int)); |
13315 | if (p) return 0; | |
7eb368b3 NR |
13316 | ; |
13317 | return 0; | |
13318 | } | |
13319 | _ACEOF | |
05ea2a05 TT |
13320 | if ac_fn_c_try_link "$LINENO"; then : |
13321 | ac_cv_working_alloca_h=yes | |
81ecdfbb | 13322 | else |
05ea2a05 | 13323 | ac_cv_working_alloca_h=no |
a9322a30 | 13324 | fi |
05ea2a05 TT |
13325 | rm -f core conftest.err conftest.$ac_objext \ |
13326 | conftest$ac_exeext conftest.$ac_ext | |
a9322a30 | 13327 | fi |
05ea2a05 TT |
13328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
13329 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
13330 | if test $ac_cv_working_alloca_h = yes; then | |
13331 | ||
13332 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
7eb368b3 | 13333 | |
7eb368b3 | 13334 | fi |
05ea2a05 TT |
13335 | |
13336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
13337 | $as_echo_n "checking for alloca... " >&6; } | |
13338 | if ${ac_cv_func_alloca_works+:} false; then : | |
13339 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13340 | else |
81ecdfbb | 13341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13342 | /* end confdefs.h. */ |
05ea2a05 TT |
13343 | #ifdef __GNUC__ |
13344 | # define alloca __builtin_alloca | |
13345 | #else | |
13346 | # ifdef _MSC_VER | |
13347 | # include <malloc.h> | |
13348 | # define alloca _alloca | |
13349 | # else | |
13350 | # ifdef HAVE_ALLOCA_H | |
13351 | # include <alloca.h> | |
13352 | # else | |
13353 | # ifdef _AIX | |
13354 | #pragma alloca | |
13355 | # else | |
13356 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
13357 | void *alloca (size_t); | |
13358 | # endif | |
13359 | # endif | |
13360 | # endif | |
13361 | # endif | |
13362 | #endif | |
13363 | ||
d3ea6809 MM |
13364 | int |
13365 | main () | |
13366 | { | |
05ea2a05 TT |
13367 | char *p = (char *) alloca (1); |
13368 | if (p) return 0; | |
81ecdfbb RW |
13369 | ; |
13370 | return 0; | |
d3ea6809 MM |
13371 | } |
13372 | _ACEOF | |
05ea2a05 TT |
13373 | if ac_fn_c_try_link "$LINENO"; then : |
13374 | ac_cv_func_alloca_works=yes | |
d3ea6809 | 13375 | else |
05ea2a05 | 13376 | ac_cv_func_alloca_works=no |
a9322a30 | 13377 | fi |
05ea2a05 TT |
13378 | rm -f core conftest.err conftest.$ac_objext \ |
13379 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 13380 | fi |
05ea2a05 TT |
13381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
13382 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
81ecdfbb | 13383 | |
05ea2a05 | 13384 | if test $ac_cv_func_alloca_works = yes; then |
d3ea6809 | 13385 | |
05ea2a05 | 13386 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
d3ea6809 | 13387 | |
05ea2a05 TT |
13388 | else |
13389 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13390 | # that cause trouble. Some versions do not even contain alloca or | |
13391 | # contain a buggy version. If you still want to use their alloca, | |
13392 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
d3ea6809 | 13393 | |
05ea2a05 | 13394 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
d0ac1c44 | 13395 | |
05ea2a05 | 13396 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
d0ac1c44 SM |
13397 | |
13398 | ||
05ea2a05 TT |
13399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
13400 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
13401 | if ${ac_cv_os_cray+:} false; then : | |
13402 | $as_echo_n "(cached) " >&6 | |
13403 | else | |
13404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13405 | /* end confdefs.h. */ | |
13406 | #if defined CRAY && ! defined CRAY2 | |
13407 | webecray | |
13408 | #else | |
13409 | wenotbecray | |
13410 | #endif | |
13411 | ||
13412 | _ACEOF | |
13413 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13414 | $EGREP "webecray" >/dev/null 2>&1; then : | |
13415 | ac_cv_os_cray=yes | |
13416 | else | |
13417 | ac_cv_os_cray=no | |
13418 | fi | |
13419 | rm -f conftest* | |
13420 | ||
13421 | fi | |
13422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
13423 | $as_echo "$ac_cv_os_cray" >&6; } | |
13424 | if test $ac_cv_os_cray = yes; then | |
13425 | for ac_func in _getb67 GETB67 getb67; do | |
13426 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13427 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13428 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
13429 | ||
13430 | cat >>confdefs.h <<_ACEOF | |
13431 | #define CRAY_STACKSEG_END $ac_func | |
13432 | _ACEOF | |
13433 | ||
13434 | break | |
13435 | fi | |
13436 | ||
13437 | done | |
13438 | fi | |
13439 | ||
13440 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
13441 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
13442 | if ${ac_cv_c_stack_direction+:} false; then : | |
13443 | $as_echo_n "(cached) " >&6 | |
13444 | else | |
13445 | if test "$cross_compiling" = yes; then : | |
13446 | ac_cv_c_stack_direction=0 | |
13447 | else | |
13448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13449 | /* end confdefs.h. */ | |
13450 | $ac_includes_default | |
13451 | int | |
13452 | find_stack_direction (int *addr, int depth) | |
13453 | { | |
13454 | int dir, dummy = 0; | |
13455 | if (! addr) | |
13456 | addr = &dummy; | |
13457 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
13458 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
13459 | return dir + dummy; | |
13460 | } | |
13461 | ||
13462 | int | |
13463 | main (int argc, char **argv) | |
13464 | { | |
13465 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
13466 | } | |
13467 | _ACEOF | |
13468 | if ac_fn_c_try_run "$LINENO"; then : | |
13469 | ac_cv_c_stack_direction=1 | |
13470 | else | |
13471 | ac_cv_c_stack_direction=-1 | |
13472 | fi | |
13473 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13474 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13475 | fi | |
13476 | ||
13477 | fi | |
13478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13479 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
13480 | cat >>confdefs.h <<_ACEOF | |
13481 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13482 | _ACEOF | |
13483 | ||
13484 | ||
13485 | fi | |
13486 | ||
13487 | ||
13488 | WIN32APILIBS= | |
13489 | case ${host} in | |
13490 | *mingw32*) | |
13491 | ||
13492 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
13493 | ||
13494 | WIN32APILIBS="-lws2_32" | |
13495 | ;; | |
13496 | esac | |
13497 | ||
13498 | ||
13499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13500 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13501 | if ${am_cv_langinfo_codeset+:} false; then : | |
13502 | $as_echo_n "(cached) " >&6 | |
13503 | else | |
13504 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13505 | /* end confdefs.h. */ | |
13506 | #include <langinfo.h> | |
13507 | int | |
13508 | main () | |
13509 | { | |
13510 | char* cs = nl_langinfo(CODESET); | |
13511 | ; | |
13512 | return 0; | |
13513 | } | |
13514 | _ACEOF | |
13515 | if ac_fn_c_try_link "$LINENO"; then : | |
13516 | am_cv_langinfo_codeset=yes | |
13517 | else | |
13518 | am_cv_langinfo_codeset=no | |
13519 | fi | |
13520 | rm -f core conftest.err conftest.$ac_objext \ | |
13521 | conftest$ac_exeext conftest.$ac_ext | |
13522 | ||
13523 | fi | |
13524 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
13525 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13526 | if test $am_cv_langinfo_codeset = yes; then | |
13527 | ||
13528 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
13529 | ||
13530 | fi | |
13531 | ||
13532 | ||
c8693053 | 13533 | 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 proc_service.h poll.h sys/poll.h sys/select.h |
81ecdfbb RW |
13534 | do : |
13535 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
05ea2a05 | 13536 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
d0ac1c44 | 13537 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
bec39cab | 13538 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13539 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 13540 | _ACEOF |
b757528f | 13541 | |
b757528f | 13542 | fi |
bec39cab | 13543 | |
a9322a30 | 13544 | done |
a3828db0 | 13545 | |
d0ac1c44 SM |
13546 | |
13547 | ||
a9322a30 | 13548 | for ac_func in getpagesize |
81ecdfbb RW |
13549 | do : |
13550 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d0ac1c44 | 13551 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
bec39cab | 13552 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13553 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 13554 | _ACEOF |
bcb3dc3d | 13555 | |
bcb3dc3d MK |
13556 | fi |
13557 | done | |
13558 | ||
81ecdfbb RW |
13559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
13560 | $as_echo_n "checking for working mmap... " >&6; } | |
d0ac1c44 | 13561 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
81ecdfbb | 13562 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13563 | else |
81ecdfbb | 13564 | if test "$cross_compiling" = yes; then : |
a9322a30 | 13565 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 13566 | else |
81ecdfbb | 13567 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13568 | /* end confdefs.h. */ |
a9322a30 TT |
13569 | $ac_includes_default |
13570 | /* malloc might have been renamed as rpl_malloc. */ | |
13571 | #undef malloc | |
bec39cab | 13572 | |
a9322a30 TT |
13573 | /* Thanks to Mike Haertel and Jim Avera for this test. |
13574 | Here is a matrix of mmap possibilities: | |
13575 | mmap private not fixed | |
13576 | mmap private fixed at somewhere currently unmapped | |
13577 | mmap private fixed at somewhere already mapped | |
13578 | mmap shared not fixed | |
13579 | mmap shared fixed at somewhere currently unmapped | |
13580 | mmap shared fixed at somewhere already mapped | |
13581 | For private mappings, we should verify that changes cannot be read() | |
13582 | back from the file, nor mmap's back from the file at a different | |
13583 | address. (There have been systems where private was not correctly | |
13584 | implemented like the infamous i386 svr4.0, and systems where the | |
13585 | VM page cache was not coherent with the file system buffer cache | |
13586 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
13587 | For shared mappings, we should conversely verify that changes get | |
13588 | propagated back to all the places they're supposed to be. | |
bec39cab | 13589 | |
a9322a30 TT |
13590 | Grep wants private fixed already mapped. |
13591 | The main things grep needs to know about mmap are: | |
13592 | * does it exist and is it safe to write into the mmap'd area | |
13593 | * how to use it (BSD variants) */ | |
8b9cf735 | 13594 | |
a9322a30 TT |
13595 | #include <fcntl.h> |
13596 | #include <sys/mman.h> | |
8b9cf735 | 13597 | |
81ecdfbb | 13598 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 13599 | char *malloc (); |
a3828db0 MK |
13600 | #endif |
13601 | ||
a9322a30 | 13602 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 13603 | #ifndef HAVE_GETPAGESIZE |
a9322a30 TT |
13604 | # ifdef _SC_PAGESIZE |
13605 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
13606 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 13607 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
13608 | # include <sys/param.h> |
13609 | # ifdef EXEC_PAGESIZE | |
13610 | # define getpagesize() EXEC_PAGESIZE | |
13611 | # else /* no EXEC_PAGESIZE */ | |
13612 | # ifdef NBPG | |
13613 | # define getpagesize() NBPG * CLSIZE | |
13614 | # ifndef CLSIZE | |
13615 | # define CLSIZE 1 | |
13616 | # endif /* no CLSIZE */ | |
13617 | # else /* no NBPG */ | |
13618 | # ifdef NBPC | |
13619 | # define getpagesize() NBPC | |
13620 | # else /* no NBPC */ | |
13621 | # ifdef PAGESIZE | |
13622 | # define getpagesize() PAGESIZE | |
13623 | # endif /* PAGESIZE */ | |
13624 | # endif /* no NBPC */ | |
13625 | # endif /* no NBPG */ | |
13626 | # endif /* no EXEC_PAGESIZE */ | |
13627 | # else /* no HAVE_SYS_PARAM_H */ | |
13628 | # define getpagesize() 8192 /* punt totally */ | |
13629 | # endif /* no HAVE_SYS_PARAM_H */ | |
13630 | # endif /* no _SC_PAGESIZE */ | |
13631 | ||
13632 | #endif /* no HAVE_GETPAGESIZE */ | |
13633 | ||
bec39cab AC |
13634 | int |
13635 | main () | |
13636 | { | |
a9322a30 | 13637 | char *data, *data2, *data3; |
d0ac1c44 | 13638 | const char *cdata2; |
a9322a30 | 13639 | int i, pagesize; |
d0ac1c44 | 13640 | int fd, fd2; |
a9322a30 TT |
13641 | |
13642 | pagesize = getpagesize (); | |
13643 | ||
13644 | /* First, make a file with some known garbage in it. */ | |
13645 | data = (char *) malloc (pagesize); | |
13646 | if (!data) | |
81ecdfbb | 13647 | return 1; |
a9322a30 TT |
13648 | for (i = 0; i < pagesize; ++i) |
13649 | *(data + i) = rand (); | |
13650 | umask (0); | |
13651 | fd = creat ("conftest.mmap", 0600); | |
13652 | if (fd < 0) | |
d0ac1c44 | 13653 | return 2; |
a9322a30 | 13654 | if (write (fd, data, pagesize) != pagesize) |
d0ac1c44 | 13655 | return 3; |
a9322a30 TT |
13656 | close (fd); |
13657 | ||
d0ac1c44 SM |
13658 | /* Next, check that the tail of a page is zero-filled. File must have |
13659 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
13660 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
13661 | if (fd2 < 0) | |
13662 | return 4; | |
13663 | cdata2 = ""; | |
13664 | if (write (fd2, cdata2, 1) != 1) | |
13665 | return 5; | |
13666 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
13667 | if (data2 == MAP_FAILED) | |
13668 | return 6; | |
13669 | for (i = 0; i < pagesize; ++i) | |
13670 | if (*(data2 + i)) | |
13671 | return 7; | |
13672 | close (fd2); | |
13673 | if (munmap (data2, pagesize)) | |
13674 | return 8; | |
13675 | ||
a9322a30 TT |
13676 | /* Next, try to mmap the file at a fixed address which already has |
13677 | something else allocated at it. If we can, also make sure that | |
13678 | we see the same garbage. */ | |
13679 | fd = open ("conftest.mmap", O_RDWR); | |
13680 | if (fd < 0) | |
d0ac1c44 | 13681 | return 9; |
a9322a30 TT |
13682 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
13683 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
d0ac1c44 | 13684 | return 10; |
a9322a30 TT |
13685 | for (i = 0; i < pagesize; ++i) |
13686 | if (*(data + i) != *(data2 + i)) | |
d0ac1c44 | 13687 | return 11; |
a9322a30 TT |
13688 | |
13689 | /* Finally, make sure that changes to the mapped area do not | |
13690 | percolate back to the file as seen by read(). (This is a bug on | |
13691 | some variants of i386 svr4.0.) */ | |
13692 | for (i = 0; i < pagesize; ++i) | |
13693 | *(data2 + i) = *(data2 + i) + 1; | |
13694 | data3 = (char *) malloc (pagesize); | |
13695 | if (!data3) | |
d0ac1c44 | 13696 | return 12; |
a9322a30 | 13697 | if (read (fd, data3, pagesize) != pagesize) |
d0ac1c44 | 13698 | return 13; |
a9322a30 TT |
13699 | for (i = 0; i < pagesize; ++i) |
13700 | if (*(data + i) != *(data3 + i)) | |
d0ac1c44 | 13701 | return 14; |
a9322a30 | 13702 | close (fd); |
81ecdfbb | 13703 | return 0; |
bec39cab AC |
13704 | } |
13705 | _ACEOF | |
81ecdfbb | 13706 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13707 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 13708 | else |
81ecdfbb | 13709 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 13710 | fi |
81ecdfbb RW |
13711 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13712 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 13713 | fi |
81ecdfbb | 13714 | |
a9322a30 | 13715 | fi |
81ecdfbb RW |
13716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
13717 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
13718 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
13719 | ||
81ecdfbb | 13720 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 13721 | |
086ec9eb | 13722 | fi |
d0ac1c44 | 13723 | rm -f conftest.mmap conftest.txt |
a3828db0 | 13724 | |
05ea2a05 | 13725 | for ac_header in vfork.h |
81ecdfbb RW |
13726 | do : |
13727 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 13728 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
a3828db0 | 13729 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13730 | #define HAVE_VFORK_H 1 |
bec39cab | 13731 | _ACEOF |
c906108c SS |
13732 | |
13733 | fi | |
a9322a30 | 13734 | |
a3828db0 | 13735 | done |
c906108c | 13736 | |
a9322a30 | 13737 | for ac_func in fork vfork |
81ecdfbb RW |
13738 | do : |
13739 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13740 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13741 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
a3828db0 | 13742 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13743 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 13744 | _ACEOF |
b83266a0 | 13745 | |
97bf5e38 | 13746 | fi |
a3828db0 | 13747 | done |
b83266a0 | 13748 | |
a9322a30 | 13749 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
13750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
13751 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 13752 | if ${ac_cv_func_fork_works+:} false; then : |
81ecdfbb | 13753 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13754 | else |
81ecdfbb | 13755 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13756 | ac_cv_func_fork_works=cross |
13757 | else | |
81ecdfbb RW |
13758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13759 | /* end confdefs.h. */ | |
13760 | $ac_includes_default | |
13761 | int | |
13762 | main () | |
13763 | { | |
13764 | ||
13765 | /* By Ruediger Kuhlmann. */ | |
13766 | return fork () < 0; | |
13767 | ||
13768 | ; | |
13769 | return 0; | |
13770 | } | |
a9322a30 | 13771 | _ACEOF |
81ecdfbb | 13772 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13773 | ac_cv_func_fork_works=yes |
13774 | else | |
81ecdfbb | 13775 | ac_cv_func_fork_works=no |
a9322a30 | 13776 | fi |
81ecdfbb RW |
13777 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13778 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13779 | fi |
81ecdfbb | 13780 | |
a9322a30 | 13781 | fi |
81ecdfbb RW |
13782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
13783 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
13784 | |
13785 | else | |
13786 | ac_cv_func_fork_works=$ac_cv_func_fork | |
13787 | fi | |
13788 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13789 | case $host in | |
13790 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13791 | # Override, as these systems have only a dummy fork() stub | |
13792 | ac_cv_func_fork_works=no | |
13793 | ;; | |
13794 | *) | |
13795 | ac_cv_func_fork_works=yes | |
13796 | ;; | |
13797 | esac | |
81ecdfbb RW |
13798 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
13799 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13800 | fi |
13801 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
13802 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
13803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
13804 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 13805 | if ${ac_cv_func_vfork_works+:} false; then : |
81ecdfbb | 13806 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13807 | else |
81ecdfbb | 13808 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13809 | ac_cv_func_vfork_works=cross |
13810 | else | |
81ecdfbb | 13811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
13812 | /* end confdefs.h. */ |
13813 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 13814 | $ac_includes_default |
a9322a30 | 13815 | #include <sys/wait.h> |
81ecdfbb | 13816 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
13817 | # include <vfork.h> |
13818 | #endif | |
13819 | /* On some sparc systems, changes by the child to local and incoming | |
13820 | argument registers are propagated back to the parent. The compiler | |
13821 | is told about this with #include <vfork.h>, but some compilers | |
13822 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13823 | static variable whose address is put into a register that is | |
13824 | clobbered by the vfork. */ | |
13825 | static void | |
13826 | #ifdef __cplusplus | |
13827 | sparc_address_test (int arg) | |
13828 | # else | |
13829 | sparc_address_test (arg) int arg; | |
13830 | #endif | |
13831 | { | |
13832 | static pid_t child; | |
13833 | if (!child) { | |
13834 | child = vfork (); | |
13835 | if (child < 0) { | |
13836 | perror ("vfork"); | |
13837 | _exit(2); | |
13838 | } | |
13839 | if (!child) { | |
13840 | arg = getpid(); | |
13841 | write(-1, "", 0); | |
13842 | _exit (arg); | |
13843 | } | |
13844 | } | |
13845 | } | |
13846 | ||
13847 | int | |
13848 | main () | |
13849 | { | |
13850 | pid_t parent = getpid (); | |
13851 | pid_t child; | |
13852 | ||
13853 | sparc_address_test (0); | |
13854 | ||
13855 | child = vfork (); | |
13856 | ||
13857 | if (child == 0) { | |
13858 | /* Here is another test for sparc vfork register problems. This | |
13859 | test uses lots of local variables, at least as many local | |
13860 | variables as main has allocated so far including compiler | |
13861 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13862 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13863 | reuse the register of parent for one of the local variables, | |
13864 | since it will think that parent can't possibly be used any more | |
13865 | in this routine. Assigning to the local variable will thus | |
13866 | munge parent in the parent process. */ | |
13867 | pid_t | |
13868 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13869 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13870 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13871 | use the same hardware register for all 8 local variables. */ | |
13872 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13873 | || p != p5 || p != p6 || p != p7) | |
13874 | _exit(1); | |
13875 | ||
13876 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
13877 | from child file descriptors. If the child closes a descriptor | |
13878 | before it execs or exits, this munges the parent's descriptor | |
13879 | as well. Test for this by closing stdout in the child. */ | |
13880 | _exit(close(fileno(stdout)) != 0); | |
13881 | } else { | |
13882 | int status; | |
13883 | struct stat st; | |
13884 | ||
13885 | while (wait(&status) != child) | |
13886 | ; | |
81ecdfbb | 13887 | return ( |
a9322a30 TT |
13888 | /* Was there some problem with vforking? */ |
13889 | child < 0 | |
13890 | ||
13891 | /* Did the child fail? (This shouldn't happen.) */ | |
13892 | || status | |
13893 | ||
13894 | /* Did the vfork/compiler bug occur? */ | |
13895 | || parent != getpid() | |
13896 | ||
13897 | /* Did the file descriptor bug occur? */ | |
13898 | || fstat(fileno(stdout), &st) != 0 | |
13899 | ); | |
13900 | } | |
13901 | } | |
13902 | _ACEOF | |
81ecdfbb | 13903 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13904 | ac_cv_func_vfork_works=yes |
13905 | else | |
81ecdfbb | 13906 | ac_cv_func_vfork_works=no |
a9322a30 | 13907 | fi |
81ecdfbb RW |
13908 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13909 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13910 | fi |
81ecdfbb | 13911 | |
a9322a30 | 13912 | fi |
81ecdfbb RW |
13913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
13914 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
13915 | |
13916 | fi; | |
13917 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13918 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
13919 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
13920 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13921 | fi |
13922 | ||
13923 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
13924 | ||
81ecdfbb | 13925 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
13926 | |
13927 | else | |
13928 | ||
81ecdfbb | 13929 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
13930 | |
13931 | fi | |
13932 | if test "x$ac_cv_func_fork_works" = xyes; then | |
13933 | ||
81ecdfbb | 13934 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
13935 | |
13936 | fi | |
13937 | ||
8ae8e197 | 13938 | for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \ |
05ea2a05 | 13939 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
f4931779 | 13940 | setpgid setpgrp getrusage getauxval sigtimedwait |
81ecdfbb RW |
13941 | do : |
13942 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13943 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13944 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
6c7a06a3 | 13945 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13946 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
13947 | _ACEOF |
13948 | ||
13949 | fi | |
13950 | done | |
13951 | ||
13952 | ||
0b03c6f0 TT |
13953 | # This is needed for RHEL 5 and uclibc-ng < 1.0.39. |
13954 | # These did not define ADDR_NO_RANDOMIZE in sys/personality.h, | |
13955 | # only in linux/personality.h. | |
13956 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> | |
13957 | " | |
13958 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : | |
13959 | ac_have_decl=1 | |
13960 | else | |
13961 | ac_have_decl=0 | |
13962 | fi | |
13963 | ||
13964 | cat >>confdefs.h <<_ACEOF | |
13965 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl | |
13966 | _ACEOF | |
13967 | ||
13968 | ||
05ea2a05 TT |
13969 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
13970 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
13971 | ac_have_decl=1 | |
d0ac1c44 | 13972 | else |
05ea2a05 TT |
13973 | ac_have_decl=0 |
13974 | fi | |
d0ac1c44 SM |
13975 | |
13976 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 TT |
13977 | #define HAVE_DECL_STRSTR $ac_have_decl |
13978 | _ACEOF | |
13979 | ||
13980 | ||
13981 | # ----------------------- # | |
13982 | # Checks for structures. # | |
13983 | # ----------------------- # | |
13984 | ||
13985 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
13986 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
13987 | ||
13988 | cat >>confdefs.h <<_ACEOF | |
13989 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
d0ac1c44 SM |
13990 | _ACEOF |
13991 | ||
05ea2a05 | 13992 | |
d0ac1c44 | 13993 | fi |
05ea2a05 TT |
13994 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
13995 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
d0ac1c44 | 13996 | |
05ea2a05 TT |
13997 | cat >>confdefs.h <<_ACEOF |
13998 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
13999 | _ACEOF | |
14000 | ||
14001 | ||
14002 | fi | |
14003 | ||
14004 | ||
e911c666 JB |
14005 | # On FreeBSD we need libutil for the kinfo_get* functions. On |
14006 | # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. | |
14007 | # Figure out which one to use. | |
05ea2a05 TT |
14008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 |
14009 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
14010 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
5e030278 TT |
14011 | $as_echo_n "(cached) " >&6 |
14012 | else | |
05ea2a05 TT |
14013 | ac_func_search_save_LIBS=$LIBS |
14014 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14015 | /* end confdefs.h. */ |
3266f10b | 14016 | |
05ea2a05 TT |
14017 | /* Override any GCC internal prototype to avoid an error. |
14018 | Use char because int might match the return type of a GCC | |
14019 | builtin and then its argument prototype would still apply. */ | |
14020 | #ifdef __cplusplus | |
14021 | extern "C" | |
14022 | #endif | |
14023 | char kinfo_getfile (); | |
3266f10b TT |
14024 | int |
14025 | main () | |
14026 | { | |
05ea2a05 | 14027 | return kinfo_getfile (); |
3266f10b TT |
14028 | ; |
14029 | return 0; | |
14030 | } | |
14031 | _ACEOF | |
05ea2a05 TT |
14032 | for ac_lib in '' util util-freebsd; do |
14033 | if test -z "$ac_lib"; then | |
14034 | ac_res="none required" | |
14035 | else | |
14036 | ac_res=-l$ac_lib | |
14037 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
14038 | fi | |
14039 | if ac_fn_c_try_link "$LINENO"; then : | |
14040 | ac_cv_search_kinfo_getfile=$ac_res | |
3266f10b | 14041 | fi |
05ea2a05 TT |
14042 | rm -f core conftest.err conftest.$ac_objext \ |
14043 | conftest$ac_exeext | |
14044 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
14045 | break | |
14046 | fi | |
14047 | done | |
14048 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
3266f10b TT |
14049 | |
14050 | else | |
05ea2a05 | 14051 | ac_cv_search_kinfo_getfile=no |
3266f10b | 14052 | fi |
05ea2a05 TT |
14053 | rm conftest.$ac_ext |
14054 | LIBS=$ac_func_search_save_LIBS | |
14055 | fi | |
14056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
14057 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
14058 | ac_res=$ac_cv_search_kinfo_getfile | |
14059 | if test "$ac_res" != no; then : | |
14060 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
14061 | ||
e911c666 JB |
14062 | fi |
14063 | ||
14064 | ||
14065 | # Define HAVE_KINFO_GETFILE if kinfo_getfile is available. | |
14066 | for ac_func in kinfo_getfile | |
14067 | do : | |
14068 | ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile" | |
14069 | if test "x$ac_cv_func_kinfo_getfile" = xyes; then : | |
14070 | cat >>confdefs.h <<_ACEOF | |
14071 | #define HAVE_KINFO_GETFILE 1 | |
14072 | _ACEOF | |
3266f10b TT |
14073 | |
14074 | fi | |
e911c666 | 14075 | done |
3266f10b | 14076 | |
3266f10b | 14077 | |
261b0748 LM |
14078 | # ----------------------- # |
14079 | # Check for threading. # | |
14080 | # ----------------------- # | |
14081 | ||
14082 | # Check whether --enable-threading was given. | |
14083 | if test "${enable_threading+set}" = set; then : | |
14084 | enableval=$enable_threading; case "$enableval" in | |
14085 | yes) want_threading=yes ;; | |
14086 | no) want_threading=no ;; | |
14087 | *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;; | |
14088 | esac | |
14089 | else | |
14090 | want_threading=yes | |
14091 | fi | |
14092 | ||
14093 | ||
05ea2a05 TT |
14094 | # Check for std::thread. This does not work on some platforms, like |
14095 | # mingw and DJGPP. | |
14096 | ac_ext=cpp | |
14097 | ac_cpp='$CXXCPP $CPPFLAGS' | |
14098 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14099 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14100 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3266f10b | 14101 | |
3266f10b | 14102 | |
3266f10b | 14103 | |
3266f10b | 14104 | |
3266f10b | 14105 | |
05ea2a05 TT |
14106 | ac_ext=c |
14107 | ac_cpp='$CPP $CPPFLAGS' | |
14108 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14109 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14110 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3266f10b | 14111 | |
05ea2a05 | 14112 | ax_pthread_ok=no |
3266f10b | 14113 | |
05ea2a05 TT |
14114 | # We used to check for pthread.h first, but this fails if pthread.h |
14115 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
14116 | # It gets checked for in the link test anyway. | |
3266f10b | 14117 | |
05ea2a05 TT |
14118 | # First of all, check if the user has set any of the PTHREAD_LIBS, |
14119 | # etcetera environment variables, and if threads linking works using | |
14120 | # them: | |
14121 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
14122 | ax_pthread_save_CC="$CC" | |
14123 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14124 | ax_pthread_save_LIBS="$LIBS" | |
14125 | if test "x$PTHREAD_CC" != "x"; then : | |
14126 | CC="$PTHREAD_CC" | |
3266f10b | 14127 | fi |
05ea2a05 TT |
14128 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
14129 | LIBS="$PTHREAD_LIBS $LIBS" | |
14130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
14131 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
14132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14133 | /* end confdefs.h. */ |
05ea2a05 TT |
14134 | |
14135 | /* Override any GCC internal prototype to avoid an error. | |
14136 | Use char because int might match the return type of a GCC | |
14137 | builtin and then its argument prototype would still apply. */ | |
14138 | #ifdef __cplusplus | |
14139 | extern "C" | |
14140 | #endif | |
14141 | char pthread_join (); | |
3266f10b TT |
14142 | int |
14143 | main () | |
14144 | { | |
05ea2a05 | 14145 | return pthread_join (); |
3266f10b TT |
14146 | ; |
14147 | return 0; | |
14148 | } | |
14149 | _ACEOF | |
14150 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 | 14151 | ax_pthread_ok=yes |
3266f10b TT |
14152 | fi |
14153 | rm -f core conftest.err conftest.$ac_objext \ | |
14154 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 TT |
14155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 |
14156 | $as_echo "$ax_pthread_ok" >&6; } | |
14157 | if test "x$ax_pthread_ok" = "xno"; then | |
14158 | PTHREAD_LIBS="" | |
14159 | PTHREAD_CFLAGS="" | |
14160 | fi | |
14161 | CC="$ax_pthread_save_CC" | |
14162 | CFLAGS="$ax_pthread_save_CFLAGS" | |
14163 | LIBS="$ax_pthread_save_LIBS" | |
3266f10b | 14164 | fi |
3266f10b | 14165 | |
05ea2a05 TT |
14166 | # We must check for the threads library under a number of different |
14167 | # names; the ordering is very important because some systems | |
14168 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
14169 | # libraries is broken (non-POSIX). | |
3266f10b | 14170 | |
05ea2a05 TT |
14171 | # Create a list of thread flags to try. Items starting with a "-" are |
14172 | # C compiler flags, and other items are library names, except for "none" | |
14173 | # which indicates that we try without any flags at all, and "pthread-config" | |
14174 | # which is a program returning the flags for the Pth emulation library. | |
3266f10b | 14175 | |
05ea2a05 | 14176 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
3266f10b | 14177 | |
05ea2a05 TT |
14178 | # The ordering *is* (sometimes) important. Some notes on the |
14179 | # individual items follow: | |
3266f10b | 14180 | |
05ea2a05 TT |
14181 | # pthreads: AIX (must check this before -lpthread) |
14182 | # none: in case threads are in libc; should be tried before -Kthread and | |
14183 | # other compiler flags to prevent continual compiler warnings | |
14184 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
14185 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
14186 | # (Note: HP C rejects this with "bad form for `-t' option") | |
14187 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
14188 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
14189 | # doesn't hurt to check since this sometimes defines pthreads and | |
14190 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
14191 | # is present but should not be used directly; and before -mthreads, | |
14192 | # because the compiler interprets this as "-mt" + "-hreads") | |
14193 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
14194 | # pthread: Linux, etcetera | |
14195 | # --thread-safe: KAI C++ | |
14196 | # pthread-config: use pthread-config program (for GNU Pth library) | |
3266f10b | 14197 | |
05ea2a05 | 14198 | case $host_os in |
3266f10b | 14199 | |
05ea2a05 | 14200 | freebsd*) |
3266f10b | 14201 | |
05ea2a05 TT |
14202 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
14203 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
3266f10b | 14204 | |
05ea2a05 TT |
14205 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" |
14206 | ;; | |
3266f10b | 14207 | |
05ea2a05 | 14208 | hpux*) |
3266f10b | 14209 | |
05ea2a05 TT |
14210 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable |
14211 | # multi-threading and also sets -lpthread." | |
14212 | ||
14213 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
14214 | ;; | |
14215 | ||
14216 | openedition*) | |
14217 | ||
14218 | # IBM z/OS requires a feature-test macro to be defined in order to | |
14219 | # enable POSIX threads at all, so give the user a hint if this is | |
14220 | # not set. (We don't define these ourselves, as they can affect | |
14221 | # other portions of the system API in unpredictable ways.) | |
14222 | ||
14223 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14224 | /* end confdefs.h. */ |
05ea2a05 TT |
14225 | |
14226 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
14227 | AX_PTHREAD_ZOS_MISSING | |
14228 | # endif | |
3266f10b TT |
14229 | |
14230 | _ACEOF | |
14231 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
05ea2a05 TT |
14232 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : |
14233 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
14234 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
3266f10b TT |
14235 | fi |
14236 | rm -f conftest* | |
14237 | ||
05ea2a05 | 14238 | ;; |
3266f10b | 14239 | |
05ea2a05 | 14240 | solaris*) |
3266f10b | 14241 | |
05ea2a05 TT |
14242 | # On Solaris (at least, for some versions), libc contains stubbed |
14243 | # (non-functional) versions of the pthreads routines, so link-based | |
14244 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
14245 | # pthread_cleanup_push, or rather a function called by this macro, | |
14246 | # so we could check for that, but who knows whether they'll stub | |
14247 | # that too in a future libc.) So we'll check first for the | |
14248 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
14249 | ||
14250 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
14251 | ;; | |
14252 | esac | |
14253 | ||
14254 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
14255 | ||
14256 | if test "x$GCC" = "xyes"; then : | |
14257 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
3266f10b TT |
14258 | fi |
14259 | ||
05ea2a05 TT |
14260 | # The presence of a feature test macro requesting re-entrant function |
14261 | # definitions is, on some systems, a strong hint that pthreads support is | |
14262 | # correctly enabled | |
14263 | ||
14264 | case $host_os in | |
14265 | darwin* | hpux* | linux* | osf* | solaris*) | |
14266 | ax_pthread_check_macro="_REENTRANT" | |
14267 | ;; | |
14268 | ||
14269 | aix*) | |
14270 | ax_pthread_check_macro="_THREAD_SAFE" | |
14271 | ;; | |
14272 | ||
14273 | *) | |
14274 | ax_pthread_check_macro="--" | |
14275 | ;; | |
14276 | esac | |
14277 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
14278 | ax_pthread_check_cond=0 | |
14279 | else | |
14280 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
3266f10b TT |
14281 | fi |
14282 | ||
05ea2a05 TT |
14283 | # Are we compiling with Clang? |
14284 | ||
14285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
14286 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
14287 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
3266f10b TT |
14288 | $as_echo_n "(cached) " >&6 |
14289 | else | |
05ea2a05 TT |
14290 | ax_cv_PTHREAD_CLANG=no |
14291 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
14292 | if test "x$GCC" = "xyes"; then | |
14293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14294 | /* end confdefs.h. */ |
05ea2a05 TT |
14295 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ |
14296 | # if defined(__clang__) && defined(__llvm__) | |
14297 | AX_PTHREAD_CC_IS_CLANG | |
14298 | # endif | |
3266f10b | 14299 | |
3266f10b | 14300 | _ACEOF |
05ea2a05 TT |
14301 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
14302 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
14303 | ax_cv_PTHREAD_CLANG=yes | |
3266f10b | 14304 | fi |
05ea2a05 TT |
14305 | rm -f conftest* |
14306 | ||
14307 | fi | |
3266f10b TT |
14308 | |
14309 | fi | |
05ea2a05 TT |
14310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 |
14311 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
14312 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
3266f10b | 14313 | |
05ea2a05 | 14314 | ax_pthread_clang_warning=no |
3266f10b | 14315 | |
05ea2a05 TT |
14316 | # Clang needs special handling, because older versions handle the -pthread |
14317 | # option in a rather... idiosyncratic way | |
3266f10b | 14318 | |
05ea2a05 | 14319 | if test "x$ax_pthread_clang" = "xyes"; then |
3266f10b | 14320 | |
05ea2a05 | 14321 | # Clang takes -pthread; it has never supported any other flag |
b2ceabe8 | 14322 | |
05ea2a05 TT |
14323 | # (Note 1: This will need to be revisited if a system that Clang |
14324 | # supports has POSIX threads in a separate library. This tends not | |
14325 | # to be the way of modern systems, but it's conceivable.) | |
b2ceabe8 | 14326 | |
05ea2a05 TT |
14327 | # (Note 2: On some systems, notably Darwin, -pthread is not needed |
14328 | # to get POSIX threads support; the API is always present and | |
14329 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
14330 | # -pthread does define _REENTRANT, and while the Darwin headers | |
14331 | # ignore this macro, third-party headers might not.) | |
b2ceabe8 | 14332 | |
05ea2a05 TT |
14333 | PTHREAD_CFLAGS="-pthread" |
14334 | PTHREAD_LIBS= | |
3266f10b | 14335 | |
05ea2a05 TT |
14336 | ax_pthread_ok=yes |
14337 | ||
14338 | # However, older versions of Clang make a point of warning the user | |
14339 | # that, in an invocation where only linking and no compilation is | |
14340 | # taking place, the -pthread option has no effect ("argument unused | |
14341 | # during compilation"). They expect -pthread to be passed in only | |
14342 | # when source code is being compiled. | |
14343 | # | |
14344 | # Problem is, this is at odds with the way Automake and most other | |
14345 | # C build frameworks function, which is that the same flags used in | |
14346 | # compilation (CFLAGS) are also used in linking. Many systems | |
14347 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
14348 | # support, and in fact it is often not straightforward to specify a | |
14349 | # flag that is used only in the compilation phase and not in | |
14350 | # linking. Such a scenario is extremely rare in practice. | |
14351 | # | |
14352 | # Even though use of the -pthread flag in linking would only print | |
14353 | # a warning, this can be a nuisance for well-run software projects | |
14354 | # that build with -Werror. So if the active version of Clang has | |
14355 | # this misfeature, we search for an option to squash it. | |
14356 | ||
14357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
14358 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
14359 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
14360 | $as_echo_n "(cached) " >&6 | |
14361 | else | |
14362 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
14363 | # Create an alternate version of $ac_link that compiles and | |
14364 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
14365 | # (.c -> exe), because the warning occurs only in the second | |
14366 | # step | |
14367 | ax_pthread_save_ac_link="$ac_link" | |
14368 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
14369 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
14370 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
14371 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14372 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
14373 | if test "x$ax_pthread_try" = "xunknown"; then : | |
14374 | break | |
14375 | fi | |
14376 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
14377 | ac_link="$ax_pthread_save_ac_link" | |
14378 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14379 | /* end confdefs.h. */ | |
14380 | int main(void){return 0;} | |
3266f10b TT |
14381 | _ACEOF |
14382 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
14383 | ac_link="$ax_pthread_2step_ac_link" |
14384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14385 | /* end confdefs.h. */ | |
14386 | int main(void){return 0;} | |
14387 | _ACEOF | |
14388 | if ac_fn_c_try_link "$LINENO"; then : | |
14389 | break | |
3266f10b TT |
14390 | fi |
14391 | rm -f core conftest.err conftest.$ac_objext \ | |
14392 | conftest$ac_exeext conftest.$ac_ext | |
14393 | ||
14394 | fi | |
05ea2a05 TT |
14395 | rm -f core conftest.err conftest.$ac_objext \ |
14396 | conftest$ac_exeext conftest.$ac_ext | |
14397 | done | |
14398 | ac_link="$ax_pthread_save_ac_link" | |
14399 | CFLAGS="$ax_pthread_save_CFLAGS" | |
14400 | if test "x$ax_pthread_try" = "x"; then : | |
14401 | ax_pthread_try=no | |
14402 | fi | |
14403 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
3266f10b | 14404 | |
05ea2a05 TT |
14405 | fi |
14406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
14407 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
3266f10b | 14408 | |
05ea2a05 TT |
14409 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in |
14410 | no | unknown) ;; | |
14411 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
14412 | esac | |
3266f10b | 14413 | |
05ea2a05 | 14414 | fi # $ax_pthread_clang = yes |
3266f10b | 14415 | |
05ea2a05 TT |
14416 | if test "x$ax_pthread_ok" = "xno"; then |
14417 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
3266f10b | 14418 | |
05ea2a05 TT |
14419 | case $ax_pthread_try_flag in |
14420 | none) | |
14421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
14422 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
14423 | ;; | |
3266f10b | 14424 | |
05ea2a05 TT |
14425 | -mt,pthread) |
14426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
14427 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
14428 | PTHREAD_CFLAGS="-mt" | |
14429 | PTHREAD_LIBS="-lpthread" | |
14430 | ;; | |
3266f10b | 14431 | |
05ea2a05 TT |
14432 | -*) |
14433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
14434 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
14435 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
14436 | ;; | |
3266f10b | 14437 | |
05ea2a05 TT |
14438 | pthread-config) |
14439 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
14440 | set dummy pthread-config; ac_word=$2 | |
14441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14442 | $as_echo_n "checking for $ac_word... " >&6; } | |
14443 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
14444 | $as_echo_n "(cached) " >&6 | |
14445 | else | |
14446 | if test -n "$ax_pthread_config"; then | |
14447 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
14448 | else | |
14449 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14450 | for as_dir in $PATH | |
14451 | do | |
14452 | IFS=$as_save_IFS | |
14453 | test -z "$as_dir" && as_dir=. | |
14454 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14455 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14456 | ac_cv_prog_ax_pthread_config="yes" | |
14457 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14458 | break 2 | |
14459 | fi | |
3266f10b | 14460 | done |
05ea2a05 TT |
14461 | done |
14462 | IFS=$as_save_IFS | |
3266f10b | 14463 | |
05ea2a05 TT |
14464 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" |
14465 | fi | |
14466 | fi | |
14467 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
14468 | if test -n "$ax_pthread_config"; then | |
14469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
14470 | $as_echo "$ax_pthread_config" >&6; } | |
3266f10b | 14471 | else |
05ea2a05 TT |
14472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14473 | $as_echo "no" >&6; } | |
3266f10b TT |
14474 | fi |
14475 | ||
5e030278 | 14476 | |
05ea2a05 TT |
14477 | if test "x$ax_pthread_config" = "xno"; then : |
14478 | continue | |
14479 | fi | |
14480 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
14481 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
14482 | ;; | |
5e030278 | 14483 | |
05ea2a05 TT |
14484 | *) |
14485 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
14486 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
14487 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
14488 | ;; | |
14489 | esac | |
5e030278 | 14490 | |
5e030278 TT |
14491 | ax_pthread_save_CFLAGS="$CFLAGS" |
14492 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
14493 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
14494 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
14495 | |
14496 | # Check for various functions. We must include pthread.h, | |
14497 | # since some functions may be macros. (On the Sequent, we | |
14498 | # need a special flag -Kthread to make this header compile.) | |
14499 | # We check for pthread_join because it is in -lpthread on IRIX | |
14500 | # while pthread_create is in libc. We check for pthread_attr_init | |
14501 | # due to DEC craziness with -lpthreads. We check for | |
14502 | # pthread_cleanup_push because it is one of the few pthread | |
14503 | # functions on Solaris that doesn't have a non-functional libc stub. | |
14504 | # We try pthread_create on general principles. | |
14505 | ||
5e030278 TT |
14506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14507 | /* end confdefs.h. */ | |
05ea2a05 TT |
14508 | #include <pthread.h> |
14509 | # if $ax_pthread_check_cond | |
14510 | # error "$ax_pthread_check_macro must be defined" | |
14511 | # endif | |
14512 | static void routine(void *a) { a = 0; } | |
14513 | static void *start_routine(void *a) { return a; } | |
5e030278 TT |
14514 | int |
14515 | main () | |
14516 | { | |
05ea2a05 TT |
14517 | pthread_t th; pthread_attr_t attr; |
14518 | pthread_create(&th, 0, start_routine, 0); | |
14519 | pthread_join(th, 0); | |
14520 | pthread_attr_init(&attr); | |
14521 | pthread_cleanup_push(routine, 0); | |
14522 | pthread_cleanup_pop(0) /* ; */ | |
5e030278 TT |
14523 | ; |
14524 | return 0; | |
14525 | } | |
14526 | _ACEOF | |
14527 | if ac_fn_c_try_link "$LINENO"; then : | |
14528 | ax_pthread_ok=yes | |
14529 | fi | |
14530 | rm -f core conftest.err conftest.$ac_objext \ | |
14531 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 14532 | |
5e030278 TT |
14533 | CFLAGS="$ax_pthread_save_CFLAGS" |
14534 | LIBS="$ax_pthread_save_LIBS" | |
05ea2a05 TT |
14535 | |
14536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
14537 | $as_echo "$ax_pthread_ok" >&6; } | |
14538 | if test "x$ax_pthread_ok" = "xyes"; then : | |
14539 | break | |
5e030278 TT |
14540 | fi |
14541 | ||
05ea2a05 TT |
14542 | PTHREAD_LIBS="" |
14543 | PTHREAD_CFLAGS="" | |
14544 | done | |
14545 | fi | |
5e030278 | 14546 | |
05ea2a05 TT |
14547 | # Various other checks: |
14548 | if test "x$ax_pthread_ok" = "xyes"; then | |
14549 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14550 | ax_pthread_save_LIBS="$LIBS" | |
14551 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
14552 | LIBS="$PTHREAD_LIBS $LIBS" | |
5e030278 | 14553 | |
05ea2a05 TT |
14554 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
14555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
14556 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
14557 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
14558 | $as_echo_n "(cached) " >&6 | |
14559 | else | |
14560 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
14561 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
14562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14563 | /* end confdefs.h. */ | |
14564 | #include <pthread.h> | |
14565 | int | |
14566 | main () | |
14567 | { | |
14568 | int attr = $ax_pthread_attr; return attr /* ; */ | |
14569 | ; | |
14570 | return 0; | |
14571 | } | |
14572 | _ACEOF | |
14573 | if ac_fn_c_try_link "$LINENO"; then : | |
14574 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
14575 | fi | |
14576 | rm -f core conftest.err conftest.$ac_objext \ | |
14577 | conftest$ac_exeext conftest.$ac_ext | |
14578 | done | |
5e030278 | 14579 | |
05ea2a05 TT |
14580 | fi |
14581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
14582 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
14583 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
14584 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
14585 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
5e030278 | 14586 | |
05ea2a05 TT |
14587 | cat >>confdefs.h <<_ACEOF |
14588 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
14589 | _ACEOF | |
5e030278 | 14590 | |
05ea2a05 | 14591 | ax_pthread_joinable_attr_defined=yes |
5e030278 | 14592 | |
05ea2a05 | 14593 | fi |
5e030278 | 14594 | |
05ea2a05 TT |
14595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 |
14596 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
14597 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
14598 | $as_echo_n "(cached) " >&6 | |
14599 | else | |
14600 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
14601 | case $host_os in | |
14602 | solaris*) | |
14603 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
14604 | ;; | |
14605 | esac | |
5e030278 | 14606 | |
05ea2a05 TT |
14607 | fi |
14608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
14609 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
14610 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
14611 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
14612 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
14613 | ax_pthread_special_flags_added=yes | |
14614 | fi | |
5e030278 | 14615 | |
05ea2a05 TT |
14616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 |
14617 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
14618 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
14619 | $as_echo_n "(cached) " >&6 | |
14620 | else | |
14621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14622 | /* end confdefs.h. */ | |
14623 | #include <pthread.h> | |
14624 | int | |
14625 | main () | |
14626 | { | |
14627 | int i = PTHREAD_PRIO_INHERIT; | |
14628 | ; | |
14629 | return 0; | |
14630 | } | |
14631 | _ACEOF | |
14632 | if ac_fn_c_try_link "$LINENO"; then : | |
14633 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
14634 | else | |
14635 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
14636 | fi | |
14637 | rm -f core conftest.err conftest.$ac_objext \ | |
14638 | conftest$ac_exeext conftest.$ac_ext | |
5e030278 | 14639 | |
05ea2a05 TT |
14640 | fi |
14641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
14642 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
14643 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
14644 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
5e030278 | 14645 | |
05ea2a05 | 14646 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h |
5e030278 | 14647 | |
05ea2a05 | 14648 | ax_pthread_prio_inherit_defined=yes |
5e030278 | 14649 | |
05ea2a05 | 14650 | fi |
5e030278 | 14651 | |
05ea2a05 TT |
14652 | CFLAGS="$ax_pthread_save_CFLAGS" |
14653 | LIBS="$ax_pthread_save_LIBS" | |
5e030278 | 14654 | |
05ea2a05 TT |
14655 | # More AIX lossage: compile with *_r variant |
14656 | if test "x$GCC" != "xyes"; then | |
14657 | case $host_os in | |
14658 | aix*) | |
14659 | case "x/$CC" in #( | |
14660 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
14661 | #handle absolute path differently from PATH based program lookup | |
14662 | case "x$CC" in #( | |
14663 | x/*) : | |
14664 | if as_fn_executable_p ${CC}_r; then : | |
14665 | PTHREAD_CC="${CC}_r" | |
14666 | fi ;; #( | |
14667 | *) : | |
14668 | for ac_prog in ${CC}_r | |
14669 | do | |
14670 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
14671 | set dummy $ac_prog; ac_word=$2 | |
14672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14673 | $as_echo_n "checking for $ac_word... " >&6; } | |
14674 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
14675 | $as_echo_n "(cached) " >&6 | |
14676 | else | |
14677 | if test -n "$PTHREAD_CC"; then | |
14678 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
14679 | else | |
14680 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14681 | for as_dir in $PATH | |
14682 | do | |
14683 | IFS=$as_save_IFS | |
14684 | test -z "$as_dir" && as_dir=. | |
14685 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14686 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14687 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
14688 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14689 | break 2 | |
14690 | fi | |
14691 | done | |
14692 | done | |
14693 | IFS=$as_save_IFS | |
5e030278 | 14694 | |
5e030278 | 14695 | fi |
05ea2a05 TT |
14696 | fi |
14697 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
14698 | if test -n "$PTHREAD_CC"; then | |
14699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
14700 | $as_echo "$PTHREAD_CC" >&6; } | |
14701 | else | |
14702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14703 | $as_echo "no" >&6; } | |
14704 | fi | |
5e030278 | 14705 | |
5e030278 | 14706 | |
05ea2a05 TT |
14707 | test -n "$PTHREAD_CC" && break |
14708 | done | |
14709 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
14710 | ;; | |
14711 | esac ;; #( | |
14712 | *) : | |
14713 | ;; | |
5e030278 | 14714 | esac |
05ea2a05 TT |
14715 | ;; |
14716 | esac | |
14717 | fi | |
14718 | fi | |
5e030278 | 14719 | |
05ea2a05 | 14720 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
5e030278 | 14721 | |
5e030278 | 14722 | |
5e030278 | 14723 | |
5e030278 | 14724 | |
5e030278 | 14725 | |
05ea2a05 TT |
14726 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
14727 | if test "x$ax_pthread_ok" = "xyes"; then | |
14728 | threads=yes | |
14729 | : | |
5e030278 | 14730 | else |
05ea2a05 TT |
14731 | ax_pthread_ok=no |
14732 | threads=no | |
5e030278 | 14733 | fi |
05ea2a05 TT |
14734 | ac_ext=cpp |
14735 | ac_cpp='$CXXCPP $CPPFLAGS' | |
14736 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14737 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14738 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5e030278 | 14739 | |
5e030278 | 14740 | |
05ea2a05 TT |
14741 | if test "$threads" = "yes"; then |
14742 | save_LIBS="$LIBS" | |
14743 | LIBS="$PTHREAD_LIBS $LIBS" | |
14744 | save_CXXFLAGS="$CXXFLAGS" | |
14745 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
14746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
14747 | $as_echo_n "checking for std::thread... " >&6; } | |
14748 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
14749 | $as_echo_n "(cached) " >&6 | |
14750 | else | |
14751 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14752 | /* end confdefs.h. */ |
05ea2a05 TT |
14753 | #include <thread> |
14754 | void callback() { } | |
14755 | int | |
14756 | main () | |
14757 | { | |
14758 | std::thread t(callback); | |
14759 | ; | |
14760 | return 0; | |
14761 | } | |
5e030278 | 14762 | _ACEOF |
05ea2a05 TT |
14763 | if ac_fn_cxx_try_compile "$LINENO"; then : |
14764 | gdb_cv_cxx_std_thread=yes | |
14765 | else | |
14766 | gdb_cv_cxx_std_thread=no | |
5e030278 | 14767 | fi |
05ea2a05 TT |
14768 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
14769 | fi | |
14770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
14771 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
5e030278 | 14772 | |
05ea2a05 TT |
14773 | # This check must be here, while LIBS includes any necessary |
14774 | # threading library. | |
14775 | for ac_func in pthread_sigmask pthread_setname_np | |
14776 | do : | |
14777 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14778 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14779 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
14780 | cat >>confdefs.h <<_ACEOF | |
14781 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14782 | _ACEOF | |
5e030278 TT |
14783 | |
14784 | fi | |
05ea2a05 | 14785 | done |
5e030278 | 14786 | |
5e030278 | 14787 | |
05ea2a05 TT |
14788 | LIBS="$save_LIBS" |
14789 | CXXFLAGS="$save_CXXFLAGS" | |
14790 | fi | |
261b0748 LM |
14791 | |
14792 | if test "$want_threading" = "yes"; then | |
14793 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
5e030278 | 14794 | |
05ea2a05 | 14795 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h |
5e030278 | 14796 | |
261b0748 | 14797 | fi |
05ea2a05 TT |
14798 | fi |
14799 | ac_ext=c | |
14800 | ac_cpp='$CPP $CPPFLAGS' | |
14801 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14802 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14803 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5e030278 | 14804 | |
5e030278 | 14805 | |
05ea2a05 TT |
14806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
14807 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
14808 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
14809 | $as_echo_n "(cached) " >&6 | |
14810 | else | |
14811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14812 | /* end confdefs.h. */ | |
b9442ec1 | 14813 | #include <setjmp.h> |
05ea2a05 TT |
14814 | int |
14815 | main () | |
14816 | { | |
b9442ec1 SM |
14817 | sigjmp_buf env; |
14818 | while (! sigsetjmp (env, 1)) | |
14819 | siglongjmp (env, 1); | |
14820 | ||
05ea2a05 TT |
14821 | ; |
14822 | return 0; | |
14823 | } | |
14824 | _ACEOF | |
14825 | if ac_fn_c_try_compile "$LINENO"; then : | |
14826 | gdb_cv_func_sigsetjmp=yes | |
14827 | else | |
14828 | gdb_cv_func_sigsetjmp=no | |
b9442ec1 | 14829 | |
05ea2a05 TT |
14830 | fi |
14831 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b9442ec1 | 14832 | |
05ea2a05 TT |
14833 | fi |
14834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
14835 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
14836 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 14837 | |
05ea2a05 | 14838 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 14839 | |
05ea2a05 TT |
14840 | fi |
14841 | ||
14842 | ||
14843 | # Check whether --with-intel_pt was given. | |
14844 | if test "${with_intel_pt+set}" = set; then : | |
14845 | withval=$with_intel_pt; | |
5e030278 | 14846 | else |
05ea2a05 | 14847 | with_intel_pt=auto |
5e030278 | 14848 | fi |
05ea2a05 TT |
14849 | |
14850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
14851 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
14852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
14853 | $as_echo "$with_intel_pt" >&6; } | |
14854 | ||
14855 | if test "${with_intel_pt}" = no; then | |
14856 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
14857 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
14858 | HAVE_LIBIPT=no | |
14859 | else | |
14860 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14861 | /* end confdefs.h. */ |
5e030278 | 14862 | |
05ea2a05 TT |
14863 | #include <linux/perf_event.h> |
14864 | #ifndef PERF_ATTR_SIZE_VER5 | |
14865 | # error | |
14866 | #endif | |
5e030278 | 14867 | |
05ea2a05 TT |
14868 | _ACEOF |
14869 | if ac_fn_c_try_cpp "$LINENO"; then : | |
14870 | perf_event=yes | |
14871 | else | |
14872 | perf_event=no | |
5e030278 | 14873 | fi |
05ea2a05 TT |
14874 | rm -f conftest.err conftest.i conftest.$ac_ext |
14875 | if test "$perf_event" != yes; then | |
14876 | if test "$with_intel_pt" = yes; then | |
14877 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
14878 | else | |
14879 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
14880 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
14881 | fi | |
14882 | fi | |
5e030278 | 14883 | |
5e030278 | 14884 | |
5e030278 | 14885 | |
5e030278 | 14886 | |
5e030278 | 14887 | |
5e030278 | 14888 | |
5e030278 | 14889 | |
5e030278 | 14890 | |
5e030278 | 14891 | |
05ea2a05 | 14892 | use_additional=yes |
5e030278 | 14893 | |
05ea2a05 TT |
14894 | acl_save_prefix="$prefix" |
14895 | prefix="$acl_final_prefix" | |
14896 | acl_save_exec_prefix="$exec_prefix" | |
14897 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14898 | |
05ea2a05 TT |
14899 | eval additional_includedir=\"$includedir\" |
14900 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14901 | |
05ea2a05 TT |
14902 | exec_prefix="$acl_save_exec_prefix" |
14903 | prefix="$acl_save_prefix" | |
5e030278 | 14904 | |
5e030278 | 14905 | |
05ea2a05 TT |
14906 | # Check whether --with-libipt-prefix was given. |
14907 | if test "${with_libipt_prefix+set}" = set; then : | |
14908 | withval=$with_libipt_prefix; | |
14909 | if test "X$withval" = "Xno"; then | |
14910 | use_additional=no | |
14911 | else | |
14912 | if test "X$withval" = "X"; then | |
5e030278 | 14913 | |
05ea2a05 TT |
14914 | acl_save_prefix="$prefix" |
14915 | prefix="$acl_final_prefix" | |
14916 | acl_save_exec_prefix="$exec_prefix" | |
14917 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14918 | |
05ea2a05 TT |
14919 | eval additional_includedir=\"$includedir\" |
14920 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14921 | |
05ea2a05 TT |
14922 | exec_prefix="$acl_save_exec_prefix" |
14923 | prefix="$acl_save_prefix" | |
5e030278 | 14924 | |
05ea2a05 TT |
14925 | else |
14926 | additional_includedir="$withval/include" | |
14927 | additional_libdir="$withval/lib" | |
14928 | fi | |
14929 | fi | |
5e030278 TT |
14930 | |
14931 | fi | |
5e030278 | 14932 | |
9f1528a1 AB |
14933 | |
14934 | # Check whether --with-libipt-type was given. | |
14935 | if test "${with_libipt_type+set}" = set; then : | |
14936 | withval=$with_libipt_type; with_libipt_type=$withval | |
14937 | else | |
14938 | with_libipt_type=auto | |
14939 | fi | |
14940 | ||
14941 | lib_type=`eval echo \$with_libipt_type` | |
14942 | ||
05ea2a05 TT |
14943 | LIBIPT= |
14944 | LTLIBIPT= | |
14945 | INCIPT= | |
14946 | rpathdirs= | |
14947 | ltrpathdirs= | |
14948 | names_already_handled= | |
14949 | names_next_round='ipt ' | |
14950 | while test -n "$names_next_round"; do | |
14951 | names_this_round="$names_next_round" | |
14952 | names_next_round= | |
14953 | for name in $names_this_round; do | |
14954 | already_handled= | |
14955 | for n in $names_already_handled; do | |
14956 | if test "$n" = "$name"; then | |
14957 | already_handled=yes | |
14958 | break | |
14959 | fi | |
14960 | done | |
14961 | if test -z "$already_handled"; then | |
14962 | names_already_handled="$names_already_handled $name" | |
14963 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14964 | eval value=\"\$HAVE_LIB$uppername\" | |
14965 | if test -n "$value"; then | |
14966 | if test "$value" = yes; then | |
14967 | eval value=\"\$LIB$uppername\" | |
14968 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
14969 | eval value=\"\$LTLIB$uppername\" | |
14970 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
14971 | else | |
14972 | : | |
14973 | fi | |
14974 | else | |
14975 | found_dir= | |
14976 | found_la= | |
14977 | found_so= | |
14978 | found_a= | |
14979 | if test $use_additional = yes; then | |
9f1528a1 | 14980 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14981 | found_dir="$additional_libdir" |
14982 | found_so="$additional_libdir/lib$name.$shlibext" | |
14983 | if test -f "$additional_libdir/lib$name.la"; then | |
14984 | found_la="$additional_libdir/lib$name.la" | |
14985 | fi | |
9f1528a1 | 14986 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14987 | if test -f "$additional_libdir/lib$name.$libext"; then |
14988 | found_dir="$additional_libdir" | |
14989 | found_a="$additional_libdir/lib$name.$libext" | |
14990 | if test -f "$additional_libdir/lib$name.la"; then | |
14991 | found_la="$additional_libdir/lib$name.la" | |
14992 | fi | |
14993 | fi | |
14994 | fi | |
14995 | fi | |
14996 | if test "X$found_dir" = "X"; then | |
14997 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 14998 | |
05ea2a05 TT |
14999 | acl_save_prefix="$prefix" |
15000 | prefix="$acl_final_prefix" | |
15001 | acl_save_exec_prefix="$exec_prefix" | |
15002 | exec_prefix="$acl_final_exec_prefix" | |
15003 | eval x=\"$x\" | |
15004 | exec_prefix="$acl_save_exec_prefix" | |
15005 | prefix="$acl_save_prefix" | |
5e030278 | 15006 | |
05ea2a05 TT |
15007 | case "$x" in |
15008 | -L*) | |
15009 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 15010 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
15011 | found_dir="$dir" |
15012 | found_so="$dir/lib$name.$shlibext" | |
15013 | if test -f "$dir/lib$name.la"; then | |
15014 | found_la="$dir/lib$name.la" | |
15015 | fi | |
9f1528a1 | 15016 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
15017 | if test -f "$dir/lib$name.$libext"; then |
15018 | found_dir="$dir" | |
15019 | found_a="$dir/lib$name.$libext" | |
15020 | if test -f "$dir/lib$name.la"; then | |
15021 | found_la="$dir/lib$name.la" | |
15022 | fi | |
15023 | fi | |
15024 | fi | |
15025 | ;; | |
15026 | esac | |
15027 | if test "X$found_dir" != "X"; then | |
15028 | break | |
15029 | fi | |
15030 | done | |
15031 | fi | |
15032 | if test "X$found_dir" != "X"; then | |
15033 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
15034 | if test "X$found_so" != "X"; then | |
15035 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
15036 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
15037 | else | |
15038 | haveit= | |
15039 | for x in $ltrpathdirs; do | |
15040 | if test "X$x" = "X$found_dir"; then | |
15041 | haveit=yes | |
15042 | break | |
15043 | fi | |
15044 | done | |
15045 | if test -z "$haveit"; then | |
15046 | ltrpathdirs="$ltrpathdirs $found_dir" | |
15047 | fi | |
15048 | if test "$hardcode_direct" = yes; then | |
15049 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
15050 | else | |
15051 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
15052 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
15053 | haveit= | |
15054 | for x in $rpathdirs; do | |
15055 | if test "X$x" = "X$found_dir"; then | |
15056 | haveit=yes | |
15057 | break | |
15058 | fi | |
15059 | done | |
15060 | if test -z "$haveit"; then | |
15061 | rpathdirs="$rpathdirs $found_dir" | |
15062 | fi | |
15063 | else | |
15064 | haveit= | |
15065 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 15066 | |
05ea2a05 TT |
15067 | acl_save_prefix="$prefix" |
15068 | prefix="$acl_final_prefix" | |
15069 | acl_save_exec_prefix="$exec_prefix" | |
15070 | exec_prefix="$acl_final_exec_prefix" | |
15071 | eval x=\"$x\" | |
15072 | exec_prefix="$acl_save_exec_prefix" | |
15073 | prefix="$acl_save_prefix" | |
5e030278 | 15074 | |
05ea2a05 TT |
15075 | if test "X$x" = "X-L$found_dir"; then |
15076 | haveit=yes | |
15077 | break | |
15078 | fi | |
15079 | done | |
15080 | if test -z "$haveit"; then | |
15081 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
15082 | fi | |
15083 | if test "$hardcode_minus_L" != no; then | |
15084 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
15085 | else | |
15086 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
15087 | fi | |
15088 | fi | |
15089 | fi | |
15090 | fi | |
15091 | else | |
15092 | if test "X$found_a" != "X"; then | |
15093 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
15094 | else | |
15095 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
15096 | fi | |
15097 | fi | |
15098 | additional_includedir= | |
15099 | case "$found_dir" in | |
15100 | */lib | */lib/) | |
15101 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
15102 | additional_includedir="$basedir/include" | |
15103 | ;; | |
15104 | esac | |
15105 | if test "X$additional_includedir" != "X"; then | |
15106 | if test "X$additional_includedir" != "X/usr/include"; then | |
15107 | haveit= | |
15108 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
15109 | if test -n "$GCC"; then | |
15110 | case $host_os in | |
15111 | linux*) haveit=yes;; | |
15112 | esac | |
15113 | fi | |
15114 | fi | |
15115 | if test -z "$haveit"; then | |
15116 | for x in $CPPFLAGS $INCIPT; do | |
5e030278 | 15117 | |
05ea2a05 TT |
15118 | acl_save_prefix="$prefix" |
15119 | prefix="$acl_final_prefix" | |
15120 | acl_save_exec_prefix="$exec_prefix" | |
15121 | exec_prefix="$acl_final_exec_prefix" | |
15122 | eval x=\"$x\" | |
15123 | exec_prefix="$acl_save_exec_prefix" | |
15124 | prefix="$acl_save_prefix" | |
5e030278 | 15125 | |
05ea2a05 TT |
15126 | if test "X$x" = "X-I$additional_includedir"; then |
15127 | haveit=yes | |
15128 | break | |
15129 | fi | |
15130 | done | |
15131 | if test -z "$haveit"; then | |
15132 | if test -d "$additional_includedir"; then | |
15133 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
15134 | fi | |
15135 | fi | |
15136 | fi | |
15137 | fi | |
15138 | fi | |
15139 | if test -n "$found_la"; then | |
15140 | save_libdir="$libdir" | |
15141 | case "$found_la" in | |
15142 | */* | *\\*) . "$found_la" ;; | |
15143 | *) . "./$found_la" ;; | |
15144 | esac | |
15145 | libdir="$save_libdir" | |
15146 | for dep in $dependency_libs; do | |
15147 | case "$dep" in | |
15148 | -L*) | |
15149 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
15150 | if test "X$additional_libdir" != "X/usr/lib"; then | |
15151 | haveit= | |
15152 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
15153 | if test -n "$GCC"; then | |
15154 | case $host_os in | |
15155 | linux*) haveit=yes;; | |
15156 | esac | |
15157 | fi | |
15158 | fi | |
15159 | if test -z "$haveit"; then | |
15160 | haveit= | |
15161 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 15162 | |
05ea2a05 TT |
15163 | acl_save_prefix="$prefix" |
15164 | prefix="$acl_final_prefix" | |
15165 | acl_save_exec_prefix="$exec_prefix" | |
15166 | exec_prefix="$acl_final_exec_prefix" | |
15167 | eval x=\"$x\" | |
15168 | exec_prefix="$acl_save_exec_prefix" | |
15169 | prefix="$acl_save_prefix" | |
5e030278 | 15170 | |
05ea2a05 TT |
15171 | if test "X$x" = "X-L$additional_libdir"; then |
15172 | haveit=yes | |
15173 | break | |
15174 | fi | |
15175 | done | |
15176 | if test -z "$haveit"; then | |
15177 | if test -d "$additional_libdir"; then | |
15178 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
15179 | fi | |
15180 | fi | |
15181 | haveit= | |
15182 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 15183 | |
05ea2a05 TT |
15184 | acl_save_prefix="$prefix" |
15185 | prefix="$acl_final_prefix" | |
15186 | acl_save_exec_prefix="$exec_prefix" | |
15187 | exec_prefix="$acl_final_exec_prefix" | |
15188 | eval x=\"$x\" | |
15189 | exec_prefix="$acl_save_exec_prefix" | |
15190 | prefix="$acl_save_prefix" | |
5e030278 | 15191 | |
05ea2a05 TT |
15192 | if test "X$x" = "X-L$additional_libdir"; then |
15193 | haveit=yes | |
15194 | break | |
15195 | fi | |
15196 | done | |
15197 | if test -z "$haveit"; then | |
15198 | if test -d "$additional_libdir"; then | |
15199 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
15200 | fi | |
15201 | fi | |
15202 | fi | |
15203 | fi | |
15204 | ;; | |
15205 | -R*) | |
15206 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
15207 | if test "$enable_rpath" != no; then | |
15208 | haveit= | |
15209 | for x in $rpathdirs; do | |
15210 | if test "X$x" = "X$dir"; then | |
15211 | haveit=yes | |
15212 | break | |
15213 | fi | |
15214 | done | |
15215 | if test -z "$haveit"; then | |
15216 | rpathdirs="$rpathdirs $dir" | |
15217 | fi | |
15218 | haveit= | |
15219 | for x in $ltrpathdirs; do | |
15220 | if test "X$x" = "X$dir"; then | |
15221 | haveit=yes | |
15222 | break | |
15223 | fi | |
15224 | done | |
15225 | if test -z "$haveit"; then | |
15226 | ltrpathdirs="$ltrpathdirs $dir" | |
15227 | fi | |
15228 | fi | |
15229 | ;; | |
15230 | -l*) | |
15231 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
15232 | ;; | |
15233 | *.la) | |
15234 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
15235 | ;; | |
15236 | *) | |
15237 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
15238 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
15239 | ;; | |
15240 | esac | |
15241 | done | |
15242 | fi | |
15243 | else | |
9f1528a1 AB |
15244 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
15245 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
15246 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
15247 | else | |
15248 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" | |
15249 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" | |
15250 | fi | |
05ea2a05 | 15251 | fi |
5e030278 | 15252 | fi |
05ea2a05 TT |
15253 | fi |
15254 | done | |
15255 | done | |
15256 | if test "X$rpathdirs" != "X"; then | |
15257 | if test -n "$hardcode_libdir_separator"; then | |
15258 | alldirs= | |
15259 | for found_dir in $rpathdirs; do | |
15260 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
15261 | done | |
15262 | acl_save_libdir="$libdir" | |
15263 | libdir="$alldirs" | |
15264 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15265 | libdir="$acl_save_libdir" | |
15266 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
15267 | else | |
15268 | for found_dir in $rpathdirs; do | |
15269 | acl_save_libdir="$libdir" | |
15270 | libdir="$found_dir" | |
15271 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15272 | libdir="$acl_save_libdir" | |
15273 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
15274 | done | |
15275 | fi | |
15276 | fi | |
15277 | if test "X$ltrpathdirs" != "X"; then | |
15278 | for found_dir in $ltrpathdirs; do | |
15279 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
15280 | done | |
15281 | fi | |
5e030278 TT |
15282 | |
15283 | ||
05ea2a05 | 15284 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 15285 | |
05ea2a05 TT |
15286 | for element in $INCIPT; do |
15287 | haveit= | |
15288 | for x in $CPPFLAGS; do | |
5e030278 | 15289 | |
05ea2a05 TT |
15290 | acl_save_prefix="$prefix" |
15291 | prefix="$acl_final_prefix" | |
15292 | acl_save_exec_prefix="$exec_prefix" | |
15293 | exec_prefix="$acl_final_exec_prefix" | |
15294 | eval x=\"$x\" | |
15295 | exec_prefix="$acl_save_exec_prefix" | |
15296 | prefix="$acl_save_prefix" | |
5e030278 | 15297 | |
05ea2a05 TT |
15298 | if test "X$x" = "X$element"; then |
15299 | haveit=yes | |
15300 | break | |
15301 | fi | |
15302 | done | |
15303 | if test -z "$haveit"; then | |
15304 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
15305 | fi | |
15306 | done | |
5e030278 TT |
15307 | |
15308 | ||
05ea2a05 TT |
15309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 |
15310 | $as_echo_n "checking for libipt... " >&6; } | |
15311 | if ${ac_cv_libipt+:} false; then : | |
5e030278 TT |
15312 | $as_echo_n "(cached) " >&6 |
15313 | else | |
05ea2a05 TT |
15314 | |
15315 | ac_save_LIBS="$LIBS" | |
15316 | LIBS="$LIBS $LIBIPT" | |
15317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 15318 | /* end confdefs.h. */ |
05ea2a05 | 15319 | #include "intel-pt.h" |
5e030278 TT |
15320 | int |
15321 | main () | |
15322 | { | |
05ea2a05 | 15323 | pt_insn_alloc_decoder (0); |
5e030278 TT |
15324 | ; |
15325 | return 0; | |
15326 | } | |
15327 | _ACEOF | |
05ea2a05 TT |
15328 | if ac_fn_c_try_link "$LINENO"; then : |
15329 | ac_cv_libipt=yes | |
5e030278 | 15330 | else |
05ea2a05 | 15331 | ac_cv_libipt=no |
5e030278 | 15332 | fi |
05ea2a05 TT |
15333 | rm -f core conftest.err conftest.$ac_objext \ |
15334 | conftest$ac_exeext conftest.$ac_ext | |
15335 | LIBS="$ac_save_LIBS" | |
15336 | ||
5e030278 | 15337 | fi |
05ea2a05 TT |
15338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
15339 | $as_echo "$ac_cv_libipt" >&6; } | |
15340 | if test "$ac_cv_libipt" = yes; then | |
15341 | HAVE_LIBIPT=yes | |
21987b9c | 15342 | |
05ea2a05 TT |
15343 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
15344 | ||
15345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
15346 | $as_echo_n "checking how to link with libipt... " >&6; } | |
15347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
15348 | $as_echo "$LIBIPT" >&6; } | |
15349 | else | |
15350 | HAVE_LIBIPT=no | |
15351 | CPPFLAGS="$ac_save_CPPFLAGS" | |
15352 | LIBIPT= | |
15353 | LTLIBIPT= | |
15354 | fi | |
15355 | ||
15356 | ||
15357 | ||
15358 | ||
15359 | ||
15360 | ||
15361 | if test "$HAVE_LIBIPT" != yes; then | |
15362 | if test "$with_intel_pt" = yes; then | |
15363 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
15364 | else | |
15365 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
15366 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
15367 | fi | |
15368 | else | |
15369 | save_LIBS=$LIBS | |
15370 | LIBS="$LIBS $LIBIPT" | |
15371 | for ac_func in pt_insn_event | |
21987b9c | 15372 | do : |
05ea2a05 TT |
15373 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" |
15374 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
21987b9c | 15375 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 15376 | #define HAVE_PT_INSN_EVENT 1 |
21987b9c TT |
15377 | _ACEOF |
15378 | ||
15379 | fi | |
15380 | done | |
15381 | ||
05ea2a05 TT |
15382 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> |
15383 | " | |
15384 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
21987b9c | 15385 | |
05ea2a05 TT |
15386 | cat >>confdefs.h <<_ACEOF |
15387 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
15388 | _ACEOF | |
5e030278 | 15389 | |
5e030278 | 15390 | |
05ea2a05 TT |
15391 | fi |
15392 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
15393 | " | |
15394 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
15395 | ||
15396 | cat >>confdefs.h <<_ACEOF | |
15397 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
15398 | _ACEOF | |
5e030278 TT |
15399 | |
15400 | ||
05ea2a05 TT |
15401 | fi |
15402 | ||
15403 | LIBS=$save_LIBS | |
15404 | fi | |
15405 | fi | |
15406 | ||
5dfe4bfc TT |
15407 | # Check if the compiler and runtime support printing long longs. |
15408 | ||
15409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 | |
15410 | $as_echo_n "checking for long long support in printf... " >&6; } | |
15411 | if ${gdb_cv_printf_has_long_long+:} false; then : | |
15412 | $as_echo_n "(cached) " >&6 | |
15413 | else | |
15414 | if test "$cross_compiling" = yes; then : | |
15415 | gdb_cv_printf_has_long_long=no | |
15416 | else | |
15417 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15418 | /* end confdefs.h. */ | |
15419 | $ac_includes_default | |
15420 | int | |
15421 | main () | |
15422 | { | |
15423 | char buf[32]; | |
15424 | long long l = 0; | |
15425 | l = (l << 16) + 0x0123; | |
15426 | l = (l << 16) + 0x4567; | |
15427 | l = (l << 16) + 0x89ab; | |
15428 | l = (l << 16) + 0xcdef; | |
15429 | sprintf (buf, "0x%016llx", l); | |
15430 | return (strcmp ("0x0123456789abcdef", buf)); | |
15431 | ; | |
15432 | return 0; | |
15433 | } | |
15434 | _ACEOF | |
15435 | if ac_fn_c_try_run "$LINENO"; then : | |
15436 | gdb_cv_printf_has_long_long=yes | |
15437 | else | |
15438 | gdb_cv_printf_has_long_long=no | |
15439 | fi | |
15440 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
15441 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
15442 | fi | |
15443 | ||
15444 | fi | |
15445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 | |
15446 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
15447 | if test "$gdb_cv_printf_has_long_long" = yes; then | |
15448 | ||
15449 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h | |
15450 | ||
15451 | fi | |
15452 | ||
c8693053 RO |
15453 | |
15454 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h | |
15455 | ||
15456 | for ac_header in sys/procfs.h | |
15457 | do : | |
15458 | ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default" | |
15459 | if test "x$ac_cv_header_sys_procfs_h" = xyes; then : | |
15460 | cat >>confdefs.h <<_ACEOF | |
15461 | #define HAVE_SYS_PROCFS_H 1 | |
15462 | _ACEOF | |
15463 | ||
15464 | fi | |
15465 | ||
15466 | done | |
15467 | ||
05ea2a05 | 15468 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
c8693053 RO |
15469 | |
15470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15471 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } |
15472 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
e9bcb658 GB |
15473 | $as_echo_n "(cached) " >&6 |
15474 | else | |
15475 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15476 | /* end confdefs.h. */ | |
15477 | ||
05ea2a05 | 15478 | #define _SYSCALL32 |
05ea2a05 | 15479 | #include <sys/procfs.h> |
e9bcb658 GB |
15480 | int |
15481 | main () | |
15482 | { | |
05ea2a05 | 15483 | gregset_t avar |
e9bcb658 GB |
15484 | ; |
15485 | return 0; | |
15486 | } | |
15487 | _ACEOF | |
15488 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15489 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
e9bcb658 | 15490 | else |
05ea2a05 | 15491 | bfd_cv_have_sys_procfs_type_gregset_t=no |
54019719 PA |
15492 | |
15493 | fi | |
05ea2a05 | 15494 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
06825bd1 | 15495 | fi |
06825bd1 | 15496 | |
05ea2a05 | 15497 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
a3828db0 | 15498 | |
05ea2a05 | 15499 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
06825bd1 | 15500 | |
05ea2a05 TT |
15501 | fi |
15502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
15503 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
15504 | ||
c8693053 RO |
15505 | |
15506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15507 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } |
15508 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
81ecdfbb | 15509 | $as_echo_n "(cached) " >&6 |
bec39cab | 15510 | else |
81ecdfbb | 15511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15512 | /* end confdefs.h. */ |
05ea2a05 TT |
15513 | |
15514 | #define _SYSCALL32 | |
05ea2a05 | 15515 | #include <sys/procfs.h> |
bec39cab AC |
15516 | int |
15517 | main () | |
15518 | { | |
05ea2a05 | 15519 | fpregset_t avar |
064ef605 DJ |
15520 | ; |
15521 | return 0; | |
15522 | } | |
15523 | _ACEOF | |
9b30624b | 15524 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15525 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
15526 | else | |
15527 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
15528 | ||
15529 | fi | |
15530 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15531 | fi | |
15532 | ||
15533 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
15534 | ||
15535 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
15536 | ||
15537 | fi | |
15538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
15539 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
15540 | ||
c8693053 RO |
15541 | |
15542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15543 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } |
15544 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
15545 | $as_echo_n "(cached) " >&6 | |
064ef605 | 15546 | else |
81ecdfbb | 15547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15548 | /* end confdefs.h. */ |
05ea2a05 TT |
15549 | |
15550 | #define _SYSCALL32 | |
05ea2a05 | 15551 | #include <sys/procfs.h> |
064ef605 DJ |
15552 | int |
15553 | main () | |
15554 | { | |
05ea2a05 | 15555 | prgregset_t avar |
bec39cab AC |
15556 | ; |
15557 | return 0; | |
15558 | } | |
15559 | _ACEOF | |
9b30624b | 15560 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15561 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
70f9f479 | 15562 | else |
05ea2a05 TT |
15563 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
15564 | ||
70f9f479 | 15565 | fi |
81ecdfbb | 15566 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 15567 | fi |
bec39cab | 15568 | |
05ea2a05 | 15569 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
70f9f479 | 15570 | |
05ea2a05 TT |
15571 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
15572 | ||
15573 | fi | |
15574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
15575 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
15576 | ||
c8693053 RO |
15577 | |
15578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15579 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } |
15580 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
81ecdfbb | 15581 | $as_echo_n "(cached) " >&6 |
bec39cab | 15582 | else |
81ecdfbb | 15583 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15584 | /* end confdefs.h. */ |
05ea2a05 TT |
15585 | |
15586 | #define _SYSCALL32 | |
05ea2a05 | 15587 | #include <sys/procfs.h> |
064ef605 DJ |
15588 | int |
15589 | main () | |
15590 | { | |
05ea2a05 | 15591 | prfpregset_t avar |
064ef605 DJ |
15592 | ; |
15593 | return 0; | |
15594 | } | |
15595 | _ACEOF | |
9b30624b | 15596 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15597 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
064ef605 | 15598 | else |
05ea2a05 | 15599 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
064ef605 | 15600 | |
5c7f2947 | 15601 | fi |
81ecdfbb | 15602 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
05ea2a05 TT |
15603 | fi |
15604 | ||
15605 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
15606 | ||
15607 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h | |
15608 | ||
15609 | fi | |
15610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
15611 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
15612 | ||
c8693053 RO |
15613 | |
15614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15615 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } |
15616 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
15617 | $as_echo_n "(cached) " >&6 | |
15618 | else | |
15619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15620 | /* end confdefs.h. */ |
05ea2a05 TT |
15621 | |
15622 | #define _SYSCALL32 | |
05ea2a05 | 15623 | #include <sys/procfs.h> |
bec39cab AC |
15624 | int |
15625 | main () | |
15626 | { | |
05ea2a05 | 15627 | prgregset32_t avar |
bec39cab AC |
15628 | ; |
15629 | return 0; | |
15630 | } | |
15631 | _ACEOF | |
9b30624b | 15632 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15633 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
15634 | else | |
15635 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
a3828db0 | 15636 | |
064ef605 | 15637 | fi |
81ecdfbb | 15638 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 15639 | fi |
96d7229d | 15640 | |
05ea2a05 | 15641 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
78434e59 | 15642 | |
05ea2a05 | 15643 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
78434e59 | 15644 | |
05ea2a05 TT |
15645 | fi |
15646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
15647 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
54019719 | 15648 | |
c8693053 RO |
15649 | |
15650 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15651 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } |
15652 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
81ecdfbb | 15653 | $as_echo_n "(cached) " >&6 |
bec39cab | 15654 | else |
81ecdfbb | 15655 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15656 | /* end confdefs.h. */ |
05ea2a05 TT |
15657 | |
15658 | #define _SYSCALL32 | |
05ea2a05 | 15659 | #include <sys/procfs.h> |
bec39cab AC |
15660 | int |
15661 | main () | |
15662 | { | |
05ea2a05 | 15663 | lwpid_t avar |
bec39cab AC |
15664 | ; |
15665 | return 0; | |
15666 | } | |
15667 | _ACEOF | |
05ea2a05 TT |
15668 | if ac_fn_c_try_compile "$LINENO"; then : |
15669 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
c906108c | 15670 | else |
05ea2a05 TT |
15671 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
15672 | ||
c906108c | 15673 | fi |
05ea2a05 | 15674 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15675 | fi |
81ecdfbb | 15676 | |
05ea2a05 | 15677 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
a3828db0 | 15678 | |
05ea2a05 | 15679 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
97bf5e38 | 15680 | |
05ea2a05 TT |
15681 | fi |
15682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
15683 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
a3828db0 | 15684 | |
c8693053 RO |
15685 | |
15686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15687 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } |
15688 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
81ecdfbb | 15689 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15690 | else |
81ecdfbb | 15691 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15692 | /* end confdefs.h. */ |
a3828db0 | 15693 | |
05ea2a05 | 15694 | #define _SYSCALL32 |
05ea2a05 | 15695 | #include <sys/procfs.h> |
bec39cab AC |
15696 | int |
15697 | main () | |
15698 | { | |
05ea2a05 | 15699 | psaddr_t avar |
bec39cab AC |
15700 | ; |
15701 | return 0; | |
15702 | } | |
15703 | _ACEOF | |
81ecdfbb | 15704 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15705 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 15706 | else |
05ea2a05 TT |
15707 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
15708 | ||
c906108c | 15709 | fi |
81ecdfbb | 15710 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 15711 | fi |
c3f6f71d | 15712 | |
05ea2a05 | 15713 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
c906108c | 15714 | |
05ea2a05 | 15715 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
db1ff28b | 15716 | |
05ea2a05 TT |
15717 | fi |
15718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
15719 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
15720 | ||
c8693053 RO |
15721 | |
15722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15723 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } |
15724 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
db1ff28b JK |
15725 | $as_echo_n "(cached) " >&6 |
15726 | else | |
15727 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15728 | /* end confdefs.h. */ | |
05ea2a05 TT |
15729 | |
15730 | #define _SYSCALL32 | |
05ea2a05 | 15731 | #include <sys/procfs.h> |
db1ff28b JK |
15732 | int |
15733 | main () | |
15734 | { | |
05ea2a05 | 15735 | elf_fpregset_t avar |
db1ff28b JK |
15736 | ; |
15737 | return 0; | |
15738 | } | |
15739 | _ACEOF | |
15740 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15741 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
db1ff28b | 15742 | else |
05ea2a05 TT |
15743 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
15744 | ||
db1ff28b JK |
15745 | fi |
15746 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15747 | fi | |
db1ff28b | 15748 | |
05ea2a05 | 15749 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
db1ff28b | 15750 | |
05ea2a05 | 15751 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
db1ff28b | 15752 | |
05ea2a05 TT |
15753 | fi |
15754 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
15755 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
db1ff28b | 15756 | |
05ea2a05 TT |
15757 | fi |
15758 | ||
15759 | ||
15760 | # Check the return and argument types of ptrace. | |
15761 | ||
15762 | ||
15763 | for ac_header in sys/ptrace.h ptrace.h | |
15764 | do : | |
15765 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
15766 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
15767 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
15768 | cat >>confdefs.h <<_ACEOF | |
15769 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
15770 | _ACEOF | |
db1ff28b JK |
15771 | |
15772 | fi | |
15773 | ||
05ea2a05 TT |
15774 | done |
15775 | ||
81ecdfbb | 15776 | |
05ea2a05 TT |
15777 | gdb_ptrace_headers=' |
15778 | #include <sys/types.h> | |
15779 | #if HAVE_SYS_PTRACE_H | |
15780 | # include <sys/ptrace.h> | |
15781 | #endif | |
15782 | #if HAVE_UNISTD_H | |
15783 | # include <unistd.h> | |
15784 | #endif | |
15785 | ' | |
5c45e068 | 15786 | |
05ea2a05 TT |
15787 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
15788 | # empty argument list, so check for that explicitly. | |
15789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
15790 | $as_echo_n "checking return type of ptrace... " >&6; } | |
15791 | if ${gdb_cv_func_ptrace_ret+:} false; then : | |
81ecdfbb | 15792 | $as_echo_n "(cached) " >&6 |
bec39cab | 15793 | else |
81ecdfbb | 15794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15795 | /* end confdefs.h. */ |
5164c117 | 15796 | Â $gdb_ptrace_headers |
bec39cab AC |
15797 | int |
15798 | main () | |
15799 | { | |
05ea2a05 | 15800 | extern long ptrace (enum __ptrace_request, ...); |
5164c117 | 15801 | |
bec39cab AC |
15802 | ; |
15803 | return 0; | |
15804 | } | |
15805 | _ACEOF | |
81ecdfbb | 15806 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15807 | gdb_cv_func_ptrace_ret='long' |
bec39cab | 15808 | else |
81ecdfbb | 15809 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15810 | /* end confdefs.h. */ |
05ea2a05 | 15811 | $gdb_ptrace_headers |
bec39cab AC |
15812 | int |
15813 | main () | |
15814 | { | |
05ea2a05 | 15815 | extern int ptrace (); |
5164c117 | 15816 | |
bec39cab AC |
15817 | ; |
15818 | return 0; | |
15819 | } | |
15820 | _ACEOF | |
81ecdfbb | 15821 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15822 | gdb_cv_func_ptrace_ret='int' |
27ca5dad | 15823 | else |
05ea2a05 | 15824 | gdb_cv_func_ptrace_ret='long' |
b6fb30ed | 15825 | |
27ca5dad | 15826 | fi |
81ecdfbb | 15827 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15828 | |
27ca5dad | 15829 | fi |
05ea2a05 | 15830 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15831 | |
27ca5dad | 15832 | fi |
05ea2a05 TT |
15833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
15834 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
5c45e068 | 15835 | |
b6fb30ed | 15836 | |
5c45e068 | 15837 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 15838 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret |
bec39cab | 15839 | _ACEOF |
3862412b | 15840 | |
b6fb30ed | 15841 | |
05ea2a05 TT |
15842 | # Check argument types. |
15843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
15844 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
15845 | if ${gdb_cv_func_ptrace_args+:} false; then : | |
15846 | $as_echo_n "(cached) " >&6 | |
15847 | else | |
05ea2a05 TT |
15848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15849 | /* end confdefs.h. */ | |
15850 | $gdb_ptrace_headers | |
15851 | int | |
15852 | main () | |
15853 | { | |
15854 | extern long ptrace (enum __ptrace_request, ...); | |
5164c117 | 15855 | |
05ea2a05 TT |
15856 | ; |
15857 | return 0; | |
15858 | } | |
bec39cab | 15859 | _ACEOF |
05ea2a05 TT |
15860 | if ac_fn_c_try_compile "$LINENO"; then : |
15861 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' | |
15862 | else | |
b6fb30ed SM |
15863 | for gdb_arg1 in 'int' 'long'; do |
15864 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
15865 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
15866 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
15867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
15868 | /* end confdefs.h. */ |
15869 | $gdb_ptrace_headers | |
15870 | int | |
15871 | main () | |
15872 | { | |
b6fb30ed | 15873 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); |
5164c117 | 15874 | |
05ea2a05 TT |
15875 | ; |
15876 | return 0; | |
15877 | } | |
15878 | _ACEOF | |
15879 | if ac_fn_c_try_compile "$LINENO"; then : | |
15880 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | |
b6fb30ed SM |
15881 | break 4; |
15882 | ||
97bf5e38 | 15883 | fi |
05ea2a05 | 15884 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed SM |
15885 | |
15886 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
15887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
15888 | /* end confdefs.h. */ |
15889 | $gdb_ptrace_headers | |
15890 | int | |
15891 | main () | |
15892 | { | |
b6fb30ed | 15893 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); |
5164c117 | 15894 | |
05ea2a05 TT |
15895 | ; |
15896 | return 0; | |
15897 | } | |
6fea9e18 | 15898 | _ACEOF |
05ea2a05 | 15899 | if ac_fn_c_try_compile "$LINENO"; then : |
b6fb30ed SM |
15900 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
15901 | break 5; | |
6fea9e18 | 15902 | |
05ea2a05 TT |
15903 | fi |
15904 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed SM |
15905 | done |
15906 | done | |
15907 | done | |
15908 | done | |
15909 | done | |
15910 | # Provide a safe default value. | |
15911 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
6fea9e18 L |
15912 | |
15913 | fi | |
05ea2a05 | 15914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15915 | |
05ea2a05 TT |
15916 | fi |
15917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
15918 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
b6fb30ed | 15919 | |
05ea2a05 TT |
15920 | ac_save_IFS=$IFS; IFS=',' |
15921 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
15922 | IFS=$ac_save_IFS | |
15923 | shift | |
6fea9e18 L |
15924 | |
15925 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15926 | #define PTRACE_TYPE_ARG1 $1 |
6fea9e18 L |
15927 | _ACEOF |
15928 | ||
15929 | ||
05ea2a05 TT |
15930 | cat >>confdefs.h <<_ACEOF |
15931 | #define PTRACE_TYPE_ARG3 $3 | |
bec39cab | 15932 | _ACEOF |
451928c5 | 15933 | |
60ca704f | 15934 | |
05ea2a05 TT |
15935 | cat >>confdefs.h <<_ACEOF |
15936 | #define PTRACE_TYPE_ARG4 $4 | |
15937 | _ACEOF | |
15938 | ||
15939 | if test -n "$5"; then | |
15940 | ||
15941 | cat >>confdefs.h <<_ACEOF | |
15942 | #define PTRACE_TYPE_ARG5 $5 | |
15943 | _ACEOF | |
451928c5 | 15944 | |
97bf5e38 | 15945 | fi |
451928c5 | 15946 | |
05ea2a05 TT |
15947 | |
15948 | if test "$cross_compiling" = no; then | |
15949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15950 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15951 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15952 | $as_echo_n "(cached) " >&6 |
05ea2a05 TT |
15953 | else |
15954 | if test "$cross_compiling" = yes; then : | |
15955 | as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
451928c5 | 15956 | else |
81ecdfbb | 15957 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15958 | /* end confdefs.h. */ |
05ea2a05 | 15959 | $ac_includes_default |
bec39cab AC |
15960 | int |
15961 | main () | |
15962 | { | |
05ea2a05 TT |
15963 | /* If this system has a BSD-style setpgrp which takes arguments, |
15964 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
15965 | exit successfully. */ | |
15966 | return setpgrp (1,1) != -1; | |
bec39cab AC |
15967 | ; |
15968 | return 0; | |
15969 | } | |
15970 | _ACEOF | |
05ea2a05 TT |
15971 | if ac_fn_c_try_run "$LINENO"; then : |
15972 | ac_cv_func_setpgrp_void=no | |
451928c5 | 15973 | else |
05ea2a05 | 15974 | ac_cv_func_setpgrp_void=yes |
451928c5 | 15975 | fi |
05ea2a05 TT |
15976 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15977 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
451928c5 AC |
15978 | fi |
15979 | ||
05ea2a05 TT |
15980 | fi |
15981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 | |
15982 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15983 | if test $ac_cv_func_setpgrp_void = yes; then | |
60ca704f | 15984 | |
05ea2a05 | 15985 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
451928c5 | 15986 | |
97bf5e38 | 15987 | fi |
451928c5 | 15988 | |
05ea2a05 TT |
15989 | else |
15990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15991 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15992 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15993 | $as_echo_n "(cached) " >&6 |
3862412b | 15994 | else |
81ecdfbb | 15995 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15996 | /* end confdefs.h. */ |
05ea2a05 | 15997 | #include <unistd.h> |
bec39cab AC |
15998 | int |
15999 | main () | |
16000 | { | |
5593a99a SM |
16001 | if (setpgrp(1,1) == -1) |
16002 | exit (0); | |
16003 | else | |
16004 | exit (1); | |
05ea2a05 | 16005 | |
bec39cab AC |
16006 | ; |
16007 | return 0; | |
16008 | } | |
16009 | _ACEOF | |
81ecdfbb | 16010 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16011 | ac_cv_func_setpgrp_void=no |
3862412b | 16012 | else |
05ea2a05 | 16013 | ac_cv_func_setpgrp_void=yes |
5593a99a | 16014 | |
3862412b | 16015 | fi |
81ecdfbb | 16016 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16017 | |
3862412b | 16018 | fi |
05ea2a05 TT |
16019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
16020 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
16021 | if test "$ac_cv_func_setpgrp_void" = yes; then | |
16022 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h | |
3862412b | 16023 | |
05ea2a05 | 16024 | fi |
97bf5e38 | 16025 | fi |
3862412b | 16026 | |
05ea2a05 TT |
16027 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
16028 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
16029 | #include <sys/proc.h> | |
6e9567fe | 16030 | |
e6cdd38e | 16031 | " |
05ea2a05 | 16032 | if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : |
e6cdd38e JB |
16033 | |
16034 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 16035 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
e6cdd38e JB |
16036 | _ACEOF |
16037 | ||
16038 | ||
16039 | fi | |
16040 | ||
6e9567fe | 16041 | |
05ea2a05 TT |
16042 | # See if <sys/lwp.h> defines `struct lwp`. |
16043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 | |
16044 | $as_echo_n "checking for struct lwp... " >&6; } | |
16045 | if ${gdb_cv_struct_lwp+:} false; then : | |
81ecdfbb | 16046 | $as_echo_n "(cached) " >&6 |
596c9d4b | 16047 | else |
81ecdfbb | 16048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16049 | /* end confdefs.h. */ |
05ea2a05 | 16050 | #include <sys/param.h> |
5593a99a SM |
16051 | #define _KMEMUSER |
16052 | #include <sys/lwp.h> | |
bec39cab AC |
16053 | int |
16054 | main () | |
16055 | { | |
05ea2a05 | 16056 | struct lwp l; |
5593a99a | 16057 | |
bec39cab AC |
16058 | ; |
16059 | return 0; | |
16060 | } | |
16061 | _ACEOF | |
81ecdfbb | 16062 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16063 | gdb_cv_struct_lwp=yes |
596c9d4b | 16064 | else |
05ea2a05 | 16065 | gdb_cv_struct_lwp=no |
5593a99a | 16066 | |
596c9d4b | 16067 | fi |
81ecdfbb | 16068 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16069 | |
596c9d4b | 16070 | fi |
05ea2a05 TT |
16071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
16072 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
16073 | if test "$gdb_cv_struct_lwp" = yes; then | |
596c9d4b | 16074 | |
05ea2a05 | 16075 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
596c9d4b | 16076 | |
05ea2a05 | 16077 | fi |
451928c5 | 16078 | |
05ea2a05 TT |
16079 | # See if <machine/reg.h> degines `struct reg'. |
16080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 | |
16081 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
16082 | if ${gdb_cv_struct_reg+:} false; then : | |
81ecdfbb | 16083 | $as_echo_n "(cached) " >&6 |
d84dd0c5 | 16084 | else |
81ecdfbb | 16085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16086 | /* end confdefs.h. */ |
05ea2a05 | 16087 | #include <sys/types.h> |
5593a99a | 16088 | #include <machine/reg.h> |
bec39cab AC |
16089 | int |
16090 | main () | |
16091 | { | |
05ea2a05 | 16092 | struct reg r; |
5593a99a | 16093 | |
bec39cab AC |
16094 | ; |
16095 | return 0; | |
16096 | } | |
16097 | _ACEOF | |
81ecdfbb | 16098 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16099 | gdb_cv_struct_reg=yes |
d84dd0c5 | 16100 | else |
05ea2a05 | 16101 | gdb_cv_struct_reg=no |
5593a99a | 16102 | |
d84dd0c5 | 16103 | fi |
81ecdfbb | 16104 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16105 | |
d84dd0c5 | 16106 | fi |
05ea2a05 TT |
16107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
16108 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
16109 | if test "$gdb_cv_struct_reg" = yes; then | |
d84dd0c5 | 16110 | |
05ea2a05 | 16111 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
bec39cab | 16112 | |
05ea2a05 | 16113 | fi |
d84dd0c5 | 16114 | |
05ea2a05 TT |
16115 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
16116 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
16117 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> | |
16118 | #include <machine/reg.h> | |
16119 | " | |
16120 | if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : | |
d84dd0c5 | 16121 | |
05ea2a05 TT |
16122 | cat >>confdefs.h <<_ACEOF |
16123 | #define HAVE_STRUCT_REG_R_FS 1 | |
16124 | _ACEOF | |
16125 | ||
16126 | ||
16127 | fi | |
16128 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> | |
16129 | #include <machine/reg.h> | |
16130 | " | |
16131 | if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : | |
16132 | ||
16133 | cat >>confdefs.h <<_ACEOF | |
16134 | #define HAVE_STRUCT_REG_R_GS 1 | |
16135 | _ACEOF | |
16136 | ||
16137 | ||
16138 | fi | |
16139 | ||
16140 | ||
05ea2a05 TT |
16141 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
16142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 | |
16143 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
16144 | if ${gdb_cv_have_ptrace_getregs+:} false; then : | |
81ecdfbb | 16145 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16146 | else |
81ecdfbb | 16147 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16148 | /* end confdefs.h. */ |
05ea2a05 | 16149 | #include <sys/ptrace.h> |
bec39cab AC |
16150 | int |
16151 | main () | |
16152 | { | |
05ea2a05 | 16153 | PTRACE_GETREGS; |
bec39cab AC |
16154 | ; |
16155 | return 0; | |
16156 | } | |
16157 | _ACEOF | |
81ecdfbb | 16158 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16159 | gdb_cv_have_ptrace_getregs=yes |
d45fe813 | 16160 | else |
05ea2a05 | 16161 | gdb_cv_have_ptrace_getregs=no |
5593a99a | 16162 | |
d45fe813 | 16163 | fi |
81ecdfbb | 16164 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16165 | |
d45fe813 KB |
16166 | fi |
16167 | ||
05ea2a05 TT |
16168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
16169 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
16170 | if test "$gdb_cv_have_ptrace_getregs" = yes; then | |
bec39cab | 16171 | |
05ea2a05 | 16172 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
d45fe813 | 16173 | |
05ea2a05 | 16174 | fi |
d45fe813 | 16175 | |
05ea2a05 TT |
16176 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
16177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 | |
16178 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
16179 | if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : | |
81ecdfbb | 16180 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16181 | else |
81ecdfbb | 16182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16183 | /* end confdefs.h. */ |
05ea2a05 | 16184 | #include <sys/ptrace.h> |
bec39cab AC |
16185 | int |
16186 | main () | |
16187 | { | |
05ea2a05 | 16188 | PTRACE_GETFPXREGS; |
bec39cab AC |
16189 | ; |
16190 | return 0; | |
16191 | } | |
16192 | _ACEOF | |
81ecdfbb | 16193 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16194 | gdb_cv_have_ptrace_getfpxregs=yes |
d45fe813 | 16195 | else |
05ea2a05 | 16196 | gdb_cv_have_ptrace_getfpxregs=no |
5593a99a | 16197 | |
d45fe813 | 16198 | fi |
81ecdfbb | 16199 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16200 | |
d45fe813 KB |
16201 | fi |
16202 | ||
05ea2a05 TT |
16203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
16204 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
16205 | if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then | |
bec39cab | 16206 | |
05ea2a05 | 16207 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
d45fe813 | 16208 | |
05ea2a05 | 16209 | fi |
d45fe813 | 16210 | |
05ea2a05 TT |
16211 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
16212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 | |
16213 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
16214 | if ${gdb_cv_have_pt_getdbregs+:} false; then : | |
81ecdfbb | 16215 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16216 | else |
81ecdfbb | 16217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16218 | /* end confdefs.h. */ |
05ea2a05 | 16219 | #include <sys/types.h> |
5593a99a | 16220 | #include <sys/ptrace.h> |
bec39cab AC |
16221 | int |
16222 | main () | |
16223 | { | |
05ea2a05 | 16224 | PT_GETDBREGS; |
5593a99a | 16225 | |
bec39cab AC |
16226 | ; |
16227 | return 0; | |
16228 | } | |
16229 | _ACEOF | |
81ecdfbb | 16230 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16231 | gdb_cv_have_pt_getdbregs=yes |
d45fe813 | 16232 | else |
05ea2a05 | 16233 | gdb_cv_have_pt_getdbregs=no |
5593a99a | 16234 | |
d45fe813 | 16235 | fi |
81ecdfbb | 16236 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16237 | |
d45fe813 KB |
16238 | fi |
16239 | ||
05ea2a05 TT |
16240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
16241 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
16242 | if test "$gdb_cv_have_pt_getdbregs" = yes; then | |
bec39cab | 16243 | |
05ea2a05 | 16244 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
d45fe813 | 16245 | |
05ea2a05 | 16246 | fi |
c906108c | 16247 | |
05ea2a05 TT |
16248 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
16249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 | |
16250 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
16251 | if ${gdb_cv_have_pt_getxmmregs+:} false; then : | |
81ecdfbb | 16252 | $as_echo_n "(cached) " >&6 |
c906108c | 16253 | else |
81ecdfbb | 16254 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16255 | /* end confdefs.h. */ |
05ea2a05 | 16256 | #include <sys/types.h> |
5593a99a | 16257 | #include <sys/ptrace.h> |
bec39cab AC |
16258 | int |
16259 | main () | |
16260 | { | |
05ea2a05 | 16261 | PT_GETXMMREGS; |
5593a99a | 16262 | |
bec39cab AC |
16263 | ; |
16264 | return 0; | |
16265 | } | |
16266 | _ACEOF | |
81ecdfbb | 16267 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16268 | gdb_cv_have_pt_getxmmregs=yes |
c906108c | 16269 | else |
05ea2a05 | 16270 | gdb_cv_have_pt_getxmmregs=no |
5593a99a | 16271 | |
c906108c | 16272 | fi |
81ecdfbb | 16273 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16274 | |
c906108c SS |
16275 | fi |
16276 | ||
05ea2a05 TT |
16277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
16278 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
16279 | if test "$gdb_cv_have_pt_getxmmregs" = yes; then | |
bec39cab | 16280 | |
05ea2a05 | 16281 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
c906108c | 16282 | |
05ea2a05 | 16283 | fi |
c906108c | 16284 | |
05ea2a05 TT |
16285 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
16286 | # Older FreeBSD versions don't have the pl_tdname member of | |
16287 | # `struct ptrace_lwpinfo'. | |
16288 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
16289 | " | |
16290 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : | |
43b7e92b | 16291 | |
05ea2a05 TT |
16292 | cat >>confdefs.h <<_ACEOF |
16293 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
43b7e92b | 16294 | _ACEOF |
43b7e92b | 16295 | |
05ea2a05 | 16296 | |
43b7e92b GB |
16297 | fi |
16298 | ||
43b7e92b | 16299 | |
05ea2a05 TT |
16300 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
16301 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
16302 | # FreeBSD 10.3. | |
16303 | 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> | |
16304 | " | |
16305 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : | |
16306 | ||
16307 | cat >>confdefs.h <<_ACEOF | |
16308 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
16309 | _ACEOF | |
43b7e92b | 16310 | |
43b7e92b | 16311 | |
c906108c | 16312 | fi |
c906108c | 16313 | |
05ea2a05 | 16314 | |
bc8bcb4b | 16315 | # Check if the compiler supports the `long long' type. |
c906108c | 16316 | |
81ecdfbb RW |
16317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
16318 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
d0ac1c44 | 16319 | if ${gdb_cv_c_long_long+:} false; then : |
81ecdfbb | 16320 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16321 | else |
81ecdfbb | 16322 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16323 | /* end confdefs.h. */ |
bc8bcb4b | 16324 | extern long long foo; |
bec39cab AC |
16325 | int |
16326 | main () | |
16327 | { | |
bc8bcb4b | 16328 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
16329 | ; |
16330 | return 0; | |
16331 | } | |
16332 | _ACEOF | |
81ecdfbb | 16333 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
16334 | gdb_cv_c_long_long=yes |
16335 | else | |
81ecdfbb | 16336 | gdb_cv_c_long_long=no |
97bf5e38 | 16337 | fi |
81ecdfbb | 16338 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16339 | fi |
81ecdfbb RW |
16340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
16341 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
0ad6b8ee | 16342 | if test "$gdb_cv_c_long_long" != yes; then |
74a0d9f6 | 16343 | # libdecnumber requires long long. |
d0ac1c44 | 16344 | as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 |
97bf5e38 MK |
16345 | fi |
16346 | ||
1a619819 LM |
16347 | # Check if the compiler and runtime support printing decfloats. |
16348 | ||
81ecdfbb RW |
16349 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
16350 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
d0ac1c44 | 16351 | if ${gdb_cv_printf_has_decfloat+:} false; then : |
81ecdfbb | 16352 | $as_echo_n "(cached) " >&6 |
1a619819 | 16353 | else |
81ecdfbb | 16354 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
16355 | gdb_cv_printf_has_decfloat=no |
16356 | else | |
81ecdfbb | 16357 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
16358 | /* end confdefs.h. */ |
16359 | $ac_includes_default | |
16360 | int | |
16361 | main () | |
16362 | { | |
16363 | char buf[64]; | |
16364 | _Decimal32 d32 = 1.2345df; | |
16365 | _Decimal64 d64 = 1.2345dd; | |
16366 | _Decimal128 d128 = 1.2345dl; | |
16367 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
16368 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
16369 | ; | |
16370 | return 0; | |
16371 | } | |
16372 | _ACEOF | |
81ecdfbb | 16373 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
16374 | gdb_cv_printf_has_decfloat=yes |
16375 | else | |
81ecdfbb | 16376 | gdb_cv_printf_has_decfloat=no |
1a619819 | 16377 | fi |
81ecdfbb RW |
16378 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16379 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 16380 | fi |
81ecdfbb | 16381 | |
1a619819 | 16382 | fi |
81ecdfbb RW |
16383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
16384 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
0ad6b8ee | 16385 | if test "$gdb_cv_printf_has_decfloat" = yes; then |
1a619819 | 16386 | |
81ecdfbb | 16387 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
16388 | |
16389 | fi | |
16390 | ||
bc8bcb4b MK |
16391 | # Check if the compiler supports the `long double' type. We can't use |
16392 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
16393 | # constants defined in <float.h> that fail on some systems, | |
16394 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 16395 | |
81ecdfbb RW |
16396 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
16397 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
d0ac1c44 | 16398 | if ${gdb_cv_c_long_double+:} false; then : |
81ecdfbb | 16399 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16400 | else |
81ecdfbb | 16401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16402 | /* end confdefs.h. */ |
97bf5e38 | 16403 | long double foo; |
bec39cab | 16404 | _ACEOF |
81ecdfbb | 16405 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 16406 | gdb_cv_c_long_double=yes |
97bf5e38 | 16407 | else |
81ecdfbb | 16408 | gdb_cv_c_long_double=no |
97bf5e38 | 16409 | fi |
81ecdfbb | 16410 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16411 | fi |
81ecdfbb RW |
16412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
16413 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
0ad6b8ee | 16414 | if test "$gdb_cv_c_long_double" = yes; then |
c906108c | 16415 | |
81ecdfbb | 16416 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16417 | |
16418 | fi | |
16419 | ||
bc8bcb4b | 16420 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 16421 | |
81ecdfbb RW |
16422 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
16423 | $as_echo_n "checking for long double support in printf... " >&6; } | |
d0ac1c44 | 16424 | if ${gdb_cv_printf_has_long_double+:} false; then : |
81ecdfbb | 16425 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16426 | else |
81ecdfbb | 16427 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16428 | gdb_cv_printf_has_long_double=no |
16429 | else | |
81ecdfbb | 16430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16431 | /* end confdefs.h. */ |
bc8bcb4b MK |
16432 | $ac_includes_default |
16433 | int | |
16434 | main () | |
16435 | { | |
16436 | char buf[16]; | |
97bf5e38 MK |
16437 | long double f = 3.141592653; |
16438 | sprintf (buf, "%Lg", f); | |
16439 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
16440 | ; |
16441 | return 0; | |
97bf5e38 | 16442 | } |
bec39cab | 16443 | _ACEOF |
81ecdfbb | 16444 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 16445 | gdb_cv_printf_has_long_double=yes |
c906108c | 16446 | else |
81ecdfbb | 16447 | gdb_cv_printf_has_long_double=no |
c906108c | 16448 | fi |
81ecdfbb RW |
16449 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16450 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 16451 | fi |
81ecdfbb | 16452 | |
c906108c | 16453 | fi |
81ecdfbb RW |
16454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
16455 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
0ad6b8ee | 16456 | if test "$gdb_cv_printf_has_long_double" = yes; then |
bc8bcb4b | 16457 | |
81ecdfbb | 16458 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16459 | |
16460 | fi | |
97bf5e38 | 16461 | |
bc8bcb4b | 16462 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 16463 | |
81ecdfbb RW |
16464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
16465 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
d0ac1c44 | 16466 | if ${gdb_cv_scanf_has_long_double+:} false; then : |
81ecdfbb | 16467 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16468 | else |
81ecdfbb | 16469 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16470 | gdb_cv_scanf_has_long_double=no |
16471 | else | |
81ecdfbb | 16472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16473 | /* end confdefs.h. */ |
bc8bcb4b MK |
16474 | #include <stdio.h> |
16475 | int | |
16476 | main () | |
16477 | { | |
16478 | char *buf = "3.141592653"; | |
97bf5e38 MK |
16479 | long double f = 0; |
16480 | sscanf (buf, "%Lg", &f); | |
16481 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
16482 | ; |
16483 | return 0; | |
97bf5e38 | 16484 | } |
bec39cab | 16485 | _ACEOF |
81ecdfbb | 16486 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
16487 | gdb_cv_scanf_has_long_double=yes |
16488 | else | |
81ecdfbb | 16489 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 16490 | fi |
81ecdfbb RW |
16491 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16492 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 16493 | fi |
81ecdfbb | 16494 | |
c906108c | 16495 | fi |
81ecdfbb RW |
16496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
16497 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
0ad6b8ee | 16498 | if test "$gdb_cv_scanf_has_long_double" = yes; then |
bc8bcb4b | 16499 | |
81ecdfbb | 16500 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16501 | |
16502 | fi | |
c906108c | 16503 | |
438013df AO |
16504 | case ${host_os} in |
16505 | aix*) | |
81ecdfbb RW |
16506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
16507 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d0ac1c44 | 16508 | if ${gdb_cv_bigtoc+:} false; then : |
81ecdfbb | 16509 | $as_echo_n "(cached) " >&6 |
438013df | 16510 | else |
5593a99a | 16511 | SAVE_LDFLAGS=$LDFLAGS |
bec39cab | 16512 | |
5593a99a SM |
16513 | case $GCC in |
16514 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
16515 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
16516 | esac | |
438013df | 16517 | |
5593a99a SM |
16518 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
16519 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16520 | /* end confdefs.h. */ |
438013df | 16521 | |
bec39cab AC |
16522 | int |
16523 | main () | |
16524 | { | |
438013df | 16525 | int i; |
bec39cab AC |
16526 | ; |
16527 | return 0; | |
16528 | } | |
16529 | _ACEOF | |
81ecdfbb | 16530 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16531 | |
81ecdfbb RW |
16532 | else |
16533 | gdb_cv_bigtoc= | |
5593a99a | 16534 | |
438013df | 16535 | fi |
81ecdfbb RW |
16536 | rm -f core conftest.err conftest.$ac_objext \ |
16537 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 16538 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 16539 | |
bec39cab | 16540 | fi |
81ecdfbb RW |
16541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
16542 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
16543 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
16544 | ;; | |
16545 | esac | |
16546 | ||
38f6b338 | 16547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 16548 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
16549 | dynamic_list=false |
16550 | if test "${gdb_native}" = yes; then | |
16551 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
16552 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
16553 | # may not be supported there. | |
16554 | old_LDFLAGS="$LDFLAGS" | |
16555 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
16556 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
16557 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
16558 | if test "${have_libpython}" = no; then | |
16559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
16560 | /* end confdefs.h. */ |
16561 | ||
16562 | int | |
16563 | main () | |
16564 | { | |
16565 | ||
16566 | ; | |
16567 | return 0; | |
16568 | } | |
16569 | _ACEOF | |
16570 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
16571 | dynamic_list=true |
16572 | fi | |
16573 | rm -f core conftest.err conftest.$ac_objext \ | |
16574 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
16575 | else |
16576 | # Workaround http://bugs.python.org/issue4434 where static | |
16577 | # libpythonX.Y.a would get its symbols required for | |
16578 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
16579 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
16580 | |
16581 | # Note the workaround for Python | |
16582 | # http://bugs.python.org/issue10112 earlier has removed | |
16583 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
16584 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
16585 | # always pass. | |
38f6b338 JK |
16586 | old_CFLAGS="$CFLAGS" |
16587 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
16588 | old_LIBS="$LIBS" |
16589 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
16590 | old_CPPFLAGS="$CPPFLAGS" |
16591 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 16592 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 16593 | true |
f6528abd | 16594 | else |
3bebe2f2 JK |
16595 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16596 | /* end confdefs.h. */ | |
1b4f615e | 16597 | #include "Python.h" |
3bebe2f2 JK |
16598 | int |
16599 | main () | |
16600 | { | |
16601 | int err; | |
38f6b338 | 16602 | Py_Initialize (); |
3fed4c0b | 16603 | err = PyRun_SimpleString ("import ctypes\n"); |
38f6b338 JK |
16604 | Py_Finalize (); |
16605 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
16606 | ; |
16607 | return 0; | |
16608 | } | |
16609 | _ACEOF | |
16610 | if ac_fn_c_try_run "$LINENO"; then : | |
16611 | dynamic_list=true | |
16612 | fi | |
16613 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16614 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16615 | fi | |
16616 | ||
8c1fb155 | 16617 | LIBS="$old_LIBS" |
38f6b338 | 16618 | CFLAGS="$old_CFLAGS" |
1b4f615e | 16619 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
16620 | fi |
16621 | LDFLAGS="$old_LDFLAGS" | |
16622 | fi | |
16623 | if $dynamic_list; then | |
16624 | found="-Wl,--dynamic-list" | |
16625 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 16626 | else |
38f6b338 JK |
16627 | found="-rdynamic" |
16628 | RDYNAMIC="-rdynamic" | |
f6528abd | 16629 | fi |
f6528abd | 16630 | |
38f6b338 | 16631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 16632 | $as_echo "$found" >&6; } |
0407b3f1 | 16633 | |
6aa4f97c AB |
16634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether execinfo.h backtrace is available" >&5 |
16635 | $as_echo_n "checking whether execinfo.h backtrace is available... " >&6; } | |
16636 | if ${gdb_cv_execinfo_backtrace+:} false; then : | |
16637 | $as_echo_n "(cached) " >&6 | |
16638 | else | |
16639 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16640 | /* end confdefs.h. */ | |
16641 | ||
16642 | #include <execinfo.h> | |
16643 | ||
16644 | int | |
16645 | main () | |
16646 | { | |
16647 | ||
16648 | int f; | |
16649 | void *b[2]; | |
16650 | f = backtrace (b, 2); | |
16651 | backtrace_symbols_fd (b, f, 2); | |
16652 | ||
16653 | ; | |
16654 | return 0; | |
16655 | } | |
16656 | _ACEOF | |
16657 | if ac_fn_c_try_link "$LINENO"; then : | |
16658 | gdb_cv_execinfo_backtrace=yes | |
16659 | else | |
16660 | gdb_cv_execinfo_backtrace=no | |
16661 | fi | |
16662 | rm -f core conftest.err conftest.$ac_objext \ | |
16663 | conftest$ac_exeext conftest.$ac_ext | |
16664 | fi | |
16665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_execinfo_backtrace" >&5 | |
16666 | $as_echo "$gdb_cv_execinfo_backtrace" >&6; } | |
16667 | if test "$gdb_cv_execinfo_backtrace" = yes; then | |
16668 | ||
16669 | $as_echo "#define HAVE_EXECINFO_BACKTRACE 1" >>confdefs.h | |
16670 | ||
16671 | fi | |
16672 | ||
f6528abd | 16673 | |
0ad6b8ee | 16674 | if test "${build}" = "${host}" -a "${host}" = "${target}" ; then |
c906108c | 16675 | case ${host_os} in |
d92419e5 | 16676 | aix*) |
81ecdfbb RW |
16677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
16678 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
d0ac1c44 | 16679 | if ${gdb_cv_have_aix_thread_debug+:} false; then : |
81ecdfbb | 16680 | $as_echo_n "(cached) " >&6 |
bec39cab | 16681 | else |
81ecdfbb | 16682 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16683 | /* end confdefs.h. */ |
d92419e5 | 16684 | #include <sys/pthdebug.h> |
bec39cab AC |
16685 | int |
16686 | main () | |
16687 | { | |
d92419e5 | 16688 | #ifndef PTHDB_VERSION_3 |
5593a99a SM |
16689 | #error |
16690 | #endif | |
16691 | ||
bec39cab AC |
16692 | ; |
16693 | return 0; | |
16694 | } | |
16695 | _ACEOF | |
81ecdfbb | 16696 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
16697 | gdb_cv_have_aix_thread_debug=yes |
16698 | else | |
81ecdfbb | 16699 | gdb_cv_have_aix_thread_debug=no |
5593a99a | 16700 | |
d92419e5 | 16701 | fi |
81ecdfbb | 16702 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16703 | |
d92419e5 JB |
16704 | fi |
16705 | ||
81ecdfbb RW |
16706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
16707 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
0ad6b8ee | 16708 | if test "$gdb_cv_have_aix_thread_debug" = yes; then |
d92419e5 | 16709 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" |
3483b318 | 16710 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 16711 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
16712 | |
16713 | # Older versions of AIX do not provide the declaration for | |
16714 | # the getthrds function (it appears that it was introduced | |
16715 | # with AIX 6.x). | |
16716 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
16717 | " | |
d0ac1c44 | 16718 | if test "x$ac_cv_have_decl_getthrds" = xyes; then : |
d645e32e JB |
16719 | ac_have_decl=1 |
16720 | else | |
16721 | ac_have_decl=0 | |
16722 | fi | |
16723 | ||
16724 | cat >>confdefs.h <<_ACEOF | |
16725 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
16726 | _ACEOF | |
16727 | ||
d92419e5 JB |
16728 | fi |
16729 | ;; | |
c906108c | 16730 | esac |
bec39cab | 16731 | |
c906108c SS |
16732 | fi |
16733 | ||
3f47be5c | 16734 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
5593a99a | 16735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
81ecdfbb | 16736 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } |
d0ac1c44 | 16737 | if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : |
81ecdfbb | 16738 | $as_echo_n "(cached) " >&6 |
bec39cab | 16739 | else |
81ecdfbb | 16740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16741 | /* end confdefs.h. */ |
3f47be5c | 16742 | #include <thread_db.h> |
bec39cab AC |
16743 | int |
16744 | main () | |
16745 | { | |
3f47be5c | 16746 | int i = TD_NOTALLOC; |
5593a99a | 16747 | |
bec39cab AC |
16748 | ; |
16749 | return 0; | |
16750 | } | |
16751 | _ACEOF | |
81ecdfbb | 16752 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
16753 | gdb_cv_thread_db_h_has_td_notalloc=yes |
16754 | else | |
81ecdfbb | 16755 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 16756 | |
3f47be5c | 16757 | fi |
81ecdfbb | 16758 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 16759 | |
bec39cab | 16760 | fi |
81ecdfbb RW |
16761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
16762 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
5593a99a SM |
16763 | |
16764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
81ecdfbb | 16765 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } |
d0ac1c44 | 16766 | if ${gdb_cv_thread_db_h_has_td_version+:} false; then : |
81ecdfbb | 16767 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16768 | else |
81ecdfbb | 16769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16770 | /* end confdefs.h. */ |
16771 | #include <thread_db.h> | |
16772 | int | |
16773 | main () | |
16774 | { | |
16775 | int i = TD_VERSION; | |
5593a99a | 16776 | |
59f80f10 DJ |
16777 | ; |
16778 | return 0; | |
16779 | } | |
16780 | _ACEOF | |
81ecdfbb | 16781 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16782 | gdb_cv_thread_db_h_has_td_version=yes |
16783 | else | |
81ecdfbb | 16784 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
16785 | |
16786 | fi | |
81ecdfbb | 16787 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16788 | |
16789 | fi | |
81ecdfbb RW |
16790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
16791 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
5593a99a SM |
16792 | |
16793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
81ecdfbb | 16794 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } |
d0ac1c44 | 16795 | if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : |
81ecdfbb | 16796 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16797 | else |
81ecdfbb | 16798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16799 | /* end confdefs.h. */ |
16800 | #include <thread_db.h> | |
16801 | int | |
16802 | main () | |
16803 | { | |
16804 | int i = TD_NOTLS; | |
5593a99a | 16805 | |
59f80f10 DJ |
16806 | ; |
16807 | return 0; | |
16808 | } | |
16809 | _ACEOF | |
81ecdfbb | 16810 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16811 | gdb_cv_thread_db_h_has_td_notls=yes |
16812 | else | |
81ecdfbb | 16813 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
16814 | |
16815 | fi | |
81ecdfbb | 16816 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16817 | |
16818 | fi | |
81ecdfbb RW |
16819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
16820 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
16821 | fi |
16822 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 16823 | |
81ecdfbb | 16824 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 16825 | |
59f80f10 DJ |
16826 | fi |
16827 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
16828 | ||
81ecdfbb | 16829 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
16830 | |
16831 | fi | |
16832 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
16833 | ||
81ecdfbb | 16834 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 16835 | |
3f47be5c EZ |
16836 | fi |
16837 | ||
e655c1a2 PA |
16838 | case $host_os in |
16839 | go32* | *djgpp*) | |
16840 | gdbinit=gdb.ini | |
16841 | ;; | |
16842 | *) | |
16843 | gdbinit=.gdbinit | |
16844 | ;; | |
16845 | esac | |
16846 | ||
16847 | cat >>confdefs.h <<_ACEOF | |
16848 | #define GDBINIT "$gdbinit" | |
16849 | _ACEOF | |
16850 | ||
16851 | ||
fb40c209 | 16852 | |
92e4e97a AB |
16853 | cat >>confdefs.h <<_ACEOF |
16854 | #define GDBEARLYINIT ".gdbearlyinit" | |
16855 | _ACEOF | |
16856 | ||
16857 | ||
16858 | ||
f83d8a90 DE |
16859 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
16860 | # except that the argument to --with-sysroot is optional. | |
16861 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
16862 | if test "x$with_sysroot" = xyes; then | |
16863 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
16864 | fi | |
bec39cab | 16865 | |
81ecdfbb RW |
16866 | # Check whether --with-sysroot was given. |
16867 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
16868 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
16869 | else | |
16870 | TARGET_SYSTEM_ROOT= | |
16871 | fi | |
030292b7 | 16872 | |
030292b7 | 16873 | |
f83d8a90 DE |
16874 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
16875 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16876 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
16877 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 16878 | |
f83d8a90 DE |
16879 | cat >>confdefs.h <<_ACEOF |
16880 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
16881 | _ACEOF | |
bec39cab | 16882 | |
030292b7 | 16883 | |
b14b1491 | 16884 | |
f83d8a90 DE |
16885 | |
16886 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16887 | if test "x$prefix" = xNONE; then | |
16888 | test_prefix=/usr/local | |
16889 | else | |
16890 | test_prefix=$prefix | |
16891 | fi | |
16892 | else | |
16893 | test_prefix=$exec_prefix | |
16894 | fi | |
16895 | value=0 | |
16896 | case ${ac_define_dir} in | |
16897 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16898 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16899 | value=1 | |
16900 | ;; | |
16901 | esac | |
16902 | ||
16903 | cat >>confdefs.h <<_ACEOF | |
16904 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
16905 | _ACEOF | |
030292b7 DJ |
16906 | |
16907 | ||
16908 | ||
16e7150e | 16909 | |
16e7150e | 16910 | |
81ecdfbb RW |
16911 | # Check whether --with-system-gdbinit was given. |
16912 | if test "${with_system_gdbinit+set}" = set; then : | |
16913 | withval=$with_system_gdbinit; | |
b14b1491 TT |
16914 | SYSTEM_GDBINIT=$withval |
16915 | else | |
16916 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
16917 | fi |
16918 | ||
16e7150e JG |
16919 | |
16920 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16921 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 16922 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
16923 | ac_define_dir=`eval echo $ac_define_dir` |
16924 | ||
16925 | cat >>confdefs.h <<_ACEOF | |
16926 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
16927 | _ACEOF | |
16928 | ||
16929 | ||
16930 | ||
0c4a4063 | 16931 | |
b14b1491 TT |
16932 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
16933 | if test "x$prefix" = xNONE; then | |
16934 | test_prefix=/usr/local | |
16935 | else | |
16936 | test_prefix=$prefix | |
16937 | fi | |
16938 | else | |
16939 | test_prefix=$exec_prefix | |
16940 | fi | |
16941 | value=0 | |
16942 | case ${ac_define_dir} in | |
16943 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16944 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16945 | value=1 | |
16946 | ;; | |
16947 | esac | |
16e7150e | 16948 | |
b14b1491 TT |
16949 | cat >>confdefs.h <<_ACEOF |
16950 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
16951 | _ACEOF |
16952 | ||
b14b1491 | 16953 | |
16e7150e | 16954 | |
0c4a4063 | 16955 | |
b835bb52 | 16956 | |
ed2a2229 CB |
16957 | # Check whether --with-system-gdbinit-dir was given. |
16958 | if test "${with_system_gdbinit_dir+set}" = set; then : | |
16959 | withval=$with_system_gdbinit_dir; | |
16960 | SYSTEM_GDBINIT_DIR=$withval | |
16961 | else | |
16962 | SYSTEM_GDBINIT_DIR= | |
16963 | fi | |
16964 | ||
16965 | ||
16966 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16967 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16968 | ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR` | |
16969 | ac_define_dir=`eval echo $ac_define_dir` | |
16970 | ||
16971 | cat >>confdefs.h <<_ACEOF | |
16972 | #define SYSTEM_GDBINIT_DIR "$ac_define_dir" | |
16973 | _ACEOF | |
16974 | ||
16975 | ||
16976 | ||
16977 | ||
16978 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16979 | if test "x$prefix" = xNONE; then | |
16980 | test_prefix=/usr/local | |
16981 | else | |
16982 | test_prefix=$prefix | |
16983 | fi | |
16984 | else | |
16985 | test_prefix=$exec_prefix | |
16986 | fi | |
16987 | value=0 | |
16988 | case ${ac_define_dir} in | |
16989 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16990 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16991 | value=1 | |
16992 | ;; | |
16993 | esac | |
16994 | ||
16995 | cat >>confdefs.h <<_ACEOF | |
16996 | #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value | |
16997 | _ACEOF | |
16998 | ||
16999 | ||
17000 | ||
17001 | ||
17002 | ||
81ecdfbb RW |
17003 | # Check whether --enable-werror was given. |
17004 | if test "${enable_werror+set}" = set; then : | |
17005 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
17006 | yes | y) ERROR_ON_WARNING="yes" ;; |
17007 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 17008 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 17009 | esac |
81ecdfbb RW |
17010 | fi |
17011 | ||
094a342e | 17012 | |
9a084706 PA |
17013 | # Enable -Werror by default when using gcc. Turn it off for releases. |
17014 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
17015 | ERROR_ON_WARNING=yes |
17016 | fi | |
17017 | ||
17018 | WERROR_CFLAGS="" | |
17019 | if test "${ERROR_ON_WARNING}" = yes ; then | |
17020 | WERROR_CFLAGS="-Werror" | |
17021 | fi | |
17022 | ||
cf6de44d | 17023 | # The options we'll try to enable. |
aac331e4 | 17024 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 17025 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
aac331e4 | 17026 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 17027 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 17028 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
7f8a5d38 | 17029 | -Wno-mismatched-tags \ |
632e107b | 17030 | -Wno-error=deprecated-register \ |
85e26832 | 17031 | -Wsuggest-override \ |
1a34f210 | 17032 | -Wimplicit-fallthrough=3 \ |
96643e35 | 17033 | -Wduplicated-cond \ |
33a6bc35 TT |
17034 | -Wshadow=local \ |
17035 | -Wdeprecated-copy \ | |
17036 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 17037 | -Wredundant-move \ |
8ddd8e0e | 17038 | -Wmissing-declarations \ |
a0761e34 | 17039 | -Wmissing-prototypes \ |
898e7f60 SM |
17040 | -Wstrict-null-sentinel \ |
17041 | " | |
3bc3d82a | 17042 | |
3526781e | 17043 | case "${host}" in |
4fa7574e RO |
17044 | *-*-mingw32*) |
17045 | # Enable -Wno-format by default when using gcc on mingw since many | |
17046 | # GCC versions complain about %I64. | |
17047 | build_warnings="$build_warnings -Wno-format" ;; | |
17048 | *-*-solaris*) | |
17049 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
17050 | # doesn't understand. | |
17051 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
17052 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
17053 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
17054 | *) |
17055 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
17056 | # but there's a special case for this below. | |
17057 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
3526781e DJ |
17058 | esac |
17059 | ||
81ecdfbb RW |
17060 | # Check whether --enable-build-warnings was given. |
17061 | if test "${enable_build_warnings+set}" = set; then : | |
17062 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
17063 | yes) ;; |
17064 | no) build_warnings="-w";; | |
17065 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
17066 | build_warnings="${build_warnings} ${t}";; | |
17067 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
17068 | build_warnings="${t} ${build_warnings}";; | |
17069 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
17070 | esac | |
d4f3574e | 17071 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 17072 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 17073 | fi |
81ecdfbb RW |
17074 | fi |
17075 | # Check whether --enable-gdb-build-warnings was given. | |
17076 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
17077 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
17078 | yes) ;; |
17079 | no) build_warnings="-w";; | |
17080 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
17081 | build_warnings="${build_warnings} ${t}";; | |
17082 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
17083 | build_warnings="${t} ${build_warnings}";; | |
17084 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
17085 | esac | |
17086 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
17087 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
17088 | fi | |
81ecdfbb | 17089 | fi |
3bc3d82a PA |
17090 | |
17091 | # The set of warnings supported by a C++ compiler is not the same as | |
17092 | # of the C compiler. | |
cf6de44d | 17093 | ac_ext=cpp |
3bc3d82a PA |
17094 | ac_cpp='$CXXCPP $CPPFLAGS' |
17095 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17096 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17097 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17098 | ||
3bc3d82a | 17099 | |
81ecdfbb | 17100 | WARN_CFLAGS="" |
c906108c SS |
17101 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
17102 | then | |
81ecdfbb RW |
17103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
17104 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
17105 | # Separate out the -Werror flag as some files just cannot be |
17106 | # compiled with it enabled. | |
17107 | for w in ${build_warnings}; do | |
7544db95 PA |
17108 | # GCC does not complain about -Wno-unknown-warning. Invert |
17109 | # and test -Wunknown-warning instead. | |
17110 | case $w in | |
17111 | -Wno-*) | |
17112 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
17113 | -Wformat-nonliteral) |
17114 | # gcc requires -Wformat before -Wformat-nonliteral | |
17115 | # will work, so stick them together. | |
17116 | w="-Wformat $w" | |
17117 | wtest="$w" | |
17118 | ;; | |
7544db95 PA |
17119 | *) |
17120 | wtest=$w ;; | |
17121 | esac | |
17122 | ||
746a987d AC |
17123 | case $w in |
17124 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
17125 | *) |
17126 | # Check whether GCC accepts it. | |
4536bbc6 | 17127 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 17128 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 17129 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 17130 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
17131 | if test "x$w" = "x-Wunused-variable"; then |
17132 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
17133 | # fixed in GCC 4.9. This test is derived from the gdb | |
17134 | # source code that triggered this bug in GCC. | |
17135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17136 | /* end confdefs.h. */ | |
17137 | struct scoped_restore_base {}; | |
864ca435 SM |
17138 | struct scoped_restore_tmpl : public scoped_restore_base { |
17139 | ~scoped_restore_tmpl() {} | |
17140 | }; | |
a0de763e TT |
17141 | int |
17142 | main () | |
17143 | { | |
17144 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
864ca435 | 17145 | |
a0de763e TT |
17146 | ; |
17147 | return 0; | |
17148 | } | |
17149 | _ACEOF | |
17150 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
17151 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
17152 | fi | |
17153 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
17154 | else | |
17155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 17156 | /* end confdefs.h. */ |
4536bbc6 | 17157 | |
bec39cab AC |
17158 | int |
17159 | main () | |
17160 | { | |
4536bbc6 | 17161 | |
bec39cab AC |
17162 | ; |
17163 | return 0; | |
17164 | } | |
17165 | _ACEOF | |
3bc3d82a | 17166 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 17167 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 17168 | fi |
81ecdfbb | 17169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a0de763e | 17170 | fi |
4536bbc6 | 17171 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 17172 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
17173 | esac |
17174 | done | |
81ecdfbb RW |
17175 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
17176 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
17177 | fi |
17178 | ||
17179 | ||
104c1213 | 17180 | |
cf6de44d | 17181 | ac_ext=c |
3bc3d82a PA |
17182 | ac_cpp='$CPP $CPPFLAGS' |
17183 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17184 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17185 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17186 | ||
3bc3d82a | 17187 | |
b835bb52 | 17188 | |
f35d5ade TT |
17189 | # Check whether --enable-ubsan was given. |
17190 | if test "${enable_ubsan+set}" = set; then : | |
17191 | enableval=$enable_ubsan; | |
17192 | else | |
eff98030 | 17193 | enable_ubsan=no |
f35d5ade TT |
17194 | fi |
17195 | ||
17196 | if test "x$enable_ubsan" = xauto; then | |
17197 | if $development; then | |
17198 | enable_ubsan=yes | |
17199 | fi | |
17200 | fi | |
17201 | ac_ext=cpp | |
17202 | ac_cpp='$CXXCPP $CPPFLAGS' | |
17203 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17204 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17205 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17206 | ||
17207 | if test "x$enable_ubsan" = xyes; then | |
17208 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5 | |
17209 | $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; } | |
17210 | saved_CXXFLAGS="$CXXFLAGS" | |
17211 | CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
17212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17213 | /* end confdefs.h. */ | |
17214 | ||
17215 | int | |
17216 | main () | |
17217 | { | |
17218 | ||
17219 | ; | |
17220 | return 0; | |
17221 | } | |
17222 | _ACEOF | |
17223 | if ac_fn_cxx_try_link "$LINENO"; then : | |
17224 | enable_ubsan=yes | |
17225 | else | |
17226 | enable_ubsan=no | |
ad6dba1c | 17227 | |
f35d5ade TT |
17228 | fi |
17229 | rm -f core conftest.err conftest.$ac_objext \ | |
17230 | conftest$ac_exeext conftest.$ac_ext | |
17231 | CXXFLAGS="$saved_CXXFLAGS" | |
17232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 | |
17233 | $as_echo "$enable_ubsan" >&6; } | |
17234 | if test "x$enable_ubsan" = xyes; then | |
17235 | WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
17236 | CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined" | |
17237 | fi | |
17238 | fi | |
17239 | ac_ext=c | |
17240 | ac_cpp='$CPP $CPPFLAGS' | |
17241 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17242 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17243 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17244 | ||
17245 | ||
17246 | ||
7a292a7a | 17247 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
17248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
17249 | $as_echo_n "checking for cygwin... " >&6; } | |
d0ac1c44 | 17250 | if ${gdb_cv_os_cygwin+:} false; then : |
81ecdfbb | 17251 | $as_echo_n "(cached) " >&6 |
bec39cab | 17252 | else |
81ecdfbb | 17253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 17254 | /* end confdefs.h. */ |
7a292a7a SS |
17255 | |
17256 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
17257 | lose | |
17258 | #endif | |
bec39cab | 17259 | _ACEOF |
7a292a7a | 17260 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 17261 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
17262 | gdb_cv_os_cygwin=yes |
17263 | else | |
7a292a7a SS |
17264 | gdb_cv_os_cygwin=no |
17265 | fi | |
17266 | rm -f conftest* | |
17267 | ||
17268 | fi | |
81ecdfbb RW |
17269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
17270 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 17271 | |
aff38e61 | 17272 | |
3eb25fda | 17273 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 17274 | case ${host} in |
95cbc983 AC |
17275 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
17276 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 17277 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
c1168a2f | 17278 | *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;; |
aff38e61 AC |
17279 | esac |
17280 | ||
17281 | ||
cd0fc7c3 SS |
17282 | # libreadline needs libuser32.a in a cygwin environment |
17283 | WIN32LIBS= | |
0ad6b8ee | 17284 | if test x"$gdb_cv_os_cygwin" = xyes; then |
c5394b80 JM |
17285 | WIN32LIBS="-luser32" |
17286 | case "${target}" in | |
17287 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
17288 | ;; | |
17289 | esac | |
cd0fc7c3 | 17290 | fi |
c906108c | 17291 | |
b4505029 | 17292 | # The ser-tcp.c module requires sockets. |
b2ceabe8 TT |
17293 | # Note that WIN32APILIBS is set by GDB_AC_COMMON. |
17294 | WIN32LIBS="$WIN32LIBS $WIN32APILIBS" | |
7a292a7a | 17295 | |
31d99776 | 17296 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
17297 | |
17298 | OLD_CFLAGS=$CFLAGS | |
17299 | OLD_LDFLAGS=$LDFLAGS | |
17300 | OLD_LIBS=$LIBS | |
17301 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
17302 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
17303 | # always want our bfd. | |
17304 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
17305 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
17306 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 17307 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 17308 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 17309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb | 17310 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
d0ac1c44 | 17311 | if ${gdb_cv_var_elf+:} false; then : |
81ecdfbb | 17312 | $as_echo_n "(cached) " >&6 |
31d99776 | 17313 | else |
81ecdfbb | 17314 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
17315 | /* end confdefs.h. */ |
17316 | #include <stdlib.h> | |
b4132322 | 17317 | #include <string.h> |
294f2697 SM |
17318 | #include "bfd.h" |
17319 | #include "elf-bfd.h" | |
31d99776 DJ |
17320 | int |
17321 | main () | |
17322 | { | |
def63ff0 | 17323 | return bfd_get_elf_phdr_upper_bound (NULL); |
294f2697 | 17324 | |
31d99776 DJ |
17325 | ; |
17326 | return 0; | |
17327 | } | |
17328 | _ACEOF | |
81ecdfbb | 17329 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
17330 | gdb_cv_var_elf=yes |
17331 | else | |
81ecdfbb | 17332 | gdb_cv_var_elf=no |
294f2697 | 17333 | |
31d99776 | 17334 | fi |
81ecdfbb RW |
17335 | rm -f core conftest.err conftest.$ac_objext \ |
17336 | conftest$ac_exeext conftest.$ac_ext | |
294f2697 | 17337 | |
31d99776 | 17338 | fi |
81ecdfbb RW |
17339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
17340 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
17341 | CFLAGS=$OLD_CFLAGS |
17342 | LDFLAGS=$OLD_LDFLAGS | |
17343 | LIBS=$OLD_LIBS | |
0ad6b8ee | 17344 | if test "$gdb_cv_var_elf" = yes; then |
fb8f3fc0 AB |
17345 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \ |
17346 | gcore-elf.o elf-none-tdep.o" | |
31d99776 | 17347 | |
81ecdfbb | 17348 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 17349 | |
075ff26d JK |
17350 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
17351 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
17352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
17353 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 17354 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17355 | $as_echo_n "(cached) " >&6 |
17356 | else | |
17357 | ac_func_search_save_LIBS=$LIBS | |
17358 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17359 | /* end confdefs.h. */ | |
17360 | ||
17361 | /* Override any GCC internal prototype to avoid an error. | |
17362 | Use char because int might match the return type of a GCC | |
17363 | builtin and then its argument prototype would still apply. */ | |
17364 | #ifdef __cplusplus | |
17365 | extern "C" | |
17366 | #endif | |
17367 | char dlopen (); | |
17368 | int | |
17369 | main () | |
17370 | { | |
17371 | return dlopen (); | |
17372 | ; | |
17373 | return 0; | |
17374 | } | |
17375 | _ACEOF | |
17376 | for ac_lib in '' dl; do | |
17377 | if test -z "$ac_lib"; then | |
17378 | ac_res="none required" | |
17379 | else | |
17380 | ac_res=-l$ac_lib | |
17381 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
17382 | fi | |
17383 | if ac_fn_c_try_link "$LINENO"; then : | |
17384 | ac_cv_search_dlopen=$ac_res | |
17385 | fi | |
17386 | rm -f core conftest.err conftest.$ac_objext \ | |
17387 | conftest$ac_exeext | |
d0ac1c44 | 17388 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17389 | break |
17390 | fi | |
17391 | done | |
d0ac1c44 | 17392 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17393 | |
17394 | else | |
17395 | ac_cv_search_dlopen=no | |
17396 | fi | |
17397 | rm conftest.$ac_ext | |
17398 | LIBS=$ac_func_search_save_LIBS | |
17399 | fi | |
17400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
17401 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
17402 | ac_res=$ac_cv_search_dlopen | |
17403 | if test "$ac_res" != no; then : | |
17404 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
17405 | ||
17406 | fi | |
17407 | ||
075ff26d | 17408 | fi |
31d99776 | 17409 | fi |
31d99776 | 17410 | |
4f05add4 TT |
17411 | # Add macho support to GDB, but only if BFD includes it. |
17412 | ||
17413 | OLD_CFLAGS=$CFLAGS | |
17414 | OLD_LDFLAGS=$LDFLAGS | |
17415 | OLD_LIBS=$LIBS | |
17416 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
17417 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
17418 | # always want our bfd. | |
17419 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
17420 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
17421 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 17422 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 17423 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
17424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
17425 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
d0ac1c44 | 17426 | if ${gdb_cv_var_macho+:} false; then : |
4f05add4 TT |
17427 | $as_echo_n "(cached) " >&6 |
17428 | else | |
17429 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17430 | /* end confdefs.h. */ | |
17431 | #include <stdlib.h> | |
b4132322 | 17432 | #include <string.h> |
294f2697 SM |
17433 | #include "bfd.h" |
17434 | #include "mach-o.h" | |
4f05add4 TT |
17435 | int |
17436 | main () | |
17437 | { | |
17438 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
294f2697 | 17439 | |
4f05add4 TT |
17440 | ; |
17441 | return 0; | |
17442 | } | |
17443 | _ACEOF | |
17444 | if ac_fn_c_try_link "$LINENO"; then : | |
17445 | gdb_cv_var_macho=yes | |
17446 | else | |
17447 | gdb_cv_var_macho=no | |
294f2697 | 17448 | |
4f05add4 TT |
17449 | fi |
17450 | rm -f core conftest.err conftest.$ac_objext \ | |
17451 | conftest$ac_exeext conftest.$ac_ext | |
294f2697 | 17452 | |
4f05add4 TT |
17453 | fi |
17454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
17455 | $as_echo "$gdb_cv_var_macho" >&6; } | |
17456 | CFLAGS=$OLD_CFLAGS | |
17457 | LDFLAGS=$OLD_LDFLAGS | |
17458 | LIBS=$OLD_LIBS | |
0ad6b8ee | 17459 | if test "$gdb_cv_var_macho" = yes; then |
4f05add4 TT |
17460 | CONFIG_OBS="$CONFIG_OBS machoread.o" |
17461 | fi | |
17462 | ||
121ce6e5 DJ |
17463 | # Add any host-specific objects to GDB. |
17464 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
17465 | ||
608e2dbb | 17466 | # If building on ELF, look for lzma support for embedded compressed debug info. |
0ad6b8ee | 17467 | if test "$gdb_cv_var_elf" = yes; then |
608e2dbb TT |
17468 | |
17469 | # Check whether --with-lzma was given. | |
17470 | if test "${with_lzma+set}" = set; then : | |
17471 | withval=$with_lzma; | |
17472 | else | |
17473 | with_lzma=auto | |
17474 | fi | |
17475 | ||
17476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
17477 | $as_echo_n "checking whether to use lzma... " >&6; } | |
17478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
17479 | $as_echo "$with_lzma" >&6; } | |
17480 | ||
17481 | if test "${with_lzma}" != no; then | |
17482 | ||
17483 | ||
17484 | ||
17485 | ||
17486 | ||
17487 | ||
17488 | ||
17489 | ||
17490 | use_additional=yes | |
17491 | ||
17492 | acl_save_prefix="$prefix" | |
17493 | prefix="$acl_final_prefix" | |
17494 | acl_save_exec_prefix="$exec_prefix" | |
17495 | exec_prefix="$acl_final_exec_prefix" | |
17496 | ||
17497 | eval additional_includedir=\"$includedir\" | |
17498 | eval additional_libdir=\"$libdir\" | |
17499 | ||
17500 | exec_prefix="$acl_save_exec_prefix" | |
17501 | prefix="$acl_save_prefix" | |
17502 | ||
17503 | ||
17504 | # Check whether --with-liblzma-prefix was given. | |
17505 | if test "${with_liblzma_prefix+set}" = set; then : | |
17506 | withval=$with_liblzma_prefix; | |
17507 | if test "X$withval" = "Xno"; then | |
17508 | use_additional=no | |
17509 | else | |
17510 | if test "X$withval" = "X"; then | |
17511 | ||
17512 | acl_save_prefix="$prefix" | |
17513 | prefix="$acl_final_prefix" | |
17514 | acl_save_exec_prefix="$exec_prefix" | |
17515 | exec_prefix="$acl_final_exec_prefix" | |
17516 | ||
17517 | eval additional_includedir=\"$includedir\" | |
17518 | eval additional_libdir=\"$libdir\" | |
17519 | ||
17520 | exec_prefix="$acl_save_exec_prefix" | |
17521 | prefix="$acl_save_prefix" | |
17522 | ||
17523 | else | |
17524 | additional_includedir="$withval/include" | |
17525 | additional_libdir="$withval/lib" | |
17526 | fi | |
17527 | fi | |
17528 | ||
17529 | fi | |
17530 | ||
9f1528a1 AB |
17531 | |
17532 | # Check whether --with-liblzma-type was given. | |
17533 | if test "${with_liblzma_type+set}" = set; then : | |
17534 | withval=$with_liblzma_type; with_liblzma_type=$withval | |
17535 | else | |
17536 | with_liblzma_type=auto | |
17537 | fi | |
17538 | ||
17539 | lib_type=`eval echo \$with_liblzma_type` | |
17540 | ||
608e2dbb TT |
17541 | LIBLZMA= |
17542 | LTLIBLZMA= | |
17543 | INCLZMA= | |
17544 | rpathdirs= | |
17545 | ltrpathdirs= | |
17546 | names_already_handled= | |
17547 | names_next_round='lzma ' | |
17548 | while test -n "$names_next_round"; do | |
17549 | names_this_round="$names_next_round" | |
17550 | names_next_round= | |
17551 | for name in $names_this_round; do | |
17552 | already_handled= | |
17553 | for n in $names_already_handled; do | |
17554 | if test "$n" = "$name"; then | |
17555 | already_handled=yes | |
17556 | break | |
17557 | fi | |
17558 | done | |
17559 | if test -z "$already_handled"; then | |
17560 | names_already_handled="$names_already_handled $name" | |
17561 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17562 | eval value=\"\$HAVE_LIB$uppername\" | |
17563 | if test -n "$value"; then | |
17564 | if test "$value" = yes; then | |
17565 | eval value=\"\$LIB$uppername\" | |
17566 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
17567 | eval value=\"\$LTLIB$uppername\" | |
17568 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
17569 | else | |
17570 | : | |
17571 | fi | |
17572 | else | |
17573 | found_dir= | |
17574 | found_la= | |
17575 | found_so= | |
17576 | found_a= | |
17577 | if test $use_additional = yes; then | |
9f1528a1 | 17578 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17579 | found_dir="$additional_libdir" |
17580 | found_so="$additional_libdir/lib$name.$shlibext" | |
17581 | if test -f "$additional_libdir/lib$name.la"; then | |
17582 | found_la="$additional_libdir/lib$name.la" | |
17583 | fi | |
9f1528a1 | 17584 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17585 | if test -f "$additional_libdir/lib$name.$libext"; then |
17586 | found_dir="$additional_libdir" | |
17587 | found_a="$additional_libdir/lib$name.$libext" | |
17588 | if test -f "$additional_libdir/lib$name.la"; then | |
17589 | found_la="$additional_libdir/lib$name.la" | |
17590 | fi | |
17591 | fi | |
17592 | fi | |
17593 | fi | |
17594 | if test "X$found_dir" = "X"; then | |
17595 | for x in $LDFLAGS $LTLIBLZMA; do | |
17596 | ||
17597 | acl_save_prefix="$prefix" | |
17598 | prefix="$acl_final_prefix" | |
17599 | acl_save_exec_prefix="$exec_prefix" | |
17600 | exec_prefix="$acl_final_exec_prefix" | |
17601 | eval x=\"$x\" | |
17602 | exec_prefix="$acl_save_exec_prefix" | |
17603 | prefix="$acl_save_prefix" | |
17604 | ||
17605 | case "$x" in | |
17606 | -L*) | |
17607 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 17608 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17609 | found_dir="$dir" |
17610 | found_so="$dir/lib$name.$shlibext" | |
17611 | if test -f "$dir/lib$name.la"; then | |
17612 | found_la="$dir/lib$name.la" | |
17613 | fi | |
9f1528a1 | 17614 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17615 | if test -f "$dir/lib$name.$libext"; then |
17616 | found_dir="$dir" | |
17617 | found_a="$dir/lib$name.$libext" | |
17618 | if test -f "$dir/lib$name.la"; then | |
17619 | found_la="$dir/lib$name.la" | |
17620 | fi | |
17621 | fi | |
17622 | fi | |
17623 | ;; | |
17624 | esac | |
17625 | if test "X$found_dir" != "X"; then | |
17626 | break | |
17627 | fi | |
17628 | done | |
17629 | fi | |
17630 | if test "X$found_dir" != "X"; then | |
17631 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
17632 | if test "X$found_so" != "X"; then | |
17633 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17634 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17635 | else | |
17636 | haveit= | |
17637 | for x in $ltrpathdirs; do | |
17638 | if test "X$x" = "X$found_dir"; then | |
17639 | haveit=yes | |
17640 | break | |
17641 | fi | |
17642 | done | |
17643 | if test -z "$haveit"; then | |
17644 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17645 | fi | |
17646 | if test "$hardcode_direct" = yes; then | |
17647 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17648 | else | |
17649 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17650 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17651 | haveit= | |
17652 | for x in $rpathdirs; do | |
17653 | if test "X$x" = "X$found_dir"; then | |
17654 | haveit=yes | |
17655 | break | |
17656 | fi | |
17657 | done | |
17658 | if test -z "$haveit"; then | |
17659 | rpathdirs="$rpathdirs $found_dir" | |
17660 | fi | |
17661 | else | |
17662 | haveit= | |
17663 | for x in $LDFLAGS $LIBLZMA; do | |
17664 | ||
17665 | acl_save_prefix="$prefix" | |
17666 | prefix="$acl_final_prefix" | |
17667 | acl_save_exec_prefix="$exec_prefix" | |
17668 | exec_prefix="$acl_final_exec_prefix" | |
17669 | eval x=\"$x\" | |
17670 | exec_prefix="$acl_save_exec_prefix" | |
17671 | prefix="$acl_save_prefix" | |
17672 | ||
17673 | if test "X$x" = "X-L$found_dir"; then | |
17674 | haveit=yes | |
17675 | break | |
17676 | fi | |
17677 | done | |
17678 | if test -z "$haveit"; then | |
17679 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
17680 | fi | |
17681 | if test "$hardcode_minus_L" != no; then | |
17682 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17683 | else | |
17684 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17685 | fi | |
17686 | fi | |
17687 | fi | |
17688 | fi | |
17689 | else | |
17690 | if test "X$found_a" != "X"; then | |
17691 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
17692 | else | |
17693 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
17694 | fi | |
17695 | fi | |
17696 | additional_includedir= | |
17697 | case "$found_dir" in | |
17698 | */lib | */lib/) | |
17699 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17700 | additional_includedir="$basedir/include" | |
17701 | ;; | |
17702 | esac | |
17703 | if test "X$additional_includedir" != "X"; then | |
17704 | if test "X$additional_includedir" != "X/usr/include"; then | |
17705 | haveit= | |
17706 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17707 | if test -n "$GCC"; then | |
17708 | case $host_os in | |
17709 | linux*) haveit=yes;; | |
17710 | esac | |
17711 | fi | |
17712 | fi | |
17713 | if test -z "$haveit"; then | |
17714 | for x in $CPPFLAGS $INCLZMA; do | |
17715 | ||
17716 | acl_save_prefix="$prefix" | |
17717 | prefix="$acl_final_prefix" | |
17718 | acl_save_exec_prefix="$exec_prefix" | |
17719 | exec_prefix="$acl_final_exec_prefix" | |
17720 | eval x=\"$x\" | |
17721 | exec_prefix="$acl_save_exec_prefix" | |
17722 | prefix="$acl_save_prefix" | |
17723 | ||
17724 | if test "X$x" = "X-I$additional_includedir"; then | |
17725 | haveit=yes | |
17726 | break | |
17727 | fi | |
17728 | done | |
17729 | if test -z "$haveit"; then | |
17730 | if test -d "$additional_includedir"; then | |
17731 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
17732 | fi | |
17733 | fi | |
17734 | fi | |
17735 | fi | |
17736 | fi | |
17737 | if test -n "$found_la"; then | |
17738 | save_libdir="$libdir" | |
17739 | case "$found_la" in | |
17740 | */* | *\\*) . "$found_la" ;; | |
17741 | *) . "./$found_la" ;; | |
17742 | esac | |
17743 | libdir="$save_libdir" | |
17744 | for dep in $dependency_libs; do | |
17745 | case "$dep" in | |
17746 | -L*) | |
17747 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17748 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17749 | haveit= | |
17750 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17751 | if test -n "$GCC"; then | |
17752 | case $host_os in | |
17753 | linux*) haveit=yes;; | |
17754 | esac | |
17755 | fi | |
17756 | fi | |
17757 | if test -z "$haveit"; then | |
17758 | haveit= | |
17759 | for x in $LDFLAGS $LIBLZMA; do | |
17760 | ||
17761 | acl_save_prefix="$prefix" | |
17762 | prefix="$acl_final_prefix" | |
17763 | acl_save_exec_prefix="$exec_prefix" | |
17764 | exec_prefix="$acl_final_exec_prefix" | |
17765 | eval x=\"$x\" | |
17766 | exec_prefix="$acl_save_exec_prefix" | |
17767 | prefix="$acl_save_prefix" | |
17768 | ||
17769 | if test "X$x" = "X-L$additional_libdir"; then | |
17770 | haveit=yes | |
17771 | break | |
17772 | fi | |
17773 | done | |
17774 | if test -z "$haveit"; then | |
17775 | if test -d "$additional_libdir"; then | |
17776 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
17777 | fi | |
17778 | fi | |
17779 | haveit= | |
17780 | for x in $LDFLAGS $LTLIBLZMA; do | |
17781 | ||
17782 | acl_save_prefix="$prefix" | |
17783 | prefix="$acl_final_prefix" | |
17784 | acl_save_exec_prefix="$exec_prefix" | |
17785 | exec_prefix="$acl_final_exec_prefix" | |
17786 | eval x=\"$x\" | |
17787 | exec_prefix="$acl_save_exec_prefix" | |
17788 | prefix="$acl_save_prefix" | |
17789 | ||
17790 | if test "X$x" = "X-L$additional_libdir"; then | |
17791 | haveit=yes | |
17792 | break | |
17793 | fi | |
17794 | done | |
17795 | if test -z "$haveit"; then | |
17796 | if test -d "$additional_libdir"; then | |
17797 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
17798 | fi | |
17799 | fi | |
17800 | fi | |
17801 | fi | |
17802 | ;; | |
17803 | -R*) | |
17804 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17805 | if test "$enable_rpath" != no; then | |
17806 | haveit= | |
17807 | for x in $rpathdirs; do | |
17808 | if test "X$x" = "X$dir"; then | |
17809 | haveit=yes | |
17810 | break | |
17811 | fi | |
17812 | done | |
17813 | if test -z "$haveit"; then | |
17814 | rpathdirs="$rpathdirs $dir" | |
17815 | fi | |
17816 | haveit= | |
17817 | for x in $ltrpathdirs; do | |
17818 | if test "X$x" = "X$dir"; then | |
17819 | haveit=yes | |
17820 | break | |
17821 | fi | |
17822 | done | |
17823 | if test -z "$haveit"; then | |
17824 | ltrpathdirs="$ltrpathdirs $dir" | |
17825 | fi | |
17826 | fi | |
17827 | ;; | |
17828 | -l*) | |
17829 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17830 | ;; | |
17831 | *.la) | |
17832 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17833 | ;; | |
17834 | *) | |
17835 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
17836 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
17837 | ;; | |
17838 | esac | |
17839 | done | |
17840 | fi | |
17841 | else | |
9f1528a1 AB |
17842 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
17843 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17844 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
17845 | else | |
17846 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext" | |
17847 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext" | |
17848 | fi | |
608e2dbb TT |
17849 | fi |
17850 | fi | |
17851 | fi | |
17852 | done | |
17853 | done | |
17854 | if test "X$rpathdirs" != "X"; then | |
17855 | if test -n "$hardcode_libdir_separator"; then | |
17856 | alldirs= | |
17857 | for found_dir in $rpathdirs; do | |
17858 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17859 | done | |
17860 | acl_save_libdir="$libdir" | |
17861 | libdir="$alldirs" | |
17862 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17863 | libdir="$acl_save_libdir" | |
17864 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17865 | else | |
17866 | for found_dir in $rpathdirs; do | |
17867 | acl_save_libdir="$libdir" | |
17868 | libdir="$found_dir" | |
17869 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17870 | libdir="$acl_save_libdir" | |
17871 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17872 | done | |
17873 | fi | |
17874 | fi | |
17875 | if test "X$ltrpathdirs" != "X"; then | |
17876 | for found_dir in $ltrpathdirs; do | |
17877 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
17878 | done | |
17879 | fi | |
17880 | ||
17881 | ||
17882 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17883 | ||
17884 | for element in $INCLZMA; do | |
17885 | haveit= | |
17886 | for x in $CPPFLAGS; do | |
17887 | ||
17888 | acl_save_prefix="$prefix" | |
17889 | prefix="$acl_final_prefix" | |
17890 | acl_save_exec_prefix="$exec_prefix" | |
17891 | exec_prefix="$acl_final_exec_prefix" | |
17892 | eval x=\"$x\" | |
17893 | exec_prefix="$acl_save_exec_prefix" | |
17894 | prefix="$acl_save_prefix" | |
17895 | ||
17896 | if test "X$x" = "X$element"; then | |
17897 | haveit=yes | |
17898 | break | |
17899 | fi | |
17900 | done | |
17901 | if test -z "$haveit"; then | |
17902 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17903 | fi | |
17904 | done | |
17905 | ||
17906 | ||
17907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
17908 | $as_echo_n "checking for liblzma... " >&6; } | |
d0ac1c44 | 17909 | if ${ac_cv_liblzma+:} false; then : |
608e2dbb TT |
17910 | $as_echo_n "(cached) " >&6 |
17911 | else | |
17912 | ||
17913 | ac_save_LIBS="$LIBS" | |
17914 | LIBS="$LIBS $LIBLZMA" | |
17915 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17916 | /* end confdefs.h. */ | |
17917 | #include "lzma.h" | |
17918 | int | |
17919 | main () | |
17920 | { | |
17921 | lzma_index_iter iter; | |
17922 | lzma_index_iter_init (&iter, 0); | |
17923 | lzma_mf_is_supported (LZMA_MF_HC3); | |
17924 | ; | |
17925 | return 0; | |
17926 | } | |
17927 | _ACEOF | |
17928 | if ac_fn_c_try_link "$LINENO"; then : | |
17929 | ac_cv_liblzma=yes | |
17930 | else | |
17931 | ac_cv_liblzma=no | |
17932 | fi | |
17933 | rm -f core conftest.err conftest.$ac_objext \ | |
17934 | conftest$ac_exeext conftest.$ac_ext | |
17935 | LIBS="$ac_save_LIBS" | |
17936 | ||
17937 | fi | |
17938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
17939 | $as_echo "$ac_cv_liblzma" >&6; } | |
17940 | if test "$ac_cv_liblzma" = yes; then | |
17941 | HAVE_LIBLZMA=yes | |
17942 | ||
17943 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
17944 | ||
17945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
17946 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
17947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
17948 | $as_echo "$LIBLZMA" >&6; } | |
17949 | else | |
17950 | HAVE_LIBLZMA=no | |
17951 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17952 | LIBLZMA= | |
17953 | LTLIBLZMA= | |
17954 | fi | |
17955 | ||
17956 | ||
17957 | ||
17958 | ||
17959 | ||
17960 | ||
17961 | if test "$HAVE_LIBLZMA" != yes; then | |
17962 | if test "$with_lzma" = yes; then | |
d0ac1c44 | 17963 | as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 |
608e2dbb TT |
17964 | fi |
17965 | fi | |
17966 | fi | |
17967 | fi | |
17968 | ||
3fc11d3e JM |
17969 | LIBGUI="../libgui/src/libgui.a" |
17970 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
17971 | ||
17972 | ||
7a292a7a | 17973 | |
3fc11d3e JM |
17974 | WIN32LDAPP= |
17975 | ||
17976 | ||
17977 | ||
d91670b9 | 17978 | case "${host}" in |
686a5eed | 17979 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
17980 | configdir="win" |
17981 | ;; | |
17982 | *) | |
17983 | configdir="unix" | |
17984 | ;; | |
17985 | esac | |
3fc11d3e JM |
17986 | |
17987 | GDBTKLIBS= | |
17988 | if test "${enable_gdbtk}" = "yes"; then | |
17989 | ||
d1c3b63a KS |
17990 | # Gdbtk must have an absolute path to srcdir in order to run |
17991 | # properly when not installed. | |
17992 | here=`pwd` | |
17993 | cd ${srcdir} | |
17994 | GDBTK_SRC_DIR=`pwd` | |
17995 | cd $here | |
17996 | ||
bec39cab | 17997 | |
5062cc19 KS |
17998 | # |
17999 | # Ok, lets find the tcl configuration | |
18000 | # First, look for one uninstalled. | |
18001 | # the alternative search directory is invoked by --with-tcl | |
18002 | # | |
3fc11d3e | 18003 | |
5062cc19 KS |
18004 | if test x"${no_tcl}" = x ; then |
18005 | # we reset no_tcl in case something fails here | |
18006 | no_tcl=true | |
bec39cab | 18007 | |
81ecdfbb RW |
18008 | # Check whether --with-tcl was given. |
18009 | if test "${with_tcl+set}" = set; then : | |
18010 | withval=$with_tcl; with_tclconfig=${withval} | |
18011 | fi | |
18012 | ||
18013 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
18014 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
d0ac1c44 | 18015 | if ${ac_cv_c_tclconfig+:} false; then : |
81ecdfbb | 18016 | $as_echo_n "(cached) " >&6 |
3fc11d3e | 18017 | else |
bec39cab | 18018 | |
3fc11d3e | 18019 | |
5062cc19 KS |
18020 | # First check to see if --with-tcl was specified. |
18021 | case "${host}" in | |
18022 | *-*-cygwin*) platDir="win" ;; | |
18023 | *) platDir="unix" ;; | |
18024 | esac | |
18025 | if test x"${with_tclconfig}" != x ; then | |
18026 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
18027 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
18028 | else | |
d0ac1c44 | 18029 | as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
18030 | fi |
18031 | fi | |
18032 | ||
18033 | # then check for a private Tcl installation | |
18034 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
18035 | for i in \ | |
18036 | ../tcl \ | |
18037 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18038 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
18039 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
18040 | ../../tcl \ | |
18041 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18042 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
18043 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
18044 | ../../../tcl \ | |
18045 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18046 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
18047 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
18048 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
18049 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
18050 | break | |
18051 | fi | |
18052 | done | |
18053 | fi | |
18054 | ||
18055 | # on Darwin, check in Framework installation locations | |
18056 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
18057 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
18058 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
18059 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
18060 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
18061 | ; do | |
18062 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
18063 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
18064 | break | |
18065 | fi | |
18066 | done | |
18067 | fi | |
18068 | ||
18069 | # check in a few common install locations | |
18070 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
18071 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
18072 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
18073 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
18074 | `ls -d /usr/local/lib 2>/dev/null` \ | |
18075 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
18076 | `ls -d /usr/lib 2>/dev/null` \ | |
18077 | ; do | |
18078 | if test -f "$i/tclConfig.sh" ; then | |
18079 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
18080 | break | |
18081 | fi | |
18082 | done | |
18083 | fi | |
3fc11d3e | 18084 | |
5062cc19 KS |
18085 | # check in a few other private locations |
18086 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
18087 | for i in \ | |
18088 | ${srcdir}/../tcl \ | |
18089 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18090 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
18091 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
18092 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
18093 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
18094 | break | |
18095 | fi | |
18096 | done | |
18097 | fi | |
bec39cab | 18098 | |
3fc11d3e JM |
18099 | fi |
18100 | ||
5062cc19 KS |
18101 | |
18102 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
18103 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
18104 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
18105 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
18106 | else |
18107 | no_tcl= | |
18108 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
18109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18110 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
18111 | fi |
18112 | fi | |
3fc11d3e | 18113 | |
bec39cab | 18114 | |
85541719 DE |
18115 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
18116 | # point to doing Tcl. | |
bec39cab | 18117 | |
5062cc19 KS |
18118 | # |
18119 | # Ok, lets find the tk configuration | |
18120 | # First, look for one uninstalled. | |
18121 | # the alternative search directory is invoked by --with-tk | |
18122 | # | |
3fc11d3e | 18123 | |
5062cc19 KS |
18124 | if test x"${no_tk}" = x ; then |
18125 | # we reset no_tk in case something fails here | |
18126 | no_tk=true | |
bec39cab | 18127 | |
81ecdfbb RW |
18128 | # Check whether --with-tk was given. |
18129 | if test "${with_tk+set}" = set; then : | |
18130 | withval=$with_tk; with_tkconfig=${withval} | |
18131 | fi | |
18132 | ||
18133 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
18134 | $as_echo_n "checking for Tk configuration... " >&6; } | |
d0ac1c44 | 18135 | if ${ac_cv_c_tkconfig+:} false; then : |
81ecdfbb | 18136 | $as_echo_n "(cached) " >&6 |
bec39cab | 18137 | else |
3fc11d3e JM |
18138 | |
18139 | ||
5062cc19 KS |
18140 | # First check to see if --with-tkconfig was specified. |
18141 | if test x"${with_tkconfig}" != x ; then | |
18142 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
18143 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
18144 | else | |
d0ac1c44 | 18145 | as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
18146 | fi |
18147 | fi | |
3fc11d3e | 18148 | |
5062cc19 KS |
18149 | # then check for a private Tk library |
18150 | case "${host}" in | |
18151 | *-*-cygwin*) platDir="win" ;; | |
18152 | *) platDir="unix" ;; | |
18153 | esac | |
18154 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18155 | for i in \ | |
18156 | ../tk \ | |
18157 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18158 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
18159 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
18160 | ../../tk \ | |
18161 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18162 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
18163 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
18164 | ../../../tk \ | |
18165 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18166 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
18167 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
18168 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
18169 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
18170 | break | |
18171 | fi | |
18172 | done | |
18173 | fi | |
18174 | ||
18175 | # on Darwin, check in Framework installation locations | |
18176 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
18177 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
18178 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
18179 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
18180 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
18181 | ; do | |
18182 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
18183 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
18184 | break | |
18185 | fi | |
18186 | done | |
18187 | fi | |
18188 | ||
18189 | # check in a few common install locations | |
18190 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18191 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
18192 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
18193 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
18194 | `ls -d /usr/local/lib 2>/dev/null` \ | |
18195 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
18196 | `ls -d /usr/lib 2>/dev/null` \ | |
18197 | ; do | |
18198 | if test -f "$i/tkConfig.sh" ; then | |
18199 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
18200 | break | |
18201 | fi | |
18202 | done | |
18203 | fi | |
18204 | # check in a few other private locations | |
18205 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18206 | for i in \ | |
18207 | ${srcdir}/../tk \ | |
18208 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18209 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
18210 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
18211 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
18212 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
18213 | break | |
18214 | fi | |
18215 | done | |
18216 | fi | |
3fc11d3e | 18217 | |
3fc11d3e JM |
18218 | fi |
18219 | ||
18220 | ||
5062cc19 KS |
18221 | if test x"${ac_cv_c_tkconfig}" = x ; then |
18222 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
18223 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
18224 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
18225 | else |
18226 | no_tk= | |
18227 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
18228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18229 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 18230 | fi |
3fc11d3e | 18231 | fi |
dd2504ab | 18232 | |
dd2504ab | 18233 | |
85541719 DE |
18234 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
18235 | ||
81ecdfbb RW |
18236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18237 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
18238 | |
18239 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
18240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
18241 | $as_echo "loading" >&6; } | |
85541719 DE |
18242 | . ${TCL_BIN_DIR}/tclConfig.sh |
18243 | else | |
81ecdfbb RW |
18244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18245 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
18246 | fi |
18247 | ||
18248 | # eval is required to do the TCL_DBGX substitution | |
18249 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
18250 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
18251 | ||
18252 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
18253 | # then set the common variable name to the value of the build variables. | |
18254 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
18255 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
18256 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
18257 | # installed and uninstalled version of Tcl. | |
18258 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
18259 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
18260 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
18261 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
18262 | elif test "`uname -s`" = "Darwin"; then | |
18263 | # If Tcl was built as a framework, attempt to use the libraries | |
18264 | # from the framework at the given location so that linking works | |
a68ffae9 | 18265 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
18266 | case ${TCL_DEFS} in |
18267 | *TCL_FRAMEWORK*) | |
18268 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
18269 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
18270 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
18271 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
18272 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
18273 | break | |
18274 | fi | |
18275 | done | |
18276 | fi | |
18277 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
18278 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
18279 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
18280 | fi | |
18281 | ;; | |
18282 | esac | |
18283 | fi | |
18284 | ||
18285 | # eval is required to do the TCL_DBGX substitution | |
18286 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
18287 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
18288 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
18289 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
18290 | ||
18291 | ||
18292 | ||
18293 | ||
18294 | ||
18295 | ||
18296 | ||
18297 | ||
18298 | ||
18299 | ||
18300 | ||
18301 | ||
18302 | ||
18303 | ||
18304 | ||
18305 | # Check for in-tree tcl | |
18306 | here=`pwd` | |
18307 | cd ${srcdir}/.. | |
18308 | topdir=`pwd` | |
18309 | cd ${here} | |
18310 | ||
18311 | intree="no" | |
18312 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
18313 | intree="yes" | |
18314 | fi | |
18315 | ||
18316 | # Find Tcl private headers | |
18317 | if test x"${intree}" = xno; then | |
18318 | ||
81ecdfbb RW |
18319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
18320 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
18321 | private_dir="" |
18322 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
18323 | if test -f ${dir}/tclInt.h ; then | |
18324 | private_dir=${dir} | |
18325 | fi | |
18326 | ||
18327 | if test x"${private_dir}" = x; then | |
d0ac1c44 | 18328 | as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
18329 | else |
18330 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
18331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
18332 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
18333 | fi |
18334 | ||
18335 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
18336 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
18337 | TCL_DEPS="" | |
18338 | else | |
18339 | # If building tcl in the same src tree, private headers | |
18340 | # are not needed, but we need to be sure to use the right | |
18341 | # headers library | |
18342 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
18343 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
18344 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
18345 | fi | |
18346 | ||
18347 | ||
18348 | ||
18349 | ||
18350 | ||
81ecdfbb RW |
18351 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18352 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 18353 | |
5062cc19 | 18354 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
18355 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
18356 | $as_echo "loading" >&6; } | |
5062cc19 | 18357 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 18358 | else |
81ecdfbb RW |
18359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18360 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 18361 | fi |
bec39cab | 18362 | |
5062cc19 KS |
18363 | # eval is required to do the TK_DBGX substitution |
18364 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
18365 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
18366 | ||
18367 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
18368 | # then set the common variable name to the value of the build variables. | |
18369 | # For example, the variable TK_LIB_SPEC will be set to the value | |
18370 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
18371 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
18372 | # installed and uninstalled version of Tcl. | |
85541719 | 18373 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
18374 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
18375 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
18376 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
18377 | elif test "`uname -s`" = "Darwin"; then | |
18378 | # If Tk was built as a framework, attempt to use the libraries | |
18379 | # from the framework at the given location so that linking works | |
a68ffae9 | 18380 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
18381 | case ${TK_DEFS} in |
18382 | *TK_FRAMEWORK*) | |
85541719 | 18383 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
18384 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
18385 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
18386 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
18387 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
18388 | break | |
18389 | fi | |
18390 | done | |
18391 | fi | |
85541719 | 18392 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
18393 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
18394 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
18395 | fi | |
18396 | ;; | |
18397 | esac | |
3fc11d3e JM |
18398 | fi |
18399 | ||
5062cc19 KS |
18400 | # eval is required to do the TK_DBGX substitution |
18401 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
18402 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
18403 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
18404 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 18405 | |
3fc11d3e JM |
18406 | |
18407 | ||
bec39cab AC |
18408 | |
18409 | ||
18410 | ||
18411 | ||
18412 | ||
18413 | ||
18414 | ||
3fc11d3e | 18415 | |
3fc11d3e | 18416 | |
bec39cab | 18417 | |
bec39cab | 18418 | |
85541719 DE |
18419 | # Check for in-tree Tk |
18420 | intree="no" | |
18421 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
18422 | intree="yes" | |
18423 | fi | |
3fc11d3e | 18424 | |
85541719 DE |
18425 | # Find Tk private headers |
18426 | if test x"${intree}" = xno; then | |
3fc11d3e | 18427 | |
81ecdfbb RW |
18428 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
18429 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
18430 | private_dir="" |
18431 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
18432 | if test -f ${dir}/tkInt.h; then | |
18433 | private_dir=${dir} | |
3fc11d3e | 18434 | fi |
bec39cab | 18435 | |
5062cc19 | 18436 | if test x"${private_dir}" = x; then |
d0ac1c44 | 18437 | as_fn_error $? "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 18438 | else |
5062cc19 | 18439 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
18440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
18441 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 18442 | fi |
3fc11d3e | 18443 | |
85541719 DE |
18444 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
18445 | TK_LIBRARY=${TK_LIB_SPEC} | |
18446 | TK_DEPS="" | |
18447 | else | |
18448 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
18449 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
18450 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
18451 | fi | |
3fc11d3e JM |
18452 | |
18453 | ||
3fc11d3e JM |
18454 | |
18455 | ||
3fc11d3e | 18456 | |
85541719 | 18457 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 18458 | |
85541719 DE |
18459 | # Include some libraries that Tcl and Tk want. |
18460 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
18461 | # Yes, the ordering seems wrong here. But it isn't. | |
18462 | # TK_LIBS is the list of libraries that need to be linked | |
18463 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
18464 | # were in LIBS then any link tests after this point would | |
18465 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
18466 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 18467 | |
85541719 DE |
18468 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
18469 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
18470 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
18471 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
18472 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
18473 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
18474 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 18475 | |
0ad6b8ee | 18476 | if test x"$gdb_cv_os_cygwin" = xyes; then |
85541719 DE |
18477 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" |
18478 | WIN32LDAPP="-Wl,--subsystem,console" | |
18479 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 18480 | fi |
ffc6a242 | 18481 | |
a100a945 | 18482 | subdirs="$subdirs gdbtk" |
3ace7edb | 18483 | |
85541719 | 18484 | fi |
3fc11d3e JM |
18485 | fi |
18486 | ||
18487 | ||
18488 | ||
18489 | ||
18490 | ||
18491 | ||
18492 | ||
18493 | ||
81ecdfbb RW |
18494 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
18495 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 18496 | |
c906108c | 18497 | |
81ecdfbb RW |
18498 | # Check whether --with-x was given. |
18499 | if test "${with_x+set}" = set; then : | |
18500 | withval=$with_x; | |
18501 | fi | |
c906108c SS |
18502 | |
18503 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
18504 | if test "x$with_x" = xno; then | |
18505 | # The user explicitly disabled X. | |
18506 | have_x=disabled | |
18507 | else | |
81ecdfbb | 18508 | case $x_includes,$x_libraries in #( |
d0ac1c44 SM |
18509 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
18510 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
81ecdfbb | 18511 | $as_echo_n "(cached) " >&6 |
c906108c SS |
18512 | else |
18513 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 18514 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 18515 | rm -f -r conftest.dir |
bec39cab AC |
18516 | if mkdir conftest.dir; then |
18517 | cd conftest.dir | |
bec39cab | 18518 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
18519 | incroot: |
18520 | @echo incroot='${INCROOT}' | |
18521 | usrlibdir: | |
18522 | @echo usrlibdir='${USRLIBDIR}' | |
18523 | libdir: | |
18524 | @echo libdir='${LIBDIR}' | |
18525 | _ACEOF | |
18526 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
d0ac1c44 | 18527 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
81ecdfbb RW |
18528 | for ac_var in incroot usrlibdir libdir; do |
18529 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
18530 | done | |
c906108c | 18531 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
18532 | for ac_extension in a so sl dylib la dll; do |
18533 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
18534 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 18535 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
18536 | fi |
18537 | done | |
18538 | # Screen out bogus values from the imake configuration. They are | |
18539 | # bogus both because they are the default anyway, and because | |
18540 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 18541 | case $ac_im_incroot in |
81ecdfbb | 18542 | /usr/include) ac_x_includes= ;; |
bec39cab | 18543 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 18544 | esac |
bec39cab | 18545 | case $ac_im_usrlibdir in |
81ecdfbb | 18546 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 18547 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
18548 | esac |
18549 | fi | |
18550 | cd .. | |
81ecdfbb | 18551 | rm -f -r conftest.dir |
c906108c SS |
18552 | fi |
18553 | ||
bec39cab AC |
18554 | # Standard set of common directories for X headers. |
18555 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
18556 | ac_x_header_dirs=' | |
18557 | /usr/X11/include | |
81ecdfbb | 18558 | /usr/X11R7/include |
bec39cab AC |
18559 | /usr/X11R6/include |
18560 | /usr/X11R5/include | |
18561 | /usr/X11R4/include | |
18562 | ||
18563 | /usr/include/X11 | |
81ecdfbb | 18564 | /usr/include/X11R7 |
bec39cab AC |
18565 | /usr/include/X11R6 |
18566 | /usr/include/X11R5 | |
18567 | /usr/include/X11R4 | |
18568 | ||
18569 | /usr/local/X11/include | |
81ecdfbb | 18570 | /usr/local/X11R7/include |
bec39cab AC |
18571 | /usr/local/X11R6/include |
18572 | /usr/local/X11R5/include | |
18573 | /usr/local/X11R4/include | |
18574 | ||
18575 | /usr/local/include/X11 | |
81ecdfbb | 18576 | /usr/local/include/X11R7 |
bec39cab AC |
18577 | /usr/local/include/X11R6 |
18578 | /usr/local/include/X11R5 | |
18579 | /usr/local/include/X11R4 | |
18580 | ||
18581 | /usr/X386/include | |
18582 | /usr/x386/include | |
18583 | /usr/XFree86/include/X11 | |
18584 | ||
18585 | /usr/include | |
18586 | /usr/local/include | |
18587 | /usr/unsupported/include | |
18588 | /usr/athena/include | |
18589 | /usr/local/x11r5/include | |
18590 | /usr/lpp/Xamples/include | |
18591 | ||
18592 | /usr/openwin/include | |
18593 | /usr/openwin/share/include' | |
18594 | ||
18595 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 18596 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 18597 | # First, try using that file with no special directory specified. |
81ecdfbb | 18598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 18599 | /* end confdefs.h. */ |
81ecdfbb | 18600 | #include <X11/Xlib.h> |
bec39cab | 18601 | _ACEOF |
81ecdfbb | 18602 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
18603 | # We can compile using X headers with no special include directory. |
18604 | ac_x_includes= | |
18605 | else | |
bec39cab | 18606 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 18607 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
18608 | ac_x_includes=$ac_dir |
18609 | break | |
18610 | fi | |
18611 | done | |
c906108c | 18612 | fi |
d0ac1c44 | 18613 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 18614 | fi # $ac_x_includes = no |
c906108c | 18615 | |
bec39cab | 18616 | if test "$ac_x_libraries" = no; then |
c906108c | 18617 | # Check for the libraries. |
c906108c SS |
18618 | # See if we find them without any special options. |
18619 | # Don't add to $LIBS permanently. | |
bec39cab | 18620 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
18621 | LIBS="-lX11 $LIBS" |
18622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 18623 | /* end confdefs.h. */ |
81ecdfbb | 18624 | #include <X11/Xlib.h> |
bec39cab AC |
18625 | int |
18626 | main () | |
18627 | { | |
81ecdfbb | 18628 | XrmInitialize () |
bec39cab AC |
18629 | ; |
18630 | return 0; | |
18631 | } | |
18632 | _ACEOF | |
81ecdfbb | 18633 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 18634 | LIBS=$ac_save_LIBS |
c906108c SS |
18635 | # We can link X programs with no special library path. |
18636 | ac_x_libraries= | |
18637 | else | |
81ecdfbb RW |
18638 | LIBS=$ac_save_LIBS |
18639 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 18640 | do |
bec39cab | 18641 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
18642 | for ac_extension in a so sl dylib la dll; do |
18643 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
18644 | ac_x_libraries=$ac_dir |
18645 | break 2 | |
18646 | fi | |
18647 | done | |
18648 | done | |
18649 | fi | |
81ecdfbb RW |
18650 | rm -f core conftest.err conftest.$ac_objext \ |
18651 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 18652 | fi # $ac_x_libraries = no |
c906108c | 18653 | |
81ecdfbb RW |
18654 | case $ac_x_includes,$ac_x_libraries in #( |
18655 | no,* | *,no | *\'*) | |
18656 | # Didn't find X, or a directory has "'" in its name. | |
18657 | ac_cv_have_x="have_x=no";; #( | |
18658 | *) | |
18659 | # Record where we found X for the cache. | |
18660 | ac_cv_have_x="have_x=yes\ | |
18661 | ac_x_includes='$ac_x_includes'\ | |
18662 | ac_x_libraries='$ac_x_libraries'" | |
18663 | esac | |
c906108c | 18664 | fi |
81ecdfbb RW |
18665 | ;; #( |
18666 | *) have_x=yes;; | |
18667 | esac | |
c906108c SS |
18668 | eval "$ac_cv_have_x" |
18669 | fi # $with_x != no | |
18670 | ||
18671 | if test "$have_x" != yes; then | |
81ecdfbb RW |
18672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
18673 | $as_echo "$have_x" >&6; } | |
c906108c SS |
18674 | no_x=yes |
18675 | else | |
18676 | # If each of the values was on the command line, it overrides each guess. | |
18677 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
18678 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
18679 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
18680 | ac_cv_have_x="have_x=yes\ |
18681 | ac_x_includes='$x_includes'\ | |
18682 | ac_x_libraries='$x_libraries'" | |
18683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
18684 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
18685 | fi |
18686 | ||
18687 | ||
bec39cab | 18688 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 18689 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
18690 | # This code just checks for a few cases where we'd like to ignore those |
18691 | # definitions, even when they're present in the '.mt' file. These cases | |
18692 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 18693 | # not part of the source tree. |
7a292a7a | 18694 | # |
81ecdfbb RW |
18695 | # Check whether --enable-sim was given. |
18696 | if test "${enable_sim+set}" = set; then : | |
18697 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
18698 | echo "enableval = ${enableval}"; |
18699 | case "${enableval}" in | |
18700 | yes) ignore_sim=false ;; | |
18701 | no) ignore_sim=true ;; | |
18702 | *) ignore_sim=false ;; | |
18703 | esac | |
18704 | else | |
18705 | ignore_sim=false | |
81ecdfbb RW |
18706 | fi |
18707 | ||
7a292a7a SS |
18708 | |
18709 | if test ! -d "${srcdir}/../sim"; then | |
18710 | ignore_sim=true | |
18711 | fi | |
18712 | ||
9b624dbe UW |
18713 | SIM= |
18714 | SIM_OBS= | |
18715 | if test "${ignore_sim}" = "false"; then | |
18716 | if test x"${gdb_sim}" != x ; then | |
18717 | SIM="${gdb_sim}" | |
18718 | SIM_OBS="remote-sim.o" | |
60ca704f | 18719 | |
81ecdfbb | 18720 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 18721 | |
976102cd PA |
18722 | |
18723 | # Some tdep code should only be compiled in when the ppc sim is | |
18724 | # built. PR sim/13418. | |
18725 | case $target in | |
18726 | powerpc*-*-*) | |
18727 | ||
18728 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
18729 | ||
18730 | ;; | |
18731 | esac | |
9b624dbe | 18732 | fi |
7a292a7a SS |
18733 | fi |
18734 | ||
18735 | ||
18736 | ||
c906108c SS |
18737 | |
18738 | ||
18739 | ||
18740 | ||
18741 | ||
18742 | ||
dfcd3bfb | 18743 | |
e56ac5c3 AC |
18744 | |
18745 | ||
b3a90332 AC |
18746 | |
18747 | ||
c35f4ffc | 18748 | # List of host floatformats. |
bec39cab AC |
18749 | |
18750 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18751 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 18752 | _ACEOF |
c35f4ffc | 18753 | |
bec39cab AC |
18754 | |
18755 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18756 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
18757 | _ACEOF |
18758 | ||
c35f4ffc | 18759 | |
bec39cab | 18760 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 18761 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 18762 | _ACEOF |
c35f4ffc AC |
18763 | |
18764 | ||
c906108c SS |
18765 | # target_subdir is used by the testsuite to find the target libraries. |
18766 | target_subdir= | |
18767 | if test "${host}" != "${target}"; then | |
18768 | target_subdir="${target_alias}/" | |
18769 | fi | |
18770 | ||
18771 | ||
21ea5acd | 18772 | # Import nat definitions. |
2b351b19 | 18773 | nat_makefile_frag=/dev/null |
771b4502 | 18774 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
18775 | . ${srcdir}/configure.nat |
18776 | nativefile=$NAT_FILE | |
c906108c | 18777 | fi |
c906108c | 18778 | |
c906108c SS |
18779 | |
18780 | ||
18781 | ||
21ea5acd SDJ |
18782 | |
18783 | ||
18784 | ||
18785 | ||
18786 | ||
c906108c SS |
18787 | |
18788 | ||
b00a8037 | 18789 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
18790 | |
18791 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 18792 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 18793 | _ACEOF |
b00a8037 DJ |
18794 | |
18795 | fi | |
18796 | ||
abbbd4a3 AB |
18797 | # Setup possible use of libbacktrace. |
18798 | # Check whether --enable-libbacktrace was given. | |
18799 | if test "${enable_libbacktrace+set}" = set; then : | |
18800 | enableval=$enable_libbacktrace; case "${enableval}" in | |
18801 | yes) enable_libbacktrace=yes ;; | |
18802 | no) enable_libbacktrace=no ;; | |
18803 | *) as_fn_error $? "bad value ${enableval} for --enable-libbacktrace option" "$LINENO" 5 ;; | |
18804 | esac | |
18805 | else | |
18806 | enable_libbacktrace=yes | |
18807 | fi | |
18808 | ||
18809 | ||
18810 | if test "${enable_libbacktrace}" == "yes"; then | |
18811 | LIBBACKTRACE_INC="-I$srcdir/../libbacktrace/ -I../libbacktrace/" | |
18812 | LIBBACKTRACE_LIB=../libbacktrace/.libs/libbacktrace.a | |
18813 | ||
18814 | $as_echo "#define HAVE_LIBBACKTRACE 1" >>confdefs.h | |
18815 | ||
18816 | else | |
18817 | LIBBACKTRACE_INC= | |
18818 | LIBBACKTRACE_LIB= | |
18819 | fi | |
18820 | ||
18821 | ||
18822 | ||
18823 | ||
393fd4c3 YQ |
18824 | # Check for babeltrace and babeltrace-ctf |
18825 | ||
18826 | # Check whether --with-babeltrace was given. | |
18827 | if test "${with_babeltrace+set}" = set; then : | |
18828 | withval=$with_babeltrace; | |
18829 | else | |
18830 | with_babeltrace=auto | |
18831 | fi | |
18832 | ||
18833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
18834 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
18835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
18836 | $as_echo "$with_babeltrace" >&6; } | |
18837 | ||
18838 | if test "x$with_babeltrace" = "xno"; then | |
18839 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
18840 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
18841 | else | |
18842 | # Append -Werror to CFLAGS so that configure can catch the warning | |
18843 | # "assignment from incompatible pointer type", which is related to | |
18844 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
18845 | # in GDB, while babeltrace 1.0.3 is broken. | |
18846 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
18847 | # safe to save and restore CFLAGS here. | |
18848 | saved_CFLAGS=$CFLAGS | |
18849 | CFLAGS="$CFLAGS -Werror" | |
18850 | ||
18851 | ||
18852 | ||
18853 | ||
18854 | ||
18855 | ||
18856 | ||
18857 | ||
18858 | use_additional=yes | |
18859 | ||
18860 | acl_save_prefix="$prefix" | |
18861 | prefix="$acl_final_prefix" | |
18862 | acl_save_exec_prefix="$exec_prefix" | |
18863 | exec_prefix="$acl_final_exec_prefix" | |
18864 | ||
18865 | eval additional_includedir=\"$includedir\" | |
18866 | eval additional_libdir=\"$libdir\" | |
18867 | ||
18868 | exec_prefix="$acl_save_exec_prefix" | |
18869 | prefix="$acl_save_prefix" | |
18870 | ||
18871 | ||
18872 | # Check whether --with-libbabeltrace-prefix was given. | |
18873 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
18874 | withval=$with_libbabeltrace_prefix; | |
18875 | if test "X$withval" = "Xno"; then | |
18876 | use_additional=no | |
18877 | else | |
18878 | if test "X$withval" = "X"; then | |
18879 | ||
18880 | acl_save_prefix="$prefix" | |
18881 | prefix="$acl_final_prefix" | |
18882 | acl_save_exec_prefix="$exec_prefix" | |
18883 | exec_prefix="$acl_final_exec_prefix" | |
18884 | ||
18885 | eval additional_includedir=\"$includedir\" | |
18886 | eval additional_libdir=\"$libdir\" | |
18887 | ||
18888 | exec_prefix="$acl_save_exec_prefix" | |
18889 | prefix="$acl_save_prefix" | |
18890 | ||
18891 | else | |
18892 | additional_includedir="$withval/include" | |
18893 | additional_libdir="$withval/lib" | |
18894 | fi | |
18895 | fi | |
18896 | ||
18897 | fi | |
18898 | ||
9f1528a1 AB |
18899 | |
18900 | # Check whether --with-libbabeltrace-type was given. | |
18901 | if test "${with_libbabeltrace_type+set}" = set; then : | |
18902 | withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval | |
18903 | else | |
18904 | with_libbabeltrace_type=auto | |
18905 | fi | |
18906 | ||
18907 | lib_type=`eval echo \$with_libbabeltrace_type` | |
18908 | ||
393fd4c3 YQ |
18909 | LIBBABELTRACE= |
18910 | LTLIBBABELTRACE= | |
18911 | INCBABELTRACE= | |
18912 | rpathdirs= | |
18913 | ltrpathdirs= | |
18914 | names_already_handled= | |
18915 | names_next_round='babeltrace babeltrace-ctf' | |
18916 | while test -n "$names_next_round"; do | |
18917 | names_this_round="$names_next_round" | |
18918 | names_next_round= | |
18919 | for name in $names_this_round; do | |
18920 | already_handled= | |
18921 | for n in $names_already_handled; do | |
18922 | if test "$n" = "$name"; then | |
18923 | already_handled=yes | |
18924 | break | |
18925 | fi | |
18926 | done | |
18927 | if test -z "$already_handled"; then | |
18928 | names_already_handled="$names_already_handled $name" | |
18929 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
18930 | eval value=\"\$HAVE_LIB$uppername\" | |
18931 | if test -n "$value"; then | |
18932 | if test "$value" = yes; then | |
18933 | eval value=\"\$LIB$uppername\" | |
18934 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
18935 | eval value=\"\$LTLIB$uppername\" | |
18936 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
18937 | else | |
18938 | : | |
18939 | fi | |
18940 | else | |
18941 | found_dir= | |
18942 | found_la= | |
18943 | found_so= | |
18944 | found_a= | |
18945 | if test $use_additional = yes; then | |
9f1528a1 | 18946 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18947 | found_dir="$additional_libdir" |
18948 | found_so="$additional_libdir/lib$name.$shlibext" | |
18949 | if test -f "$additional_libdir/lib$name.la"; then | |
18950 | found_la="$additional_libdir/lib$name.la" | |
18951 | fi | |
9f1528a1 | 18952 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18953 | if test -f "$additional_libdir/lib$name.$libext"; then |
18954 | found_dir="$additional_libdir" | |
18955 | found_a="$additional_libdir/lib$name.$libext" | |
18956 | if test -f "$additional_libdir/lib$name.la"; then | |
18957 | found_la="$additional_libdir/lib$name.la" | |
18958 | fi | |
18959 | fi | |
18960 | fi | |
18961 | fi | |
18962 | if test "X$found_dir" = "X"; then | |
18963 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18964 | ||
18965 | acl_save_prefix="$prefix" | |
18966 | prefix="$acl_final_prefix" | |
18967 | acl_save_exec_prefix="$exec_prefix" | |
18968 | exec_prefix="$acl_final_exec_prefix" | |
18969 | eval x=\"$x\" | |
18970 | exec_prefix="$acl_save_exec_prefix" | |
18971 | prefix="$acl_save_prefix" | |
18972 | ||
18973 | case "$x" in | |
18974 | -L*) | |
18975 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 18976 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18977 | found_dir="$dir" |
18978 | found_so="$dir/lib$name.$shlibext" | |
18979 | if test -f "$dir/lib$name.la"; then | |
18980 | found_la="$dir/lib$name.la" | |
18981 | fi | |
9f1528a1 | 18982 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18983 | if test -f "$dir/lib$name.$libext"; then |
18984 | found_dir="$dir" | |
18985 | found_a="$dir/lib$name.$libext" | |
18986 | if test -f "$dir/lib$name.la"; then | |
18987 | found_la="$dir/lib$name.la" | |
18988 | fi | |
18989 | fi | |
18990 | fi | |
18991 | ;; | |
18992 | esac | |
18993 | if test "X$found_dir" != "X"; then | |
18994 | break | |
18995 | fi | |
18996 | done | |
18997 | fi | |
18998 | if test "X$found_dir" != "X"; then | |
18999 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
19000 | if test "X$found_so" != "X"; then | |
19001 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
19002 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
19003 | else | |
19004 | haveit= | |
19005 | for x in $ltrpathdirs; do | |
19006 | if test "X$x" = "X$found_dir"; then | |
19007 | haveit=yes | |
19008 | break | |
19009 | fi | |
19010 | done | |
19011 | if test -z "$haveit"; then | |
19012 | ltrpathdirs="$ltrpathdirs $found_dir" | |
19013 | fi | |
19014 | if test "$hardcode_direct" = yes; then | |
19015 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
19016 | else | |
19017 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
19018 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
19019 | haveit= | |
19020 | for x in $rpathdirs; do | |
19021 | if test "X$x" = "X$found_dir"; then | |
19022 | haveit=yes | |
19023 | break | |
19024 | fi | |
19025 | done | |
19026 | if test -z "$haveit"; then | |
19027 | rpathdirs="$rpathdirs $found_dir" | |
19028 | fi | |
19029 | else | |
19030 | haveit= | |
19031 | for x in $LDFLAGS $LIBBABELTRACE; do | |
19032 | ||
19033 | acl_save_prefix="$prefix" | |
19034 | prefix="$acl_final_prefix" | |
19035 | acl_save_exec_prefix="$exec_prefix" | |
19036 | exec_prefix="$acl_final_exec_prefix" | |
19037 | eval x=\"$x\" | |
19038 | exec_prefix="$acl_save_exec_prefix" | |
19039 | prefix="$acl_save_prefix" | |
19040 | ||
19041 | if test "X$x" = "X-L$found_dir"; then | |
19042 | haveit=yes | |
19043 | break | |
19044 | fi | |
19045 | done | |
19046 | if test -z "$haveit"; then | |
19047 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
19048 | fi | |
19049 | if test "$hardcode_minus_L" != no; then | |
19050 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
19051 | else | |
19052 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
19053 | fi | |
19054 | fi | |
19055 | fi | |
19056 | fi | |
19057 | else | |
19058 | if test "X$found_a" != "X"; then | |
19059 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
19060 | else | |
19061 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
19062 | fi | |
19063 | fi | |
19064 | additional_includedir= | |
19065 | case "$found_dir" in | |
19066 | */lib | */lib/) | |
19067 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
19068 | additional_includedir="$basedir/include" | |
19069 | ;; | |
19070 | esac | |
19071 | if test "X$additional_includedir" != "X"; then | |
19072 | if test "X$additional_includedir" != "X/usr/include"; then | |
19073 | haveit= | |
19074 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
19075 | if test -n "$GCC"; then | |
19076 | case $host_os in | |
19077 | linux*) haveit=yes;; | |
19078 | esac | |
19079 | fi | |
19080 | fi | |
19081 | if test -z "$haveit"; then | |
19082 | for x in $CPPFLAGS $INCBABELTRACE; do | |
19083 | ||
19084 | acl_save_prefix="$prefix" | |
19085 | prefix="$acl_final_prefix" | |
19086 | acl_save_exec_prefix="$exec_prefix" | |
19087 | exec_prefix="$acl_final_exec_prefix" | |
19088 | eval x=\"$x\" | |
19089 | exec_prefix="$acl_save_exec_prefix" | |
19090 | prefix="$acl_save_prefix" | |
19091 | ||
19092 | if test "X$x" = "X-I$additional_includedir"; then | |
19093 | haveit=yes | |
19094 | break | |
19095 | fi | |
19096 | done | |
19097 | if test -z "$haveit"; then | |
19098 | if test -d "$additional_includedir"; then | |
19099 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
19100 | fi | |
19101 | fi | |
19102 | fi | |
19103 | fi | |
19104 | fi | |
19105 | if test -n "$found_la"; then | |
19106 | save_libdir="$libdir" | |
19107 | case "$found_la" in | |
19108 | */* | *\\*) . "$found_la" ;; | |
19109 | *) . "./$found_la" ;; | |
19110 | esac | |
19111 | libdir="$save_libdir" | |
19112 | for dep in $dependency_libs; do | |
19113 | case "$dep" in | |
19114 | -L*) | |
19115 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
19116 | if test "X$additional_libdir" != "X/usr/lib"; then | |
19117 | haveit= | |
19118 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
19119 | if test -n "$GCC"; then | |
19120 | case $host_os in | |
19121 | linux*) haveit=yes;; | |
19122 | esac | |
19123 | fi | |
19124 | fi | |
19125 | if test -z "$haveit"; then | |
19126 | haveit= | |
19127 | for x in $LDFLAGS $LIBBABELTRACE; do | |
19128 | ||
19129 | acl_save_prefix="$prefix" | |
19130 | prefix="$acl_final_prefix" | |
19131 | acl_save_exec_prefix="$exec_prefix" | |
19132 | exec_prefix="$acl_final_exec_prefix" | |
19133 | eval x=\"$x\" | |
19134 | exec_prefix="$acl_save_exec_prefix" | |
19135 | prefix="$acl_save_prefix" | |
19136 | ||
19137 | if test "X$x" = "X-L$additional_libdir"; then | |
19138 | haveit=yes | |
19139 | break | |
19140 | fi | |
19141 | done | |
19142 | if test -z "$haveit"; then | |
19143 | if test -d "$additional_libdir"; then | |
19144 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
19145 | fi | |
19146 | fi | |
19147 | haveit= | |
19148 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
19149 | ||
19150 | acl_save_prefix="$prefix" | |
19151 | prefix="$acl_final_prefix" | |
19152 | acl_save_exec_prefix="$exec_prefix" | |
19153 | exec_prefix="$acl_final_exec_prefix" | |
19154 | eval x=\"$x\" | |
19155 | exec_prefix="$acl_save_exec_prefix" | |
19156 | prefix="$acl_save_prefix" | |
19157 | ||
19158 | if test "X$x" = "X-L$additional_libdir"; then | |
19159 | haveit=yes | |
19160 | break | |
19161 | fi | |
19162 | done | |
19163 | if test -z "$haveit"; then | |
19164 | if test -d "$additional_libdir"; then | |
19165 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
19166 | fi | |
19167 | fi | |
19168 | fi | |
19169 | fi | |
19170 | ;; | |
19171 | -R*) | |
19172 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
19173 | if test "$enable_rpath" != no; then | |
19174 | haveit= | |
19175 | for x in $rpathdirs; do | |
19176 | if test "X$x" = "X$dir"; then | |
19177 | haveit=yes | |
19178 | break | |
19179 | fi | |
19180 | done | |
19181 | if test -z "$haveit"; then | |
19182 | rpathdirs="$rpathdirs $dir" | |
19183 | fi | |
19184 | haveit= | |
19185 | for x in $ltrpathdirs; do | |
19186 | if test "X$x" = "X$dir"; then | |
19187 | haveit=yes | |
19188 | break | |
19189 | fi | |
19190 | done | |
19191 | if test -z "$haveit"; then | |
19192 | ltrpathdirs="$ltrpathdirs $dir" | |
19193 | fi | |
19194 | fi | |
19195 | ;; | |
19196 | -l*) | |
19197 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
19198 | ;; | |
19199 | *.la) | |
19200 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19201 | ;; | |
19202 | *) | |
19203 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
19204 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
19205 | ;; | |
19206 | esac | |
19207 | done | |
19208 | fi | |
19209 | else | |
9f1528a1 AB |
19210 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19211 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
19212 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
19213 | else | |
19214 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext" | |
19215 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext" | |
19216 | fi | |
393fd4c3 YQ |
19217 | fi |
19218 | fi | |
19219 | fi | |
19220 | done | |
19221 | done | |
19222 | if test "X$rpathdirs" != "X"; then | |
19223 | if test -n "$hardcode_libdir_separator"; then | |
19224 | alldirs= | |
19225 | for found_dir in $rpathdirs; do | |
19226 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19227 | done | |
19228 | acl_save_libdir="$libdir" | |
19229 | libdir="$alldirs" | |
19230 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19231 | libdir="$acl_save_libdir" | |
19232 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
19233 | else | |
19234 | for found_dir in $rpathdirs; do | |
19235 | acl_save_libdir="$libdir" | |
19236 | libdir="$found_dir" | |
19237 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19238 | libdir="$acl_save_libdir" | |
19239 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
19240 | done | |
19241 | fi | |
19242 | fi | |
19243 | if test "X$ltrpathdirs" != "X"; then | |
19244 | for found_dir in $ltrpathdirs; do | |
19245 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
19246 | done | |
19247 | fi | |
19248 | ||
19249 | ||
19250 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19251 | ||
19252 | for element in $INCBABELTRACE; do | |
19253 | haveit= | |
19254 | for x in $CPPFLAGS; do | |
19255 | ||
19256 | acl_save_prefix="$prefix" | |
19257 | prefix="$acl_final_prefix" | |
19258 | acl_save_exec_prefix="$exec_prefix" | |
19259 | exec_prefix="$acl_final_exec_prefix" | |
19260 | eval x=\"$x\" | |
19261 | exec_prefix="$acl_save_exec_prefix" | |
19262 | prefix="$acl_save_prefix" | |
19263 | ||
19264 | if test "X$x" = "X$element"; then | |
19265 | haveit=yes | |
19266 | break | |
19267 | fi | |
19268 | done | |
19269 | if test -z "$haveit"; then | |
19270 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19271 | fi | |
19272 | done | |
19273 | ||
19274 | ||
19275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
19276 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
d0ac1c44 | 19277 | if ${ac_cv_libbabeltrace+:} false; then : |
393fd4c3 YQ |
19278 | $as_echo_n "(cached) " >&6 |
19279 | else | |
19280 | ||
19281 | ac_save_LIBS="$LIBS" | |
19282 | LIBS="$LIBS $LIBBABELTRACE" | |
19283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19284 | /* end confdefs.h. */ | |
19285 | #include <babeltrace/babeltrace.h> | |
19286 | #include <babeltrace/ctf/events.h> | |
19287 | #include <babeltrace/ctf/iterator.h> | |
19288 | int | |
19289 | main () | |
19290 | { | |
19291 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
19292 | struct bt_ctf_event *event = NULL; | |
19293 | const struct bt_definition *scope; | |
19294 | ||
13cdc2af | 19295 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 19296 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
19297 | scope = bt_ctf_get_top_level_scope (event, |
19298 | BT_STREAM_EVENT_HEADER); | |
19299 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
19300 | ||
19301 | ; | |
19302 | return 0; | |
19303 | } | |
19304 | _ACEOF | |
19305 | if ac_fn_c_try_link "$LINENO"; then : | |
19306 | ac_cv_libbabeltrace=yes | |
19307 | else | |
19308 | ac_cv_libbabeltrace=no | |
19309 | fi | |
19310 | rm -f core conftest.err conftest.$ac_objext \ | |
19311 | conftest$ac_exeext conftest.$ac_ext | |
19312 | LIBS="$ac_save_LIBS" | |
19313 | ||
19314 | fi | |
19315 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
19316 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
19317 | if test "$ac_cv_libbabeltrace" = yes; then | |
19318 | HAVE_LIBBABELTRACE=yes | |
19319 | ||
19320 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
19321 | ||
19322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
19323 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
19324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
19325 | $as_echo "$LIBBABELTRACE" >&6; } | |
19326 | else | |
19327 | HAVE_LIBBABELTRACE=no | |
19328 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19329 | LIBBABELTRACE= | |
19330 | LTLIBBABELTRACE= | |
19331 | fi | |
19332 | ||
19333 | ||
19334 | ||
19335 | ||
19336 | ||
19337 | ||
19338 | CFLAGS=$saved_CFLAGS | |
19339 | ||
19340 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
19341 | if test "$with_babeltrace" = yes; then | |
d0ac1c44 | 19342 | as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 |
393fd4c3 YQ |
19343 | else |
19344 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
19345 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
19346 | fi | |
19347 | fi | |
19348 | fi | |
19349 | ||
ccb1ba62 CB |
19350 | # Check for xxhash |
19351 | ||
19352 | # Check whether --with-xxhash was given. | |
19353 | if test "${with_xxhash+set}" = set; then : | |
19354 | withval=$with_xxhash; | |
19355 | else | |
19356 | with_xxhash=auto | |
19357 | fi | |
19358 | ||
19359 | ||
1776e3e5 NA |
19360 | # Check whether --enable-libctf was given. |
19361 | if test "${enable_libctf+set}" = set; then : | |
19362 | enableval=$enable_libctf; | |
19363 | case "$enableval" in | |
19364 | yes|no) ;; | |
19365 | *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;; | |
19366 | esac | |
19367 | ||
19368 | else | |
19369 | enable_libctf=yes | |
19370 | fi | |
19371 | ||
19372 | ||
19373 | if test x${enable_static} = xno; then | |
19374 | LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so" | |
19375 | CTF_DEPS="../libctf/.libs/libctf.so" | |
19376 | else | |
19377 | LIBCTF="../libctf/.libs/libctf.a" | |
19378 | CTF_DEPS="$LIBCTF" | |
19379 | fi | |
19380 | if test "${enable_libctf}" = yes; then | |
19381 | ||
19382 | $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h | |
19383 | ||
19384 | else | |
19385 | LIBCTF= | |
19386 | CTF_DEPS= | |
19387 | fi | |
19388 | ||
19389 | ||
19390 | ||
1776e3e5 NA |
19391 | # If nativefile (NAT_FILE) is not set in configure.nat, we link to an |
19392 | # empty version. | |
19393 | ||
ccb1ba62 CB |
19394 | if test "x$with_xxhash" != "xno"; then |
19395 | ||
19396 | ||
19397 | ||
19398 | ||
19399 | ||
19400 | ||
19401 | ||
19402 | ||
19403 | use_additional=yes | |
19404 | ||
19405 | acl_save_prefix="$prefix" | |
19406 | prefix="$acl_final_prefix" | |
19407 | acl_save_exec_prefix="$exec_prefix" | |
19408 | exec_prefix="$acl_final_exec_prefix" | |
19409 | ||
19410 | eval additional_includedir=\"$includedir\" | |
19411 | eval additional_libdir=\"$libdir\" | |
19412 | ||
19413 | exec_prefix="$acl_save_exec_prefix" | |
19414 | prefix="$acl_save_prefix" | |
19415 | ||
19416 | ||
19417 | # Check whether --with-libxxhash-prefix was given. | |
19418 | if test "${with_libxxhash_prefix+set}" = set; then : | |
19419 | withval=$with_libxxhash_prefix; | |
19420 | if test "X$withval" = "Xno"; then | |
19421 | use_additional=no | |
19422 | else | |
19423 | if test "X$withval" = "X"; then | |
19424 | ||
19425 | acl_save_prefix="$prefix" | |
19426 | prefix="$acl_final_prefix" | |
19427 | acl_save_exec_prefix="$exec_prefix" | |
19428 | exec_prefix="$acl_final_exec_prefix" | |
19429 | ||
19430 | eval additional_includedir=\"$includedir\" | |
19431 | eval additional_libdir=\"$libdir\" | |
19432 | ||
19433 | exec_prefix="$acl_save_exec_prefix" | |
19434 | prefix="$acl_save_prefix" | |
19435 | ||
19436 | else | |
19437 | additional_includedir="$withval/include" | |
19438 | additional_libdir="$withval/lib" | |
19439 | fi | |
19440 | fi | |
19441 | ||
19442 | fi | |
19443 | ||
9f1528a1 AB |
19444 | |
19445 | # Check whether --with-libxxhash-type was given. | |
19446 | if test "${with_libxxhash_type+set}" = set; then : | |
19447 | withval=$with_libxxhash_type; with_libxxhash_type=$withval | |
19448 | else | |
19449 | with_libxxhash_type=auto | |
19450 | fi | |
19451 | ||
19452 | lib_type=`eval echo \$with_libxxhash_type` | |
19453 | ||
ccb1ba62 CB |
19454 | LIBXXHASH= |
19455 | LTLIBXXHASH= | |
19456 | INCXXHASH= | |
19457 | rpathdirs= | |
19458 | ltrpathdirs= | |
19459 | names_already_handled= | |
19460 | names_next_round='xxhash ' | |
19461 | while test -n "$names_next_round"; do | |
19462 | names_this_round="$names_next_round" | |
19463 | names_next_round= | |
19464 | for name in $names_this_round; do | |
19465 | already_handled= | |
19466 | for n in $names_already_handled; do | |
19467 | if test "$n" = "$name"; then | |
19468 | already_handled=yes | |
19469 | break | |
19470 | fi | |
19471 | done | |
19472 | if test -z "$already_handled"; then | |
19473 | names_already_handled="$names_already_handled $name" | |
19474 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
19475 | eval value=\"\$HAVE_LIB$uppername\" | |
19476 | if test -n "$value"; then | |
19477 | if test "$value" = yes; then | |
19478 | eval value=\"\$LIB$uppername\" | |
19479 | test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" | |
19480 | eval value=\"\$LTLIB$uppername\" | |
19481 | test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" | |
19482 | else | |
19483 | : | |
19484 | fi | |
19485 | else | |
19486 | found_dir= | |
19487 | found_la= | |
19488 | found_so= | |
19489 | found_a= | |
19490 | if test $use_additional = yes; then | |
9f1528a1 | 19491 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
19492 | found_dir="$additional_libdir" |
19493 | found_so="$additional_libdir/lib$name.$shlibext" | |
19494 | if test -f "$additional_libdir/lib$name.la"; then | |
19495 | found_la="$additional_libdir/lib$name.la" | |
19496 | fi | |
9f1528a1 | 19497 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
19498 | if test -f "$additional_libdir/lib$name.$libext"; then |
19499 | found_dir="$additional_libdir" | |
19500 | found_a="$additional_libdir/lib$name.$libext" | |
19501 | if test -f "$additional_libdir/lib$name.la"; then | |
19502 | found_la="$additional_libdir/lib$name.la" | |
19503 | fi | |
19504 | fi | |
19505 | fi | |
19506 | fi | |
19507 | if test "X$found_dir" = "X"; then | |
19508 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19509 | ||
19510 | acl_save_prefix="$prefix" | |
19511 | prefix="$acl_final_prefix" | |
19512 | acl_save_exec_prefix="$exec_prefix" | |
19513 | exec_prefix="$acl_final_exec_prefix" | |
19514 | eval x=\"$x\" | |
19515 | exec_prefix="$acl_save_exec_prefix" | |
19516 | prefix="$acl_save_prefix" | |
19517 | ||
19518 | case "$x" in | |
19519 | -L*) | |
19520 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 19521 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
19522 | found_dir="$dir" |
19523 | found_so="$dir/lib$name.$shlibext" | |
19524 | if test -f "$dir/lib$name.la"; then | |
19525 | found_la="$dir/lib$name.la" | |
19526 | fi | |
9f1528a1 | 19527 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
19528 | if test -f "$dir/lib$name.$libext"; then |
19529 | found_dir="$dir" | |
19530 | found_a="$dir/lib$name.$libext" | |
19531 | if test -f "$dir/lib$name.la"; then | |
19532 | found_la="$dir/lib$name.la" | |
19533 | fi | |
19534 | fi | |
19535 | fi | |
19536 | ;; | |
19537 | esac | |
19538 | if test "X$found_dir" != "X"; then | |
19539 | break | |
19540 | fi | |
19541 | done | |
19542 | fi | |
19543 | if test "X$found_dir" != "X"; then | |
19544 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name" | |
19545 | if test "X$found_so" != "X"; then | |
19546 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
19547 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19548 | else | |
19549 | haveit= | |
19550 | for x in $ltrpathdirs; do | |
19551 | if test "X$x" = "X$found_dir"; then | |
19552 | haveit=yes | |
19553 | break | |
19554 | fi | |
19555 | done | |
19556 | if test -z "$haveit"; then | |
19557 | ltrpathdirs="$ltrpathdirs $found_dir" | |
19558 | fi | |
19559 | if test "$hardcode_direct" = yes; then | |
19560 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19561 | else | |
19562 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
19563 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19564 | haveit= | |
19565 | for x in $rpathdirs; do | |
19566 | if test "X$x" = "X$found_dir"; then | |
19567 | haveit=yes | |
19568 | break | |
19569 | fi | |
19570 | done | |
19571 | if test -z "$haveit"; then | |
19572 | rpathdirs="$rpathdirs $found_dir" | |
19573 | fi | |
19574 | else | |
19575 | haveit= | |
19576 | for x in $LDFLAGS $LIBXXHASH; do | |
19577 | ||
19578 | acl_save_prefix="$prefix" | |
19579 | prefix="$acl_final_prefix" | |
19580 | acl_save_exec_prefix="$exec_prefix" | |
19581 | exec_prefix="$acl_final_exec_prefix" | |
19582 | eval x=\"$x\" | |
19583 | exec_prefix="$acl_save_exec_prefix" | |
19584 | prefix="$acl_save_prefix" | |
19585 | ||
19586 | if test "X$x" = "X-L$found_dir"; then | |
19587 | haveit=yes | |
19588 | break | |
19589 | fi | |
19590 | done | |
19591 | if test -z "$haveit"; then | |
19592 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" | |
19593 | fi | |
19594 | if test "$hardcode_minus_L" != no; then | |
19595 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19596 | else | |
19597 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19598 | fi | |
19599 | fi | |
19600 | fi | |
19601 | fi | |
19602 | else | |
19603 | if test "X$found_a" != "X"; then | |
19604 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" | |
19605 | else | |
19606 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" | |
19607 | fi | |
19608 | fi | |
19609 | additional_includedir= | |
19610 | case "$found_dir" in | |
19611 | */lib | */lib/) | |
19612 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
19613 | additional_includedir="$basedir/include" | |
19614 | ;; | |
19615 | esac | |
19616 | if test "X$additional_includedir" != "X"; then | |
19617 | if test "X$additional_includedir" != "X/usr/include"; then | |
19618 | haveit= | |
19619 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
19620 | if test -n "$GCC"; then | |
19621 | case $host_os in | |
19622 | linux*) haveit=yes;; | |
19623 | esac | |
19624 | fi | |
19625 | fi | |
19626 | if test -z "$haveit"; then | |
19627 | for x in $CPPFLAGS $INCXXHASH; do | |
19628 | ||
19629 | acl_save_prefix="$prefix" | |
19630 | prefix="$acl_final_prefix" | |
19631 | acl_save_exec_prefix="$exec_prefix" | |
19632 | exec_prefix="$acl_final_exec_prefix" | |
19633 | eval x=\"$x\" | |
19634 | exec_prefix="$acl_save_exec_prefix" | |
19635 | prefix="$acl_save_prefix" | |
19636 | ||
19637 | if test "X$x" = "X-I$additional_includedir"; then | |
19638 | haveit=yes | |
19639 | break | |
19640 | fi | |
19641 | done | |
19642 | if test -z "$haveit"; then | |
19643 | if test -d "$additional_includedir"; then | |
19644 | INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" | |
19645 | fi | |
19646 | fi | |
19647 | fi | |
19648 | fi | |
19649 | fi | |
19650 | if test -n "$found_la"; then | |
19651 | save_libdir="$libdir" | |
19652 | case "$found_la" in | |
19653 | */* | *\\*) . "$found_la" ;; | |
19654 | *) . "./$found_la" ;; | |
19655 | esac | |
19656 | libdir="$save_libdir" | |
19657 | for dep in $dependency_libs; do | |
19658 | case "$dep" in | |
19659 | -L*) | |
19660 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
19661 | if test "X$additional_libdir" != "X/usr/lib"; then | |
19662 | haveit= | |
19663 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
19664 | if test -n "$GCC"; then | |
19665 | case $host_os in | |
19666 | linux*) haveit=yes;; | |
19667 | esac | |
19668 | fi | |
19669 | fi | |
19670 | if test -z "$haveit"; then | |
19671 | haveit= | |
19672 | for x in $LDFLAGS $LIBXXHASH; do | |
19673 | ||
19674 | acl_save_prefix="$prefix" | |
19675 | prefix="$acl_final_prefix" | |
19676 | acl_save_exec_prefix="$exec_prefix" | |
19677 | exec_prefix="$acl_final_exec_prefix" | |
19678 | eval x=\"$x\" | |
19679 | exec_prefix="$acl_save_exec_prefix" | |
19680 | prefix="$acl_save_prefix" | |
19681 | ||
19682 | if test "X$x" = "X-L$additional_libdir"; then | |
19683 | haveit=yes | |
19684 | break | |
19685 | fi | |
19686 | done | |
19687 | if test -z "$haveit"; then | |
19688 | if test -d "$additional_libdir"; then | |
19689 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" | |
19690 | fi | |
19691 | fi | |
19692 | haveit= | |
19693 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19694 | ||
19695 | acl_save_prefix="$prefix" | |
19696 | prefix="$acl_final_prefix" | |
19697 | acl_save_exec_prefix="$exec_prefix" | |
19698 | exec_prefix="$acl_final_exec_prefix" | |
19699 | eval x=\"$x\" | |
19700 | exec_prefix="$acl_save_exec_prefix" | |
19701 | prefix="$acl_save_prefix" | |
19702 | ||
19703 | if test "X$x" = "X-L$additional_libdir"; then | |
19704 | haveit=yes | |
19705 | break | |
19706 | fi | |
19707 | done | |
19708 | if test -z "$haveit"; then | |
19709 | if test -d "$additional_libdir"; then | |
19710 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" | |
19711 | fi | |
19712 | fi | |
19713 | fi | |
19714 | fi | |
19715 | ;; | |
19716 | -R*) | |
19717 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
19718 | if test "$enable_rpath" != no; then | |
19719 | haveit= | |
19720 | for x in $rpathdirs; do | |
19721 | if test "X$x" = "X$dir"; then | |
19722 | haveit=yes | |
19723 | break | |
19724 | fi | |
19725 | done | |
19726 | if test -z "$haveit"; then | |
19727 | rpathdirs="$rpathdirs $dir" | |
19728 | fi | |
19729 | haveit= | |
19730 | for x in $ltrpathdirs; do | |
19731 | if test "X$x" = "X$dir"; then | |
19732 | haveit=yes | |
19733 | break | |
19734 | fi | |
19735 | done | |
19736 | if test -z "$haveit"; then | |
19737 | ltrpathdirs="$ltrpathdirs $dir" | |
19738 | fi | |
19739 | fi | |
19740 | ;; | |
19741 | -l*) | |
19742 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
19743 | ;; | |
19744 | *.la) | |
19745 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19746 | ;; | |
19747 | *) | |
19748 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" | |
19749 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" | |
19750 | ;; | |
19751 | esac | |
19752 | done | |
19753 | fi | |
19754 | else | |
9f1528a1 AB |
19755 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19756 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19757 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" | |
19758 | else | |
19759 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext" | |
19760 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext" | |
19761 | fi | |
ccb1ba62 CB |
19762 | fi |
19763 | fi | |
19764 | fi | |
19765 | done | |
19766 | done | |
19767 | if test "X$rpathdirs" != "X"; then | |
19768 | if test -n "$hardcode_libdir_separator"; then | |
19769 | alldirs= | |
19770 | for found_dir in $rpathdirs; do | |
19771 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19772 | done | |
19773 | acl_save_libdir="$libdir" | |
19774 | libdir="$alldirs" | |
19775 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19776 | libdir="$acl_save_libdir" | |
19777 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19778 | else | |
19779 | for found_dir in $rpathdirs; do | |
19780 | acl_save_libdir="$libdir" | |
19781 | libdir="$found_dir" | |
19782 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19783 | libdir="$acl_save_libdir" | |
19784 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19785 | done | |
19786 | fi | |
19787 | fi | |
19788 | if test "X$ltrpathdirs" != "X"; then | |
19789 | for found_dir in $ltrpathdirs; do | |
19790 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" | |
19791 | done | |
19792 | fi | |
19793 | ||
19794 | ||
19795 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19796 | ||
19797 | for element in $INCXXHASH; do | |
19798 | haveit= | |
19799 | for x in $CPPFLAGS; do | |
19800 | ||
19801 | acl_save_prefix="$prefix" | |
19802 | prefix="$acl_final_prefix" | |
19803 | acl_save_exec_prefix="$exec_prefix" | |
19804 | exec_prefix="$acl_final_exec_prefix" | |
19805 | eval x=\"$x\" | |
19806 | exec_prefix="$acl_save_exec_prefix" | |
19807 | prefix="$acl_save_prefix" | |
19808 | ||
19809 | if test "X$x" = "X$element"; then | |
19810 | haveit=yes | |
19811 | break | |
19812 | fi | |
19813 | done | |
19814 | if test -z "$haveit"; then | |
19815 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19816 | fi | |
19817 | done | |
19818 | ||
19819 | ||
19820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 | |
19821 | $as_echo_n "checking for libxxhash... " >&6; } | |
19822 | if ${ac_cv_libxxhash+:} false; then : | |
19823 | $as_echo_n "(cached) " >&6 | |
19824 | else | |
19825 | ||
19826 | ac_save_LIBS="$LIBS" | |
19827 | LIBS="$LIBS $LIBXXHASH" | |
19828 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19829 | /* end confdefs.h. */ | |
19830 | #include <xxhash.h> | |
19831 | int | |
19832 | main () | |
19833 | { | |
19834 | XXH32("foo", 3, 0); | |
19835 | ||
19836 | ; | |
19837 | return 0; | |
19838 | } | |
19839 | _ACEOF | |
19840 | if ac_fn_c_try_link "$LINENO"; then : | |
19841 | ac_cv_libxxhash=yes | |
19842 | else | |
19843 | ac_cv_libxxhash=no | |
19844 | fi | |
19845 | rm -f core conftest.err conftest.$ac_objext \ | |
19846 | conftest$ac_exeext conftest.$ac_ext | |
19847 | LIBS="$ac_save_LIBS" | |
19848 | ||
19849 | fi | |
19850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 | |
19851 | $as_echo "$ac_cv_libxxhash" >&6; } | |
19852 | if test "$ac_cv_libxxhash" = yes; then | |
19853 | HAVE_LIBXXHASH=yes | |
19854 | ||
19855 | $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h | |
19856 | ||
19857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 | |
19858 | $as_echo_n "checking how to link with libxxhash... " >&6; } | |
19859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 | |
19860 | $as_echo "$LIBXXHASH" >&6; } | |
19861 | else | |
19862 | HAVE_LIBXXHASH=no | |
19863 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19864 | LIBXXHASH= | |
19865 | LTLIBXXHASH= | |
19866 | fi | |
19867 | ||
19868 | ||
19869 | ||
19870 | ||
19871 | ||
19872 | ||
19873 | if test "$HAVE_LIBXXHASH" != yes; then | |
19874 | if test "$with_xxhash" = yes; then | |
19875 | as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 | |
19876 | fi | |
19877 | fi | |
19878 | if test "x$with_xxhash" = "xauto"; then | |
19879 | with_xxhash="$HAVE_LIBXXHASH" | |
19880 | fi | |
19881 | fi | |
19882 | ||
19883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 | |
19884 | $as_echo_n "checking whether to use xxhash... " >&6; } | |
19885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 | |
19886 | $as_echo "$with_xxhash" >&6; } | |
19887 | ||
a0a461e5 | 19888 | NM_H= |
c906108c SS |
19889 | rm -f nm.h |
19890 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
19891 | case "${nativefile}" in |
19892 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
19893 | * ) GDB_NM_FILE="${nativefile}" | |
19894 | esac | |
a0a461e5 TT |
19895 | ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE" |
19896 | ||
60ca704f SE |
19897 | |
19898 | cat >>confdefs.h <<_ACEOF | |
b78960be | 19899 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 19900 | _ACEOF |
5a2402b8 | 19901 | |
a0a461e5 | 19902 | NM_H=nm.h |
c906108c | 19903 | fi |
5a2402b8 AC |
19904 | |
19905 | ||
a0a461e5 | 19906 | |
e3487908 GKB |
19907 | for ac_prog in xsltproc |
19908 | do | |
19909 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
19910 | set dummy $ac_prog; ac_word=$2 | |
19911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
19912 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 19913 | if ${ac_cv_path_XSLTPROC+:} false; then : |
e3487908 GKB |
19914 | $as_echo_n "(cached) " >&6 |
19915 | else | |
19916 | case $XSLTPROC in | |
19917 | [\\/]* | ?:[\\/]*) | |
19918 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
19919 | ;; | |
19920 | *) | |
19921 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
19922 | for as_dir in $PATH | |
19923 | do | |
19924 | IFS=$as_save_IFS | |
19925 | test -z "$as_dir" && as_dir=. | |
19926 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 19927 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e3487908 GKB |
19928 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" |
19929 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
19930 | break 2 | |
19931 | fi | |
19932 | done | |
19933 | done | |
19934 | IFS=$as_save_IFS | |
19935 | ||
19936 | ;; | |
19937 | esac | |
19938 | fi | |
19939 | XSLTPROC=$ac_cv_path_XSLTPROC | |
19940 | if test -n "$XSLTPROC"; then | |
19941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
19942 | $as_echo "$XSLTPROC" >&6; } | |
19943 | else | |
19944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
19945 | $as_echo "no" >&6; } | |
19946 | fi | |
19947 | ||
19948 | ||
19949 | test -n "$XSLTPROC" && break | |
19950 | done | |
19951 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
19952 | ||
19953 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
19954 | if test "${XSLTPROC}" = missing; then | |
d0ac1c44 | 19955 | as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 |
e3487908 GKB |
19956 | fi |
19957 | fi | |
19958 | ||
19959 | ||
c906108c SS |
19960 | |
19961 | ||
c906108c | 19962 | |
81ecdfbb | 19963 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 19964 | |
bec39cab | 19965 | |
8ecfd7bd SDJ |
19966 | |
19967 | # Check whether we will enable the inclusion of unit tests when | |
19968 | # compiling GDB. | |
19969 | # | |
19970 | # The default value of this option changes depending whether we're on | |
19971 | # development mode (in which case it's "true") or not (in which case | |
db6878ac SM |
19972 | # it's "false"). The $development variable is set by the GDB_AC_COMMON |
19973 | # macro, which must therefore be used before GDB_AC_SELFTEST. | |
4d696a5c SM |
19974 | |
19975 | if test "x$development" != xtrue && test "x$development" != xfalse; then : | |
19976 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 | |
19977 | fi | |
19978 | ||
8ecfd7bd SDJ |
19979 | # Check whether --enable-unit-tests was given. |
19980 | if test "${enable_unit_tests+set}" = set; then : | |
19981 | enableval=$enable_unit_tests; case "${enableval}" in | |
19982 | yes) enable_unittests=true ;; | |
19983 | no) enable_unittests=false ;; | |
19984 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
19985 | esac | |
19986 | else | |
19987 | enable_unittests=$development | |
19988 | fi | |
19989 | ||
19990 | ||
19991 | if $enable_unittests; then | |
dcd1f979 TT |
19992 | |
19993 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
19994 | ||
8ecfd7bd | 19995 | |
74cd3f9d SM |
19996 | CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)" |
19997 | CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)" | |
8ecfd7bd | 19998 | |
dcd1f979 TT |
19999 | fi |
20000 | ||
b292c783 | 20001 | |
8ecfd7bd | 20002 | |
f6a88844 JM |
20003 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
20004 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
20005 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
20006 | GDB_TRANSFORM_NAME=gdb | |
20007 | fi | |
20008 | ||
20009 | ||
20010 | ||
20011 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
20012 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
20013 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
20014 | GCORE_TRANSFORM_NAME=gcore | |
20015 | fi | |
20016 | ||
b292c783 JK |
20017 | |
20018 | ac_config_files="$ac_config_files gcore" | |
20019 | ||
141ec9f6 | 20020 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" |
81ecdfbb | 20021 | |
89a34d1b | 20022 | |
bec39cab AC |
20023 | cat >confcache <<\_ACEOF |
20024 | # This file is a shell script that caches the results of configure | |
20025 | # tests run on this system so they can be shared between configure | |
20026 | # scripts and configure runs, see configure's option --config-cache. | |
20027 | # It is not useful on other systems. If it contains results you don't | |
20028 | # want to keep, you may remove or edit it. | |
20029 | # | |
20030 | # config.status only pays attention to the cache file if you give it | |
20031 | # the --recheck option to rerun configure. | |
20032 | # | |
20033 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
20034 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
20035 | # following values. | |
20036 | ||
20037 | _ACEOF | |
20038 | ||
20039 | # The following way of writing the cache mishandles newlines in values, | |
20040 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 20041 | # So, we kill variables containing newlines. |
bec39cab AC |
20042 | # Ultrix sh set writes to stderr and can't be redirected directly, |
20043 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
20044 | ( |
20045 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
20046 | eval ac_val=\$$ac_var | |
20047 | case $ac_val in #( | |
20048 | *${as_nl}*) | |
20049 | case $ac_var in #( | |
20050 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
20051 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
20052 | esac | |
20053 | case $ac_var in #( | |
20054 | _ | IFS | as_nl) ;; #( | |
20055 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
20056 | *) { eval $ac_var=; unset $ac_var;} ;; | |
20057 | esac ;; | |
20058 | esac | |
20059 | done | |
20060 | ||
bec39cab | 20061 | (set) 2>&1 | |
81ecdfbb RW |
20062 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
20063 | *${as_nl}ac_space=\ *) | |
20064 | # `set' does not quote correctly, so add quotes: double-quote | |
20065 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
20066 | sed -n \ |
20067 | "s/'/'\\\\''/g; | |
20068 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 20069 | ;; #( |
bec39cab AC |
20070 | *) |
20071 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 20072 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 20073 | ;; |
81ecdfbb RW |
20074 | esac | |
20075 | sort | |
20076 | ) | | |
bec39cab | 20077 | sed ' |
81ecdfbb | 20078 | /^ac_cv_env_/b end |
bec39cab | 20079 | t clear |
81ecdfbb | 20080 | :clear |
bec39cab AC |
20081 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
20082 | t end | |
81ecdfbb RW |
20083 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
20084 | :end' >>confcache | |
20085 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
20086 | if test -w "$cache_file"; then | |
d0ac1c44 | 20087 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
20088 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
20089 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
20090 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
20091 | cat confcache >"$cache_file" | |
20092 | else | |
20093 | case $cache_file in #( | |
20094 | */* | ?:*) | |
20095 | mv -f confcache "$cache_file"$$ && | |
20096 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
20097 | *) | |
20098 | mv -f confcache "$cache_file" ;; | |
20099 | esac | |
20100 | fi | |
20101 | fi | |
bec39cab | 20102 | else |
81ecdfbb RW |
20103 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
20104 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
20105 | fi |
20106 | fi | |
20107 | rm -f confcache | |
20108 | ||
20109 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
20110 | # Let make expand exec_prefix. | |
20111 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
20112 | ||
bec39cab AC |
20113 | DEFS=-DHAVE_CONFIG_H |
20114 | ||
20115 | ac_libobjs= | |
20116 | ac_ltlibobjs= | |
d0ac1c44 | 20117 | U= |
bec39cab AC |
20118 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
20119 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
20120 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
20121 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
20122 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
20123 | # will be set to the directory where LIBOBJS objects are built. | |
20124 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
20125 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
20126 | done |
20127 | LIBOBJS=$ac_libobjs | |
20128 | ||
20129 | LTLIBOBJS=$ac_ltlibobjs | |
20130 | ||
20131 | ||
85981d60 | 20132 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 20133 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
81ecdfbb | 20134 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
85981d60 | 20135 | fi |
1d5269c9 MF |
20136 | if test -z "${ENABLE_BFD_64_BIT_TRUE}" && test -z "${ENABLE_BFD_64_BIT_FALSE}"; then |
20137 | as_fn_error $? "conditional \"ENABLE_BFD_64_BIT\" was never defined. | |
20138 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
20139 | fi | |
4df42755 | 20140 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
d0ac1c44 | 20141 | as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. |
4df42755 DE |
20142 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
20143 | fi | |
20144 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
d0ac1c44 | 20145 | as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. |
4df42755 DE |
20146 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
20147 | fi | |
81ecdfbb RW |
20148 | |
20149 | ||
d0ac1c44 | 20150 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 20151 | ac_write_fail=0 |
bec39cab AC |
20152 | ac_clean_files_save=$ac_clean_files |
20153 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
20154 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
20155 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
20156 | as_write_fail=0 | |
20157 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
20158 | #! $SHELL |
20159 | # Generated by $as_me. | |
20160 | # Run this file to recreate the current configuration. | |
20161 | # Compiler output produced by configure, useful for debugging | |
20162 | # configure, is in config.log if it exists. | |
20163 | ||
20164 | debug=false | |
20165 | ac_cs_recheck=false | |
20166 | ac_cs_silent=false | |
bec39cab | 20167 | |
81ecdfbb RW |
20168 | SHELL=\${CONFIG_SHELL-$SHELL} |
20169 | export SHELL | |
20170 | _ASEOF | |
20171 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
20172 | ## -------------------- ## | |
20173 | ## M4sh Initialization. ## | |
20174 | ## -------------------- ## | |
20175 | ||
20176 | # Be more Bourne compatible | |
20177 | DUALCASE=1; export DUALCASE # for MKS sh | |
20178 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
20179 | emulate sh |
20180 | NULLCMD=: | |
81ecdfbb | 20181 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
20182 | # is contrary to our usage. Disable this feature. |
20183 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
20184 | setopt NO_GLOB_SUBST |
20185 | else | |
20186 | case `(set -o) 2>/dev/null` in #( | |
20187 | *posix*) : | |
20188 | set -o posix ;; #( | |
20189 | *) : | |
20190 | ;; | |
20191 | esac | |
bec39cab | 20192 | fi |
bec39cab | 20193 | |
81ecdfbb RW |
20194 | |
20195 | as_nl=' | |
20196 | ' | |
20197 | export as_nl | |
20198 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
20199 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
20200 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
20201 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
20202 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
20203 | # but without wasting forks for bash or zsh. | |
20204 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
20205 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
20206 | as_echo='print -r --' | |
20207 | as_echo_n='print -rn --' | |
20208 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
20209 | as_echo='printf %s\n' | |
20210 | as_echo_n='printf %s' | |
20211 | else | |
20212 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
20213 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
20214 | as_echo_n='/usr/ucb/echo -n' | |
20215 | else | |
20216 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
20217 | as_echo_n_body='eval | |
20218 | arg=$1; | |
20219 | case $arg in #( | |
20220 | *"$as_nl"*) | |
20221 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
20222 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
20223 | esac; | |
20224 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
20225 | ' | |
20226 | export as_echo_n_body | |
20227 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
20228 | fi | |
20229 | export as_echo_body | |
20230 | as_echo='sh -c $as_echo_body as_echo' | |
20231 | fi | |
20232 | ||
20233 | # The user is always right. | |
20234 | if test "${PATH_SEPARATOR+set}" != set; then | |
20235 | PATH_SEPARATOR=: | |
20236 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
20237 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
20238 | PATH_SEPARATOR=';' | |
20239 | } | |
bec39cab AC |
20240 | fi |
20241 | ||
20242 | ||
81ecdfbb RW |
20243 | # IFS |
20244 | # We need space, tab and new line, in precisely that order. Quoting is | |
20245 | # there to prevent editors from complaining about space-tab. | |
20246 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
20247 | # splitting by setting IFS to empty value.) | |
20248 | IFS=" "" $as_nl" | |
20249 | ||
20250 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 20251 | as_myself= |
81ecdfbb RW |
20252 | case $0 in #(( |
20253 | *[\\/]* ) as_myself=$0 ;; | |
20254 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20255 | for as_dir in $PATH | |
20256 | do | |
20257 | IFS=$as_save_IFS | |
20258 | test -z "$as_dir" && as_dir=. | |
20259 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
20260 | done | |
20261 | IFS=$as_save_IFS | |
20262 | ||
20263 | ;; | |
20264 | esac | |
20265 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
20266 | # in which case we are not to be found in the path. | |
20267 | if test "x$as_myself" = x; then | |
20268 | as_myself=$0 | |
20269 | fi | |
20270 | if test ! -f "$as_myself"; then | |
20271 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
20272 | exit 1 | |
20273 | fi | |
20274 | ||
20275 | # Unset variables that we do not need and which cause bugs (e.g. in | |
20276 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
20277 | # suppresses any "Segmentation fault" message there. '((' could | |
20278 | # trigger a bug in pdksh 5.2.14. | |
20279 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
20280 | do eval test x\${$as_var+set} = xset \ | |
20281 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
20282 | done | |
bec39cab AC |
20283 | PS1='$ ' |
20284 | PS2='> ' | |
20285 | PS4='+ ' | |
20286 | ||
20287 | # NLS nuisances. | |
81ecdfbb RW |
20288 | LC_ALL=C |
20289 | export LC_ALL | |
20290 | LANGUAGE=C | |
20291 | export LANGUAGE | |
20292 | ||
20293 | # CDPATH. | |
20294 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
20295 | ||
20296 | ||
d0ac1c44 SM |
20297 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
20298 | # ---------------------------------------- | |
81ecdfbb RW |
20299 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
20300 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 20301 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
20302 | as_fn_error () |
20303 | { | |
d0ac1c44 SM |
20304 | as_status=$1; test $as_status -eq 0 && as_status=1 |
20305 | if test "$4"; then | |
20306 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
20307 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 20308 | fi |
d0ac1c44 | 20309 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
20310 | as_fn_exit $as_status |
20311 | } # as_fn_error | |
20312 | ||
20313 | ||
20314 | # as_fn_set_status STATUS | |
20315 | # ----------------------- | |
20316 | # Set $? to STATUS, without forking. | |
20317 | as_fn_set_status () | |
20318 | { | |
20319 | return $1 | |
20320 | } # as_fn_set_status | |
20321 | ||
20322 | # as_fn_exit STATUS | |
20323 | # ----------------- | |
20324 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
20325 | as_fn_exit () | |
20326 | { | |
20327 | set +e | |
20328 | as_fn_set_status $1 | |
20329 | exit $1 | |
20330 | } # as_fn_exit | |
20331 | ||
20332 | # as_fn_unset VAR | |
20333 | # --------------- | |
20334 | # Portably unset VAR. | |
20335 | as_fn_unset () | |
20336 | { | |
20337 | { eval $1=; unset $1;} | |
20338 | } | |
20339 | as_unset=as_fn_unset | |
20340 | # as_fn_append VAR VALUE | |
20341 | # ---------------------- | |
20342 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
20343 | # advantage of any shell optimizations that allow amortized linear growth over | |
20344 | # repeated appends, instead of the typical quadratic growth present in naive | |
20345 | # implementations. | |
20346 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
20347 | eval 'as_fn_append () | |
20348 | { | |
20349 | eval $1+=\$2 | |
20350 | }' | |
20351 | else | |
20352 | as_fn_append () | |
20353 | { | |
20354 | eval $1=\$$1\$2 | |
20355 | } | |
20356 | fi # as_fn_append | |
20357 | ||
20358 | # as_fn_arith ARG... | |
20359 | # ------------------ | |
20360 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
20361 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
20362 | # must be portable across $(()) and expr. | |
20363 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
20364 | eval 'as_fn_arith () | |
20365 | { | |
20366 | as_val=$(( $* )) | |
20367 | }' | |
20368 | else | |
20369 | as_fn_arith () | |
20370 | { | |
20371 | as_val=`expr "$@" || test $? -eq 1` | |
20372 | } | |
20373 | fi # as_fn_arith | |
bec39cab | 20374 | |
81ecdfbb RW |
20375 | |
20376 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
20377 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
20378 | as_expr=expr |
20379 | else | |
20380 | as_expr=false | |
20381 | fi | |
20382 | ||
81ecdfbb | 20383 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
20384 | as_basename=basename |
20385 | else | |
20386 | as_basename=false | |
20387 | fi | |
20388 | ||
81ecdfbb RW |
20389 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
20390 | as_dirname=dirname | |
20391 | else | |
20392 | as_dirname=false | |
20393 | fi | |
bec39cab | 20394 | |
81ecdfbb | 20395 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
20396 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
20397 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
20398 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
20399 | $as_echo X/"$0" | | |
20400 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
20401 | s//\1/ | |
20402 | q | |
20403 | } | |
20404 | /^X\/\(\/\/\)$/{ | |
20405 | s//\1/ | |
20406 | q | |
20407 | } | |
20408 | /^X\/\(\/\).*/{ | |
20409 | s//\1/ | |
20410 | q | |
20411 | } | |
20412 | s/.*/./; q'` | |
b4e70030 | 20413 | |
b4e70030 JB |
20414 | # Avoid depending upon Character Ranges. |
20415 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
20416 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
20417 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
20418 | as_cr_digits='0123456789' | |
20419 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
20420 | ||
81ecdfbb RW |
20421 | ECHO_C= ECHO_N= ECHO_T= |
20422 | case `echo -n x` in #((((( | |
20423 | -n*) | |
20424 | case `echo 'xy\c'` in | |
20425 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
20426 | xy) ECHO_C='\c';; | |
20427 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
20428 | ECHO_T=' ';; | |
20429 | esac;; | |
20430 | *) | |
20431 | ECHO_N='-n';; | |
bec39cab AC |
20432 | esac |
20433 | ||
81ecdfbb RW |
20434 | rm -f conf$$ conf$$.exe conf$$.file |
20435 | if test -d conf$$.dir; then | |
20436 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 20437 | else |
81ecdfbb RW |
20438 | rm -f conf$$.dir |
20439 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 20440 | fi |
81ecdfbb RW |
20441 | if (echo >conf$$.file) 2>/dev/null; then |
20442 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 20443 | as_ln_s='ln -s' |
81ecdfbb RW |
20444 | # ... but there are two gotchas: |
20445 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
20446 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 20447 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 20448 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 20449 | as_ln_s='cp -pR' |
81ecdfbb RW |
20450 | elif ln conf$$.file conf$$ 2>/dev/null; then |
20451 | as_ln_s=ln | |
20452 | else | |
d0ac1c44 | 20453 | as_ln_s='cp -pR' |
b4e70030 | 20454 | fi |
bec39cab | 20455 | else |
d0ac1c44 | 20456 | as_ln_s='cp -pR' |
bec39cab | 20457 | fi |
81ecdfbb RW |
20458 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
20459 | rmdir conf$$.dir 2>/dev/null | |
20460 | ||
20461 | ||
20462 | # as_fn_mkdir_p | |
20463 | # ------------- | |
20464 | # Create "$as_dir" as a directory, including parents if necessary. | |
20465 | as_fn_mkdir_p () | |
20466 | { | |
20467 | ||
20468 | case $as_dir in #( | |
20469 | -*) as_dir=./$as_dir;; | |
20470 | esac | |
20471 | test -d "$as_dir" || eval $as_mkdir_p || { | |
20472 | as_dirs= | |
20473 | while :; do | |
20474 | case $as_dir in #( | |
20475 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
20476 | *) as_qdir=$as_dir;; | |
20477 | esac | |
20478 | as_dirs="'$as_qdir' $as_dirs" | |
20479 | as_dir=`$as_dirname -- "$as_dir" || | |
20480 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
20481 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
20482 | X"$as_dir" : 'X\(//\)$' \| \ | |
20483 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
20484 | $as_echo X"$as_dir" | | |
20485 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
20486 | s//\1/ | |
20487 | q | |
20488 | } | |
20489 | /^X\(\/\/\)[^/].*/{ | |
20490 | s//\1/ | |
20491 | q | |
20492 | } | |
20493 | /^X\(\/\/\)$/{ | |
20494 | s//\1/ | |
20495 | q | |
20496 | } | |
20497 | /^X\(\/\).*/{ | |
20498 | s//\1/ | |
20499 | q | |
20500 | } | |
20501 | s/.*/./; q'` | |
20502 | test -d "$as_dir" && break | |
20503 | done | |
20504 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 20505 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb | 20506 | |
bec39cab | 20507 | |
81ecdfbb | 20508 | } # as_fn_mkdir_p |
bec39cab | 20509 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 20510 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
20511 | else |
20512 | test -d ./-p && rmdir ./-p | |
20513 | as_mkdir_p=false | |
20514 | fi | |
20515 | ||
d0ac1c44 SM |
20516 | |
20517 | # as_fn_executable_p FILE | |
20518 | # ----------------------- | |
20519 | # Test if FILE is an executable regular file. | |
20520 | as_fn_executable_p () | |
20521 | { | |
20522 | test -f "$1" && test -x "$1" | |
20523 | } # as_fn_executable_p | |
20524 | as_test_x='test -x' | |
20525 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
20526 | |
20527 | # Sed expression to map a string onto a valid CPP name. | |
20528 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
20529 | ||
20530 | # Sed expression to map a string onto a valid variable name. | |
20531 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
20532 | ||
20533 | ||
bec39cab | 20534 | exec 6>&1 |
81ecdfbb RW |
20535 | ## ----------------------------------- ## |
20536 | ## Main body of $CONFIG_STATUS script. ## | |
20537 | ## ----------------------------------- ## | |
20538 | _ASEOF | |
20539 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
20540 | ||
20541 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20542 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 20543 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
20544 | # values after options handling. |
20545 | ac_log=" | |
bec39cab | 20546 | This file was extended by $as_me, which was |
d0ac1c44 | 20547 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
20548 | |
20549 | CONFIG_FILES = $CONFIG_FILES | |
20550 | CONFIG_HEADERS = $CONFIG_HEADERS | |
20551 | CONFIG_LINKS = $CONFIG_LINKS | |
20552 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
20553 | $ $0 $@ | |
20554 | ||
81ecdfbb RW |
20555 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
20556 | " | |
20557 | ||
bec39cab AC |
20558 | _ACEOF |
20559 | ||
81ecdfbb RW |
20560 | case $ac_config_files in *" |
20561 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
20562 | esac | |
234b45d4 | 20563 | |
81ecdfbb RW |
20564 | case $ac_config_headers in *" |
20565 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
20566 | esac | |
b4e70030 | 20567 | |
b4e70030 | 20568 | |
81ecdfbb RW |
20569 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
20570 | # Files that config.status was made for. | |
20571 | config_files="$ac_config_files" | |
20572 | config_headers="$ac_config_headers" | |
20573 | config_links="$ac_config_links" | |
20574 | config_commands="$ac_config_commands" | |
234b45d4 | 20575 | |
81ecdfbb | 20576 | _ACEOF |
b4e70030 | 20577 | |
81ecdfbb | 20578 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 20579 | ac_cs_usage="\ |
81ecdfbb RW |
20580 | \`$as_me' instantiates files and other configuration actions |
20581 | from templates according to the current configuration. Unless the files | |
20582 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 20583 | |
81ecdfbb | 20584 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 20585 | |
bec39cab | 20586 | -h, --help print this help, then exit |
81ecdfbb | 20587 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 20588 | --config print configuration, then exit |
81ecdfbb RW |
20589 | -q, --quiet, --silent |
20590 | do not print progress messages | |
bec39cab AC |
20591 | -d, --debug don't remove temporary files |
20592 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
20593 | --file=FILE[:TEMPLATE] |
20594 | instantiate the configuration file FILE | |
20595 | --header=FILE[:TEMPLATE] | |
20596 | instantiate the configuration header FILE | |
234b45d4 | 20597 | |
bec39cab AC |
20598 | Configuration files: |
20599 | $config_files | |
234b45d4 | 20600 | |
bec39cab AC |
20601 | Configuration headers: |
20602 | $config_headers | |
234b45d4 | 20603 | |
bec39cab AC |
20604 | Configuration links: |
20605 | $config_links | |
234b45d4 | 20606 | |
bec39cab AC |
20607 | Configuration commands: |
20608 | $config_commands | |
20609 | ||
81ecdfbb | 20610 | Report bugs to the package provider." |
b4e70030 | 20611 | |
81ecdfbb RW |
20612 | _ACEOF |
20613 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20614 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
20615 | ac_cs_version="\\ |
20616 | config.status | |
d0ac1c44 SM |
20617 | configured by $0, generated by GNU Autoconf 2.69, |
20618 | with options \\"\$ac_cs_config\\" | |
bec39cab | 20619 | |
d0ac1c44 | 20620 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
20621 | This config.status script is free software; the Free Software Foundation |
20622 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
20623 | |
20624 | ac_pwd='$ac_pwd' | |
20625 | srcdir='$srcdir' | |
20626 | INSTALL='$INSTALL' | |
81ecdfbb RW |
20627 | AWK='$AWK' |
20628 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
20629 | _ACEOF |
20630 | ||
81ecdfbb RW |
20631 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20632 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
20633 | ac_need_defaults=: |
20634 | while test $# != 0 | |
20635 | do | |
20636 | case $1 in | |
d0ac1c44 | 20637 | --*=?*) |
81ecdfbb RW |
20638 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
20639 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 20640 | ac_shift=: |
c906108c | 20641 | ;; |
d0ac1c44 SM |
20642 | --*=) |
20643 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
20644 | ac_optarg= | |
20645 | ac_shift=: | |
20646 | ;; | |
81ecdfbb | 20647 | *) |
bec39cab AC |
20648 | ac_option=$1 |
20649 | ac_optarg=$2 | |
20650 | ac_shift=shift | |
c906108c | 20651 | ;; |
bec39cab | 20652 | esac |
c906108c | 20653 | |
bec39cab AC |
20654 | case $ac_option in |
20655 | # Handling of the options. | |
bec39cab AC |
20656 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
20657 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
20658 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
20659 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
20660 | --config | --confi | --conf | --con | --co | --c ) |
20661 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 20662 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
20663 | debug=: ;; |
20664 | --file | --fil | --fi | --f ) | |
20665 | $ac_shift | |
81ecdfbb RW |
20666 | case $ac_optarg in |
20667 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 20668 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
20669 | esac |
20670 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
20671 | ac_need_defaults=false;; |
20672 | --header | --heade | --head | --hea ) | |
20673 | $ac_shift | |
81ecdfbb RW |
20674 | case $ac_optarg in |
20675 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
20676 | esac | |
20677 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 20678 | ac_need_defaults=false;; |
81ecdfbb RW |
20679 | --he | --h) |
20680 | # Conflict between --help and --header | |
d0ac1c44 | 20681 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
20682 | Try \`$0 --help' for more information.";; |
20683 | --help | --hel | -h ) | |
20684 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
20685 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
20686 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
20687 | ac_cs_silent=: ;; | |
c906108c | 20688 | |
bec39cab | 20689 | # This is an error. |
d0ac1c44 | 20690 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 20691 | Try \`$0 --help' for more information." ;; |
c906108c | 20692 | |
81ecdfbb RW |
20693 | *) as_fn_append ac_config_targets " $1" |
20694 | ac_need_defaults=false ;; | |
c906108c | 20695 | |
bec39cab AC |
20696 | esac |
20697 | shift | |
20698 | done | |
c906108c | 20699 | |
bec39cab | 20700 | ac_configure_extra_args= |
c906108c | 20701 | |
bec39cab AC |
20702 | if $ac_cs_silent; then |
20703 | exec 6>/dev/null | |
20704 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
20705 | fi | |
c906108c | 20706 | |
bec39cab | 20707 | _ACEOF |
81ecdfbb | 20708 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 20709 | if \$ac_cs_recheck; then |
d0ac1c44 | 20710 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
20711 | shift |
20712 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
20713 | CONFIG_SHELL='$SHELL' | |
20714 | export CONFIG_SHELL | |
20715 | exec "\$@" | |
bec39cab AC |
20716 | fi |
20717 | ||
20718 | _ACEOF | |
81ecdfbb RW |
20719 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20720 | exec 5>>config.log | |
20721 | { | |
20722 | echo | |
20723 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
20724 | ## Running $as_me. ## | |
20725 | _ASBOX | |
20726 | $as_echo "$ac_log" | |
20727 | } >&5 | |
bec39cab | 20728 | |
81ecdfbb RW |
20729 | _ACEOF |
20730 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 20731 | # |
81ecdfbb | 20732 | # INIT-COMMANDS |
c906108c | 20733 | # |
a417dc56 | 20734 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
a0a461e5 | 20735 | GDB_NM_FILE=$GDB_NM_FILE |
b4e70030 | 20736 | |
bec39cab AC |
20737 | _ACEOF |
20738 | ||
81ecdfbb | 20739 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 20740 | |
81ecdfbb | 20741 | # Handling of arguments. |
bec39cab | 20742 | for ac_config_target in $ac_config_targets |
c906108c | 20743 | do |
81ecdfbb RW |
20744 | case $ac_config_target in |
20745 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
20746 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 20747 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
a0a461e5 | 20748 | "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;; |
b292c783 | 20749 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 20750 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 20751 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
141ec9f6 | 20752 | "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; |
5ae98d25 | 20753 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 20754 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb | 20755 | |
d0ac1c44 | 20756 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c906108c SS |
20757 | esac |
20758 | done | |
20759 | ||
81ecdfbb | 20760 | |
bec39cab AC |
20761 | # If the user did not use the arguments to specify the items to instantiate, |
20762 | # then the envvar interface is used. Set only those that are not. | |
20763 | # We use the long form for the default assignment because of an extremely | |
20764 | # bizarre bug on SunOS 4.1.3. | |
20765 | if $ac_need_defaults; then | |
20766 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
20767 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
20768 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
20769 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
20770 | fi | |
20771 | ||
b4e70030 | 20772 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 20773 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 20774 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
20775 | # Hook for its removal unless debugging. |
20776 | # Note that there is a small window in which the directory will not be cleaned: | |
20777 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
20778 | $debug || |
20779 | { | |
d0ac1c44 | 20780 | tmp= ac_tmp= |
81ecdfbb | 20781 | trap 'exit_status=$? |
d0ac1c44 SM |
20782 | : "${ac_tmp:=$tmp}" |
20783 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
20784 | ' 0 |
20785 | trap 'as_fn_exit 1' 1 2 13 15 | |
20786 | } | |
20787 | # Create a (secure) tmp directory for tmp files. | |
20788 | ||
20789 | { | |
20790 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 20791 | test -d "$tmp" |
81ecdfbb RW |
20792 | } || |
20793 | { | |
20794 | tmp=./conf$$-$RANDOM | |
20795 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
20796 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
20797 | ac_tmp=$tmp | |
81ecdfbb RW |
20798 | |
20799 | # Set up the scripts for CONFIG_FILES section. | |
20800 | # No need to generate them if there are no CONFIG_FILES. | |
20801 | # This happens for instance with `./config.status config.h'. | |
20802 | if test -n "$CONFIG_FILES"; then | |
20803 | ||
20804 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
20805 | ac_cs_awk_getline=: | |
20806 | ac_cs_awk_pipe_init= | |
20807 | ac_cs_awk_read_file=' | |
20808 | while ((getline aline < (F[key])) > 0) | |
20809 | print(aline) | |
20810 | close(F[key])' | |
20811 | ac_cs_awk_pipe_fini= | |
20812 | else | |
20813 | ac_cs_awk_getline=false | |
20814 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
20815 | ac_cs_awk_read_file=' | |
20816 | print "|#_!!_#|" | |
20817 | print "cat " F[key] " &&" | |
20818 | '$ac_cs_awk_pipe_init | |
20819 | # The final `:' finishes the AND list. | |
20820 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
20821 | fi | |
20822 | ac_cr=`echo X | tr X '\015'` | |
20823 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
20824 | # But we know of no other shell where ac_cr would be empty at this | |
20825 | # point, so we can use a bashism as a fallback. | |
20826 | if test "x$ac_cr" = x; then | |
20827 | eval ac_cr=\$\'\\r\' | |
20828 | fi | |
20829 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
20830 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 20831 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
20832 | else |
20833 | ac_cs_awk_cr=$ac_cr | |
20834 | fi | |
20835 | ||
d0ac1c44 | 20836 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
20837 | _ACEOF |
20838 | ||
20839 | # Create commands to substitute file output variables. | |
20840 | { | |
20841 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d0ac1c44 | 20842 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
81ecdfbb RW |
20843 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
20844 | echo "_ACAWK" && | |
20845 | echo "_ACEOF" | |
20846 | } >conf$$files.sh && | |
20847 | . ./conf$$files.sh || | |
d0ac1c44 | 20848 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20849 | rm -f conf$$files.sh |
20850 | ||
20851 | { | |
20852 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
20853 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
20854 | echo "_ACEOF" | |
20855 | } >conf$$subs.sh || | |
d0ac1c44 SM |
20856 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
20857 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
20858 | ac_delim='%!_!# ' |
20859 | for ac_last_try in false false false false false :; do | |
20860 | . ./conf$$subs.sh || | |
d0ac1c44 | 20861 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20862 | |
20863 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
20864 | if test $ac_delim_n = $ac_delim_num; then | |
20865 | break | |
20866 | elif $ac_last_try; then | |
d0ac1c44 | 20867 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20868 | else |
20869 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20870 | fi | |
20871 | done | |
20872 | rm -f conf$$subs.sh | |
20873 | ||
20874 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20875 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
20876 | _ACEOF |
20877 | sed -n ' | |
20878 | h | |
20879 | s/^/S["/; s/!.*/"]=/ | |
20880 | p | |
20881 | g | |
20882 | s/^[^!]*!// | |
20883 | :repl | |
20884 | t repl | |
20885 | s/'"$ac_delim"'$// | |
20886 | t delim | |
20887 | :nl | |
20888 | h | |
d0ac1c44 | 20889 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20890 | t more1 |
20891 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
20892 | p | |
20893 | n | |
20894 | b repl | |
20895 | :more1 | |
20896 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20897 | p | |
20898 | g | |
20899 | s/.\{148\}// | |
20900 | t nl | |
20901 | :delim | |
20902 | h | |
d0ac1c44 | 20903 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20904 | t more2 |
20905 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
20906 | p | |
20907 | b | |
20908 | :more2 | |
20909 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20910 | p | |
20911 | g | |
20912 | s/.\{148\}// | |
20913 | t delim | |
20914 | ' <conf$$subs.awk | sed ' | |
20915 | /^[^""]/{ | |
20916 | N | |
20917 | s/\n// | |
20918 | } | |
20919 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
20920 | rm -f conf$$subs.awk | |
20921 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20922 | _ACAWK | |
d0ac1c44 | 20923 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
20924 | for (key in S) S_is_set[key] = 1 |
20925 | FS = "\a" | |
20926 | \$ac_cs_awk_pipe_init | |
20927 | } | |
20928 | { | |
20929 | line = $ 0 | |
20930 | nfields = split(line, field, "@") | |
20931 | substed = 0 | |
20932 | len = length(field[1]) | |
20933 | for (i = 2; i < nfields; i++) { | |
20934 | key = field[i] | |
20935 | keylen = length(key) | |
20936 | if (S_is_set[key]) { | |
20937 | value = S[key] | |
20938 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
20939 | len += length(value) + length(field[++i]) | |
20940 | substed = 1 | |
20941 | } else | |
20942 | len += 1 + keylen | |
20943 | } | |
20944 | if (nfields == 3 && !substed) { | |
20945 | key = field[2] | |
20946 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
20947 | \$ac_cs_awk_read_file | |
20948 | next | |
20949 | } | |
20950 | } | |
20951 | print line | |
b4e70030 | 20952 | } |
81ecdfbb RW |
20953 | \$ac_cs_awk_pipe_fini |
20954 | _ACAWK | |
20955 | _ACEOF | |
20956 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20957 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
20958 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
20959 | else | |
20960 | cat | |
d0ac1c44 SM |
20961 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
20962 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
81ecdfbb RW |
20963 | _ACEOF |
20964 | ||
d0ac1c44 SM |
20965 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
20966 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
20967 | # trailing colons and then remove the whole line if VPATH becomes empty |
20968 | # (actually we leave an empty line to preserve line numbers). | |
20969 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
20970 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
20971 | h | |
20972 | s/// | |
20973 | s/^/:/ | |
20974 | s/[ ]*$/:/ | |
20975 | s/:\$(srcdir):/:/g | |
20976 | s/:\${srcdir}:/:/g | |
20977 | s/:@srcdir@:/:/g | |
20978 | s/^:*// | |
81ecdfbb | 20979 | s/:*$// |
d0ac1c44 SM |
20980 | x |
20981 | s/\(=[ ]*\).*/\1/ | |
20982 | G | |
20983 | s/\n// | |
81ecdfbb RW |
20984 | s/^[^=]*=[ ]*$// |
20985 | }' | |
20986 | fi | |
20987 | ||
20988 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20989 | fi # test -n "$CONFIG_FILES" | |
20990 | ||
20991 | # Set up the scripts for CONFIG_HEADERS section. | |
20992 | # No need to generate them if there are no CONFIG_HEADERS. | |
20993 | # This happens for instance with `./config.status Makefile'. | |
20994 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 20995 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb RW |
20996 | BEGIN { |
20997 | _ACEOF | |
20998 | ||
20999 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
21000 | # here-document in config.status, that substitutes the proper values into | |
21001 | # config.h.in to produce config.h. | |
4e8d927d | 21002 | |
81ecdfbb RW |
21003 | # Create a delimiter string that does not exist in confdefs.h, to ease |
21004 | # handling of long lines. | |
21005 | ac_delim='%!_!# ' | |
21006 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
21007 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
21008 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
21009 | break |
21010 | elif $ac_last_try; then | |
d0ac1c44 | 21011 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
21012 | else |
21013 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
21014 | fi | |
21015 | done | |
4e8d927d | 21016 | |
81ecdfbb RW |
21017 | # For the awk script, D is an array of macro values keyed by name, |
21018 | # likewise P contains macro parameters if any. Preserve backslash | |
21019 | # newline sequences. | |
21020 | ||
21021 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
21022 | sed -n ' | |
21023 | s/.\{148\}/&'"$ac_delim"'/g | |
21024 | t rset | |
21025 | :rset | |
21026 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
21027 | t def | |
21028 | d | |
21029 | :def | |
21030 | s/\\$// | |
21031 | t bsnl | |
21032 | s/["\\]/\\&/g | |
21033 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
21034 | D["\1"]=" \3"/p | |
21035 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
21036 | d | |
21037 | :bsnl | |
21038 | s/["\\]/\\&/g | |
21039 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
21040 | D["\1"]=" \3\\\\\\n"\\/p | |
21041 | t cont | |
21042 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
21043 | t cont | |
21044 | d | |
21045 | :cont | |
21046 | n | |
21047 | s/.\{148\}/&'"$ac_delim"'/g | |
21048 | t clear | |
21049 | :clear | |
21050 | s/\\$// | |
21051 | t bsnlc | |
21052 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
21053 | d | |
21054 | :bsnlc | |
21055 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
21056 | b cont | |
21057 | ' <confdefs.h | sed ' | |
21058 | s/'"$ac_delim"'/"\\\ | |
21059 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
21060 | ||
21061 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21062 | for (key in D) D_is_set[key] = 1 | |
21063 | FS = "\a" | |
21064 | } | |
21065 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
21066 | line = \$ 0 | |
21067 | split(line, arg, " ") | |
21068 | if (arg[1] == "#") { | |
21069 | defundef = arg[2] | |
21070 | mac1 = arg[3] | |
21071 | } else { | |
21072 | defundef = substr(arg[1], 2) | |
21073 | mac1 = arg[2] | |
21074 | } | |
21075 | split(mac1, mac2, "(") #) | |
21076 | macro = mac2[1] | |
21077 | prefix = substr(line, 1, index(line, defundef) - 1) | |
21078 | if (D_is_set[macro]) { | |
21079 | # Preserve the white space surrounding the "#". | |
21080 | print prefix "define", macro P[macro] D[macro] | |
21081 | next | |
21082 | } else { | |
21083 | # Replace #undef with comments. This is necessary, for example, | |
21084 | # in the case of _POSIX_SOURCE, which is predefined and required | |
21085 | # on some systems where configure will not decide to define it. | |
21086 | if (defundef == "undef") { | |
21087 | print "/*", prefix defundef, macro, "*/" | |
21088 | next | |
21089 | } | |
21090 | } | |
b4e70030 | 21091 | } |
81ecdfbb RW |
21092 | { print } |
21093 | _ACAWK | |
b4e70030 | 21094 | _ACEOF |
81ecdfbb | 21095 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 21096 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb | 21097 | fi # test -n "$CONFIG_HEADERS" |
4e8d927d | 21098 | |
4e8d927d | 21099 | |
81ecdfbb RW |
21100 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
21101 | shift | |
21102 | for ac_tag | |
21103 | do | |
21104 | case $ac_tag in | |
21105 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
21106 | esac | |
21107 | case $ac_mode$ac_tag in | |
21108 | :[FHL]*:*);; | |
d0ac1c44 | 21109 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
21110 | :[FH]-) ac_tag=-:-;; |
21111 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
21112 | esac | |
21113 | ac_save_IFS=$IFS | |
21114 | IFS=: | |
21115 | set x $ac_tag | |
21116 | IFS=$ac_save_IFS | |
21117 | shift | |
21118 | ac_file=$1 | |
21119 | shift | |
4e8d927d | 21120 | |
81ecdfbb RW |
21121 | case $ac_mode in |
21122 | :L) ac_source=$1;; | |
21123 | :[FH]) | |
21124 | ac_file_inputs= | |
21125 | for ac_f | |
21126 | do | |
21127 | case $ac_f in | |
d0ac1c44 | 21128 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
21129 | *) # Look for the file first in the build tree, then in the source tree |
21130 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
21131 | # because $ac_f cannot contain `:'. | |
21132 | test -f "$ac_f" || | |
21133 | case $ac_f in | |
21134 | [\\/$]*) false;; | |
21135 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
21136 | esac || | |
d0ac1c44 | 21137 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
21138 | esac |
21139 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
21140 | as_fn_append ac_file_inputs " '$ac_f'" | |
21141 | done | |
21142 | ||
21143 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
21144 | # use $as_me), people would be surprised to read: | |
21145 | # /* config.h. Generated by config.status. */ | |
21146 | configure_input='Generated from '` | |
21147 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
21148 | `' by configure.' | |
21149 | if test x"$ac_file" != x-; then | |
21150 | configure_input="$ac_file. $configure_input" | |
21151 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
21152 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 21153 | fi |
81ecdfbb RW |
21154 | # Neutralize special characters interpreted by sed in replacement strings. |
21155 | case $configure_input in #( | |
21156 | *\&* | *\|* | *\\* ) | |
21157 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
21158 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
21159 | *) ac_sed_conf_input=$configure_input;; | |
21160 | esac | |
4e8d927d | 21161 | |
81ecdfbb | 21162 | case $ac_tag in |
d0ac1c44 SM |
21163 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
21164 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
21165 | esac |
21166 | ;; | |
c906108c SS |
21167 | esac |
21168 | ||
81ecdfbb | 21169 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
21170 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
21171 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
21172 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
21173 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
21174 | $as_echo X"$ac_file" | | |
21175 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
21176 | s//\1/ | |
21177 | q | |
21178 | } | |
21179 | /^X\(\/\/\)[^/].*/{ | |
21180 | s//\1/ | |
21181 | q | |
21182 | } | |
21183 | /^X\(\/\/\)$/{ | |
21184 | s//\1/ | |
21185 | q | |
21186 | } | |
21187 | /^X\(\/\).*/{ | |
21188 | s//\1/ | |
21189 | q | |
21190 | } | |
21191 | s/.*/./; q'` | |
21192 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
21193 | ac_builddir=. |
21194 | ||
81ecdfbb RW |
21195 | case "$ac_dir" in |
21196 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21197 | *) | |
21198 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
21199 | # A ".." for each directory in $ac_dir_suffix. | |
21200 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
21201 | case $ac_top_builddir_sub in | |
21202 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21203 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
21204 | esac ;; | |
21205 | esac | |
21206 | ac_abs_top_builddir=$ac_pwd | |
21207 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
21208 | # for backward compatibility: | |
21209 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
21210 | |
21211 | case $srcdir in | |
81ecdfbb | 21212 | .) # We are building in place. |
bec39cab | 21213 | ac_srcdir=. |
81ecdfbb RW |
21214 | ac_top_srcdir=$ac_top_builddir_sub |
21215 | ac_abs_top_srcdir=$ac_pwd ;; | |
21216 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 21217 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
21218 | ac_top_srcdir=$srcdir |
21219 | ac_abs_top_srcdir=$srcdir ;; | |
21220 | *) # Relative name. | |
21221 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
21222 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
21223 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 21224 | esac |
81ecdfbb | 21225 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 21226 | |
c906108c | 21227 | |
81ecdfbb RW |
21228 | case $ac_mode in |
21229 | :F) | |
21230 | # | |
21231 | # CONFIG_FILE | |
21232 | # | |
c906108c | 21233 | |
bec39cab AC |
21234 | case $INSTALL in |
21235 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 21236 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 21237 | esac |
81ecdfbb | 21238 | _ACEOF |
121ce6e5 | 21239 | |
81ecdfbb RW |
21240 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
21241 | # If the template does not know about datarootdir, expand it. | |
21242 | # FIXME: This hack should be removed a few years after 2.60. | |
21243 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
21244 | ac_sed_dataroot=' | |
21245 | /datarootdir/ { | |
21246 | p | |
21247 | q | |
21248 | } | |
21249 | /@datadir@/p | |
21250 | /@docdir@/p | |
21251 | /@infodir@/p | |
21252 | /@localedir@/p | |
21253 | /@mandir@/p' | |
21254 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
21255 | *datarootdir*) ac_datarootdir_seen=yes;; | |
21256 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
21257 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
21258 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
21259 | _ACEOF | |
21260 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21261 | ac_datarootdir_hack=' | |
21262 | s&@datadir@&$datadir&g | |
21263 | s&@docdir@&$docdir&g | |
21264 | s&@infodir@&$infodir&g | |
21265 | s&@localedir@&$localedir&g | |
21266 | s&@mandir@&$mandir&g | |
21267 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
21268 | esac | |
4e8d927d | 21269 | _ACEOF |
81ecdfbb RW |
21270 | |
21271 | # Neutralize VPATH when `$srcdir' = `.'. | |
21272 | # Shell code in configure.ac might set extrasub. | |
21273 | # FIXME: do we really want to maintain this feature? | |
21274 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21275 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
21276 | $extrasub |
21277 | _ACEOF | |
81ecdfbb | 21278 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
21279 | :t |
21280 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
21281 | s|@configure_input@|$ac_sed_conf_input|;t t |
21282 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
21283 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
21284 | s&@srcdir@&$ac_srcdir&;t t | |
21285 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
21286 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
21287 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
21288 | s&@builddir@&$ac_builddir&;t t | |
21289 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
21290 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
21291 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
21292 | $ac_datarootdir_hack |
21293 | " | |
21294 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
21295 | if $ac_cs_awk_getline; then | |
d0ac1c44 | 21296 | $AWK -f "$ac_tmp/subs.awk" |
81ecdfbb | 21297 | else |
d0ac1c44 SM |
21298 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
21299 | fi \ | |
21300 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
21301 | |
21302 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
21303 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
21304 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
21305 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 21306 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 21307 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 21308 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 21309 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 21310 | |
d0ac1c44 | 21311 | rm -f "$ac_tmp/stdin" |
bec39cab | 21312 | case $ac_file in |
d0ac1c44 SM |
21313 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
21314 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 21315 | esac \ |
d0ac1c44 | 21316 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
21317 | ;; |
21318 | :H) | |
21319 | # | |
21320 | # CONFIG_HEADER | |
21321 | # | |
bec39cab | 21322 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
21323 | { |
21324 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
21325 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
21326 | } >"$ac_tmp/config.h" \ | |
21327 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
21328 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
21329 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
21330 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 21331 | else |
81ecdfbb | 21332 | rm -f "$ac_file" |
d0ac1c44 SM |
21333 | mv "$ac_tmp/config.h" "$ac_file" \ |
21334 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
21335 | fi |
21336 | else | |
81ecdfbb | 21337 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
21338 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
21339 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
bec39cab | 21340 | fi |
81ecdfbb RW |
21341 | ;; |
21342 | :L) | |
21343 | # | |
21344 | # CONFIG_LINK | |
21345 | # | |
c906108c | 21346 | |
81ecdfbb RW |
21347 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
21348 | : | |
b4e70030 | 21349 | else |
81ecdfbb RW |
21350 | # Prefer the file from the source tree if names are identical. |
21351 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
21352 | ac_source=$srcdir/$ac_source | |
21353 | fi | |
b4e70030 | 21354 | |
81ecdfbb RW |
21355 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
21356 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 21357 | |
81ecdfbb | 21358 | if test ! -r "$ac_source"; then |
d0ac1c44 | 21359 | as_fn_error $? "$ac_source: file not found" "$LINENO" 5 |
81ecdfbb RW |
21360 | fi |
21361 | rm -f "$ac_file" | |
bec39cab | 21362 | |
81ecdfbb | 21363 | # Try a relative symlink, then a hard link, then a copy. |
d0ac1c44 | 21364 | case $ac_source in |
81ecdfbb RW |
21365 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; |
21366 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
21367 | esac | |
21368 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
21369 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
21370 | cp -p "$ac_source" "$ac_file" || | |
d0ac1c44 | 21371 | as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 |
81ecdfbb RW |
21372 | fi |
21373 | ;; | |
21374 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
21375 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
21376 | ;; | |
c906108c | 21377 | esac |
b4e70030 | 21378 | |
bec39cab | 21379 | |
81ecdfbb | 21380 | case $ac_file$ac_mode in |
c5adaa19 | 21381 | "config.h":H) echo > stamp-h ;; |
81ecdfbb | 21382 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
a0a461e5 | 21383 | "nm.h":L) echo > stamp-nmh ;; |
b292c783 | 21384 | "gcore":F) chmod +x gcore ;; |
81ecdfbb | 21385 | |
bec39cab | 21386 | esac |
81ecdfbb | 21387 | done # for ac_tag |
c906108c | 21388 | |
bec39cab | 21389 | |
81ecdfbb | 21390 | as_fn_exit 0 |
bec39cab | 21391 | _ACEOF |
bec39cab AC |
21392 | ac_clean_files=$ac_clean_files_save |
21393 | ||
81ecdfbb | 21394 | test $ac_write_fail = 0 || |
d0ac1c44 | 21395 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 21396 | |
bec39cab AC |
21397 | |
21398 | # configure is writing to config.log, and then calls config.status. | |
21399 | # config.status does its own redirection, appending to config.log. | |
21400 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
21401 | # by configure, so config.status won't be able to write to it; its | |
21402 | # output is simply discarded. So we exec the FD to /dev/null, | |
21403 | # effectively closing config.log, so it can be properly (re)opened and | |
21404 | # appended to by config.status. When coming back to configure, we | |
21405 | # need to make the FD available again. | |
21406 | if test "$no_create" != yes; then | |
21407 | ac_cs_success=: | |
21408 | ac_config_status_args= | |
21409 | test "$silent" = yes && | |
21410 | ac_config_status_args="$ac_config_status_args --quiet" | |
21411 | exec 5>/dev/null | |
21412 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
21413 | exec 5>>config.log | |
21414 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
21415 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 21416 | $ac_cs_success || as_fn_exit 1 |
bec39cab | 21417 | fi |
c906108c | 21418 | |
bec39cab | 21419 | # |
81ecdfbb | 21420 | # CONFIG_SUBDIRS section. |
bec39cab | 21421 | # |
c906108c SS |
21422 | if test "$no_recursion" != yes; then |
21423 | ||
81ecdfbb RW |
21424 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
21425 | # so they do not pile up. | |
c906108c SS |
21426 | ac_sub_configure_args= |
21427 | ac_prev= | |
fdc59709 PB |
21428 | eval "set x $ac_configure_args" |
21429 | shift | |
21430 | for ac_arg | |
21431 | do | |
c906108c SS |
21432 | if test -n "$ac_prev"; then |
21433 | ac_prev= | |
21434 | continue | |
21435 | fi | |
bec39cab | 21436 | case $ac_arg in |
c906108c SS |
21437 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
21438 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
21439 | ac_prev=cache_file ;; | |
21440 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
21441 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
21442 | | --c=*) | |
21443 | ;; | |
21444 | --config-cache | -C) | |
c906108c SS |
21445 | ;; |
21446 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
21447 | ac_prev=srcdir ;; | |
21448 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
21449 | ;; | |
bec39cab AC |
21450 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
21451 | ac_prev=prefix ;; | |
21452 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
21453 | ;; | |
81ecdfbb RW |
21454 | --disable-option-checking) |
21455 | ;; | |
fdc59709 PB |
21456 | *) |
21457 | case $ac_arg in | |
81ecdfbb | 21458 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 21459 | esac |
81ecdfbb | 21460 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
21461 | esac |
21462 | done | |
21463 | ||
bec39cab AC |
21464 | # Always prepend --prefix to ensure using the same prefix |
21465 | # in subdir configurations. | |
fdc59709 PB |
21466 | ac_arg="--prefix=$prefix" |
21467 | case $ac_arg in | |
81ecdfbb | 21468 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 21469 | esac |
81ecdfbb RW |
21470 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
21471 | ||
21472 | # Pass --silent | |
21473 | if test "$silent" = yes; then | |
21474 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
21475 | fi | |
21476 | ||
21477 | # Always prepend --disable-option-checking to silence warnings, since | |
21478 | # different subdirs can have different --enable and --with options. | |
21479 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 21480 | |
b4e70030 | 21481 | ac_popdir=`pwd` |
bec39cab | 21482 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
21483 | |
21484 | # Do not complain, so a configure script can configure whichever | |
21485 | # parts of a large source tree are present. | |
fdc59709 | 21486 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 21487 | |
81ecdfbb RW |
21488 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
21489 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
21490 | $as_echo "$ac_msg" >&6 | |
21491 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
21492 | ac_builddir=. |
21493 | ||
81ecdfbb RW |
21494 | case "$ac_dir" in |
21495 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21496 | *) | |
21497 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
21498 | # A ".." for each directory in $ac_dir_suffix. | |
21499 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
21500 | case $ac_top_builddir_sub in | |
21501 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21502 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
21503 | esac ;; | |
21504 | esac | |
21505 | ac_abs_top_builddir=$ac_pwd | |
21506 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
21507 | # for backward compatibility: | |
21508 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
21509 | |
21510 | case $srcdir in | |
81ecdfbb | 21511 | .) # We are building in place. |
bec39cab | 21512 | ac_srcdir=. |
81ecdfbb RW |
21513 | ac_top_srcdir=$ac_top_builddir_sub |
21514 | ac_abs_top_srcdir=$ac_pwd ;; | |
21515 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 21516 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
21517 | ac_top_srcdir=$srcdir |
21518 | ac_abs_top_srcdir=$srcdir ;; | |
21519 | *) # Relative name. | |
21520 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
21521 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
21522 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 21523 | esac |
81ecdfbb | 21524 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 21525 | |
c906108c | 21526 | |
fdc59709 | 21527 | cd "$ac_dir" |
c906108c SS |
21528 | |
21529 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
21530 | if test -f "$ac_srcdir/configure.gnu"; then |
21531 | ac_sub_configure=$ac_srcdir/configure.gnu | |
21532 | elif test -f "$ac_srcdir/configure"; then | |
21533 | ac_sub_configure=$ac_srcdir/configure | |
21534 | elif test -f "$ac_srcdir/configure.in"; then | |
21535 | # This should be Cygnus configure. | |
21536 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 21537 | else |
81ecdfbb RW |
21538 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
21539 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
21540 | ac_sub_configure= |
21541 | fi | |
21542 | ||
21543 | # The recursion is here. | |
21544 | if test -n "$ac_sub_configure"; then | |
c906108c | 21545 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
21546 | case $cache_file in |
21547 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
21548 | *) # Relative name. |
21549 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 21550 | esac |
c906108c | 21551 | |
81ecdfbb RW |
21552 | { $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 |
21553 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 21554 | # The eval makes quoting arguments work. |
fdc59709 PB |
21555 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
21556 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 21557 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
21558 | fi |
21559 | ||
fdc59709 | 21560 | cd "$ac_popdir" |
c906108c SS |
21561 | done |
21562 | fi | |
81ecdfbb RW |
21563 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
21564 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
21565 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
21566 | fi | |
c906108c | 21567 |