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 | ||
d0ac1c44 | 622 | ac_header_list= |
f99d1d37 | 623 | enable_option_checking=no |
c971b7fa | 624 | ac_subst_vars='LTLIBOBJS |
81ecdfbb | 625 | LIBOBJS |
f99d1d37 TT |
626 | NM_TRANSFORM_NAME |
627 | GAS_TRANSFORM_NAME | |
628 | READELF_TRANSFORM_NAME | |
629 | STRIP_TRANSFORM_NAME | |
b292c783 JK |
630 | GCORE_TRANSFORM_NAME |
631 | GDB_TRANSFORM_NAME | |
e3487908 | 632 | XSLTPROC |
a0a461e5 | 633 | NM_H |
81ecdfbb | 634 | GDB_NM_FILE |
ccb1ba62 CB |
635 | LTLIBXXHASH |
636 | LIBXXHASH | |
637 | HAVE_LIBXXHASH | |
1776e3e5 NA |
638 | CTF_DEPS |
639 | LIBCTF | |
f99d1d37 | 640 | enable_libctf |
393fd4c3 YQ |
641 | LTLIBBABELTRACE |
642 | LIBBABELTRACE | |
643 | HAVE_LIBBABELTRACE | |
21ea5acd SDJ |
644 | HAVE_NATIVE_GCORE_HOST |
645 | NAT_GENERATED_FILES | |
646 | XM_CLIBS | |
647 | MH_CFLAGS | |
648 | LOADLIBES | |
649 | NAT_CDEPS | |
650 | NATDEPFILES | |
651 | NAT_FILE | |
81ecdfbb RW |
652 | target_subdir |
653 | CONFIG_UNINSTALL | |
654 | CONFIG_INSTALL | |
655 | CONFIG_CLEAN | |
656 | CONFIG_ALL | |
657 | CONFIG_SRCS | |
658 | CONFIG_DEPS | |
659 | CONFIG_OBS | |
660 | PROFILE_CFLAGS | |
661 | ENABLE_CFLAGS | |
662 | SIM_OBS | |
663 | SIM | |
664 | XMKMF | |
665 | GDBTK_SRC_DIR | |
666 | GDBTK_CFLAGS | |
667 | GDBTKLIBS | |
668 | X_LIBS | |
669 | X_LDFLAGS | |
670 | X_CFLAGS | |
f99d1d37 | 671 | subdirs |
81ecdfbb RW |
672 | TK_XINCLUDES |
673 | TK_DEPS | |
674 | TK_LIBRARY | |
675 | TK_INCLUDE | |
676 | TK_STUB_LIB_SPEC | |
677 | TK_STUB_LIB_FLAG | |
678 | TK_STUB_LIB_FILE | |
679 | TK_LIB_SPEC | |
680 | TK_LIB_FLAG | |
681 | TK_LIB_FILE | |
682 | TK_SRC_DIR | |
683 | TK_BIN_DIR | |
684 | TK_VERSION | |
685 | TCL_DEPS | |
686 | TCL_LIBRARY | |
687 | TCL_INCLUDE | |
688 | TCL_STUB_LIB_SPEC | |
689 | TCL_STUB_LIB_FLAG | |
690 | TCL_STUB_LIB_FILE | |
691 | TCL_LIB_SPEC | |
692 | TCL_LIB_FLAG | |
693 | TCL_LIB_FILE | |
694 | TCL_SRC_DIR | |
695 | TCL_BIN_DIR | |
696 | TCL_PATCH_LEVEL | |
697 | TCL_VERSION | |
698 | WIN32LDAPP | |
b2ceabe8 | 699 | WIN32LIBS |
81ecdfbb RW |
700 | GUI_CFLAGS_X |
701 | LIBGUI | |
608e2dbb TT |
702 | LTLIBLZMA |
703 | LIBLZMA | |
704 | HAVE_LIBLZMA | |
81ecdfbb RW |
705 | SER_HARDWIRE |
706 | WERROR_CFLAGS | |
707 | WARN_CFLAGS | |
ed2a2229 | 708 | SYSTEM_GDBINIT_DIR |
81ecdfbb | 709 | SYSTEM_GDBINIT |
81ecdfbb RW |
710 | TARGET_SYSTEM_ROOT |
711 | CONFIG_LDFLAGS | |
f6528abd | 712 | RDYNAMIC |
05ea2a05 TT |
713 | LTLIBIPT |
714 | LIBIPT | |
715 | HAVE_LIBIPT | |
5e030278 TT |
716 | PTHREAD_CFLAGS |
717 | PTHREAD_LIBS | |
718 | PTHREAD_CC | |
719 | ax_pthread_config | |
720 | SED | |
81ecdfbb | 721 | ALLOCA |
62f29fda TT |
722 | SRCHIGH_CFLAGS |
723 | SRCHIGH_LIBS | |
4df42755 DE |
724 | HAVE_GUILE_FALSE |
725 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
726 | GUILE_LIBS |
727 | GUILE_CPPFLAGS | |
e76c5d17 DE |
728 | GUILD_TARGET_FLAG |
729 | GUILD | |
ed3ef339 | 730 | pkg_config_prog_path |
4df42755 DE |
731 | HAVE_PYTHON_FALSE |
732 | HAVE_PYTHON_TRUE | |
ac534cba JB |
733 | PYTHON_LIBS |
734 | PYTHON_CPPFLAGS | |
81ecdfbb | 735 | PYTHON_CFLAGS |
ec685c5e | 736 | python_prog_path |
2400729e UW |
737 | LTLIBMPFR |
738 | LIBMPFR | |
739 | HAVE_LIBMPFR | |
2c947d9b JB |
740 | LTLIBGMP |
741 | LIBGMP | |
742 | HAVE_LIBGMP | |
81ecdfbb RW |
743 | LTLIBEXPAT |
744 | LIBEXPAT | |
745 | HAVE_LIBEXPAT | |
b8e0a31c | 746 | JIT_READER_DIR |
f997c383 | 747 | TARGET_PTR |
39037522 | 748 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
749 | READLINE_CFLAGS |
750 | READLINE_DEPS | |
751 | READLINE | |
016a3251 DD |
752 | LTLIBICONV |
753 | LIBICONV | |
711a72d3 L |
754 | zlibinc |
755 | zlibdir | |
81ecdfbb RW |
756 | MIG |
757 | WINDRES | |
758 | DLLTOOL | |
c971b7fa | 759 | AR |
81ecdfbb RW |
760 | YFLAGS |
761 | YACC | |
c971b7fa | 762 | RANLIB |
81ecdfbb | 763 | LN_S |
c971b7fa PA |
764 | INSTALL_DATA |
765 | INSTALL_SCRIPT | |
766 | INSTALL_PROGRAM | |
767 | AWK | |
81ecdfbb RW |
768 | REPORT_BUGS_TEXI |
769 | REPORT_BUGS_TO | |
770 | PKGVERSION | |
44cee4fd | 771 | CODESIGN_CERT |
f6720b1c AM |
772 | DEBUGINFOD_LIBS |
773 | DEBUGINFOD_CFLAGS | |
774 | PKG_CONFIG_LIBDIR | |
775 | PKG_CONFIG_PATH | |
776 | PKG_CONFIG | |
b292c783 | 777 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb | 778 | TARGET_OBS |
f99d1d37 | 779 | RPATH_ENVVAR |
81ecdfbb RW |
780 | GDB_DATADIR |
781 | DEBUGDIR | |
5048e516 JK |
782 | MAKEINFO_EXTRA_FLAGS |
783 | MAKEINFOFLAGS | |
784 | MAKEINFO | |
81ecdfbb | 785 | PACKAGE |
81ecdfbb RW |
786 | CATOBJEXT |
787 | GENCAT | |
788 | INSTOBJEXT | |
789 | DATADIRNAME | |
790 | CATALOGS | |
791 | POSUB | |
792 | GMSGFMT | |
793 | XGETTEXT | |
794 | INCINTL | |
795 | LIBINTL_DEP | |
796 | LIBINTL | |
797 | USE_NLS | |
81ecdfbb RW |
798 | CCDEPMODE |
799 | DEPDIR | |
800 | am__leading_dot | |
0bcda685 PA |
801 | CXX_DIALECT |
802 | HAVE_CXX11 | |
b316465f | 803 | target_noncanonical |
4869db5e RM |
804 | INSTALL_STRIP_PROGRAM |
805 | STRIP | |
806 | install_sh | |
c8693053 | 807 | LARGEFILE_CPPFLAGS |
81ecdfbb RW |
808 | target_os |
809 | target_vendor | |
810 | target_cpu | |
811 | target | |
812 | host_os | |
813 | host_vendor | |
814 | host_cpu | |
815 | host | |
816 | build_os | |
817 | build_vendor | |
818 | build_cpu | |
819 | build | |
c971b7fa PA |
820 | EGREP |
821 | GREP | |
822 | CPP | |
3bc3d82a PA |
823 | ac_ct_CXX |
824 | CXXFLAGS | |
825 | CXX | |
81ecdfbb RW |
826 | OBJEXT |
827 | EXEEXT | |
828 | ac_ct_CC | |
829 | CPPFLAGS | |
830 | LDFLAGS | |
831 | CFLAGS | |
832 | CC | |
833 | MAINT | |
834 | MAINTAINER_MODE_FALSE | |
835 | MAINTAINER_MODE_TRUE | |
836 | target_alias | |
837 | host_alias | |
838 | build_alias | |
839 | LIBS | |
840 | ECHO_T | |
841 | ECHO_N | |
842 | ECHO_C | |
843 | DEFS | |
844 | mandir | |
845 | localedir | |
846 | libdir | |
847 | psdir | |
848 | pdfdir | |
849 | dvidir | |
850 | htmldir | |
851 | infodir | |
852 | docdir | |
853 | oldincludedir | |
854 | includedir | |
855 | localstatedir | |
856 | sharedstatedir | |
857 | sysconfdir | |
858 | datadir | |
859 | datarootdir | |
860 | libexecdir | |
861 | sbindir | |
862 | bindir | |
863 | program_transform_name | |
864 | prefix | |
865 | exec_prefix | |
866 | PACKAGE_URL | |
867 | PACKAGE_BUGREPORT | |
868 | PACKAGE_STRING | |
869 | PACKAGE_VERSION | |
870 | PACKAGE_TARNAME | |
871 | PACKAGE_NAME | |
872 | PATH_SEPARATOR | |
873 | SHELL' | |
2b351b19 | 874 | ac_subst_files='nat_makefile_frag' |
81ecdfbb RW |
875 | ac_user_opts=' |
876 | enable_option_checking | |
877 | enable_maintainer_mode | |
da2f07f1 JK |
878 | enable_plugins |
879 | enable_largefile | |
81ecdfbb RW |
880 | with_separate_debug_dir |
881 | with_gdb_datadir | |
882 | with_relocated_sources | |
7349ff92 | 883 | with_auto_load_dir |
bccbefd2 | 884 | with_auto_load_safe_path |
f99d1d37 | 885 | enable_shared |
81ecdfbb RW |
886 | enable_targets |
887 | enable_64_bit_bfd | |
81ecdfbb RW |
888 | enable_gdbmi |
889 | enable_tui | |
890 | enable_gdbtk | |
0d79cdc4 | 891 | with_debuginfod |
05e7c244 | 892 | with_libunwind_ia64 |
81ecdfbb RW |
893 | with_curses |
894 | enable_profiling | |
44cee4fd | 895 | enable_codesign |
81ecdfbb RW |
896 | with_pkgversion |
897 | with_bugurl | |
711a72d3 | 898 | with_system_zlib |
016a3251 DD |
899 | with_gnu_ld |
900 | enable_rpath | |
81ecdfbb | 901 | with_libiconv_prefix |
9f1528a1 | 902 | with_libiconv_type |
478aac75 | 903 | with_iconv_bin |
81ecdfbb | 904 | with_system_readline |
b8e0a31c | 905 | with_jit_reader_dir |
81ecdfbb | 906 | with_expat |
81ecdfbb | 907 | with_libexpat_prefix |
9f1528a1 | 908 | with_libexpat_type |
2c947d9b JB |
909 | with_libgmp_prefix |
910 | with_libgmp_type | |
2400729e UW |
911 | with_mpfr |
912 | with_libmpfr_prefix | |
9f1528a1 | 913 | with_libmpfr_type |
81ecdfbb | 914 | with_python |
d13c7322 | 915 | with_python_libdir |
ed3ef339 | 916 | with_guile |
189b8c2e | 917 | enable_source_highlight |
58bfce93 MM |
918 | with_intel_pt |
919 | with_libipt_prefix | |
9f1528a1 | 920 | with_libipt_type |
81ecdfbb RW |
921 | with_sysroot |
922 | with_system_gdbinit | |
ed2a2229 | 923 | with_system_gdbinit_dir |
81ecdfbb RW |
924 | enable_werror |
925 | enable_build_warnings | |
926 | enable_gdb_build_warnings | |
f35d5ade | 927 | enable_ubsan |
608e2dbb TT |
928 | with_lzma |
929 | with_liblzma_prefix | |
9f1528a1 | 930 | with_liblzma_type |
81ecdfbb RW |
931 | with_tcl |
932 | with_tk | |
933 | with_x | |
934 | enable_sim | |
393fd4c3 YQ |
935 | with_babeltrace |
936 | with_libbabeltrace_prefix | |
9f1528a1 | 937 | with_libbabeltrace_type |
ccb1ba62 | 938 | with_xxhash |
1776e3e5 | 939 | enable_libctf |
ccb1ba62 | 940 | with_libxxhash_prefix |
9f1528a1 | 941 | with_libxxhash_type |
8ecfd7bd | 942 | enable_unit_tests |
81ecdfbb RW |
943 | ' |
944 | ac_precious_vars='build_alias | |
945 | host_alias | |
946 | target_alias | |
947 | CC | |
948 | CFLAGS | |
949 | LDFLAGS | |
950 | LIBS | |
951 | CPPFLAGS | |
3bc3d82a PA |
952 | CXX |
953 | CXXFLAGS | |
954 | CCC | |
81ecdfbb | 955 | CPP |
f06e05e0 JK |
956 | MAKEINFO |
957 | MAKEINFOFLAGS | |
f6720b1c AM |
958 | PKG_CONFIG |
959 | PKG_CONFIG_PATH | |
960 | PKG_CONFIG_LIBDIR | |
961 | DEBUGINFOD_CFLAGS | |
962 | DEBUGINFOD_LIBS | |
81ecdfbb RW |
963 | YACC |
964 | YFLAGS | |
965 | XMKMF' | |
f99d1d37 | 966 | ac_subdirs_all='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 |
ba56237d | 1592 | --enable-shared build shared libraries [default=yes] |
a1220294 TT |
1593 | --enable-targets=TARGETS |
1594 | alternative target configurations | |
c0993dbe | 1595 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1596 | --disable-gdbmi disable machine-interface (MI) |
1597 | --enable-tui enable full-screen terminal user interface (TUI) | |
1598 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1599 | --enable-profiling enable profiling of GDB | |
44cee4fd | 1600 | --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
3841debe | 1601 | --disable-rpath do not hardcode runtime library paths |
189b8c2e ST |
1602 | --enable-source-highlight |
1603 | enable source-highlight for source listings | |
a1220294 | 1604 | --enable-werror treat compile warnings as errors |
32c1c914 | 1605 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1606 | --enable-gdb-build-warnings |
32c1c914 | 1607 | enable GDB specific build-time compiler warnings if |
a1220294 | 1608 | gcc is used |
f35d5ade | 1609 | --enable-ubsan enable undefined behavior sanitizer (auto/yes/no) |
32c1c914 | 1610 | --enable-sim link gdb with simulator |
1776e3e5 | 1611 | --enable-libctf Handle .ctf type-info sections [default=yes] |
8ecfd7bd SDJ |
1612 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1613 | GDB | |
bec39cab AC |
1614 | |
1615 | Optional Packages: | |
1616 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1617 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1618 | --with-separate-debug-dir=PATH |
32c1c914 | 1619 | look for global separate debug info in this path |
62e4f60c | 1620 | [LIBDIR/debug] |
b14b1491 TT |
1621 | --with-gdb-datadir=PATH look for global separate data files in this path |
1622 | [DATADIR/gdb] | |
29b0e8a2 | 1623 | --with-relocated-sources=PATH |
32c1c914 | 1624 | automatically relocate this path for source files |
7349ff92 | 1625 | --with-auto-load-dir=PATH |
aff139ff | 1626 | directories from which to load auto-loaded scripts |
1564a261 | 1627 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1628 | --with-auto-load-safe-path=PATH |
aff139ff | 1629 | directories safe to hold auto-loaded files |
7349ff92 | 1630 | [--with-auto-load-dir] |
bccbefd2 JK |
1631 | --without-auto-load-safe-path |
1632 | do not restrict auto-loaded files locations | |
0d79cdc4 AM |
1633 | --with-debuginfod Enable debuginfo lookups with debuginfod |
1634 | (auto/yes/no) | |
05e7c244 | 1635 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1636 | --with-curses use the curses library instead of the termcap |
1637 | library | |
c16158bc JM |
1638 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1639 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1640 | --with-system-zlib use installed libz |
016a3251 DD |
1641 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1642 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1643 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
9f1528a1 | 1644 | --with-libiconv-type=TYPE type of library to search for (auto/static/shared) |
478aac75 | 1645 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1646 | --with-system-readline use installed readline library |
b8e0a31c SD |
1647 | --with-jit-reader-dir=PATH |
1648 | directory to load the JIT readers from | |
5c39566f | 1649 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1650 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1651 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
9f1528a1 | 1652 | --with-libexpat-type=TYPE type of library to search for (auto/static/shared) |
2c947d9b JB |
1653 | --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib |
1654 | --without-libgmp-prefix don't search for libgmp in includedir and libdir | |
1655 | --with-libgmp-type=TYPE type of library to search for (auto/static/shared) | |
2400729e UW |
1656 | --with-mpfr include MPFR support (auto/yes/no) |
1657 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib | |
1658 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir | |
9f1528a1 | 1659 | --with-libmpfr-type=TYPE type of library to search for (auto/static/shared) |
0c4a4063 DE |
1660 | --with-python[=PYTHON] include python support |
1661 | (auto/yes/no/<python-program>) | |
d13c7322 AB |
1662 | --with-python-libdir[=DIR] |
1663 | search for python's libraries in DIR | |
ed3ef339 DE |
1664 | --with-guile[=GUILE] include guile support |
1665 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1666 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1667 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1668 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
9f1528a1 | 1669 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
81ecdfbb | 1670 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1671 | --with-system-gdbinit=PATH |
32c1c914 | 1672 | automatically load a system-wide gdbinit file |
ed2a2229 CB |
1673 | --with-system-gdbinit-dir=PATH |
1674 | automatically load system-wide gdbinit files from | |
1675 | this directory | |
608e2dbb TT |
1676 | --with-lzma support lzma compression (auto/yes/no) |
1677 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1678 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
9f1528a1 | 1679 | --with-liblzma-type=TYPE type of library to search for (auto/static/shared) |
5062cc19 KS |
1680 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1681 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1682 | --with-x use the X Window System |
393fd4c3 YQ |
1683 | --with-babeltrace include babeltrace support (auto/yes/no) |
1684 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1685 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
9f1528a1 | 1686 | --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared) |
ccb1ba62 CB |
1687 | --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) |
1688 | --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib | |
1689 | --without-libxxhash-prefix don't search for libxxhash in includedir and libdir | |
9f1528a1 | 1690 | --with-libxxhash-type=TYPE type of library to search for (auto/static/shared) |
bec39cab AC |
1691 | |
1692 | Some influential environment variables: | |
1693 | CC C compiler command | |
1694 | CFLAGS C compiler flags | |
1695 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1696 | nonstandard directory <lib dir> | |
81ecdfbb | 1697 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1698 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1699 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1700 | CXX C++ compiler command |
1701 | CXXFLAGS C++ compiler flags | |
bec39cab | 1702 | CPP C preprocessor |
f06e05e0 JK |
1703 | MAKEINFO Parent configure detects if it is of sufficient version. |
1704 | MAKEINFOFLAGS | |
1705 | Parameters for MAKEINFO. | |
f6720b1c AM |
1706 | PKG_CONFIG path to pkg-config utility |
1707 | PKG_CONFIG_PATH | |
1708 | directories to add to pkg-config's search path | |
1709 | PKG_CONFIG_LIBDIR | |
1710 | path overriding pkg-config's built-in search path | |
1711 | DEBUGINFOD_CFLAGS | |
1712 | C compiler flags for DEBUGINFOD, overriding pkg-config | |
1713 | DEBUGINFOD_LIBS | |
1714 | linker flags for DEBUGINFOD, overriding pkg-config | |
d0ac1c44 SM |
1715 | YACC The `Yet Another Compiler Compiler' implementation to use. |
1716 | Defaults to the first program found out of: `bison -y', `byacc', | |
1717 | `yacc'. | |
81ecdfbb RW |
1718 | YFLAGS The list of arguments that will be passed by default to $YACC. |
1719 | This script will default YFLAGS to the empty string to avoid a | |
1720 | default value of `-d' given by some make applications. | |
1721 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1722 | |
1723 | Use these variables to override the choices made by `configure' or to help | |
1724 | it to find libraries and programs with nonstandard names/locations. | |
1725 | ||
81ecdfbb | 1726 | Report bugs to the package provider. |
bec39cab | 1727 | _ACEOF |
81ecdfbb | 1728 | ac_status=$? |
bec39cab AC |
1729 | fi |
1730 | ||
1731 | if test "$ac_init_help" = "recursive"; then | |
1732 | # If there are subdirs, report their specific --help. | |
bec39cab | 1733 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1734 | test -d "$ac_dir" || |
1735 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1736 | continue | |
bec39cab AC |
1737 | ac_builddir=. |
1738 | ||
81ecdfbb RW |
1739 | case "$ac_dir" in |
1740 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1741 | *) | |
1742 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1743 | # A ".." for each directory in $ac_dir_suffix. | |
1744 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1745 | case $ac_top_builddir_sub in | |
1746 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1747 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1748 | esac ;; | |
1749 | esac | |
1750 | ac_abs_top_builddir=$ac_pwd | |
1751 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1752 | # for backward compatibility: | |
1753 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1754 | |
1755 | case $srcdir in | |
81ecdfbb | 1756 | .) # We are building in place. |
bec39cab | 1757 | ac_srcdir=. |
81ecdfbb RW |
1758 | ac_top_srcdir=$ac_top_builddir_sub |
1759 | ac_abs_top_srcdir=$ac_pwd ;; | |
1760 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1761 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1762 | ac_top_srcdir=$srcdir |
1763 | ac_abs_top_srcdir=$srcdir ;; | |
1764 | *) # Relative name. | |
1765 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1766 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1767 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1768 | esac |
81ecdfbb | 1769 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1770 | |
81ecdfbb RW |
1771 | cd "$ac_dir" || { ac_status=$?; continue; } |
1772 | # Check for guested configure. | |
1773 | if test -f "$ac_srcdir/configure.gnu"; then | |
1774 | echo && | |
1775 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1776 | elif test -f "$ac_srcdir/configure"; then | |
1777 | echo && | |
1778 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1779 | else |
81ecdfbb RW |
1780 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1781 | fi || ac_status=$? | |
1782 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1783 | done |
1784 | fi | |
1785 | ||
81ecdfbb | 1786 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1787 | if $ac_init_version; then |
1788 | cat <<\_ACEOF | |
81ecdfbb | 1789 | configure |
d0ac1c44 | 1790 | generated by GNU Autoconf 2.69 |
bec39cab | 1791 | |
d0ac1c44 | 1792 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1793 | This configure script is free software; the Free Software Foundation |
1794 | gives unlimited permission to copy, distribute and modify it. | |
1795 | _ACEOF | |
81ecdfbb | 1796 | exit |
bec39cab | 1797 | fi |
bec39cab | 1798 | |
81ecdfbb RW |
1799 | ## ------------------------ ## |
1800 | ## Autoconf initialization. ## | |
1801 | ## ------------------------ ## | |
bec39cab | 1802 | |
81ecdfbb RW |
1803 | # ac_fn_c_try_compile LINENO |
1804 | # -------------------------- | |
1805 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1806 | ac_fn_c_try_compile () | |
1807 | { | |
1808 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1809 | rm -f conftest.$ac_objext | |
1810 | if { { ac_try="$ac_compile" | |
1811 | case "(($ac_try" in | |
1812 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1813 | *) ac_try_echo=$ac_try;; | |
1814 | esac | |
1815 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1816 | $as_echo "$ac_try_echo"; } >&5 | |
1817 | (eval "$ac_compile") 2>conftest.err | |
1818 | ac_status=$? | |
1819 | if test -s conftest.err; then | |
1820 | grep -v '^ *+' conftest.err >conftest.er1 | |
1821 | cat conftest.er1 >&5 | |
1822 | mv -f conftest.er1 conftest.err | |
1823 | fi | |
1824 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1825 | test $ac_status = 0; } && { | |
1826 | test -z "$ac_c_werror_flag" || | |
1827 | test ! -s conftest.err | |
1828 | } && test -s conftest.$ac_objext; then : | |
1829 | ac_retval=0 | |
1830 | else | |
1831 | $as_echo "$as_me: failed program was:" >&5 | |
1832 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1833 | |
81ecdfbb RW |
1834 | ac_retval=1 |
1835 | fi | |
d0ac1c44 SM |
1836 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1837 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1838 | |
1839 | } # ac_fn_c_try_compile | |
1840 | ||
3bc3d82a PA |
1841 | # ac_fn_cxx_try_compile LINENO |
1842 | # ---------------------------- | |
1843 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1844 | ac_fn_cxx_try_compile () | |
1845 | { | |
1846 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1847 | rm -f conftest.$ac_objext | |
1848 | if { { ac_try="$ac_compile" | |
1849 | case "(($ac_try" in | |
1850 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1851 | *) ac_try_echo=$ac_try;; | |
1852 | esac | |
1853 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1854 | $as_echo "$ac_try_echo"; } >&5 | |
1855 | (eval "$ac_compile") 2>conftest.err | |
1856 | ac_status=$? | |
1857 | if test -s conftest.err; then | |
1858 | grep -v '^ *+' conftest.err >conftest.er1 | |
1859 | cat conftest.er1 >&5 | |
1860 | mv -f conftest.er1 conftest.err | |
1861 | fi | |
1862 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1863 | test $ac_status = 0; } && { | |
1864 | test -z "$ac_cxx_werror_flag" || | |
1865 | test ! -s conftest.err | |
1866 | } && test -s conftest.$ac_objext; then : | |
1867 | ac_retval=0 | |
1868 | else | |
1869 | $as_echo "$as_me: failed program was:" >&5 | |
1870 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1871 | ||
1872 | ac_retval=1 | |
1873 | fi | |
d0ac1c44 SM |
1874 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1875 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1876 | |
1877 | } # ac_fn_cxx_try_compile | |
1878 | ||
81ecdfbb RW |
1879 | # ac_fn_c_try_cpp LINENO |
1880 | # ---------------------- | |
1881 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1882 | ac_fn_c_try_cpp () | |
bec39cab | 1883 | { |
81ecdfbb RW |
1884 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1885 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1886 | case "(($ac_try" in | |
1887 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1888 | *) ac_try_echo=$ac_try;; | |
1889 | esac | |
1890 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1891 | $as_echo "$ac_try_echo"; } >&5 | |
1892 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1893 | ac_status=$? | |
1894 | if test -s conftest.err; then | |
1895 | grep -v '^ *+' conftest.err >conftest.er1 | |
1896 | cat conftest.er1 >&5 | |
1897 | mv -f conftest.er1 conftest.err | |
1898 | fi | |
1899 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1900 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1901 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1902 | test ! -s conftest.err | |
1903 | }; then : | |
1904 | ac_retval=0 | |
1905 | else | |
1906 | $as_echo "$as_me: failed program was:" >&5 | |
1907 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1908 | |
81ecdfbb RW |
1909 | ac_retval=1 |
1910 | fi | |
d0ac1c44 SM |
1911 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1912 | as_fn_set_status $ac_retval | |
bec39cab | 1913 | |
81ecdfbb | 1914 | } # ac_fn_c_try_cpp |
bec39cab | 1915 | |
81ecdfbb RW |
1916 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1917 | # ------------------------------------------------------- | |
1918 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1919 | # the include files in INCLUDES and setting the cache variable VAR | |
1920 | # accordingly. | |
1921 | ac_fn_c_check_header_mongrel () | |
1922 | { | |
1923 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1924 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1925 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1926 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1927 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1928 | $as_echo_n "(cached) " >&6 |
1929 | fi | |
1930 | eval ac_res=\$$3 | |
1931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1932 | $as_echo "$ac_res" >&6; } | |
1933 | else | |
1934 | # Is the header compilable? | |
1935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1936 | $as_echo_n "checking $2 usability... " >&6; } | |
1937 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1938 | /* end confdefs.h. */ | |
1939 | $4 | |
1940 | #include <$2> | |
1941 | _ACEOF | |
1942 | if ac_fn_c_try_compile "$LINENO"; then : | |
1943 | ac_header_compiler=yes | |
1944 | else | |
1945 | ac_header_compiler=no | |
1946 | fi | |
1947 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1949 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1950 | |
81ecdfbb RW |
1951 | # Is the header present? |
1952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1953 | $as_echo_n "checking $2 presence... " >&6; } | |
1954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1955 | /* end confdefs.h. */ | |
1956 | #include <$2> | |
1957 | _ACEOF | |
1958 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1959 | ac_header_preproc=yes | |
1960 | else | |
1961 | ac_header_preproc=no | |
1962 | fi | |
d0ac1c44 | 1963 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1965 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1966 | |
81ecdfbb RW |
1967 | # So? What about this header? |
1968 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1969 | yes:no: ) | |
1970 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1971 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1972 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1973 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1974 | ;; | |
1975 | no:yes:* ) | |
1976 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1977 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1978 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1979 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1980 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1981 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1982 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1983 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1984 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1985 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1986 | ;; | |
1987 | esac | |
1988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1989 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1990 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1991 | $as_echo_n "(cached) " >&6 |
1992 | else | |
1993 | eval "$3=\$ac_header_compiler" | |
1994 | fi | |
1995 | eval ac_res=\$$3 | |
1996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1997 | $as_echo "$ac_res" >&6; } | |
1998 | fi | |
d0ac1c44 | 1999 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 2000 | |
81ecdfbb | 2001 | } # ac_fn_c_check_header_mongrel |
bec39cab | 2002 | |
81ecdfbb RW |
2003 | # ac_fn_c_try_run LINENO |
2004 | # ---------------------- | |
2005 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2006 | # that executables *can* be run. | |
2007 | ac_fn_c_try_run () | |
2008 | { | |
2009 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2010 | if { { ac_try="$ac_link" | |
2011 | case "(($ac_try" in | |
2012 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2013 | *) ac_try_echo=$ac_try;; | |
2014 | esac | |
2015 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2016 | $as_echo "$ac_try_echo"; } >&5 | |
2017 | (eval "$ac_link") 2>&5 | |
2018 | ac_status=$? | |
2019 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2020 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2021 | { { case "(($ac_try" in | |
2022 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2023 | *) ac_try_echo=$ac_try;; | |
2024 | esac | |
2025 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2026 | $as_echo "$ac_try_echo"; } >&5 | |
2027 | (eval "$ac_try") 2>&5 | |
2028 | ac_status=$? | |
2029 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2030 | test $ac_status = 0; }; }; then : | |
2031 | ac_retval=0 | |
2032 | else | |
2033 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2034 | $as_echo "$as_me: failed program was:" >&5 | |
2035 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2036 | |
81ecdfbb RW |
2037 | ac_retval=$ac_status |
2038 | fi | |
2039 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2040 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2041 | as_fn_set_status $ac_retval | |
bec39cab | 2042 | |
81ecdfbb | 2043 | } # ac_fn_c_try_run |
bec39cab | 2044 | |
81ecdfbb RW |
2045 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2046 | # ------------------------------------------------------- | |
2047 | # Tests whether HEADER exists and can be compiled using the include files in | |
2048 | # INCLUDES, setting the cache variable VAR accordingly. | |
2049 | ac_fn_c_check_header_compile () | |
2050 | { | |
2051 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2053 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2054 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2055 | $as_echo_n "(cached) " >&6 |
2056 | else | |
2057 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2058 | /* end confdefs.h. */ | |
2059 | $4 | |
2060 | #include <$2> | |
bec39cab | 2061 | _ACEOF |
81ecdfbb RW |
2062 | if ac_fn_c_try_compile "$LINENO"; then : |
2063 | eval "$3=yes" | |
2064 | else | |
2065 | eval "$3=no" | |
2066 | fi | |
2067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2068 | fi | |
2069 | eval ac_res=\$$3 | |
2070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2071 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2072 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 2073 | |
81ecdfbb | 2074 | } # ac_fn_c_check_header_compile |
bec39cab | 2075 | |
2974be62 AM |
2076 | # ac_fn_c_try_link LINENO |
2077 | # ----------------------- | |
2078 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2079 | ac_fn_c_try_link () | |
2080 | { | |
2081 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2082 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2083 | if { { ac_try="$ac_link" | |
2084 | case "(($ac_try" in | |
2085 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2086 | *) ac_try_echo=$ac_try;; | |
2087 | esac | |
2088 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2089 | $as_echo "$ac_try_echo"; } >&5 | |
2090 | (eval "$ac_link") 2>conftest.err | |
2091 | ac_status=$? | |
2092 | if test -s conftest.err; then | |
2093 | grep -v '^ *+' conftest.err >conftest.er1 | |
2094 | cat conftest.er1 >&5 | |
2095 | mv -f conftest.er1 conftest.err | |
2096 | fi | |
2097 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2098 | test $ac_status = 0; } && { | |
2099 | test -z "$ac_c_werror_flag" || | |
2100 | test ! -s conftest.err | |
2101 | } && test -s conftest$ac_exeext && { | |
2102 | test "$cross_compiling" = yes || | |
d0ac1c44 | 2103 | test -x conftest$ac_exeext |
2974be62 AM |
2104 | }; then : |
2105 | ac_retval=0 | |
2106 | else | |
2107 | $as_echo "$as_me: failed program was:" >&5 | |
2108 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2109 | ||
2110 | ac_retval=1 | |
2111 | fi | |
2112 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2113 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2114 | # interfere with the next link command; also delete a directory that is | |
2115 | # left behind by Apple's compiler. We do this before executing the actions. | |
2116 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2117 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2118 | as_fn_set_status $ac_retval | |
2974be62 AM |
2119 | |
2120 | } # ac_fn_c_try_link | |
2121 | ||
81ecdfbb RW |
2122 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2123 | # -------------------------------------------- | |
2124 | # Tries to find the compile-time value of EXPR in a program that includes | |
2125 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2126 | # computed | |
2127 | ac_fn_c_compute_int () | |
2128 | { | |
2129 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2130 | if test "$cross_compiling" = yes; then | |
2131 | # Depending upon the size, compute the lo and hi bounds. | |
2132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2133 | /* end confdefs.h. */ | |
2134 | $4 | |
2135 | int | |
2136 | main () | |
2137 | { | |
2138 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2139 | test_array [0] = 0; |
2140 | return test_array [0]; | |
bec39cab | 2141 | |
81ecdfbb RW |
2142 | ; |
2143 | return 0; | |
2144 | } | |
2145 | _ACEOF | |
2146 | if ac_fn_c_try_compile "$LINENO"; then : | |
2147 | ac_lo=0 ac_mid=0 | |
2148 | while :; do | |
2149 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2150 | /* end confdefs.h. */ | |
2151 | $4 | |
2152 | int | |
2153 | main () | |
2154 | { | |
2155 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2156 | test_array [0] = 0; |
2157 | return test_array [0]; | |
bec39cab | 2158 | |
81ecdfbb RW |
2159 | ; |
2160 | return 0; | |
2161 | } | |
2162 | _ACEOF | |
2163 | if ac_fn_c_try_compile "$LINENO"; then : | |
2164 | ac_hi=$ac_mid; break | |
2165 | else | |
2166 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2167 | if test $ac_lo -le $ac_mid; then | |
2168 | ac_lo= ac_hi= | |
2169 | break | |
2170 | fi | |
2171 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2172 | fi |
81ecdfbb RW |
2173 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2174 | done | |
c906108c | 2175 | else |
81ecdfbb RW |
2176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2177 | /* end confdefs.h. */ | |
2178 | $4 | |
2179 | int | |
2180 | main () | |
2181 | { | |
2182 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2183 | test_array [0] = 0; |
2184 | return test_array [0]; | |
bec39cab | 2185 | |
81ecdfbb RW |
2186 | ; |
2187 | return 0; | |
2188 | } | |
2189 | _ACEOF | |
2190 | if ac_fn_c_try_compile "$LINENO"; then : | |
2191 | ac_hi=-1 ac_mid=-1 | |
2192 | while :; do | |
2193 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2194 | /* end confdefs.h. */ | |
2195 | $4 | |
2196 | int | |
2197 | main () | |
2198 | { | |
2199 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2200 | test_array [0] = 0; |
2201 | return test_array [0]; | |
bec39cab | 2202 | |
81ecdfbb RW |
2203 | ; |
2204 | return 0; | |
2205 | } | |
2206 | _ACEOF | |
2207 | if ac_fn_c_try_compile "$LINENO"; then : | |
2208 | ac_lo=$ac_mid; break | |
2209 | else | |
2210 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2211 | if test $ac_mid -le $ac_hi; then | |
2212 | ac_lo= ac_hi= | |
2213 | break | |
2214 | fi | |
2215 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2216 | fi | |
2217 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2218 | done | |
2219 | else | |
2220 | ac_lo= ac_hi= | |
2221 | fi | |
2222 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2223 | fi | |
2224 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2225 | # Binary search between lo and hi bounds. | |
2226 | while test "x$ac_lo" != "x$ac_hi"; do | |
2227 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2228 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2229 | /* end confdefs.h. */ | |
2230 | $4 | |
2231 | int | |
2232 | main () | |
2233 | { | |
2234 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2235 | test_array [0] = 0; |
2236 | return test_array [0]; | |
bec39cab | 2237 | |
81ecdfbb RW |
2238 | ; |
2239 | return 0; | |
2240 | } | |
2241 | _ACEOF | |
2242 | if ac_fn_c_try_compile "$LINENO"; then : | |
2243 | ac_hi=$ac_mid | |
2244 | else | |
2245 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2246 | fi | |
2247 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2248 | done | |
2249 | case $ac_lo in #(( | |
2250 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2251 | '') ac_retval=1 ;; | |
2252 | esac | |
2253 | else | |
2254 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2255 | /* end confdefs.h. */ | |
2256 | $4 | |
2257 | static long int longval () { return $2; } | |
2258 | static unsigned long int ulongval () { return $2; } | |
2259 | #include <stdio.h> | |
2260 | #include <stdlib.h> | |
2261 | int | |
2262 | main () | |
2263 | { | |
bec39cab | 2264 | |
81ecdfbb RW |
2265 | FILE *f = fopen ("conftest.val", "w"); |
2266 | if (! f) | |
2267 | return 1; | |
2268 | if (($2) < 0) | |
2269 | { | |
2270 | long int i = longval (); | |
2271 | if (i != ($2)) | |
2272 | return 1; | |
2273 | fprintf (f, "%ld", i); | |
2274 | } | |
2275 | else | |
2276 | { | |
2277 | unsigned long int i = ulongval (); | |
2278 | if (i != ($2)) | |
2279 | return 1; | |
2280 | fprintf (f, "%lu", i); | |
2281 | } | |
2282 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2283 | on some platforms. */ | |
2284 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2285 | |
81ecdfbb RW |
2286 | ; |
2287 | return 0; | |
2288 | } | |
2289 | _ACEOF | |
2290 | if ac_fn_c_try_run "$LINENO"; then : | |
2291 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2292 | else | |
2293 | ac_retval=1 | |
2294 | fi | |
2295 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2296 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2297 | rm -f conftest.val | |
bec39cab | 2298 | |
81ecdfbb | 2299 | fi |
d0ac1c44 SM |
2300 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2301 | as_fn_set_status $ac_retval | |
bec39cab | 2302 | |
81ecdfbb | 2303 | } # ac_fn_c_compute_int |
bec39cab | 2304 | |
55a8c076 YQ |
2305 | # ac_fn_c_check_func LINENO FUNC VAR |
2306 | # ---------------------------------- | |
2307 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2308 | ac_fn_c_check_func () | |
81ecdfbb RW |
2309 | { |
2310 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2312 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2313 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2314 | $as_echo_n "(cached) " >&6 |
2315 | else | |
81ecdfbb RW |
2316 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2317 | /* end confdefs.h. */ | |
55a8c076 YQ |
2318 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2319 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2320 | #define $2 innocuous_$2 | |
2321 | ||
2322 | /* System header to define __stub macros and hopefully few prototypes, | |
2323 | which can conflict with char $2 (); below. | |
2324 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2325 | <limits.h> exists even on freestanding compilers. */ | |
2326 | ||
2327 | #ifdef __STDC__ | |
2328 | # include <limits.h> | |
2329 | #else | |
2330 | # include <assert.h> | |
2331 | #endif | |
2332 | ||
2333 | #undef $2 | |
2334 | ||
2335 | /* Override any GCC internal prototype to avoid an error. | |
2336 | Use char because int might match the return type of a GCC | |
2337 | builtin and then its argument prototype would still apply. */ | |
2338 | #ifdef __cplusplus | |
2339 | extern "C" | |
2340 | #endif | |
2341 | char $2 (); | |
2342 | /* The GNU C library defines this for functions which it implements | |
2343 | to always fail with ENOSYS. Some functions are actually named | |
2344 | something starting with __ and the normal name is an alias. */ | |
2345 | #if defined __stub_$2 || defined __stub___$2 | |
2346 | choke me | |
2347 | #endif | |
2348 | ||
2349 | int | |
2350 | main () | |
2351 | { | |
2352 | return $2 (); | |
2353 | ; | |
2354 | return 0; | |
2355 | } | |
2356 | _ACEOF | |
2357 | if ac_fn_c_try_link "$LINENO"; then : | |
2358 | eval "$3=yes" | |
2359 | else | |
2360 | eval "$3=no" | |
2361 | fi | |
2362 | rm -f core conftest.err conftest.$ac_objext \ | |
2363 | conftest$ac_exeext conftest.$ac_ext | |
2364 | fi | |
2365 | eval ac_res=\$$3 | |
2366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2367 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2368 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
55a8c076 YQ |
2369 | |
2370 | } # ac_fn_c_check_func | |
2371 | ||
07697489 PA |
2372 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2373 | # ------------------------------------------- | |
2374 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2375 | # variable VAR accordingly. | |
2376 | ac_fn_c_check_type () | |
2377 | { | |
2378 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2380 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2381 | if eval \${$3+:} false; then : |
07697489 PA |
2382 | $as_echo_n "(cached) " >&6 |
2383 | else | |
2384 | eval "$3=no" | |
2385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2386 | /* end confdefs.h. */ | |
2387 | $4 | |
2388 | int | |
2389 | main () | |
2390 | { | |
2391 | if (sizeof ($2)) | |
2392 | return 0; | |
2393 | ; | |
2394 | return 0; | |
2395 | } | |
2396 | _ACEOF | |
2397 | if ac_fn_c_try_compile "$LINENO"; then : | |
2398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2399 | /* end confdefs.h. */ | |
2400 | $4 | |
2401 | int | |
2402 | main () | |
2403 | { | |
2404 | if (sizeof (($2))) | |
2405 | return 0; | |
2406 | ; | |
2407 | return 0; | |
2408 | } | |
2409 | _ACEOF | |
2410 | if ac_fn_c_try_compile "$LINENO"; then : | |
2411 | ||
2412 | else | |
2413 | eval "$3=yes" | |
2414 | fi | |
2415 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2416 | fi | |
2417 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2418 | fi | |
2419 | eval ac_res=\$$3 | |
2420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2421 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2422 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
07697489 PA |
2423 | |
2424 | } # ac_fn_c_check_type | |
2425 | ||
f6720b1c AM |
2426 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2427 | # --------------------------------------------- | |
2428 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2429 | # accordingly. | |
2430 | ac_fn_c_check_decl () | |
2431 | { | |
2432 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2433 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2434 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2436 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2437 | if eval \${$3+:} false; then : | |
2438 | $as_echo_n "(cached) " >&6 | |
2439 | else | |
2440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2441 | /* end confdefs.h. */ | |
2442 | $4 | |
2443 | int | |
2444 | main () | |
2445 | { | |
2446 | #ifndef $as_decl_name | |
2447 | #ifdef __cplusplus | |
2448 | (void) $as_decl_use; | |
2449 | #else | |
2450 | (void) $as_decl_name; | |
2451 | #endif | |
2452 | #endif | |
2453 | ||
2454 | ; | |
2455 | return 0; | |
2456 | } | |
2457 | _ACEOF | |
2458 | if ac_fn_c_try_compile "$LINENO"; then : | |
2459 | eval "$3=yes" | |
2460 | else | |
2461 | eval "$3=no" | |
2462 | fi | |
2463 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2464 | fi | |
2465 | eval ac_res=\$$3 | |
2466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2467 | $as_echo "$ac_res" >&6; } | |
2468 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2469 | ||
2470 | } # ac_fn_c_check_decl | |
2471 | ||
05ea2a05 TT |
2472 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2473 | # ---------------------------------------------------- | |
2474 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2475 | # INCLUDES, setting cache variable VAR accordingly. | |
2476 | ac_fn_c_check_member () | |
2477 | { | |
2478 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2480 | $as_echo_n "checking for $2.$3... " >&6; } | |
2481 | if eval \${$4+:} false; then : | |
2482 | $as_echo_n "(cached) " >&6 | |
2483 | else | |
2484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2485 | /* end confdefs.h. */ | |
2486 | $5 | |
2487 | int | |
2488 | main () | |
2489 | { | |
2490 | static $2 ac_aggr; | |
2491 | if (ac_aggr.$3) | |
2492 | return 0; | |
2493 | ; | |
2494 | return 0; | |
2495 | } | |
2496 | _ACEOF | |
2497 | if ac_fn_c_try_compile "$LINENO"; then : | |
2498 | eval "$4=yes" | |
2499 | else | |
2500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2501 | /* end confdefs.h. */ | |
2502 | $5 | |
2503 | int | |
2504 | main () | |
2505 | { | |
2506 | static $2 ac_aggr; | |
2507 | if (sizeof ac_aggr.$3) | |
2508 | return 0; | |
2509 | ; | |
2510 | return 0; | |
2511 | } | |
2512 | _ACEOF | |
2513 | if ac_fn_c_try_compile "$LINENO"; then : | |
2514 | eval "$4=yes" | |
2515 | else | |
2516 | eval "$4=no" | |
2517 | fi | |
2518 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2519 | fi | |
2520 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2521 | fi | |
2522 | eval ac_res=\$$4 | |
2523 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2524 | $as_echo "$ac_res" >&6; } | |
2525 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2526 | ||
2527 | } # ac_fn_c_check_member | |
2528 | ||
f35d5ade TT |
2529 | # ac_fn_cxx_try_link LINENO |
2530 | # ------------------------- | |
2531 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2532 | ac_fn_cxx_try_link () | |
2533 | { | |
2534 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2535 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2536 | if { { ac_try="$ac_link" | |
2537 | case "(($ac_try" in | |
2538 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2539 | *) ac_try_echo=$ac_try;; | |
2540 | esac | |
2541 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2542 | $as_echo "$ac_try_echo"; } >&5 | |
2543 | (eval "$ac_link") 2>conftest.err | |
2544 | ac_status=$? | |
2545 | if test -s conftest.err; then | |
2546 | grep -v '^ *+' conftest.err >conftest.er1 | |
2547 | cat conftest.er1 >&5 | |
2548 | mv -f conftest.er1 conftest.err | |
2549 | fi | |
2550 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2551 | test $ac_status = 0; } && { | |
2552 | test -z "$ac_cxx_werror_flag" || | |
2553 | test ! -s conftest.err | |
2554 | } && test -s conftest$ac_exeext && { | |
2555 | test "$cross_compiling" = yes || | |
2556 | test -x conftest$ac_exeext | |
2557 | }; then : | |
2558 | ac_retval=0 | |
2559 | else | |
2560 | $as_echo "$as_me: failed program was:" >&5 | |
2561 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2562 | ||
2563 | ac_retval=1 | |
2564 | fi | |
2565 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2566 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2567 | # interfere with the next link command; also delete a directory that is | |
2568 | # left behind by Apple's compiler. We do this before executing the actions. | |
2569 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2570 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2571 | as_fn_set_status $ac_retval | |
2572 | ||
2573 | } # ac_fn_cxx_try_link | |
21987b9c TT |
2574 | |
2575 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2576 | # ------------------------------------ | |
2577 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2578 | ac_fn_cxx_check_func () | |
2579 | { | |
2580 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2581 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2582 | $as_echo_n "checking for $2... " >&6; } | |
2583 | if eval \${$3+:} false; then : | |
2584 | $as_echo_n "(cached) " >&6 | |
2585 | else | |
2586 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2587 | /* end confdefs.h. */ | |
2588 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2589 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2590 | #define $2 innocuous_$2 | |
2591 | ||
2592 | /* System header to define __stub macros and hopefully few prototypes, | |
2593 | which can conflict with char $2 (); below. | |
2594 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2595 | <limits.h> exists even on freestanding compilers. */ | |
2596 | ||
2597 | #ifdef __STDC__ | |
2598 | # include <limits.h> | |
2599 | #else | |
2600 | # include <assert.h> | |
2601 | #endif | |
2602 | ||
2603 | #undef $2 | |
2604 | ||
2605 | /* Override any GCC internal prototype to avoid an error. | |
2606 | Use char because int might match the return type of a GCC | |
2607 | builtin and then its argument prototype would still apply. */ | |
2608 | #ifdef __cplusplus | |
2609 | extern "C" | |
2610 | #endif | |
2611 | char $2 (); | |
2612 | /* The GNU C library defines this for functions which it implements | |
2613 | to always fail with ENOSYS. Some functions are actually named | |
2614 | something starting with __ and the normal name is an alias. */ | |
2615 | #if defined __stub_$2 || defined __stub___$2 | |
2616 | choke me | |
2617 | #endif | |
2618 | ||
2619 | int | |
2620 | main () | |
2621 | { | |
2622 | return $2 (); | |
2623 | ; | |
2624 | return 0; | |
2625 | } | |
2626 | _ACEOF | |
2627 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2628 | eval "$3=yes" | |
2629 | else | |
2630 | eval "$3=no" | |
2631 | fi | |
2632 | rm -f core conftest.err conftest.$ac_objext \ | |
2633 | conftest$ac_exeext conftest.$ac_ext | |
2634 | fi | |
2635 | eval ac_res=\$$3 | |
2636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2637 | $as_echo "$ac_res" >&6; } | |
2638 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2639 | ||
2640 | } # ac_fn_cxx_check_func | |
81ecdfbb RW |
2641 | cat >config.log <<_ACEOF |
2642 | This file contains any messages produced by compilers while | |
2643 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2644 | |
81ecdfbb | 2645 | It was created by $as_me, which was |
d0ac1c44 | 2646 | generated by GNU Autoconf 2.69. Invocation command line was |
b4e70030 | 2647 | |
81ecdfbb | 2648 | $ $0 $@ |
413ccac7 | 2649 | |
81ecdfbb RW |
2650 | _ACEOF |
2651 | exec 5>>config.log | |
2652 | { | |
2653 | cat <<_ASUNAME | |
2654 | ## --------- ## | |
2655 | ## Platform. ## | |
2656 | ## --------- ## | |
413ccac7 | 2657 | |
81ecdfbb RW |
2658 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2659 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2660 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2661 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2662 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2663 | |
81ecdfbb RW |
2664 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2665 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2666 | |
81ecdfbb RW |
2667 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2668 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2669 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2670 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2671 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2672 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2673 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2674 | |
81ecdfbb | 2675 | _ASUNAME |
bec39cab | 2676 | |
bec39cab AC |
2677 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2678 | for as_dir in $PATH | |
2679 | do | |
2680 | IFS=$as_save_IFS | |
2681 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2682 | $as_echo "PATH: $as_dir" |
2683 | done | |
2684 | IFS=$as_save_IFS | |
bec39cab | 2685 | |
81ecdfbb | 2686 | } >&5 |
bec39cab | 2687 | |
81ecdfbb | 2688 | cat >&5 <<_ACEOF |
bec39cab | 2689 | |
bec39cab | 2690 | |
81ecdfbb RW |
2691 | ## ----------- ## |
2692 | ## Core tests. ## | |
2693 | ## ----------- ## | |
2694 | ||
2695 | _ACEOF | |
2696 | ||
2697 | ||
2698 | # Keep a trace of the command line. | |
2699 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2700 | # Strip out --silent because we don't want to record it for future runs. | |
2701 | # Also quote any args containing shell meta-characters. | |
2702 | # Make two passes to allow for proper duplicate-argument suppression. | |
2703 | ac_configure_args= | |
2704 | ac_configure_args0= | |
2705 | ac_configure_args1= | |
2706 | ac_must_keep_next=false | |
2707 | for ac_pass in 1 2 | |
2708 | do | |
2709 | for ac_arg | |
2710 | do | |
2711 | case $ac_arg in | |
2712 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2713 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2714 | | -silent | --silent | --silen | --sile | --sil) | |
2715 | continue ;; | |
2716 | *\'*) | |
2717 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2718 | esac | |
2719 | case $ac_pass in | |
2720 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2721 | 2) | |
2722 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2723 | if test $ac_must_keep_next = true; then | |
2724 | ac_must_keep_next=false # Got value, back to normal. | |
2725 | else | |
2726 | case $ac_arg in | |
2727 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2728 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2729 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2730 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2731 | case "$ac_configure_args0 " in | |
2732 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2733 | esac | |
2734 | ;; | |
2735 | -* ) ac_must_keep_next=true ;; | |
2736 | esac | |
2737 | fi | |
2738 | as_fn_append ac_configure_args " '$ac_arg'" | |
2739 | ;; | |
2740 | esac | |
2741 | done | |
2742 | done | |
2743 | { ac_configure_args0=; unset ac_configure_args0;} | |
2744 | { ac_configure_args1=; unset ac_configure_args1;} | |
2745 | ||
2746 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2747 | # config.log. We remove comments because anyway the quotes in there | |
2748 | # would cause problems or look ugly. | |
2749 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2750 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2751 | trap 'exit_status=$? | |
2752 | # Save into config.log some information that might help in debugging. | |
2753 | { | |
2754 | echo | |
2755 | ||
d0ac1c44 | 2756 | $as_echo "## ---------------- ## |
81ecdfbb | 2757 | ## Cache variables. ## |
d0ac1c44 | 2758 | ## ---------------- ##" |
81ecdfbb RW |
2759 | echo |
2760 | # The following way of writing the cache mishandles newlines in values, | |
2761 | ( | |
2762 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2763 | eval ac_val=\$$ac_var | |
2764 | case $ac_val in #( | |
2765 | *${as_nl}*) | |
2766 | case $ac_var in #( | |
2767 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2768 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2769 | esac | |
2770 | case $ac_var in #( | |
2771 | _ | IFS | as_nl) ;; #( | |
2772 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2773 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2774 | esac ;; | |
2775 | esac | |
2776 | done | |
2777 | (set) 2>&1 | | |
2778 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2779 | *${as_nl}ac_space=\ *) | |
2780 | sed -n \ | |
2781 | "s/'\''/'\''\\\\'\'''\''/g; | |
2782 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2783 | ;; #( | |
2784 | *) | |
2785 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2786 | ;; | |
2787 | esac | | |
2788 | sort | |
2789 | ) | |
2790 | echo | |
2791 | ||
d0ac1c44 | 2792 | $as_echo "## ----------------- ## |
81ecdfbb | 2793 | ## Output variables. ## |
d0ac1c44 | 2794 | ## ----------------- ##" |
81ecdfbb RW |
2795 | echo |
2796 | for ac_var in $ac_subst_vars | |
2797 | do | |
2798 | eval ac_val=\$$ac_var | |
2799 | case $ac_val in | |
2800 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2801 | esac | |
2802 | $as_echo "$ac_var='\''$ac_val'\''" | |
2803 | done | sort | |
2804 | echo | |
2805 | ||
2806 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2807 | $as_echo "## ------------------- ## |
81ecdfbb | 2808 | ## File substitutions. ## |
d0ac1c44 | 2809 | ## ------------------- ##" |
81ecdfbb RW |
2810 | echo |
2811 | for ac_var in $ac_subst_files | |
2812 | do | |
2813 | eval ac_val=\$$ac_var | |
2814 | case $ac_val in | |
2815 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2816 | esac | |
2817 | $as_echo "$ac_var='\''$ac_val'\''" | |
2818 | done | sort | |
2819 | echo | |
2820 | fi | |
2821 | ||
2822 | if test -s confdefs.h; then | |
d0ac1c44 | 2823 | $as_echo "## ----------- ## |
81ecdfbb | 2824 | ## confdefs.h. ## |
d0ac1c44 | 2825 | ## ----------- ##" |
81ecdfbb RW |
2826 | echo |
2827 | cat confdefs.h | |
2828 | echo | |
2829 | fi | |
2830 | test "$ac_signal" != 0 && | |
2831 | $as_echo "$as_me: caught signal $ac_signal" | |
2832 | $as_echo "$as_me: exit $exit_status" | |
2833 | } >&5 | |
2834 | rm -f core *.core core.conftest.* && | |
2835 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2836 | exit $exit_status | |
2837 | ' 0 | |
2838 | for ac_signal in 1 2 13 15; do | |
2839 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2840 | done | |
2841 | ac_signal=0 | |
2842 | ||
2843 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2844 | rm -f -r conftest* confdefs.h | |
2845 | ||
2846 | $as_echo "/* confdefs.h */" > confdefs.h | |
2847 | ||
2848 | # Predefined preprocessor variables. | |
2849 | ||
2850 | cat >>confdefs.h <<_ACEOF | |
2851 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2852 | _ACEOF | |
2853 | ||
2854 | cat >>confdefs.h <<_ACEOF | |
2855 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2856 | _ACEOF | |
2857 | ||
2858 | cat >>confdefs.h <<_ACEOF | |
2859 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2860 | _ACEOF | |
2861 | ||
2862 | cat >>confdefs.h <<_ACEOF | |
2863 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2864 | _ACEOF | |
2865 | ||
2866 | cat >>confdefs.h <<_ACEOF | |
2867 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2868 | _ACEOF | |
2869 | ||
2870 | cat >>confdefs.h <<_ACEOF | |
2871 | #define PACKAGE_URL "$PACKAGE_URL" | |
2872 | _ACEOF | |
2873 | ||
2874 | ||
2875 | # Let the site file select an alternate cache file if it wants to. | |
2876 | # Prefer an explicitly selected file to automatically selected ones. | |
2877 | ac_site_file1=NONE | |
2878 | ac_site_file2=NONE | |
2879 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2880 | # We do not want a PATH search for config.site. |
2881 | case $CONFIG_SITE in #(( | |
2882 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2883 | */*) ac_site_file1=$CONFIG_SITE;; | |
2884 | *) ac_site_file1=./$CONFIG_SITE;; | |
2885 | esac | |
81ecdfbb RW |
2886 | elif test "x$prefix" != xNONE; then |
2887 | ac_site_file1=$prefix/share/config.site | |
2888 | ac_site_file2=$prefix/etc/config.site | |
2889 | else | |
2890 | ac_site_file1=$ac_default_prefix/share/config.site | |
2891 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2892 | fi | |
2893 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2894 | do | |
2895 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2896 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2897 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2898 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2899 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
2900 | . "$ac_site_file" \ |
2901 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2902 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2903 | as_fn_error $? "failed to load site script $ac_site_file | |
2904 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
2905 | fi |
2906 | done | |
2907 | ||
2908 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2909 | # Some versions of bash will fail to source /dev/null (special files |
2910 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2911 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2912 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2913 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2914 | case $cache_file in | |
2915 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2916 | *) . "./$cache_file";; | |
2917 | esac | |
2918 | fi | |
2919 | else | |
2920 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2921 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2922 | >$cache_file | |
bec39cab AC |
2923 | fi |
2924 | ||
d0ac1c44 SM |
2925 | as_fn_append ac_header_list " stdlib.h" |
2926 | as_fn_append ac_header_list " unistd.h" | |
2927 | as_fn_append ac_header_list " sys/param.h" | |
81ecdfbb RW |
2928 | # Check that the precious variables saved in the cache have kept the same |
2929 | # value. | |
2930 | ac_cache_corrupted=false | |
2931 | for ac_var in $ac_precious_vars; do | |
2932 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2933 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2934 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2935 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2936 | case $ac_old_set,$ac_new_set in | |
2937 | set,) | |
2938 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2939 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2940 | ac_cache_corrupted=: ;; | |
2941 | ,set) | |
2942 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2943 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2944 | ac_cache_corrupted=: ;; | |
2945 | ,);; | |
2946 | *) | |
2947 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2948 | # differences in whitespace do not lead to failure. | |
2949 | ac_old_val_w=`echo x $ac_old_val` | |
2950 | ac_new_val_w=`echo x $ac_new_val` | |
2951 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2952 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2953 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2954 | ac_cache_corrupted=: | |
2955 | else | |
2956 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2957 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2958 | eval $ac_var=\$ac_old_val | |
2959 | fi | |
2960 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2961 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2962 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2963 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2964 | fi;; | |
2965 | esac | |
2966 | # Pass precious variables to config.status. | |
2967 | if test "$ac_new_set" = set; then | |
2968 | case $ac_new_val in | |
2969 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2970 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2971 | esac | |
2972 | case " $ac_configure_args " in | |
2973 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2974 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2975 | esac | |
2976 | fi | |
2977 | done | |
2978 | if $ac_cache_corrupted; then | |
2979 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2980 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2981 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2982 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2983 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
81ecdfbb RW |
2984 | fi |
2985 | ## -------------------- ## | |
2986 | ## Main body of script. ## | |
2987 | ## -------------------- ## | |
2988 | ||
2989 | ac_ext=c | |
2990 | ac_cpp='$CPP $CPPFLAGS' | |
2991 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2992 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2993 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2994 | ||
2995 | ||
2996 | ||
2997 | ||
2998 | ||
5593a99a | 2999 | |
81ecdfbb RW |
3000 | ac_config_headers="$ac_config_headers config.h:config.in" |
3001 | ||
3002 | ||
3003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
3004 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
3005 | # Check whether --enable-maintainer-mode was given. | |
3006 | if test "${enable_maintainer_mode+set}" = set; then : | |
3007 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3008 | else | |
3009 | USE_MAINTAINER_MODE=no | |
3010 | fi | |
3011 | ||
3012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
3013 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
3014 | if test $USE_MAINTAINER_MODE = yes; then | |
3015 | MAINTAINER_MODE_TRUE= | |
3016 | MAINTAINER_MODE_FALSE='#' | |
3017 | else | |
3018 | MAINTAINER_MODE_TRUE='#' | |
3019 | MAINTAINER_MODE_FALSE= | |
3020 | fi | |
3021 | ||
3022 | MAINT=$MAINTAINER_MODE_TRUE | |
3023 | ||
3024 | ||
3025 | ||
3026 | ac_ext=c | |
3027 | ac_cpp='$CPP $CPPFLAGS' | |
3028 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3029 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3030 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3031 | if test -n "$ac_tool_prefix"; then | |
3032 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3033 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3034 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3035 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3036 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3037 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3038 | else |
3039 | if test -n "$CC"; then | |
3040 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3041 | else | |
bec39cab AC |
3042 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3043 | for as_dir in $PATH | |
3044 | do | |
3045 | IFS=$as_save_IFS | |
3046 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3047 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3048 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3049 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
3050 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3051 | break 2 |
3052 | fi | |
3053 | done | |
81ecdfbb RW |
3054 | done |
3055 | IFS=$as_save_IFS | |
bec39cab | 3056 | |
c906108c SS |
3057 | fi |
3058 | fi | |
bec39cab | 3059 | CC=$ac_cv_prog_CC |
c906108c | 3060 | if test -n "$CC"; then |
81ecdfbb RW |
3061 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3062 | $as_echo "$CC" >&6; } | |
c906108c | 3063 | else |
81ecdfbb RW |
3064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3065 | $as_echo "no" >&6; } | |
c906108c SS |
3066 | fi |
3067 | ||
81ecdfbb | 3068 | |
b4e70030 JB |
3069 | fi |
3070 | if test -z "$ac_cv_prog_CC"; then | |
3071 | ac_ct_CC=$CC | |
81ecdfbb RW |
3072 | # Extract the first word of "gcc", so it can be a program name with args. |
3073 | set dummy gcc; ac_word=$2 | |
3074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3075 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3076 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3077 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
3078 | else |
3079 | if test -n "$ac_ct_CC"; then | |
3080 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3081 | else | |
3082 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3083 | for as_dir in $PATH | |
3084 | do | |
3085 | IFS=$as_save_IFS | |
3086 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3087 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3088 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3089 | ac_cv_prog_ac_ct_CC="gcc" |
3090 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 3091 | break 2 |
4e8d927d | 3092 | fi |
b4e70030 | 3093 | done |
81ecdfbb RW |
3094 | done |
3095 | IFS=$as_save_IFS | |
b4e70030 JB |
3096 | |
3097 | fi | |
3098 | fi | |
3099 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3100 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3102 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 3103 | else |
81ecdfbb RW |
3104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3105 | $as_echo "no" >&6; } | |
b4e70030 JB |
3106 | fi |
3107 | ||
81ecdfbb RW |
3108 | if test "x$ac_ct_CC" = x; then |
3109 | CC="" | |
3110 | else | |
3111 | case $cross_compiling:$ac_tool_warned in | |
3112 | yes:) | |
3113 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3114 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3115 | ac_tool_warned=yes ;; | |
3116 | esac | |
3117 | CC=$ac_ct_CC | |
3118 | fi | |
b4e70030 JB |
3119 | else |
3120 | CC="$ac_cv_prog_CC" | |
3121 | fi | |
3122 | ||
c906108c | 3123 | if test -z "$CC"; then |
81ecdfbb RW |
3124 | if test -n "$ac_tool_prefix"; then |
3125 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3126 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3128 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3129 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3130 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3131 | else |
3132 | if test -n "$CC"; then | |
3133 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3134 | else | |
bec39cab AC |
3135 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3136 | for as_dir in $PATH | |
3137 | do | |
3138 | IFS=$as_save_IFS | |
3139 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3140 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3141 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3142 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
3143 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3144 | break 2 |
3145 | fi | |
3146 | done | |
81ecdfbb RW |
3147 | done |
3148 | IFS=$as_save_IFS | |
3149 | ||
3150 | fi | |
3151 | fi | |
3152 | CC=$ac_cv_prog_CC | |
3153 | if test -n "$CC"; then | |
3154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3155 | $as_echo "$CC" >&6; } | |
3156 | else | |
3157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3158 | $as_echo "no" >&6; } | |
3159 | fi | |
3160 | ||
3161 | ||
3162 | fi | |
3163 | fi | |
3164 | if test -z "$CC"; then | |
3165 | # Extract the first word of "cc", so it can be a program name with args. | |
3166 | set dummy cc; ac_word=$2 | |
3167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3168 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3169 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb RW |
3170 | $as_echo_n "(cached) " >&6 |
3171 | else | |
3172 | if test -n "$CC"; then | |
3173 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3174 | else | |
3175 | ac_prog_rejected=no | |
3176 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3177 | for as_dir in $PATH | |
3178 | do | |
3179 | IFS=$as_save_IFS | |
3180 | test -z "$as_dir" && as_dir=. | |
3181 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3182 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3183 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3184 | ac_prog_rejected=yes | |
3185 | continue | |
3186 | fi | |
3187 | ac_cv_prog_CC="cc" | |
3188 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3189 | break 2 | |
3190 | fi | |
3191 | done | |
3192 | done | |
3193 | IFS=$as_save_IFS | |
bec39cab | 3194 | |
c906108c SS |
3195 | if test $ac_prog_rejected = yes; then |
3196 | # We found a bogon in the path, so make sure we never use it. | |
3197 | set dummy $ac_cv_prog_CC | |
3198 | shift | |
bec39cab | 3199 | if test $# != 0; then |
c906108c SS |
3200 | # We chose a different compiler from the bogus one. |
3201 | # However, it has the same basename, so the bogon will be chosen | |
3202 | # first if we set CC to just the basename; use the full file name. | |
3203 | shift | |
bec39cab | 3204 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3205 | fi |
3206 | fi | |
3207 | fi | |
3208 | fi | |
bec39cab | 3209 | CC=$ac_cv_prog_CC |
c906108c | 3210 | if test -n "$CC"; then |
81ecdfbb RW |
3211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3212 | $as_echo "$CC" >&6; } | |
c906108c | 3213 | else |
81ecdfbb RW |
3214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3215 | $as_echo "no" >&6; } | |
c906108c SS |
3216 | fi |
3217 | ||
81ecdfbb | 3218 | |
bec39cab AC |
3219 | fi |
3220 | if test -z "$CC"; then | |
3221 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3222 | for ac_prog in cl.exe |
bec39cab AC |
3223 | do |
3224 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3225 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3227 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3228 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3229 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3230 | else |
3231 | if test -n "$CC"; then | |
3232 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3233 | else | |
bec39cab AC |
3234 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3235 | for as_dir in $PATH | |
3236 | do | |
3237 | IFS=$as_save_IFS | |
3238 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3239 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3240 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3241 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3242 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3243 | break 2 |
3244 | fi | |
3245 | done | |
81ecdfbb RW |
3246 | done |
3247 | IFS=$as_save_IFS | |
bec39cab | 3248 | |
c906108c SS |
3249 | fi |
3250 | fi | |
bec39cab | 3251 | CC=$ac_cv_prog_CC |
c906108c | 3252 | if test -n "$CC"; then |
81ecdfbb RW |
3253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3254 | $as_echo "$CC" >&6; } | |
c906108c | 3255 | else |
81ecdfbb RW |
3256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3257 | $as_echo "no" >&6; } | |
c906108c | 3258 | fi |
bec39cab | 3259 | |
81ecdfbb | 3260 | |
bec39cab AC |
3261 | test -n "$CC" && break |
3262 | done | |
3263 | fi | |
3264 | if test -z "$CC"; then | |
3265 | ac_ct_CC=$CC | |
81ecdfbb | 3266 | for ac_prog in cl.exe |
bec39cab AC |
3267 | do |
3268 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3269 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3271 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3272 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3273 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3274 | else |
3275 | if test -n "$ac_ct_CC"; then | |
3276 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3277 | else | |
3278 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3279 | for as_dir in $PATH | |
3280 | do | |
3281 | IFS=$as_save_IFS | |
3282 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3283 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3284 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3285 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3286 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3287 | break 2 |
c906108c | 3288 | fi |
bec39cab | 3289 | done |
81ecdfbb RW |
3290 | done |
3291 | IFS=$as_save_IFS | |
bec39cab AC |
3292 | |
3293 | fi | |
3294 | fi | |
3295 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3296 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3298 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3299 | else |
81ecdfbb RW |
3300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3301 | $as_echo "no" >&6; } | |
c906108c SS |
3302 | fi |
3303 | ||
81ecdfbb | 3304 | |
bec39cab AC |
3305 | test -n "$ac_ct_CC" && break |
3306 | done | |
c906108c | 3307 | |
81ecdfbb RW |
3308 | if test "x$ac_ct_CC" = x; then |
3309 | CC="" | |
3310 | else | |
3311 | case $cross_compiling:$ac_tool_warned in | |
3312 | yes:) | |
3313 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3314 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3315 | ac_tool_warned=yes ;; | |
3316 | esac | |
3317 | CC=$ac_ct_CC | |
3318 | fi | |
bec39cab AC |
3319 | fi |
3320 | ||
3321 | fi | |
3322 | ||
3323 | ||
81ecdfbb RW |
3324 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3325 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3326 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3327 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3328 | |
3329 | # Provide some information about the compiler. | |
81ecdfbb RW |
3330 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3331 | set X $ac_compile | |
3332 | ac_compiler=$2 | |
3333 | for ac_option in --version -v -V -qversion; do | |
3334 | { { ac_try="$ac_compiler $ac_option >&5" | |
3335 | case "(($ac_try" in | |
3336 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3337 | *) ac_try_echo=$ac_try;; | |
3338 | esac | |
3339 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3340 | $as_echo "$ac_try_echo"; } >&5 | |
3341 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3342 | ac_status=$? |
81ecdfbb RW |
3343 | if test -s conftest.err; then |
3344 | sed '10a\ | |
3345 | ... rest of stderr output deleted ... | |
3346 | 10q' conftest.err >conftest.er1 | |
3347 | cat conftest.er1 >&5 | |
81ecdfbb | 3348 | fi |
d0ac1c44 | 3349 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3350 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3351 | test $ac_status = 0; } | |
3352 | done | |
bec39cab | 3353 | |
81ecdfbb | 3354 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3355 | /* end confdefs.h. */ |
3356 | ||
3357 | int | |
3358 | main () | |
3359 | { | |
3360 | ||
3361 | ; | |
3362 | return 0; | |
3363 | } | |
3364 | _ACEOF | |
3365 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3366 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3367 | # Try to create an executable without -o first, disregard a.out. |
3368 | # It will help us diagnose broken compilers, and finding out an intuition | |
3369 | # of exeext. | |
d0ac1c44 SM |
3370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3371 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3372 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3373 | ||
3374 | # The possible output files: | |
3375 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3376 | ||
3377 | ac_rmfiles= | |
3378 | for ac_file in $ac_files | |
3379 | do | |
3380 | case $ac_file in | |
3381 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3382 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3383 | esac | |
3384 | done | |
3385 | rm -f $ac_rmfiles | |
3386 | ||
3387 | if { { ac_try="$ac_link_default" | |
3388 | case "(($ac_try" in | |
3389 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3390 | *) ac_try_echo=$ac_try;; | |
3391 | esac | |
3392 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3393 | $as_echo "$ac_try_echo"; } >&5 | |
3394 | (eval "$ac_link_default") 2>&5 | |
3395 | ac_status=$? | |
3396 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3397 | test $ac_status = 0; }; then : | |
3398 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3399 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3400 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3401 | # so that the user can short-circuit this test for compilers unknown to | |
3402 | # Autoconf. | |
3403 | for ac_file in $ac_files '' | |
bec39cab AC |
3404 | do |
3405 | test -f "$ac_file" || continue | |
3406 | case $ac_file in | |
81ecdfbb | 3407 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3408 | ;; |
3409 | [ab].out ) | |
3410 | # We found the default executable, but exeext='' is most | |
3411 | # certainly right. | |
3412 | break;; | |
3413 | *.* ) | |
81ecdfbb RW |
3414 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3415 | then :; else | |
3416 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3417 | fi | |
3418 | # We set ac_cv_exeext here because the later test for it is not | |
3419 | # safe: cross compilers may not add the suffix if given an `-o' | |
3420 | # argument, so we may need to know it at that point already. | |
3421 | # Even if this section looks crufty: it has the advantage of | |
3422 | # actually working. | |
b4e70030 JB |
3423 | break;; |
3424 | * ) | |
3425 | break;; | |
bec39cab AC |
3426 | esac |
3427 | done | |
81ecdfbb RW |
3428 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3429 | ||
bec39cab | 3430 | else |
81ecdfbb RW |
3431 | ac_file='' |
3432 | fi | |
81ecdfbb | 3433 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3435 | $as_echo "no" >&6; } | |
3436 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3437 | sed 's/^/| /' conftest.$ac_ext >&5 |
3438 | ||
81ecdfbb RW |
3439 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3440 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3441 | as_fn_error 77 "C compiler cannot create executables |
3442 | See \`config.log' for more details" "$LINENO" 5; } | |
3443 | else | |
3444 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3445 | $as_echo "yes" >&6; } | |
bec39cab | 3446 | fi |
d0ac1c44 SM |
3447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3448 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3450 | $as_echo "$ac_file" >&6; } | |
b4e70030 | 3451 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3452 | |
d0ac1c44 | 3453 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
b4e70030 | 3454 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3456 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3457 | if { { ac_try="$ac_link" | |
3458 | case "(($ac_try" in | |
3459 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3460 | *) ac_try_echo=$ac_try;; | |
3461 | esac | |
3462 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3463 | $as_echo "$ac_try_echo"; } >&5 | |
3464 | (eval "$ac_link") 2>&5 | |
bec39cab | 3465 | ac_status=$? |
81ecdfbb RW |
3466 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3467 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3468 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3469 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3470 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3471 | # `rm'. | |
3472 | for ac_file in conftest.exe conftest conftest.*; do | |
3473 | test -f "$ac_file" || continue | |
3474 | case $ac_file in | |
81ecdfbb | 3475 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3476 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3477 | break;; |
3478 | * ) break;; | |
3479 | esac | |
3480 | done | |
c906108c | 3481 | else |
81ecdfbb RW |
3482 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3483 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3484 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3485 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3486 | fi |
d0ac1c44 | 3487 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3489 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3490 | |
b4e70030 | 3491 | rm -f conftest.$ac_ext |
bec39cab AC |
3492 | EXEEXT=$ac_cv_exeext |
3493 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3494 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3495 | /* end confdefs.h. */ | |
3496 | #include <stdio.h> | |
3497 | int | |
3498 | main () | |
3499 | { | |
3500 | FILE *f = fopen ("conftest.out", "w"); | |
3501 | return ferror (f) || fclose (f) != 0; | |
3502 | ||
3503 | ; | |
3504 | return 0; | |
3505 | } | |
3506 | _ACEOF | |
3507 | ac_clean_files="$ac_clean_files conftest.out" | |
3508 | # Check that the compiler produces executables we can run. If not, either | |
3509 | # the compiler is broken, or we cross compile. | |
3510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3511 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3512 | if test "$cross_compiling" != yes; then | |
3513 | { { ac_try="$ac_link" | |
3514 | case "(($ac_try" in | |
3515 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3516 | *) ac_try_echo=$ac_try;; | |
3517 | esac | |
3518 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3519 | $as_echo "$ac_try_echo"; } >&5 | |
3520 | (eval "$ac_link") 2>&5 | |
3521 | ac_status=$? | |
3522 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3523 | test $ac_status = 0; } | |
3524 | if { ac_try='./conftest$ac_cv_exeext' | |
3525 | { { case "(($ac_try" in | |
3526 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3527 | *) ac_try_echo=$ac_try;; | |
3528 | esac | |
3529 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3530 | $as_echo "$ac_try_echo"; } >&5 | |
3531 | (eval "$ac_try") 2>&5 | |
3532 | ac_status=$? | |
3533 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3534 | test $ac_status = 0; }; }; then | |
3535 | cross_compiling=no | |
3536 | else | |
3537 | if test "$cross_compiling" = maybe; then | |
3538 | cross_compiling=yes | |
3539 | else | |
3540 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3541 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3542 | as_fn_error $? "cannot run C compiled programs. | |
3543 | If you meant to cross compile, use \`--host'. | |
3544 | See \`config.log' for more details" "$LINENO" 5; } | |
3545 | fi | |
3546 | fi | |
3547 | fi | |
3548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3549 | $as_echo "$cross_compiling" >&6; } | |
3550 | ||
3551 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3552 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3554 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3555 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3556 | $as_echo_n "(cached) " >&6 |
bec39cab | 3557 | else |
81ecdfbb | 3558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3559 | /* end confdefs.h. */ |
3560 | ||
3561 | int | |
3562 | main () | |
3563 | { | |
3564 | ||
3565 | ; | |
3566 | return 0; | |
3567 | } | |
3568 | _ACEOF | |
3569 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3570 | if { { ac_try="$ac_compile" |
3571 | case "(($ac_try" in | |
3572 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3573 | *) ac_try_echo=$ac_try;; | |
3574 | esac | |
3575 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3576 | $as_echo "$ac_try_echo"; } >&5 | |
3577 | (eval "$ac_compile") 2>&5 | |
3578 | ac_status=$? | |
3579 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3580 | test $ac_status = 0; }; then : | |
3581 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3582 | test -f "$ac_file" || continue; | |
bec39cab | 3583 | case $ac_file in |
81ecdfbb | 3584 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3585 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3586 | break;; | |
3587 | esac | |
3588 | done | |
c906108c | 3589 | else |
81ecdfbb | 3590 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3591 | sed 's/^/| /' conftest.$ac_ext >&5 |
3592 | ||
81ecdfbb RW |
3593 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3594 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3595 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3596 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3597 | fi |
b4e70030 | 3598 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3599 | fi |
81ecdfbb RW |
3600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3601 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3602 | OBJEXT=$ac_cv_objext |
3603 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3605 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3606 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3607 | $as_echo_n "(cached) " >&6 |
c906108c | 3608 | else |
81ecdfbb | 3609 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3610 | /* end confdefs.h. */ |
3611 | ||
3612 | int | |
3613 | main () | |
3614 | { | |
3615 | #ifndef __GNUC__ | |
3616 | choke me | |
3617 | #endif | |
3618 | ||
3619 | ; | |
3620 | return 0; | |
3621 | } | |
3622 | _ACEOF | |
81ecdfbb | 3623 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3624 | ac_compiler_gnu=yes |
3625 | else | |
81ecdfbb | 3626 | ac_compiler_gnu=no |
bec39cab | 3627 | fi |
81ecdfbb | 3628 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3629 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3630 | ||
3631 | fi | |
81ecdfbb RW |
3632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3633 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3634 | if test $ac_compiler_gnu = yes; then | |
3635 | GCC=yes | |
3636 | else | |
3637 | GCC= | |
3638 | fi | |
bec39cab AC |
3639 | ac_test_CFLAGS=${CFLAGS+set} |
3640 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3641 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3642 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3643 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb | 3644 | $as_echo_n "(cached) " >&6 |
bec39cab | 3645 | else |
81ecdfbb RW |
3646 | ac_save_c_werror_flag=$ac_c_werror_flag |
3647 | ac_c_werror_flag=yes | |
3648 | ac_cv_prog_cc_g=no | |
3649 | CFLAGS="-g" | |
3650 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3651 | /* end confdefs.h. */ |
3652 | ||
3653 | int | |
3654 | main () | |
3655 | { | |
3656 | ||
3657 | ; | |
3658 | return 0; | |
3659 | } | |
3660 | _ACEOF | |
81ecdfbb | 3661 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3662 | ac_cv_prog_cc_g=yes |
3663 | else | |
81ecdfbb RW |
3664 | CFLAGS="" |
3665 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3666 | /* end confdefs.h. */ | |
3667 | ||
3668 | int | |
3669 | main () | |
3670 | { | |
3671 | ||
3672 | ; | |
3673 | return 0; | |
3674 | } | |
3675 | _ACEOF | |
3676 | if ac_fn_c_try_compile "$LINENO"; then : | |
3677 | ||
3678 | else | |
3679 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3680 | CFLAGS="-g" | |
3681 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3682 | /* end confdefs.h. */ | |
3683 | ||
3684 | int | |
3685 | main () | |
3686 | { | |
c906108c | 3687 | |
81ecdfbb RW |
3688 | ; |
3689 | return 0; | |
3690 | } | |
3691 | _ACEOF | |
3692 | if ac_fn_c_try_compile "$LINENO"; then : | |
3693 | ac_cv_prog_cc_g=yes | |
3694 | fi | |
3695 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3696 | fi | |
3697 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3698 | fi |
81ecdfbb RW |
3699 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3700 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3701 | fi |
81ecdfbb RW |
3702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3703 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3704 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3705 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3706 | elif test $ac_cv_prog_cc_g = yes; then |
3707 | if test "$GCC" = yes; then | |
3708 | CFLAGS="-g -O2" | |
3709 | else | |
3710 | CFLAGS="-g" | |
3711 | fi | |
3712 | else | |
3713 | if test "$GCC" = yes; then | |
3714 | CFLAGS="-O2" | |
3715 | else | |
3716 | CFLAGS= | |
3717 | fi | |
3718 | fi | |
81ecdfbb RW |
3719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3720 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3721 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3722 | $as_echo_n "(cached) " >&6 |
bec39cab | 3723 | else |
81ecdfbb | 3724 | ac_cv_prog_cc_c89=no |
bec39cab | 3725 | ac_save_CC=$CC |
81ecdfbb | 3726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3727 | /* end confdefs.h. */ |
c906108c SS |
3728 | #include <stdarg.h> |
3729 | #include <stdio.h> | |
d0ac1c44 | 3730 | struct stat; |
c906108c SS |
3731 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3732 | struct buf { int x; }; | |
3733 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3734 | static char *e (p, i) | |
3735 | char **p; | |
3736 | int i; | |
3737 | { | |
3738 | return p[i]; | |
3739 | } | |
3740 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3741 | { | |
3742 | char *s; | |
3743 | va_list v; | |
3744 | va_start (v,p); | |
3745 | s = g (p, va_arg (v,int)); | |
3746 | va_end (v); | |
3747 | return s; | |
3748 | } | |
bec39cab AC |
3749 | |
3750 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3751 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3752 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3753 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3754 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3755 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3756 | that's true only with -std. */ |
bec39cab AC |
3757 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3758 | ||
81ecdfbb RW |
3759 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3760 | inside strings and character constants. */ | |
3761 | #define FOO(x) 'x' | |
3762 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3763 | ||
c906108c SS |
3764 | int test (int i, double x); |
3765 | struct s1 {int (*f) (int a);}; | |
3766 | struct s2 {int (*f) (double a);}; | |
3767 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3768 | int argc; | |
3769 | char **argv; | |
bec39cab AC |
3770 | int |
3771 | main () | |
3772 | { | |
c906108c | 3773 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3774 | ; |
3775 | return 0; | |
3776 | } | |
3777 | _ACEOF | |
81ecdfbb RW |
3778 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3779 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3780 | do |
3781 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3782 | if ac_fn_c_try_compile "$LINENO"; then : |
3783 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3784 | fi |
81ecdfbb RW |
3785 | rm -f core conftest.err conftest.$ac_objext |
3786 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3787 | done |
81ecdfbb | 3788 | rm -f conftest.$ac_ext |
bec39cab | 3789 | CC=$ac_save_CC |
c906108c SS |
3790 | |
3791 | fi | |
81ecdfbb RW |
3792 | # AC_CACHE_VAL |
3793 | case "x$ac_cv_prog_cc_c89" in | |
3794 | x) | |
3795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3796 | $as_echo "none needed" >&6; } ;; | |
3797 | xno) | |
3798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3799 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3800 | *) |
81ecdfbb RW |
3801 | CC="$CC $ac_cv_prog_cc_c89" |
3802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3803 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3804 | esac |
81ecdfbb | 3805 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3806 | |
b4e70030 JB |
3807 | fi |
3808 | ||
bec39cab AC |
3809 | ac_ext=c |
3810 | ac_cpp='$CPP $CPPFLAGS' | |
3811 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3812 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3813 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3814 | |
3bc3d82a PA |
3815 | ac_ext=cpp |
3816 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3817 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3818 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3819 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3820 | if test -z "$CXX"; then | |
3821 | if test -n "$CCC"; then | |
3822 | CXX=$CCC | |
3823 | else | |
3824 | if test -n "$ac_tool_prefix"; then | |
3825 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3826 | do | |
3827 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3828 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3830 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3831 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3832 | $as_echo_n "(cached) " >&6 |
3833 | else | |
3834 | if test -n "$CXX"; then | |
3835 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3836 | else | |
3837 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3838 | for as_dir in $PATH | |
3839 | do | |
3840 | IFS=$as_save_IFS | |
3841 | test -z "$as_dir" && as_dir=. | |
3842 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3843 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3844 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3845 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3846 | break 2 | |
3847 | fi | |
3848 | done | |
3849 | done | |
3850 | IFS=$as_save_IFS | |
3851 | ||
3852 | fi | |
3853 | fi | |
3854 | CXX=$ac_cv_prog_CXX | |
3855 | if test -n "$CXX"; then | |
3856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3857 | $as_echo "$CXX" >&6; } | |
3858 | else | |
3859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3860 | $as_echo "no" >&6; } | |
3861 | fi | |
3862 | ||
3863 | ||
3864 | test -n "$CXX" && break | |
3865 | done | |
3866 | fi | |
3867 | if test -z "$CXX"; then | |
3868 | ac_ct_CXX=$CXX | |
3869 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3870 | do | |
3871 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3872 | set dummy $ac_prog; ac_word=$2 | |
3873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3874 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3875 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3876 | $as_echo_n "(cached) " >&6 |
3877 | else | |
3878 | if test -n "$ac_ct_CXX"; then | |
3879 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3880 | else | |
3881 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3882 | for as_dir in $PATH | |
3883 | do | |
3884 | IFS=$as_save_IFS | |
3885 | test -z "$as_dir" && as_dir=. | |
3886 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3887 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3888 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3889 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3890 | break 2 | |
3891 | fi | |
3892 | done | |
3893 | done | |
3894 | IFS=$as_save_IFS | |
3895 | ||
3896 | fi | |
3897 | fi | |
3898 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3899 | if test -n "$ac_ct_CXX"; then | |
3900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3901 | $as_echo "$ac_ct_CXX" >&6; } | |
3902 | else | |
3903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3904 | $as_echo "no" >&6; } | |
3905 | fi | |
3906 | ||
3907 | ||
3908 | test -n "$ac_ct_CXX" && break | |
3909 | done | |
3910 | ||
3911 | if test "x$ac_ct_CXX" = x; then | |
3912 | CXX="g++" | |
3913 | else | |
3914 | case $cross_compiling:$ac_tool_warned in | |
3915 | yes:) | |
3916 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3917 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3918 | ac_tool_warned=yes ;; | |
3919 | esac | |
3920 | CXX=$ac_ct_CXX | |
3921 | fi | |
3922 | fi | |
3923 | ||
3924 | fi | |
3925 | fi | |
3926 | # Provide some information about the compiler. | |
3927 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3928 | set X $ac_compile | |
3929 | ac_compiler=$2 | |
3930 | for ac_option in --version -v -V -qversion; do | |
3931 | { { ac_try="$ac_compiler $ac_option >&5" | |
3932 | case "(($ac_try" in | |
3933 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3934 | *) ac_try_echo=$ac_try;; | |
3935 | esac | |
3936 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3937 | $as_echo "$ac_try_echo"; } >&5 | |
3938 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3939 | ac_status=$? | |
3940 | if test -s conftest.err; then | |
3941 | sed '10a\ | |
3942 | ... rest of stderr output deleted ... | |
3943 | 10q' conftest.err >conftest.er1 | |
3944 | cat conftest.er1 >&5 | |
3bc3d82a | 3945 | fi |
d0ac1c44 | 3946 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3947 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3948 | test $ac_status = 0; } | |
3949 | done | |
3950 | ||
3951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3952 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3953 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3954 | $as_echo_n "(cached) " >&6 |
3955 | else | |
3956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3957 | /* end confdefs.h. */ | |
3958 | ||
3959 | int | |
3960 | main () | |
3961 | { | |
3962 | #ifndef __GNUC__ | |
3963 | choke me | |
3964 | #endif | |
3965 | ||
3966 | ; | |
3967 | return 0; | |
3968 | } | |
3969 | _ACEOF | |
3970 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3971 | ac_compiler_gnu=yes | |
3972 | else | |
3973 | ac_compiler_gnu=no | |
3974 | fi | |
3975 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3976 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3977 | ||
3978 | fi | |
3979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3980 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3981 | if test $ac_compiler_gnu = yes; then | |
3982 | GXX=yes | |
3983 | else | |
3984 | GXX= | |
3985 | fi | |
3986 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3987 | ac_save_CXXFLAGS=$CXXFLAGS | |
3988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3989 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3990 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3991 | $as_echo_n "(cached) " >&6 |
3992 | else | |
3993 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3994 | ac_cxx_werror_flag=yes | |
3995 | ac_cv_prog_cxx_g=no | |
3996 | CXXFLAGS="-g" | |
3997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3998 | /* end confdefs.h. */ | |
3999 | ||
4000 | int | |
4001 | main () | |
4002 | { | |
4003 | ||
4004 | ; | |
4005 | return 0; | |
4006 | } | |
4007 | _ACEOF | |
4008 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4009 | ac_cv_prog_cxx_g=yes | |
4010 | else | |
4011 | CXXFLAGS="" | |
4012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4013 | /* end confdefs.h. */ | |
4014 | ||
4015 | int | |
4016 | main () | |
4017 | { | |
4018 | ||
4019 | ; | |
4020 | return 0; | |
4021 | } | |
4022 | _ACEOF | |
4023 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4024 | ||
4025 | else | |
4026 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4027 | CXXFLAGS="-g" | |
4028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4029 | /* end confdefs.h. */ | |
4030 | ||
4031 | int | |
4032 | main () | |
4033 | { | |
4034 | ||
4035 | ; | |
4036 | return 0; | |
4037 | } | |
4038 | _ACEOF | |
4039 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4040 | ac_cv_prog_cxx_g=yes | |
4041 | fi | |
4042 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4043 | fi | |
4044 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4045 | fi | |
4046 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4047 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4048 | fi | |
4049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
4050 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
4051 | if test "$ac_test_CXXFLAGS" = set; then | |
4052 | CXXFLAGS=$ac_save_CXXFLAGS | |
4053 | elif test $ac_cv_prog_cxx_g = yes; then | |
4054 | if test "$GXX" = yes; then | |
4055 | CXXFLAGS="-g -O2" | |
4056 | else | |
4057 | CXXFLAGS="-g" | |
4058 | fi | |
4059 | else | |
4060 | if test "$GXX" = yes; then | |
4061 | CXXFLAGS="-O2" | |
4062 | else | |
4063 | CXXFLAGS= | |
4064 | fi | |
4065 | fi | |
4066 | ac_ext=c | |
4067 | ac_cpp='$CPP $CPPFLAGS' | |
4068 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4069 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4070 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4071 | ||
4072 | ||
60ca704f | 4073 | |
bec39cab AC |
4074 | ac_ext=c |
4075 | ac_cpp='$CPP $CPPFLAGS' | |
4076 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4077 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4078 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
4079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
4080 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
4081 | # On Suns, sometimes $CPP names a directory. |
4082 | if test -n "$CPP" && test -d "$CPP"; then | |
4083 | CPP= | |
8bb2c122 | 4084 | fi |
bec39cab | 4085 | if test -z "$CPP"; then |
d0ac1c44 | 4086 | if ${ac_cv_prog_CPP+:} false; then : |
81ecdfbb | 4087 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
4088 | else |
4089 | # Double quotes because CPP needs to be expanded | |
4090 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4091 | do | |
4092 | ac_preproc_ok=false | |
4093 | for ac_c_preproc_warn_flag in '' yes | |
4094 | do | |
4095 | # Use a header file that comes with gcc, so configuring glibc | |
4096 | # with a fresh cross-compiler works. | |
4097 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4098 | # <limits.h> exists even on freestanding compilers. | |
4099 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4100 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4102 | /* end confdefs.h. */ |
4103 | #ifdef __STDC__ | |
4104 | # include <limits.h> | |
4105 | #else | |
4106 | # include <assert.h> | |
4107 | #endif | |
4108 | Syntax error | |
4109 | _ACEOF | |
81ecdfbb | 4110 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4111 | |
81ecdfbb | 4112 | else |
bec39cab AC |
4113 | # Broken: fails on valid input. |
4114 | continue | |
4115 | fi | |
d0ac1c44 | 4116 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4117 | |
81ecdfbb | 4118 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4119 | # can be detected and how. |
81ecdfbb | 4120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4121 | /* end confdefs.h. */ |
4122 | #include <ac_nonexistent.h> | |
4123 | _ACEOF | |
81ecdfbb | 4124 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4125 | # Broken: success on invalid input. |
4126 | continue | |
8bb2c122 | 4127 | else |
bec39cab AC |
4128 | # Passes both tests. |
4129 | ac_preproc_ok=: | |
4130 | break | |
8bb2c122 | 4131 | fi |
d0ac1c44 | 4132 | rm -f conftest.err conftest.i conftest.$ac_ext |
8bb2c122 | 4133 | |
bec39cab AC |
4134 | done |
4135 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4136 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb | 4137 | if $ac_preproc_ok; then : |
bec39cab AC |
4138 | break |
4139 | fi | |
8bb2c122 | 4140 | |
bec39cab AC |
4141 | done |
4142 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 4143 | |
c906108c | 4144 | fi |
bec39cab AC |
4145 | CPP=$ac_cv_prog_CPP |
4146 | else | |
4147 | ac_cv_prog_CPP=$CPP | |
c906108c | 4148 | fi |
81ecdfbb RW |
4149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
4150 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
4151 | ac_preproc_ok=false |
4152 | for ac_c_preproc_warn_flag in '' yes | |
4153 | do | |
4154 | # Use a header file that comes with gcc, so configuring glibc | |
4155 | # with a fresh cross-compiler works. | |
4156 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4157 | # <limits.h> exists even on freestanding compilers. | |
4158 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4159 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4161 | /* end confdefs.h. */ |
4162 | #ifdef __STDC__ | |
4163 | # include <limits.h> | |
4164 | #else | |
4165 | # include <assert.h> | |
4166 | #endif | |
4167 | Syntax error | |
4168 | _ACEOF | |
81ecdfbb | 4169 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4170 | |
81ecdfbb | 4171 | else |
bec39cab AC |
4172 | # Broken: fails on valid input. |
4173 | continue | |
4174 | fi | |
d0ac1c44 | 4175 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4176 | |
81ecdfbb | 4177 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4178 | # can be detected and how. |
81ecdfbb | 4179 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4180 | /* end confdefs.h. */ |
4181 | #include <ac_nonexistent.h> | |
4182 | _ACEOF | |
81ecdfbb | 4183 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4184 | # Broken: success on invalid input. |
4185 | continue | |
c906108c | 4186 | else |
bec39cab AC |
4187 | # Passes both tests. |
4188 | ac_preproc_ok=: | |
4189 | break | |
c906108c | 4190 | fi |
d0ac1c44 | 4191 | rm -f conftest.err conftest.i conftest.$ac_ext |
c906108c | 4192 | |
bec39cab AC |
4193 | done |
4194 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4195 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
4196 | if $ac_preproc_ok; then : |
4197 | ||
c906108c | 4198 | else |
81ecdfbb RW |
4199 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4200 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4201 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4202 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 4203 | fi |
c906108c | 4204 | |
bec39cab AC |
4205 | ac_ext=c |
4206 | ac_cpp='$CPP $CPPFLAGS' | |
4207 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4208 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4209 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4210 | ||
4211 | ||
81ecdfbb RW |
4212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4213 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 4214 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 4215 | $as_echo_n "(cached) " >&6 |
4e8d927d | 4216 | else |
81ecdfbb RW |
4217 | if test -z "$GREP"; then |
4218 | ac_path_GREP_found=false | |
4219 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4220 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4221 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4222 | do | |
4223 | IFS=$as_save_IFS | |
4224 | test -z "$as_dir" && as_dir=. | |
4225 | for ac_prog in grep ggrep; do | |
4226 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4227 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4228 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
4229 | # Check for GNU ac_path_GREP and select it if it is found. |
4230 | # Check for GNU $ac_path_GREP | |
4231 | case `"$ac_path_GREP" --version 2>&1` in | |
4232 | *GNU*) | |
4233 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4234 | *) | |
4235 | ac_count=0 | |
4236 | $as_echo_n 0123456789 >"conftest.in" | |
4237 | while : | |
4238 | do | |
4239 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4240 | mv "conftest.tmp" "conftest.in" | |
4241 | cp "conftest.in" "conftest.nl" | |
4242 | $as_echo 'GREP' >> "conftest.nl" | |
4243 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4244 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4245 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4246 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4247 | # Best one so far, save it but keep looking for a better one | |
4248 | ac_cv_path_GREP="$ac_path_GREP" | |
4249 | ac_path_GREP_max=$ac_count | |
bec39cab | 4250 | fi |
81ecdfbb RW |
4251 | # 10*(2^10) chars as input seems more than enough |
4252 | test $ac_count -gt 10 && break | |
4253 | done | |
4254 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4255 | esac | |
bec39cab | 4256 | |
81ecdfbb RW |
4257 | $ac_path_GREP_found && break 3 |
4258 | done | |
4259 | done | |
4260 | done | |
4261 | IFS=$as_save_IFS | |
4262 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 4263 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4264 | fi |
c906108c | 4265 | else |
81ecdfbb | 4266 | ac_cv_path_GREP=$GREP |
c906108c | 4267 | fi |
c906108c | 4268 | |
81ecdfbb RW |
4269 | fi |
4270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4271 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4272 | GREP="$ac_cv_path_GREP" | |
c906108c | 4273 | |
c906108c | 4274 | |
81ecdfbb RW |
4275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4276 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 4277 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb | 4278 | $as_echo_n "(cached) " >&6 |
783e057b | 4279 | else |
81ecdfbb RW |
4280 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4281 | then ac_cv_path_EGREP="$GREP -E" | |
4282 | else | |
4283 | if test -z "$EGREP"; then | |
4284 | ac_path_EGREP_found=false | |
4285 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4286 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4287 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4288 | do |
4289 | IFS=$as_save_IFS | |
4290 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4291 | for ac_prog in egrep; do |
4292 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4293 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4294 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4295 | # Check for GNU ac_path_EGREP and select it if it is found. |
4296 | # Check for GNU $ac_path_EGREP | |
4297 | case `"$ac_path_EGREP" --version 2>&1` in | |
4298 | *GNU*) | |
4299 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4300 | *) | |
4301 | ac_count=0 | |
4302 | $as_echo_n 0123456789 >"conftest.in" | |
4303 | while : | |
4304 | do | |
4305 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4306 | mv "conftest.tmp" "conftest.in" | |
4307 | cp "conftest.in" "conftest.nl" | |
4308 | $as_echo 'EGREP' >> "conftest.nl" | |
4309 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4310 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4311 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4312 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4313 | # Best one so far, save it but keep looking for a better one | |
4314 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4315 | ac_path_EGREP_max=$ac_count | |
4316 | fi | |
4317 | # 10*(2^10) chars as input seems more than enough | |
4318 | test $ac_count -gt 10 && break | |
4319 | done | |
4320 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4321 | esac | |
bec39cab | 4322 | |
81ecdfbb RW |
4323 | $ac_path_EGREP_found && break 3 |
4324 | done | |
4325 | done | |
4326 | done | |
4327 | IFS=$as_save_IFS | |
4328 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4329 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
783e057b | 4330 | fi |
783e057b | 4331 | else |
81ecdfbb | 4332 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4333 | fi |
4334 | ||
81ecdfbb | 4335 | fi |
783e057b | 4336 | fi |
81ecdfbb RW |
4337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4338 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4339 | EGREP="$ac_cv_path_EGREP" | |
4340 | ||
783e057b | 4341 | |
81ecdfbb RW |
4342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4343 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4344 | if ${ac_cv_header_stdc+:} false; then : |
81ecdfbb | 4345 | $as_echo_n "(cached) " >&6 |
783e057b | 4346 | else |
81ecdfbb | 4347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4348 | /* end confdefs.h. */ |
783e057b | 4349 | #include <stdlib.h> |
bec39cab | 4350 | #include <stdarg.h> |
783e057b DJ |
4351 | #include <string.h> |
4352 | #include <float.h> | |
c906108c | 4353 | |
bec39cab AC |
4354 | int |
4355 | main () | |
4356 | { | |
c906108c | 4357 | |
bec39cab AC |
4358 | ; |
4359 | return 0; | |
4360 | } | |
4361 | _ACEOF | |
81ecdfbb | 4362 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4363 | ac_cv_header_stdc=yes |
c906108c | 4364 | else |
81ecdfbb | 4365 | ac_cv_header_stdc=no |
c906108c | 4366 | fi |
81ecdfbb | 4367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4368 | |
783e057b DJ |
4369 | if test $ac_cv_header_stdc = yes; then |
4370 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4371 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4372 | /* end confdefs.h. */ |
4373 | #include <string.h> | |
c906108c | 4374 | |
783e057b DJ |
4375 | _ACEOF |
4376 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4377 | $EGREP "memchr" >/dev/null 2>&1; then : |
4378 | ||
c906108c | 4379 | else |
783e057b | 4380 | ac_cv_header_stdc=no |
c906108c | 4381 | fi |
783e057b | 4382 | rm -f conftest* |
c906108c SS |
4383 | |
4384 | fi | |
4385 | ||
783e057b DJ |
4386 | if test $ac_cv_header_stdc = yes; then |
4387 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4388 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4389 | /* end confdefs.h. */ |
4390 | #include <stdlib.h> | |
bec39cab | 4391 | |
783e057b DJ |
4392 | _ACEOF |
4393 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4394 | $EGREP "free" >/dev/null 2>&1; then : |
4395 | ||
bec39cab | 4396 | else |
783e057b | 4397 | ac_cv_header_stdc=no |
bec39cab | 4398 | fi |
783e057b | 4399 | rm -f conftest* |
bec39cab AC |
4400 | |
4401 | fi | |
bec39cab | 4402 | |
783e057b DJ |
4403 | if test $ac_cv_header_stdc = yes; then |
4404 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4405 | if test "$cross_compiling" = yes; then : |
783e057b | 4406 | : |
bec39cab | 4407 | else |
81ecdfbb | 4408 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4409 | /* end confdefs.h. */ |
4410 | #include <ctype.h> | |
81ecdfbb | 4411 | #include <stdlib.h> |
783e057b DJ |
4412 | #if ((' ' & 0x0FF) == 0x020) |
4413 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4414 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4415 | #else | |
4416 | # define ISLOWER(c) \ | |
4417 | (('a' <= (c) && (c) <= 'i') \ | |
4418 | || ('j' <= (c) && (c) <= 'r') \ | |
4419 | || ('s' <= (c) && (c) <= 'z')) | |
4420 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4421 | #endif | |
4422 | ||
4423 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4424 | int | |
4425 | main () | |
4426 | { | |
4427 | int i; | |
4428 | for (i = 0; i < 256; i++) | |
4429 | if (XOR (islower (i), ISLOWER (i)) | |
4430 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4431 | return 2; |
4432 | return 0; | |
783e057b DJ |
4433 | } |
4434 | _ACEOF | |
81ecdfbb | 4435 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4436 | |
81ecdfbb RW |
4437 | else |
4438 | ac_cv_header_stdc=no | |
783e057b | 4439 | fi |
81ecdfbb RW |
4440 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4441 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4442 | fi |
81ecdfbb | 4443 | |
783e057b DJ |
4444 | fi |
4445 | fi | |
81ecdfbb RW |
4446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4447 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4448 | if test $ac_cv_header_stdc = yes; then |
4449 | ||
81ecdfbb | 4450 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4451 | |
4452 | fi | |
4453 | ||
4454 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4455 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4456 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4457 | do : |
4458 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4459 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4460 | " | |
d0ac1c44 | 4461 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
783e057b | 4462 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4463 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4464 | _ACEOF |
4465 | ||
4466 | fi | |
4467 | ||
4468 | done | |
4469 | ||
4470 | ||
4471 | ||
81ecdfbb | 4472 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4473 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
783e057b DJ |
4474 | MINIX=yes |
4475 | else | |
4476 | MINIX= | |
4477 | fi | |
4478 | ||
4479 | ||
4480 | if test "$MINIX" = yes; then | |
4481 | ||
81ecdfbb | 4482 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4483 | |
4484 | ||
81ecdfbb | 4485 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4486 | |
4487 | ||
81ecdfbb | 4488 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4489 | |
4490 | fi | |
4491 | ||
4492 | ||
81ecdfbb RW |
4493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4494 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4495 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
81ecdfbb | 4496 | $as_echo_n "(cached) " >&6 |
783e057b | 4497 | else |
81ecdfbb | 4498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4499 | /* end confdefs.h. */ |
4500 | ||
d0ac1c44 SM |
4501 | # define __EXTENSIONS__ 1 |
4502 | $ac_includes_default | |
783e057b DJ |
4503 | int |
4504 | main () | |
4505 | { | |
4506 | ||
4507 | ; | |
4508 | return 0; | |
4509 | } | |
4510 | _ACEOF | |
81ecdfbb | 4511 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4512 | ac_cv_safe_to_define___extensions__=yes |
4513 | else | |
81ecdfbb | 4514 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4515 | fi |
81ecdfbb | 4516 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4517 | fi |
81ecdfbb RW |
4518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4519 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4520 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4521 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4522 | |
81ecdfbb | 4523 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4524 | |
81ecdfbb | 4525 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4526 | |
81ecdfbb | 4527 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4528 | |
81ecdfbb | 4529 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4530 | |
4531 | ||
c971b7fa PA |
4532 | ac_aux_dir= |
4533 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4534 | if test -f "$ac_dir/install-sh"; then |
4535 | ac_aux_dir=$ac_dir | |
4536 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4537 | break | |
4538 | elif 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/shtool"; then | |
4543 | ac_aux_dir=$ac_dir | |
4544 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4545 | break | |
4546 | fi | |
c971b7fa PA |
4547 | done |
4548 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4549 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
c971b7fa | 4550 | fi |
770d76d7 | 4551 | |
c971b7fa PA |
4552 | # These three variables are undocumented and unsupported, |
4553 | # and are intended to be withdrawn in a future Autoconf release. | |
4554 | # They can cause serious problems if a builder's source tree is in a directory | |
4555 | # whose full name contains unusual characters. | |
4556 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4557 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4558 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4559 | |
770d76d7 | 4560 | |
c971b7fa PA |
4561 | # Make sure we can run config.sub. |
4562 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4563 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 | 4564 | |
c971b7fa PA |
4565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4566 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4567 | if ${ac_cv_build+:} false; then : |
c971b7fa | 4568 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4569 | else |
c971b7fa PA |
4570 | ac_build_alias=$build_alias |
4571 | test "x$ac_build_alias" = x && | |
4572 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4573 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4574 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
c971b7fa | 4575 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4576 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
c971b7fa | 4577 | |
770d76d7 | 4578 | fi |
c971b7fa PA |
4579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4580 | $as_echo "$ac_cv_build" >&6; } | |
4581 | case $ac_cv_build in | |
4582 | *-*-*) ;; | |
d0ac1c44 | 4583 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 | 4584 | esac |
c971b7fa PA |
4585 | build=$ac_cv_build |
4586 | ac_save_IFS=$IFS; IFS='-' | |
4587 | set x $ac_cv_build | |
4588 | shift | |
4589 | build_cpu=$1 | |
4590 | build_vendor=$2 | |
4591 | shift; shift | |
4592 | # Remember, the first character of IFS is used to create $*, | |
4593 | # except with old shells: | |
4594 | build_os=$* | |
4595 | IFS=$ac_save_IFS | |
4596 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4597 | |
4598 | ||
c971b7fa PA |
4599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4600 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4601 | if ${ac_cv_host+:} false; then : |
81ecdfbb RW |
4602 | $as_echo_n "(cached) " >&6 |
4603 | else | |
c971b7fa PA |
4604 | if test "x$host_alias" = x; then |
4605 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4606 | else |
c971b7fa | 4607 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
d0ac1c44 | 4608 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
81ecdfbb | 4609 | fi |
81ecdfbb RW |
4610 | |
4611 | fi | |
c971b7fa PA |
4612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4613 | $as_echo "$ac_cv_host" >&6; } | |
4614 | case $ac_cv_host in | |
4615 | *-*-*) ;; | |
d0ac1c44 | 4616 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
81ecdfbb | 4617 | esac |
c971b7fa PA |
4618 | host=$ac_cv_host |
4619 | ac_save_IFS=$IFS; IFS='-' | |
4620 | set x $ac_cv_host | |
4621 | shift | |
4622 | host_cpu=$1 | |
4623 | host_vendor=$2 | |
4624 | shift; shift | |
4625 | # Remember, the first character of IFS is used to create $*, | |
4626 | # except with old shells: | |
4627 | host_os=$* | |
4628 | IFS=$ac_save_IFS | |
4629 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4630 | |
4631 | ||
4632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4633 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4634 | if ${ac_cv_target+:} false; then : |
3388710e JM |
4635 | $as_echo_n "(cached) " >&6 |
4636 | else | |
4637 | if test "x$target_alias" = x; then | |
4638 | ac_cv_target=$ac_cv_host | |
4639 | else | |
4640 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
d0ac1c44 | 4641 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
3388710e JM |
4642 | fi |
4643 | ||
4644 | fi | |
4645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4646 | $as_echo "$ac_cv_target" >&6; } | |
4647 | case $ac_cv_target in | |
4648 | *-*-*) ;; | |
d0ac1c44 | 4649 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
3388710e JM |
4650 | esac |
4651 | target=$ac_cv_target | |
4652 | ac_save_IFS=$IFS; IFS='-' | |
4653 | set x $ac_cv_target | |
4654 | shift | |
4655 | target_cpu=$1 | |
4656 | target_vendor=$2 | |
4657 | shift; shift | |
4658 | # Remember, the first character of IFS is used to create $*, | |
4659 | # except with old shells: | |
4660 | target_os=$* | |
4661 | IFS=$ac_save_IFS | |
4662 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4663 | ||
4664 | ||
4665 | # The aliases save the names the user supplied, while $host etc. | |
4666 | # will get canonicalized. | |
4667 | test -n "$target_alias" && | |
4668 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4669 | NONENONEs,x,x, && | |
4670 | program_prefix=${target_alias}- | |
4671 | ||
4672 | # The tests for host and target for $enable_largefile require | |
4673 | # canonical names. | |
4674 | ||
4675 | ||
81ecdfbb | 4676 | |
da2f07f1 JK |
4677 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4678 | # even in directories otherwise not depending on the $plugins option. | |
4679 | ||
4680 | ||
2974be62 AM |
4681 | maybe_plugins=no |
4682 | for ac_header in dlfcn.h | |
4683 | do : | |
4684 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4685 | " | |
d0ac1c44 | 4686 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : |
2974be62 AM |
4687 | cat >>confdefs.h <<_ACEOF |
4688 | #define HAVE_DLFCN_H 1 | |
4689 | _ACEOF | |
4690 | maybe_plugins=yes | |
4691 | fi | |
4692 | ||
4693 | done | |
4694 | ||
4695 | for ac_header in windows.h | |
4696 | do : | |
4697 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4698 | " | |
d0ac1c44 | 4699 | if test "x$ac_cv_header_windows_h" = xyes; then : |
2974be62 AM |
4700 | cat >>confdefs.h <<_ACEOF |
4701 | #define HAVE_WINDOWS_H 1 | |
4702 | _ACEOF | |
4703 | maybe_plugins=yes | |
4704 | fi | |
4705 | ||
4706 | done | |
4707 | ||
4708 | ||
4709 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4710 | if test "${enable_plugins+set}" = set; then : |
4711 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4712 | no) plugins=no ;; |
4713 | *) plugins=yes | |
4714 | if test "$maybe_plugins" != "yes" ; then | |
d0ac1c44 | 4715 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 |
2974be62 AM |
4716 | fi ;; |
4717 | esac | |
da2f07f1 | 4718 | else |
2974be62 AM |
4719 | plugins=$maybe_plugins |
4720 | ||
da2f07f1 JK |
4721 | fi |
4722 | ||
2974be62 | 4723 | if test "$plugins" = "yes"; then |
458412c3 TT |
4724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
4725 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
d0ac1c44 | 4726 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4727 | $as_echo_n "(cached) " >&6 |
4728 | else | |
4729 | ac_func_search_save_LIBS=$LIBS | |
4730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4731 | /* end confdefs.h. */ | |
4732 | ||
4733 | /* Override any GCC internal prototype to avoid an error. | |
4734 | Use char because int might match the return type of a GCC | |
4735 | builtin and then its argument prototype would still apply. */ | |
4736 | #ifdef __cplusplus | |
4737 | extern "C" | |
4738 | #endif | |
458412c3 | 4739 | char dlsym (); |
2974be62 AM |
4740 | int |
4741 | main () | |
4742 | { | |
458412c3 | 4743 | return dlsym (); |
2974be62 AM |
4744 | ; |
4745 | return 0; | |
4746 | } | |
4747 | _ACEOF | |
4748 | for ac_lib in '' dl; do | |
4749 | if test -z "$ac_lib"; then | |
4750 | ac_res="none required" | |
4751 | else | |
4752 | ac_res=-l$ac_lib | |
4753 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4754 | fi | |
4755 | if ac_fn_c_try_link "$LINENO"; then : | |
458412c3 | 4756 | ac_cv_search_dlsym=$ac_res |
2974be62 AM |
4757 | fi |
4758 | rm -f core conftest.err conftest.$ac_objext \ | |
4759 | conftest$ac_exeext | |
d0ac1c44 | 4760 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4761 | break |
4762 | fi | |
4763 | done | |
d0ac1c44 | 4764 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4765 | |
4766 | else | |
458412c3 | 4767 | ac_cv_search_dlsym=no |
2974be62 AM |
4768 | fi |
4769 | rm conftest.$ac_ext | |
4770 | LIBS=$ac_func_search_save_LIBS | |
4771 | fi | |
458412c3 TT |
4772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
4773 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
4774 | ac_res=$ac_cv_search_dlsym | |
2974be62 AM |
4775 | if test "$ac_res" != no; then : |
4776 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4777 | ||
4778 | fi | |
4779 | ||
4780 | fi | |
da2f07f1 JK |
4781 | |
4782 | ||
4783 | case "${host}" in | |
c8693053 RO |
4784 | sparc-*-solaris*|i?86-*-solaris*) |
4785 | # On native 32-bit Solaris/SPARC and x86, large-file and procfs support | |
4786 | # were mutually exclusive until Solaris 11.3. Without procfs support, | |
4787 | # the bfd/ elf module cannot provide certain routines such as | |
4788 | # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user | |
4789 | # explicitly requested large-file support through the | |
4790 | # --enable-largefile switch, disable large-file support in favor of | |
4791 | # procfs support. | |
4792 | # | |
4793 | # Check if <sys/procfs.h> is incompatible with large-file support. | |
4794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4795 | /* end confdefs.h. */ | |
4796 | #define _FILE_OFFSET_BITS 64 | |
4797 | #define _STRUCTURED_PROC 1 | |
4798 | #include <sys/procfs.h> | |
4799 | int | |
4800 | main () | |
4801 | { | |
4802 | ||
4803 | ; | |
4804 | return 0; | |
4805 | } | |
4806 | _ACEOF | |
4807 | if ac_fn_c_try_compile "$LINENO"; then : | |
4808 | acx_cv_procfs_lfs=yes | |
4809 | else | |
4810 | acx_cv_procfs_lfs=no | |
4811 | fi | |
4812 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4813 | # | |
4814 | # Forcefully disable large-file support only if necessary, gdb is in | |
4815 | # tree and enabled. | |
4816 | if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \ | |
4817 | -a -d $srcdir/../gdb -a "$enable_gdb" != no; then | |
4818 | : ${enable_largefile="no"} | |
4819 | if test "$plugins" = yes; then | |
4820 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | |
4821 | plugin support disabled; require large-file support which is incompatible with GDB." >&5 | |
4822 | $as_echo "$as_me: WARNING: | |
4823 | plugin support disabled; require large-file support which is incompatible with GDB." >&2;} | |
4824 | plugins=no | |
4825 | fi | |
4826 | fi | |
4827 | # | |
4828 | # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the | |
4829 | # benefit of g++ 9+ which predefines it on Solaris. | |
4830 | if test "$enable_largefile" = no; then | |
4831 | LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS" | |
4832 | ||
4833 | fi | |
da2f07f1 JK |
4834 | ;; |
4835 | esac | |
4836 | ||
4837 | # Check whether --enable-largefile was given. | |
4838 | if test "${enable_largefile+set}" = set; then : | |
4839 | enableval=$enable_largefile; | |
4840 | fi | |
4841 | ||
4842 | if test "$enable_largefile" != no; then | |
4843 | ||
4844 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4845 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4846 | if ${ac_cv_sys_largefile_CC+:} false; then : |
da2f07f1 JK |
4847 | $as_echo_n "(cached) " >&6 |
4848 | else | |
4849 | ac_cv_sys_largefile_CC=no | |
4850 | if test "$GCC" != yes; then | |
4851 | ac_save_CC=$CC | |
4852 | while :; do | |
4853 | # IRIX 6.2 and later do not support large files by default, | |
4854 | # so use the C compiler's -n32 option if that helps. | |
4855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4856 | /* end confdefs.h. */ | |
4857 | #include <sys/types.h> | |
4858 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4859 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4860 | since some C++ compilers masquerading as C compilers | |
4861 | incorrectly reject 9223372036854775807. */ | |
4862 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4863 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4864 | && LARGE_OFF_T % 2147483647 == 1) | |
4865 | ? 1 : -1]; | |
4866 | int | |
4867 | main () | |
4868 | { | |
4869 | ||
4870 | ; | |
4871 | return 0; | |
4872 | } | |
4873 | _ACEOF | |
4874 | if ac_fn_c_try_compile "$LINENO"; then : | |
4875 | break | |
4876 | fi | |
4877 | rm -f core conftest.err conftest.$ac_objext | |
4878 | CC="$CC -n32" | |
4879 | if ac_fn_c_try_compile "$LINENO"; then : | |
4880 | ac_cv_sys_largefile_CC=' -n32'; break | |
4881 | fi | |
4882 | rm -f core conftest.err conftest.$ac_objext | |
4883 | break | |
4884 | done | |
4885 | CC=$ac_save_CC | |
4886 | rm -f conftest.$ac_ext | |
4887 | fi | |
4888 | fi | |
4889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4890 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4891 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4892 | CC=$CC$ac_cv_sys_largefile_CC | |
4893 | fi | |
4894 | ||
4895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4896 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4897 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
da2f07f1 JK |
4898 | $as_echo_n "(cached) " >&6 |
4899 | else | |
4900 | while :; do | |
4901 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4902 | /* end confdefs.h. */ | |
4903 | #include <sys/types.h> | |
4904 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4905 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4906 | since some C++ compilers masquerading as C compilers | |
4907 | incorrectly reject 9223372036854775807. */ | |
4908 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4909 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4910 | && LARGE_OFF_T % 2147483647 == 1) | |
4911 | ? 1 : -1]; | |
4912 | int | |
4913 | main () | |
4914 | { | |
4915 | ||
4916 | ; | |
4917 | return 0; | |
4918 | } | |
4919 | _ACEOF | |
4920 | if ac_fn_c_try_compile "$LINENO"; then : | |
4921 | ac_cv_sys_file_offset_bits=no; break | |
4922 | fi | |
4923 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4925 | /* end confdefs.h. */ | |
4926 | #define _FILE_OFFSET_BITS 64 | |
4927 | #include <sys/types.h> | |
4928 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4929 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4930 | since some C++ compilers masquerading as C compilers | |
4931 | incorrectly reject 9223372036854775807. */ | |
4932 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4933 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4934 | && LARGE_OFF_T % 2147483647 == 1) | |
4935 | ? 1 : -1]; | |
4936 | int | |
4937 | main () | |
4938 | { | |
4939 | ||
4940 | ; | |
4941 | return 0; | |
4942 | } | |
4943 | _ACEOF | |
4944 | if ac_fn_c_try_compile "$LINENO"; then : | |
4945 | ac_cv_sys_file_offset_bits=64; break | |
4946 | fi | |
4947 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4948 | ac_cv_sys_file_offset_bits=unknown | |
4949 | break | |
4950 | done | |
4951 | fi | |
4952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4953 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4954 | case $ac_cv_sys_file_offset_bits in #( | |
4955 | no | unknown) ;; | |
4956 | *) | |
4957 | cat >>confdefs.h <<_ACEOF | |
4958 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4959 | _ACEOF | |
4960 | ;; | |
4961 | esac | |
4962 | rm -rf conftest* | |
4963 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4964 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4965 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4966 | if ${ac_cv_sys_large_files+:} false; then : |
da2f07f1 JK |
4967 | $as_echo_n "(cached) " >&6 |
4968 | else | |
4969 | while :; do | |
4970 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4971 | /* end confdefs.h. */ | |
4972 | #include <sys/types.h> | |
4973 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4974 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4975 | since some C++ compilers masquerading as C compilers | |
4976 | incorrectly reject 9223372036854775807. */ | |
4977 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4978 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4979 | && LARGE_OFF_T % 2147483647 == 1) | |
4980 | ? 1 : -1]; | |
4981 | int | |
4982 | main () | |
4983 | { | |
4984 | ||
4985 | ; | |
4986 | return 0; | |
4987 | } | |
4988 | _ACEOF | |
4989 | if ac_fn_c_try_compile "$LINENO"; then : | |
4990 | ac_cv_sys_large_files=no; break | |
4991 | fi | |
4992 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4994 | /* end confdefs.h. */ | |
4995 | #define _LARGE_FILES 1 | |
4996 | #include <sys/types.h> | |
4997 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4998 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4999 | since some C++ compilers masquerading as C compilers | |
5000 | incorrectly reject 9223372036854775807. */ | |
5001 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5002 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5003 | && LARGE_OFF_T % 2147483647 == 1) | |
5004 | ? 1 : -1]; | |
5005 | int | |
5006 | main () | |
5007 | { | |
5008 | ||
5009 | ; | |
5010 | return 0; | |
5011 | } | |
5012 | _ACEOF | |
5013 | if ac_fn_c_try_compile "$LINENO"; then : | |
5014 | ac_cv_sys_large_files=1; break | |
5015 | fi | |
5016 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5017 | ac_cv_sys_large_files=unknown | |
5018 | break | |
5019 | done | |
5020 | fi | |
5021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
5022 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
5023 | case $ac_cv_sys_large_files in #( | |
5024 | no | unknown) ;; | |
5025 | *) | |
5026 | cat >>confdefs.h <<_ACEOF | |
5027 | #define _LARGE_FILES $ac_cv_sys_large_files | |
5028 | _ACEOF | |
5029 | ;; | |
5030 | esac | |
5031 | rm -rf conftest* | |
5032 | fi | |
d0ac1c44 SM |
5033 | |
5034 | ||
da2f07f1 JK |
5035 | fi |
5036 | ||
5037 | ||
d0ac1c44 SM |
5038 | # Expand $ac_aux_dir to an absolute path. |
5039 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4869db5e | 5040 | |
d0ac1c44 | 5041 | if test x"${install_sh+set}" != xset; then |
4869db5e RM |
5042 | case $am_aux_dir in |
5043 | *\ * | *\ *) | |
5044 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
5045 | *) | |
5046 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
5047 | esac | |
5048 | fi | |
5049 | ||
d0ac1c44 SM |
5050 | # Installed binaries are usually stripped using 'strip' when the user |
5051 | # run "make install-strip". However 'strip' might not be the right | |
4869db5e | 5052 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 5053 | # will honor the 'STRIP' environment variable to overrule this program. |
4869db5e RM |
5054 | if test "$cross_compiling" != no; then |
5055 | if test -n "$ac_tool_prefix"; then | |
5056 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
5057 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
5058 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5059 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5060 | if ${ac_cv_prog_STRIP+:} false; then : |
4869db5e RM |
5061 | $as_echo_n "(cached) " >&6 |
5062 | else | |
5063 | if test -n "$STRIP"; then | |
5064 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
5065 | else | |
5066 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5067 | for as_dir in $PATH | |
5068 | do | |
5069 | IFS=$as_save_IFS | |
5070 | test -z "$as_dir" && as_dir=. | |
5071 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5072 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5073 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
5074 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5075 | break 2 | |
5076 | fi | |
5077 | done | |
5078 | done | |
5079 | IFS=$as_save_IFS | |
5080 | ||
5081 | fi | |
5082 | fi | |
5083 | STRIP=$ac_cv_prog_STRIP | |
5084 | if test -n "$STRIP"; then | |
5085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
5086 | $as_echo "$STRIP" >&6; } | |
5087 | else | |
5088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5089 | $as_echo "no" >&6; } | |
5090 | fi | |
5091 | ||
5092 | ||
5093 | fi | |
5094 | if test -z "$ac_cv_prog_STRIP"; then | |
5095 | ac_ct_STRIP=$STRIP | |
5096 | # Extract the first word of "strip", so it can be a program name with args. | |
5097 | set dummy strip; ac_word=$2 | |
5098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5099 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5100 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
4869db5e RM |
5101 | $as_echo_n "(cached) " >&6 |
5102 | else | |
5103 | if test -n "$ac_ct_STRIP"; then | |
5104 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
5105 | else | |
5106 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5107 | for as_dir in $PATH | |
5108 | do | |
5109 | IFS=$as_save_IFS | |
5110 | test -z "$as_dir" && as_dir=. | |
5111 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5112 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5113 | ac_cv_prog_ac_ct_STRIP="strip" |
5114 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5115 | break 2 | |
5116 | fi | |
5117 | done | |
5118 | done | |
5119 | IFS=$as_save_IFS | |
5120 | ||
5121 | fi | |
5122 | fi | |
5123 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
5124 | if test -n "$ac_ct_STRIP"; then | |
5125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
5126 | $as_echo "$ac_ct_STRIP" >&6; } | |
5127 | else | |
5128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5129 | $as_echo "no" >&6; } | |
5130 | fi | |
5131 | ||
5132 | if test "x$ac_ct_STRIP" = x; then | |
5133 | STRIP=":" | |
5134 | else | |
5135 | case $cross_compiling:$ac_tool_warned in | |
5136 | yes:) | |
5137 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5138 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5139 | ac_tool_warned=yes ;; | |
5140 | esac | |
5141 | STRIP=$ac_ct_STRIP | |
5142 | fi | |
5143 | else | |
5144 | STRIP="$ac_cv_prog_STRIP" | |
5145 | fi | |
5146 | ||
5147 | fi | |
5148 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
5149 | ||
783e057b DJ |
5150 | |
5151 | ac_aux_dir= | |
81ecdfbb | 5152 | for ac_dir in .. "$srcdir"/..; do |
d0ac1c44 SM |
5153 | if test -f "$ac_dir/install-sh"; then |
5154 | ac_aux_dir=$ac_dir | |
5155 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5156 | break | |
5157 | elif 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/shtool"; then | |
5162 | ac_aux_dir=$ac_dir | |
5163 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5164 | break | |
5165 | fi | |
783e057b DJ |
5166 | done |
5167 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 5168 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 5169 | fi |
81ecdfbb RW |
5170 | |
5171 | # These three variables are undocumented and unsupported, | |
5172 | # and are intended to be withdrawn in a future Autoconf release. | |
5173 | # They can cause serious problems if a builder's source tree is in a directory | |
5174 | # whose full name contains unusual characters. | |
5175 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5176 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5177 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5178 | ||
783e057b | 5179 | |
783e057b | 5180 | |
91e1a0ed SM |
5181 | # Set build, build_cpu, build_vendor and build_os. |
5182 | ||
5183 | ||
5184 | # Set host, host_cpu, host_vendor, and host_os. | |
5185 | ||
5186 | ||
5187 | # Set target, target_cpu, target_vendor, and target_os. | |
5188 | ||
5189 | ||
b316465f TT |
5190 | case ${build_alias} in |
5191 | "") build_noncanonical=${build} ;; | |
5192 | *) build_noncanonical=${build_alias} ;; | |
5193 | esac | |
5194 | ||
5195 | case ${host_alias} in | |
5196 | "") host_noncanonical=${build_noncanonical} ;; | |
5197 | *) host_noncanonical=${host_alias} ;; | |
5198 | esac | |
5199 | ||
5200 | case ${target_alias} in | |
5201 | "") target_noncanonical=${host_noncanonical} ;; | |
5202 | *) target_noncanonical=${target_alias} ;; | |
5203 | esac | |
5204 | ||
5205 | ||
5206 | ||
5207 | ||
9009e1ae MR |
5208 | test "$program_prefix" != NONE && |
5209 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
5210 | # Use a double $ so make ignores it. | |
5211 | test "$program_suffix" != NONE && | |
5212 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
5213 | # Double any \ or $. | |
5214 | # By default was `s,x,x', remove it if useless. | |
5215 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
5216 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
5217 | ||
81ecdfbb | 5218 | |
0bcda685 PA |
5219 | # We require a C++11 compiler. Check if one is available, and if |
5220 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5221 | ||
41260ac2 | 5222 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
5223 | ac_ext=cpp |
5224 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5225 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5226 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5227 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5228 | CXX_DIALECT="" | |
5229 | ac_success=no | |
5230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5231 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5232 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5233 | $as_echo_n "(cached) " >&6 |
5234 | else | |
5235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5236 | /* end confdefs.h. */ | |
5237 | ||
5238 | ||
5239 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5240 | // Hopefully, this will speed up the test. | |
5241 | ||
5242 | #ifndef __cplusplus | |
5243 | ||
5244 | #error "This is not a C++ compiler" | |
5245 | ||
5246 | #elif __cplusplus < 201103L | |
5247 | ||
5248 | #error "This is not a C++11 compiler" | |
5249 | ||
5250 | #else | |
5251 | ||
5252 | namespace cxx11 | |
5253 | { | |
5254 | ||
5255 | namespace test_static_assert | |
5256 | { | |
5257 | ||
5258 | template <typename T> | |
5259 | struct check | |
5260 | { | |
5261 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5262 | }; | |
5263 | ||
5264 | } | |
5265 | ||
5266 | namespace test_final_override | |
5267 | { | |
5268 | ||
5269 | struct Base | |
5270 | { | |
5271 | virtual void f() {} | |
5272 | }; | |
5273 | ||
5274 | struct Derived : public Base | |
5275 | { | |
5276 | virtual void f() override {} | |
5277 | }; | |
5278 | ||
5279 | } | |
5280 | ||
5281 | namespace test_double_right_angle_brackets | |
5282 | { | |
5283 | ||
5284 | template < typename T > | |
5285 | struct check {}; | |
5286 | ||
5287 | typedef check<void> single_type; | |
5288 | typedef check<check<void>> double_type; | |
5289 | typedef check<check<check<void>>> triple_type; | |
5290 | typedef check<check<check<check<void>>>> quadruple_type; | |
5291 | ||
5292 | } | |
5293 | ||
5294 | namespace test_decltype | |
5295 | { | |
5296 | ||
5297 | int | |
5298 | f() | |
5299 | { | |
5300 | int a = 1; | |
5301 | decltype(a) b = 2; | |
5302 | return a + b; | |
5303 | } | |
5304 | ||
5305 | } | |
5306 | ||
5307 | namespace test_type_deduction | |
5308 | { | |
5309 | ||
5310 | template < typename T1, typename T2 > | |
5311 | struct is_same | |
5312 | { | |
5313 | static const bool value = false; | |
5314 | }; | |
5315 | ||
5316 | template < typename T > | |
5317 | struct is_same<T, T> | |
5318 | { | |
5319 | static const bool value = true; | |
5320 | }; | |
5321 | ||
5322 | template < typename T1, typename T2 > | |
5323 | auto | |
5324 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5325 | { | |
5326 | return a1 + a2; | |
5327 | } | |
5328 | ||
5329 | int | |
5330 | test(const int c, volatile int v) | |
5331 | { | |
5332 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5333 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5334 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5335 | auto ac = c; | |
5336 | auto av = v; | |
5337 | auto sumi = ac + av + 'x'; | |
5338 | auto sumf = ac + av + 1.0; | |
5339 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5340 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5341 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5342 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5343 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5344 | return (sumf > 0.0) ? sumi : add(c, v); | |
5345 | } | |
5346 | ||
5347 | } | |
5348 | ||
5349 | namespace test_noexcept | |
5350 | { | |
5351 | ||
5352 | int f() { return 0; } | |
5353 | int g() noexcept { return 0; } | |
5354 | ||
5355 | static_assert(noexcept(f()) == false, ""); | |
5356 | static_assert(noexcept(g()) == true, ""); | |
5357 | ||
5358 | } | |
5359 | ||
5360 | namespace test_constexpr | |
5361 | { | |
5362 | ||
5363 | template < typename CharT > | |
5364 | unsigned long constexpr | |
5365 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5366 | { | |
5367 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5368 | } | |
5369 | ||
5370 | template < typename CharT > | |
5371 | unsigned long constexpr | |
5372 | strlen_c(const CharT *const s) noexcept | |
5373 | { | |
5374 | return strlen_c_r(s, 0UL); | |
5375 | } | |
5376 | ||
5377 | static_assert(strlen_c("") == 0UL, ""); | |
5378 | static_assert(strlen_c("1") == 1UL, ""); | |
5379 | static_assert(strlen_c("example") == 7UL, ""); | |
5380 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5381 | ||
5382 | } | |
5383 | ||
5384 | namespace test_rvalue_references | |
5385 | { | |
5386 | ||
5387 | template < int N > | |
5388 | struct answer | |
5389 | { | |
5390 | static constexpr int value = N; | |
5391 | }; | |
5392 | ||
5393 | answer<1> f(int&) { return answer<1>(); } | |
5394 | answer<2> f(const int&) { return answer<2>(); } | |
5395 | answer<3> f(int&&) { return answer<3>(); } | |
5396 | ||
5397 | void | |
5398 | test() | |
5399 | { | |
5400 | int i = 0; | |
5401 | const int c = 0; | |
5402 | static_assert(decltype(f(i))::value == 1, ""); | |
5403 | static_assert(decltype(f(c))::value == 2, ""); | |
5404 | static_assert(decltype(f(0))::value == 3, ""); | |
5405 | } | |
5406 | ||
5407 | } | |
5408 | ||
5409 | namespace test_uniform_initialization | |
5410 | { | |
5411 | ||
5412 | struct test | |
5413 | { | |
5414 | static const int zero {}; | |
5415 | static const int one {1}; | |
5416 | }; | |
5417 | ||
5418 | static_assert(test::zero == 0, ""); | |
5419 | static_assert(test::one == 1, ""); | |
5420 | ||
5421 | } | |
5422 | ||
5423 | namespace test_lambdas | |
5424 | { | |
5425 | ||
5426 | void | |
5427 | test1() | |
5428 | { | |
5429 | auto lambda1 = [](){}; | |
5430 | auto lambda2 = lambda1; | |
5431 | lambda1(); | |
5432 | lambda2(); | |
5433 | } | |
5434 | ||
5435 | int | |
5436 | test2() | |
5437 | { | |
5438 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5439 | auto b = []() -> int { return '0'; }(); | |
5440 | auto c = [=](){ return a + b; }(); | |
5441 | auto d = [&](){ return c; }(); | |
5442 | auto e = [a, &b](int x) mutable { | |
5443 | const auto identity = [](int y){ return y; }; | |
5444 | for (auto i = 0; i < a; ++i) | |
5445 | a += b--; | |
5446 | return x + identity(a + b); | |
5447 | }(0); | |
5448 | return a + b + c + d + e; | |
5449 | } | |
5450 | ||
5451 | int | |
5452 | test3() | |
5453 | { | |
5454 | const auto nullary = [](){ return 0; }; | |
5455 | const auto unary = [](int x){ return x; }; | |
5456 | using nullary_t = decltype(nullary); | |
5457 | using unary_t = decltype(unary); | |
5458 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5459 | const auto higher2nd = [unary](nullary_t f1){ | |
5460 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5461 | }; | |
5462 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5463 | } | |
5464 | ||
5465 | } | |
5466 | ||
5467 | namespace test_variadic_templates | |
5468 | { | |
5469 | ||
5470 | template <int...> | |
5471 | struct sum; | |
5472 | ||
5473 | template <int N0, int... N1toN> | |
5474 | struct sum<N0, N1toN...> | |
5475 | { | |
5476 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5477 | }; | |
5478 | ||
5479 | template <> | |
5480 | struct sum<> | |
5481 | { | |
5482 | static constexpr auto value = 0; | |
5483 | }; | |
5484 | ||
5485 | static_assert(sum<>::value == 0, ""); | |
5486 | static_assert(sum<1>::value == 1, ""); | |
5487 | static_assert(sum<23>::value == 23, ""); | |
5488 | static_assert(sum<1, 2>::value == 3, ""); | |
5489 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5490 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5491 | ||
5492 | } | |
5493 | ||
5494 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5495 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5496 | // because of this. | |
5497 | namespace test_template_alias_sfinae | |
5498 | { | |
5499 | ||
5500 | struct foo {}; | |
5501 | ||
5502 | template<typename T> | |
5503 | using member = typename T::member_type; | |
5504 | ||
5505 | template<typename T> | |
5506 | void func(...) {} | |
5507 | ||
5508 | template<typename T> | |
5509 | void func(member<T>*) {} | |
5510 | ||
5511 | void test(); | |
5512 | ||
5513 | void test() { func<foo>(0); } | |
5514 | ||
5515 | } | |
5516 | ||
5517 | } // namespace cxx11 | |
5518 | ||
5519 | #endif // __cplusplus >= 201103L | |
5520 | ||
5521 | ||
5522 | ||
5523 | _ACEOF | |
5524 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5525 | ax_cv_cxx_compile_cxx11=yes | |
5526 | else | |
5527 | ax_cv_cxx_compile_cxx11=no | |
5528 | fi | |
5529 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5530 | fi | |
5531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5532 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5533 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5534 | ac_success=yes | |
5535 | fi | |
5536 | ||
5537 | if test x$ac_success = xno; then | |
41260ac2 SM |
5538 | for alternative in ${ax_cxx_compile_alternatives}; do |
5539 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5540 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5541 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5542 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5543 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5544 | $as_echo_n "(cached) " >&6 |
5545 | else | |
5546 | ac_save_CXX="$CXX" | |
5547 | CXX="$CXX $switch" | |
5548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5549 | /* end confdefs.h. */ | |
5550 | ||
5551 | ||
5552 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5553 | // Hopefully, this will speed up the test. | |
5554 | ||
5555 | #ifndef __cplusplus | |
5556 | ||
5557 | #error "This is not a C++ compiler" | |
5558 | ||
5559 | #elif __cplusplus < 201103L | |
5560 | ||
5561 | #error "This is not a C++11 compiler" | |
5562 | ||
5563 | #else | |
5564 | ||
5565 | namespace cxx11 | |
5566 | { | |
5567 | ||
5568 | namespace test_static_assert | |
5569 | { | |
5570 | ||
5571 | template <typename T> | |
5572 | struct check | |
5573 | { | |
5574 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5575 | }; | |
5576 | ||
5577 | } | |
5578 | ||
5579 | namespace test_final_override | |
5580 | { | |
5581 | ||
5582 | struct Base | |
5583 | { | |
5584 | virtual void f() {} | |
5585 | }; | |
5586 | ||
5587 | struct Derived : public Base | |
5588 | { | |
5589 | virtual void f() override {} | |
5590 | }; | |
5591 | ||
5592 | } | |
5593 | ||
5594 | namespace test_double_right_angle_brackets | |
5595 | { | |
5596 | ||
5597 | template < typename T > | |
5598 | struct check {}; | |
5599 | ||
5600 | typedef check<void> single_type; | |
5601 | typedef check<check<void>> double_type; | |
5602 | typedef check<check<check<void>>> triple_type; | |
5603 | typedef check<check<check<check<void>>>> quadruple_type; | |
5604 | ||
5605 | } | |
5606 | ||
5607 | namespace test_decltype | |
5608 | { | |
5609 | ||
5610 | int | |
5611 | f() | |
5612 | { | |
5613 | int a = 1; | |
5614 | decltype(a) b = 2; | |
5615 | return a + b; | |
5616 | } | |
5617 | ||
5618 | } | |
5619 | ||
5620 | namespace test_type_deduction | |
5621 | { | |
5622 | ||
5623 | template < typename T1, typename T2 > | |
5624 | struct is_same | |
5625 | { | |
5626 | static const bool value = false; | |
5627 | }; | |
5628 | ||
5629 | template < typename T > | |
5630 | struct is_same<T, T> | |
5631 | { | |
5632 | static const bool value = true; | |
5633 | }; | |
5634 | ||
5635 | template < typename T1, typename T2 > | |
5636 | auto | |
5637 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5638 | { | |
5639 | return a1 + a2; | |
5640 | } | |
5641 | ||
5642 | int | |
5643 | test(const int c, volatile int v) | |
5644 | { | |
5645 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5646 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5647 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5648 | auto ac = c; | |
5649 | auto av = v; | |
5650 | auto sumi = ac + av + 'x'; | |
5651 | auto sumf = ac + av + 1.0; | |
5652 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5653 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5654 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5655 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5656 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5657 | return (sumf > 0.0) ? sumi : add(c, v); | |
5658 | } | |
5659 | ||
5660 | } | |
5661 | ||
5662 | namespace test_noexcept | |
5663 | { | |
5664 | ||
5665 | int f() { return 0; } | |
5666 | int g() noexcept { return 0; } | |
5667 | ||
5668 | static_assert(noexcept(f()) == false, ""); | |
5669 | static_assert(noexcept(g()) == true, ""); | |
5670 | ||
5671 | } | |
5672 | ||
5673 | namespace test_constexpr | |
5674 | { | |
5675 | ||
5676 | template < typename CharT > | |
5677 | unsigned long constexpr | |
5678 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5679 | { | |
5680 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5681 | } | |
5682 | ||
5683 | template < typename CharT > | |
5684 | unsigned long constexpr | |
5685 | strlen_c(const CharT *const s) noexcept | |
5686 | { | |
5687 | return strlen_c_r(s, 0UL); | |
5688 | } | |
5689 | ||
5690 | static_assert(strlen_c("") == 0UL, ""); | |
5691 | static_assert(strlen_c("1") == 1UL, ""); | |
5692 | static_assert(strlen_c("example") == 7UL, ""); | |
5693 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5694 | ||
5695 | } | |
5696 | ||
5697 | namespace test_rvalue_references | |
5698 | { | |
5699 | ||
5700 | template < int N > | |
5701 | struct answer | |
5702 | { | |
5703 | static constexpr int value = N; | |
5704 | }; | |
5705 | ||
5706 | answer<1> f(int&) { return answer<1>(); } | |
5707 | answer<2> f(const int&) { return answer<2>(); } | |
5708 | answer<3> f(int&&) { return answer<3>(); } | |
5709 | ||
5710 | void | |
5711 | test() | |
5712 | { | |
5713 | int i = 0; | |
5714 | const int c = 0; | |
5715 | static_assert(decltype(f(i))::value == 1, ""); | |
5716 | static_assert(decltype(f(c))::value == 2, ""); | |
5717 | static_assert(decltype(f(0))::value == 3, ""); | |
5718 | } | |
5719 | ||
5720 | } | |
5721 | ||
5722 | namespace test_uniform_initialization | |
5723 | { | |
5724 | ||
5725 | struct test | |
5726 | { | |
5727 | static const int zero {}; | |
5728 | static const int one {1}; | |
5729 | }; | |
5730 | ||
5731 | static_assert(test::zero == 0, ""); | |
5732 | static_assert(test::one == 1, ""); | |
5733 | ||
5734 | } | |
5735 | ||
5736 | namespace test_lambdas | |
5737 | { | |
5738 | ||
5739 | void | |
5740 | test1() | |
5741 | { | |
5742 | auto lambda1 = [](){}; | |
5743 | auto lambda2 = lambda1; | |
5744 | lambda1(); | |
5745 | lambda2(); | |
5746 | } | |
5747 | ||
5748 | int | |
5749 | test2() | |
5750 | { | |
5751 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5752 | auto b = []() -> int { return '0'; }(); | |
5753 | auto c = [=](){ return a + b; }(); | |
5754 | auto d = [&](){ return c; }(); | |
5755 | auto e = [a, &b](int x) mutable { | |
5756 | const auto identity = [](int y){ return y; }; | |
5757 | for (auto i = 0; i < a; ++i) | |
5758 | a += b--; | |
5759 | return x + identity(a + b); | |
5760 | }(0); | |
5761 | return a + b + c + d + e; | |
5762 | } | |
5763 | ||
5764 | int | |
5765 | test3() | |
5766 | { | |
5767 | const auto nullary = [](){ return 0; }; | |
5768 | const auto unary = [](int x){ return x; }; | |
5769 | using nullary_t = decltype(nullary); | |
5770 | using unary_t = decltype(unary); | |
5771 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5772 | const auto higher2nd = [unary](nullary_t f1){ | |
5773 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5774 | }; | |
5775 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5776 | } | |
5777 | ||
5778 | } | |
5779 | ||
5780 | namespace test_variadic_templates | |
5781 | { | |
5782 | ||
5783 | template <int...> | |
5784 | struct sum; | |
5785 | ||
5786 | template <int N0, int... N1toN> | |
5787 | struct sum<N0, N1toN...> | |
5788 | { | |
5789 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5790 | }; | |
5791 | ||
5792 | template <> | |
5793 | struct sum<> | |
5794 | { | |
5795 | static constexpr auto value = 0; | |
5796 | }; | |
5797 | ||
5798 | static_assert(sum<>::value == 0, ""); | |
5799 | static_assert(sum<1>::value == 1, ""); | |
5800 | static_assert(sum<23>::value == 23, ""); | |
5801 | static_assert(sum<1, 2>::value == 3, ""); | |
5802 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5803 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5804 | ||
5805 | } | |
5806 | ||
5807 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5808 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5809 | // because of this. | |
5810 | namespace test_template_alias_sfinae | |
5811 | { | |
5812 | ||
5813 | struct foo {}; | |
5814 | ||
5815 | template<typename T> | |
5816 | using member = typename T::member_type; | |
5817 | ||
5818 | template<typename T> | |
5819 | void func(...) {} | |
5820 | ||
5821 | template<typename T> | |
5822 | void func(member<T>*) {} | |
5823 | ||
5824 | void test(); | |
5825 | ||
5826 | void test() { func<foo>(0); } | |
5827 | ||
5828 | } | |
5829 | ||
5830 | } // namespace cxx11 | |
5831 | ||
5832 | #endif // __cplusplus >= 201103L | |
5833 | ||
5834 | ||
5835 | ||
5836 | _ACEOF | |
5837 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5838 | eval $cachevar=yes | |
5839 | else | |
5840 | eval $cachevar=no | |
5841 | fi | |
5842 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5843 | CXX="$ac_save_CXX" | |
5844 | fi | |
5845 | eval ac_res=\$$cachevar | |
5846 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5847 | $as_echo "$ac_res" >&6; } | |
5848 | if eval test x\$$cachevar = xyes; then | |
5849 | CXX_DIALECT="$switch" | |
5850 | ac_success=yes | |
5851 | break | |
5852 | fi | |
5853 | done | |
5854 | fi | |
5855 | ||
5856 | if test x$ac_success = xno; then | |
41260ac2 SM |
5857 | for alternative in ${ax_cxx_compile_alternatives}; do |
5858 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5859 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5861 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5862 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5863 | $as_echo_n "(cached) " >&6 |
5864 | else | |
5865 | ac_save_CXX="$CXX" | |
41260ac2 SM |
5866 | CXX="$CXX $switch" |
5867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5868 | /* end confdefs.h. */ |
5869 | ||
5870 | ||
5871 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5872 | // Hopefully, this will speed up the test. | |
5873 | ||
5874 | #ifndef __cplusplus | |
5875 | ||
5876 | #error "This is not a C++ compiler" | |
5877 | ||
5878 | #elif __cplusplus < 201103L | |
5879 | ||
5880 | #error "This is not a C++11 compiler" | |
5881 | ||
5882 | #else | |
5883 | ||
5884 | namespace cxx11 | |
5885 | { | |
5886 | ||
5887 | namespace test_static_assert | |
5888 | { | |
5889 | ||
5890 | template <typename T> | |
5891 | struct check | |
5892 | { | |
5893 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5894 | }; | |
5895 | ||
5896 | } | |
5897 | ||
5898 | namespace test_final_override | |
5899 | { | |
5900 | ||
5901 | struct Base | |
5902 | { | |
5903 | virtual void f() {} | |
5904 | }; | |
5905 | ||
5906 | struct Derived : public Base | |
5907 | { | |
5908 | virtual void f() override {} | |
5909 | }; | |
5910 | ||
5911 | } | |
5912 | ||
5913 | namespace test_double_right_angle_brackets | |
5914 | { | |
5915 | ||
5916 | template < typename T > | |
5917 | struct check {}; | |
5918 | ||
5919 | typedef check<void> single_type; | |
5920 | typedef check<check<void>> double_type; | |
5921 | typedef check<check<check<void>>> triple_type; | |
5922 | typedef check<check<check<check<void>>>> quadruple_type; | |
5923 | ||
5924 | } | |
5925 | ||
5926 | namespace test_decltype | |
5927 | { | |
5928 | ||
5929 | int | |
5930 | f() | |
5931 | { | |
5932 | int a = 1; | |
5933 | decltype(a) b = 2; | |
5934 | return a + b; | |
5935 | } | |
5936 | ||
5937 | } | |
5938 | ||
5939 | namespace test_type_deduction | |
5940 | { | |
5941 | ||
5942 | template < typename T1, typename T2 > | |
5943 | struct is_same | |
5944 | { | |
5945 | static const bool value = false; | |
5946 | }; | |
5947 | ||
5948 | template < typename T > | |
5949 | struct is_same<T, T> | |
5950 | { | |
5951 | static const bool value = true; | |
5952 | }; | |
5953 | ||
5954 | template < typename T1, typename T2 > | |
5955 | auto | |
5956 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5957 | { | |
5958 | return a1 + a2; | |
5959 | } | |
5960 | ||
5961 | int | |
5962 | test(const int c, volatile int v) | |
5963 | { | |
5964 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5965 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5966 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5967 | auto ac = c; | |
5968 | auto av = v; | |
5969 | auto sumi = ac + av + 'x'; | |
5970 | auto sumf = ac + av + 1.0; | |
5971 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5972 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5973 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5974 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5975 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5976 | return (sumf > 0.0) ? sumi : add(c, v); | |
5977 | } | |
5978 | ||
5979 | } | |
5980 | ||
5981 | namespace test_noexcept | |
5982 | { | |
5983 | ||
5984 | int f() { return 0; } | |
5985 | int g() noexcept { return 0; } | |
5986 | ||
5987 | static_assert(noexcept(f()) == false, ""); | |
5988 | static_assert(noexcept(g()) == true, ""); | |
5989 | ||
5990 | } | |
5991 | ||
5992 | namespace test_constexpr | |
5993 | { | |
5994 | ||
5995 | template < typename CharT > | |
5996 | unsigned long constexpr | |
5997 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5998 | { | |
5999 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
6000 | } | |
6001 | ||
6002 | template < typename CharT > | |
6003 | unsigned long constexpr | |
6004 | strlen_c(const CharT *const s) noexcept | |
6005 | { | |
6006 | return strlen_c_r(s, 0UL); | |
6007 | } | |
6008 | ||
6009 | static_assert(strlen_c("") == 0UL, ""); | |
6010 | static_assert(strlen_c("1") == 1UL, ""); | |
6011 | static_assert(strlen_c("example") == 7UL, ""); | |
6012 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
6013 | ||
6014 | } | |
6015 | ||
6016 | namespace test_rvalue_references | |
6017 | { | |
6018 | ||
6019 | template < int N > | |
6020 | struct answer | |
6021 | { | |
6022 | static constexpr int value = N; | |
6023 | }; | |
6024 | ||
6025 | answer<1> f(int&) { return answer<1>(); } | |
6026 | answer<2> f(const int&) { return answer<2>(); } | |
6027 | answer<3> f(int&&) { return answer<3>(); } | |
6028 | ||
6029 | void | |
6030 | test() | |
6031 | { | |
6032 | int i = 0; | |
6033 | const int c = 0; | |
6034 | static_assert(decltype(f(i))::value == 1, ""); | |
6035 | static_assert(decltype(f(c))::value == 2, ""); | |
6036 | static_assert(decltype(f(0))::value == 3, ""); | |
6037 | } | |
6038 | ||
6039 | } | |
6040 | ||
6041 | namespace test_uniform_initialization | |
6042 | { | |
6043 | ||
6044 | struct test | |
6045 | { | |
6046 | static const int zero {}; | |
6047 | static const int one {1}; | |
6048 | }; | |
6049 | ||
6050 | static_assert(test::zero == 0, ""); | |
6051 | static_assert(test::one == 1, ""); | |
6052 | ||
6053 | } | |
6054 | ||
6055 | namespace test_lambdas | |
6056 | { | |
6057 | ||
6058 | void | |
6059 | test1() | |
6060 | { | |
6061 | auto lambda1 = [](){}; | |
6062 | auto lambda2 = lambda1; | |
6063 | lambda1(); | |
6064 | lambda2(); | |
6065 | } | |
6066 | ||
6067 | int | |
6068 | test2() | |
6069 | { | |
6070 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6071 | auto b = []() -> int { return '0'; }(); | |
6072 | auto c = [=](){ return a + b; }(); | |
6073 | auto d = [&](){ return c; }(); | |
6074 | auto e = [a, &b](int x) mutable { | |
6075 | const auto identity = [](int y){ return y; }; | |
6076 | for (auto i = 0; i < a; ++i) | |
6077 | a += b--; | |
6078 | return x + identity(a + b); | |
6079 | }(0); | |
6080 | return a + b + c + d + e; | |
6081 | } | |
6082 | ||
6083 | int | |
6084 | test3() | |
6085 | { | |
6086 | const auto nullary = [](){ return 0; }; | |
6087 | const auto unary = [](int x){ return x; }; | |
6088 | using nullary_t = decltype(nullary); | |
6089 | using unary_t = decltype(unary); | |
6090 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6091 | const auto higher2nd = [unary](nullary_t f1){ | |
6092 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6093 | }; | |
6094 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6095 | } | |
6096 | ||
6097 | } | |
6098 | ||
6099 | namespace test_variadic_templates | |
6100 | { | |
6101 | ||
6102 | template <int...> | |
6103 | struct sum; | |
6104 | ||
6105 | template <int N0, int... N1toN> | |
6106 | struct sum<N0, N1toN...> | |
6107 | { | |
6108 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6109 | }; | |
6110 | ||
6111 | template <> | |
6112 | struct sum<> | |
6113 | { | |
6114 | static constexpr auto value = 0; | |
6115 | }; | |
6116 | ||
6117 | static_assert(sum<>::value == 0, ""); | |
6118 | static_assert(sum<1>::value == 1, ""); | |
6119 | static_assert(sum<23>::value == 23, ""); | |
6120 | static_assert(sum<1, 2>::value == 3, ""); | |
6121 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6122 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6123 | ||
6124 | } | |
6125 | ||
6126 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6127 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6128 | // because of this. | |
6129 | namespace test_template_alias_sfinae | |
6130 | { | |
6131 | ||
6132 | struct foo {}; | |
6133 | ||
6134 | template<typename T> | |
6135 | using member = typename T::member_type; | |
6136 | ||
6137 | template<typename T> | |
6138 | void func(...) {} | |
6139 | ||
6140 | template<typename T> | |
6141 | void func(member<T>*) {} | |
6142 | ||
6143 | void test(); | |
6144 | ||
6145 | void test() { func<foo>(0); } | |
6146 | ||
6147 | } | |
6148 | ||
6149 | } // namespace cxx11 | |
6150 | ||
6151 | #endif // __cplusplus >= 201103L | |
6152 | ||
6153 | ||
6154 | ||
6155 | _ACEOF | |
6156 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6157 | eval $cachevar=yes | |
6158 | else | |
6159 | eval $cachevar=no | |
6160 | fi | |
6161 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
41260ac2 | 6162 | CXX="$ac_save_CXX" |
0bcda685 PA |
6163 | fi |
6164 | eval ac_res=\$$cachevar | |
6165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6166 | $as_echo "$ac_res" >&6; } | |
41260ac2 SM |
6167 | if eval test x\$$cachevar = xyes; then |
6168 | CXX_DIALECT="$switch" | |
6169 | ac_success=yes | |
6170 | break | |
6171 | fi | |
6172 | done | |
6173 | if test x$ac_success = xyes; then | |
0bcda685 PA |
6174 | break |
6175 | fi | |
6176 | done | |
6177 | fi | |
6178 | ac_ext=c | |
6179 | ac_cpp='$CPP $CPPFLAGS' | |
6180 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6181 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6182 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6183 | ||
6184 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
6185 | if test x$ac_success = xno; then | |
d0ac1c44 | 6186 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
6187 | fi |
6188 | fi | |
6189 | if test x$ac_success = xno; then | |
6190 | HAVE_CXX11=0 | |
6191 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
6192 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
6193 | else | |
6194 | HAVE_CXX11=1 | |
6195 | ||
6196 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
6197 | ||
6198 | fi | |
6199 | ||
6200 | ||
6201 | ||
6202 | ||
a417dc56 RW |
6203 | # Dependency checking. |
6204 | rm -rf .tst 2>/dev/null | |
6205 | mkdir .tst 2>/dev/null | |
6206 | if test -d .tst; then | |
6207 | am__leading_dot=. | |
6208 | else | |
6209 | am__leading_dot=_ | |
6210 | fi | |
6211 | rmdir .tst 2>/dev/null | |
6212 | ||
6213 | DEPDIR="${am__leading_dot}deps" | |
6214 | ||
81ecdfbb | 6215 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
6216 | |
6217 | ||
6218 | depcc="$CC" am_compiler_list= | |
6219 | ||
6220 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
6221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
6222 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 6223 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
81ecdfbb | 6224 | $as_echo_n "(cached) " >&6 |
a417dc56 RW |
6225 | else |
6226 | if test -f "$am_depcomp"; then | |
6227 | # We make a subdir and do the tests there. Otherwise we can end up | |
6228 | # making bogus files that we don't know about and never remove. For | |
6229 | # instance it was reported that on HP-UX the gcc test will end up | |
6230 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6231 | # in D'. | |
6232 | mkdir conftest.dir | |
6233 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6234 | # using a relative directory. | |
6235 | cp "$am_depcomp" conftest.dir | |
6236 | cd conftest.dir | |
6237 | # We will build objects and dependencies in a subdirectory because | |
6238 | # it helps to detect inapplicable dependency modes. For instance | |
6239 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6240 | # side effect of compilation, but ICC will put the dependencies in | |
6241 | # the current directory while Tru64 will put them in the object | |
6242 | # directory. | |
6243 | mkdir sub | |
6244 | ||
6245 | am_cv_CC_dependencies_compiler_type=none | |
6246 | if test "$am_compiler_list" = ""; then | |
6247 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6248 | fi | |
6249 | for depmode in $am_compiler_list; do | |
6250 | if test $depmode = none; then break; fi | |
6251 | ||
81ecdfbb | 6252 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
6253 | # Setup a source with many dependencies, because some compilers |
6254 | # like to wrap large dependency lists on column 80 (with \), and | |
6255 | # we should not choose a depcomp mode which is confused by this. | |
6256 | # | |
6257 | # We need to recreate these files for each test, as the compiler may | |
6258 | # overwrite some of them when testing with obscure command lines. | |
6259 | # This happens at least with the AIX C compiler. | |
6260 | : > sub/conftest.c | |
6261 | for i in 1 2 3 4 5 6; do | |
6262 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6263 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6264 | # Solaris 8's {/usr,}/bin/sh. | |
6265 | touch sub/conftst$i.h | |
6266 | done | |
6267 | echo "include sub/conftest.Po" > confmf | |
6268 | ||
6269 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6270 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6271 | # handle `-M -o', and we need to detect this. | |
6272 | depcmd="depmode=$depmode \ | |
6273 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6274 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6275 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6276 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6277 | if env $depcmd > conftest.err 2>&1 && | |
6278 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6279 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6280 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6281 | # icc doesn't choke on unknown options, it will just issue warnings | |
6282 | # or remarks (even with -Werror). So we grep stderr for any message | |
6283 | # that says an option was ignored or not supported. | |
6284 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6285 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6286 | # The diagnosis changed in icc 8.0: | |
6287 | # icc: Command line remark: option '-MP' not supported | |
6288 | if (grep 'ignoring option' conftest.err || | |
6289 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6290 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6291 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6292 | break |
6293 | fi | |
6294 | fi | |
81ecdfbb | 6295 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6296 | sed -e 's/^/| /' < conftest.err >&5 |
6297 | done | |
6298 | ||
6299 | cd .. | |
6300 | rm -rf conftest.dir | |
6301 | else | |
6302 | am_cv_CC_dependencies_compiler_type=none | |
6303 | fi | |
6304 | ||
6305 | fi | |
81ecdfbb RW |
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6307 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6308 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
d0ac1c44 | 6309 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6310 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6311 | ||
6312 | fi | |
6313 | ||
6314 | ||
c971b7fa PA |
6315 | |
6316 | CONFIG_OBS= | |
6317 | CONFIG_DEPS= | |
6318 | CONFIG_SRCS= | |
6319 | ENABLE_CFLAGS= | |
6320 | ||
6321 | CONFIG_ALL= | |
6322 | CONFIG_CLEAN= | |
6323 | CONFIG_INSTALL= | |
6324 | CONFIG_UNINSTALL= | |
6325 | ||
6326 | # If we haven't got the data from the intl directory, | |
6327 | # assume NLS is disabled. | |
6328 | USE_NLS=no | |
6329 | LIBINTL= | |
6330 | LIBINTL_DEP= | |
6331 | INCINTL= | |
6332 | XGETTEXT= | |
6333 | GMSGFMT= | |
6334 | POSUB= | |
783e057b DJ |
6335 | |
6336 | if test -f ../intl/config.intl; then | |
6337 | . ../intl/config.intl | |
6338 | fi | |
81ecdfbb RW |
6339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6340 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6341 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6343 | $as_echo "no" >&6; } | |
783e057b | 6344 | else |
81ecdfbb RW |
6345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6346 | $as_echo "yes" >&6; } | |
783e057b | 6347 | |
81ecdfbb | 6348 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6349 | |
6350 | ||
81ecdfbb RW |
6351 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6352 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6353 | # Look for .po and .gmo files in the source directory. |
6354 | CATALOGS= | |
6355 | XLINGUAS= | |
6356 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6357 | # If there aren't any .gmo files the shell will give us the | |
6358 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6359 | # weeded out. | |
6360 | case "$cat" in *\**) | |
6361 | continue;; | |
6362 | esac | |
6363 | # The quadruple backslash is collapsed to a double backslash | |
6364 | # by the backticks, then collapsed again by the double quotes, | |
6365 | # leaving us with one backslash in the sed expression (right | |
6366 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6367 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6368 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6369 | # The user is allowed to set LINGUAS to a list of languages to | |
6370 | # install catalogs for. If it's empty that means "all of them." | |
6371 | if test "x$LINGUAS" = x; then | |
6372 | CATALOGS="$CATALOGS $cat" | |
6373 | XLINGUAS="$XLINGUAS $lang" | |
6374 | else | |
6375 | case "$LINGUAS" in *$lang*) | |
6376 | CATALOGS="$CATALOGS $cat" | |
6377 | XLINGUAS="$XLINGUAS $lang" | |
6378 | ;; | |
6379 | esac | |
e28b3332 DJ |
6380 | fi |
6381 | done | |
c971b7fa PA |
6382 | LINGUAS="$XLINGUAS" |
6383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6384 | $as_echo "$LINGUAS" >&6; } | |
6385 | ||
6386 | ||
6387 | DATADIRNAME=share | |
6388 | ||
6389 | INSTOBJEXT=.mo | |
6390 | ||
6391 | GENCAT=gencat | |
6392 | ||
6393 | CATOBJEXT=.gmo | |
e28b3332 | 6394 | |
e28b3332 DJ |
6395 | fi |
6396 | ||
c971b7fa PA |
6397 | localedir='${datadir}/locale' |
6398 | ||
6399 | ||
6400 | if test x"$USE_NLS" = xyes; then | |
6401 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6402 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6403 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6404 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6405 | fi |
e28b3332 | 6406 | |
c971b7fa PA |
6407 | PACKAGE=gdb |
6408 | ||
6409 | cat >>confdefs.h <<_ACEOF | |
6410 | #define PACKAGE "$PACKAGE" | |
6411 | _ACEOF | |
6412 | ||
6413 | ||
6414 | ||
6415 | # We never need to detect it in this sub-configure. | |
6416 | # But preserve it for config.status --recheck. | |
6417 | ||
6418 | ||
6419 | ||
6420 | MAKEINFO_EXTRA_FLAGS="" | |
6421 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6422 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
d0ac1c44 | 6423 | if ${gdb_cv_have_makeinfo_click+:} false; then : |
c971b7fa PA |
6424 | $as_echo_n "(cached) " >&6 |
6425 | else | |
6426 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6427 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6428 | gdb_cv_have_makeinfo_click=yes | |
6429 | else | |
6430 | gdb_cv_have_makeinfo_click=no | |
6431 | fi | |
6432 | fi | |
6433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6434 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6435 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6436 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6437 | fi | |
e28b3332 DJ |
6438 | |
6439 | ||
bec39cab AC |
6440 | |
6441 | ||
81ecdfbb RW |
6442 | # Check whether --with-separate-debug-dir was given. |
6443 | if test "${with_separate_debug_dir+set}" = set; then : | |
6444 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6445 | DEBUGDIR=$withval |
6446 | else | |
6447 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6448 | fi |
6449 | ||
20e95c23 | 6450 | |
783e057b DJ |
6451 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6452 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6453 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6454 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6455 | |
783e057b DJ |
6456 | cat >>confdefs.h <<_ACEOF |
6457 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6458 | _ACEOF |
20e95c23 | 6459 | |
20e95c23 | 6460 | |
20e95c23 | 6461 | |
0c4a4063 | 6462 | |
b14b1491 TT |
6463 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6464 | if test "x$prefix" = xNONE; then | |
6465 | test_prefix=/usr/local | |
6466 | else | |
6467 | test_prefix=$prefix | |
6468 | fi | |
783e057b | 6469 | else |
b14b1491 | 6470 | test_prefix=$exec_prefix |
783e057b | 6471 | fi |
b14b1491 TT |
6472 | value=0 |
6473 | case ${ac_define_dir} in | |
6474 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6475 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6476 | value=1 | |
6477 | ;; | |
6478 | esac | |
6479 | ||
6480 | cat >>confdefs.h <<_ACEOF | |
6481 | #define DEBUGDIR_RELOCATABLE $value | |
6482 | _ACEOF | |
6483 | ||
6484 | ||
6485 | ||
0c4a4063 | 6486 | |
f83d8a90 DE |
6487 | # We can't pass paths as command line arguments. |
6488 | # Mingw32 tries to be clever and will convert the paths for us. | |
6489 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6490 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6491 | # This breaks GDB's relocatable path conversions since paths passed in | |
6492 | # config.h would not get so translated, the path prefixes no longer match. | |
6493 | ||
6494 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6495 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6496 | ac_define_dir=`eval echo $bindir` | |
6497 | ac_define_dir=`eval echo $ac_define_dir` | |
6498 | ||
6499 | cat >>confdefs.h <<_ACEOF | |
6500 | #define BINDIR "$ac_define_dir" | |
6501 | _ACEOF | |
6502 | ||
6503 | ||
6504 | ||
b14b1491 TT |
6505 | # GDB's datadir relocation |
6506 | ||
6507 | ||
6508 | ||
81ecdfbb RW |
6509 | # Check whether --with-gdb-datadir was given. |
6510 | if test "${with_gdb_datadir+set}" = set; then : | |
6511 | withval=$with_gdb_datadir; | |
b14b1491 | 6512 | GDB_DATADIR=$withval |
20e95c23 | 6513 | else |
b14b1491 | 6514 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6515 | fi |
6516 | ||
20e95c23 | 6517 | |
b14b1491 TT |
6518 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6519 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6520 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6521 | ac_define_dir=`eval echo $ac_define_dir` | |
6522 | ||
6523 | cat >>confdefs.h <<_ACEOF | |
6524 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6525 | _ACEOF |
6526 | ||
b14b1491 TT |
6527 | |
6528 | ||
0c4a4063 | 6529 | |
b14b1491 TT |
6530 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6531 | if test "x$prefix" = xNONE; then | |
6532 | test_prefix=/usr/local | |
6533 | else | |
6534 | test_prefix=$prefix | |
6535 | fi | |
6536 | else | |
6537 | test_prefix=$exec_prefix | |
6538 | fi | |
6539 | value=0 | |
6540 | case ${ac_define_dir} in | |
6541 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6542 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6543 | value=1 | |
6544 | ;; | |
6545 | esac | |
6546 | ||
6547 | cat >>confdefs.h <<_ACEOF | |
6548 | #define GDB_DATADIR_RELOCATABLE $value | |
6549 | _ACEOF | |
6550 | ||
6551 | ||
783e057b | 6552 | |
20e95c23 | 6553 | |
0c4a4063 | 6554 | |
81ecdfbb RW |
6555 | # Check whether --with-relocated-sources was given. |
6556 | if test "${with_relocated_sources+set}" = set; then : | |
6557 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6558 | |
6559 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6560 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6561 | ac_define_dir=`eval echo $reloc_srcdir` | |
6562 | ac_define_dir=`eval echo $ac_define_dir` | |
6563 | ||
6564 | cat >>confdefs.h <<_ACEOF | |
6565 | #define RELOC_SRCDIR "$ac_define_dir" | |
6566 | _ACEOF | |
6567 | ||
6568 | ||
6569 | ||
81ecdfbb RW |
6570 | fi |
6571 | ||
29b0e8a2 | 6572 | |
7349ff92 JK |
6573 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6574 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6575 | ||
6576 | # Check whether --with-auto-load-dir was given. | |
6577 | if test "${with_auto_load_dir+set}" = set; then : | |
6578 | withval=$with_auto_load_dir; | |
6579 | else | |
1564a261 | 6580 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6581 | fi |
6582 | ||
2861ee4f | 6583 | escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6584 | |
6585 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6586 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6587 | ac_define_dir=`eval echo $escape_dir` | |
6588 | ac_define_dir=`eval echo $ac_define_dir` | |
6589 | ||
6590 | cat >>confdefs.h <<_ACEOF | |
6591 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6592 | _ACEOF | |
6593 | ||
6594 | ||
6595 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6596 | $as_echo "$with_auto_load_dir" >&6; } | |
6597 | ||
bccbefd2 JK |
6598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6599 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6600 | ||
6601 | # Check whether --with-auto-load-safe-path was given. | |
6602 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6603 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6604 | with_auto_load_safe_path="/" |
6605 | fi | |
bccbefd2 | 6606 | else |
7349ff92 | 6607 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6608 | fi |
6609 | ||
2861ee4f | 6610 | escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6611 | |
6612 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6613 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6614 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6615 | ac_define_dir=`eval echo $ac_define_dir` |
6616 | ||
6617 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6618 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6619 | _ACEOF |
6620 | ||
6621 | ||
6622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6623 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6624 | ||
f99d1d37 TT |
6625 | # Enable shared libraries. |
6626 | # Check whether --enable-shared was given. | |
6627 | if test "${enable_shared+set}" = set; then : | |
6628 | enableval=$enable_shared; | |
6629 | else | |
6630 | enable_shared=yes | |
6631 | fi | |
29b0e8a2 | 6632 | |
20e95c23 | 6633 | |
f99d1d37 TT |
6634 | # If we have shared libraries, try to set RPATH_ENVVAR reasonably, |
6635 | # such that we can find the shared libraries in the build tree. | |
6636 | if test $enable_shared = no; then | |
6637 | # The variable `RPATH_ENVVAR' itself is not likely to be used on any | |
6638 | # platform. | |
6639 | RPATH_ENVVAR=RPATH_ENVVAR | |
6640 | else | |
6641 | # The variable `LD_LIBRARY_PATH' is used on most platforms. | |
6642 | RPATH_ENVVAR=LD_LIBRARY_PATH | |
6643 | # The following exceptions are taken from Libtool 1.4.3. | |
6644 | case $host_os in | |
6645 | aix*) | |
6646 | if test $host_cpu != ia64; then | |
6647 | RPATH_ENVVAR=LIBPATH | |
6648 | fi ;; | |
6649 | darwin* | rhapsody*) | |
6650 | RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; | |
6651 | esac | |
6652 | fi | |
20e95c23 DJ |
6653 | |
6654 | ||
783e057b | 6655 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6656 | # Check whether --enable-targets was given. |
6657 | if test "${enable_targets+set}" = set; then : | |
6658 | enableval=$enable_targets; case "${enableval}" in | |
d0ac1c44 | 6659 | yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 |
783e057b DJ |
6660 | ;; |
6661 | no) enable_targets= ;; | |
6662 | *) enable_targets=$enableval ;; | |
6663 | esac | |
81ecdfbb RW |
6664 | fi |
6665 | ||
20e95c23 | 6666 | |
783e057b | 6667 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6668 | # Check whether --enable-64-bit-bfd was given. |
6669 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6670 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6671 | yes) want64=true ;; |
6672 | no) want64=false ;; | |
d0ac1c44 | 6673 | *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6674 | esac |
6675 | else | |
6676 | want64=false | |
81ecdfbb RW |
6677 | fi |
6678 | ||
783e057b DJ |
6679 | # Provide defaults for some variables set by the per-host and per-target |
6680 | # configuration. | |
6681 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6682 | |
783e057b DJ |
6683 | if test "${target}" = "${host}"; then |
6684 | gdb_native=yes | |
6685 | else | |
6686 | gdb_native=no | |
6687 | fi | |
20e95c23 | 6688 | |
783e057b | 6689 | . $srcdir/configure.host |
20e95c23 | 6690 | |
783e057b | 6691 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6692 | |
783e057b DJ |
6693 | TARGET_OBS= |
6694 | all_targets= | |
b292c783 | 6695 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6696 | |
783e057b | 6697 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6698 | do |
783e057b DJ |
6699 | if test "$targ_alias" = "all"; then |
6700 | all_targets=true | |
6701 | else | |
6702 | # Canonicalize the secondary target names. | |
6703 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6704 | if test -n "$result"; then | |
6705 | targ=$result | |
6706 | else | |
6707 | targ=$targ_alias | |
6708 | fi | |
20e95c23 | 6709 | |
783e057b | 6710 | . ${srcdir}/configure.tgt |
20e95c23 | 6711 | |
bf307134 | 6712 | if test -z "${gdb_target_obs}"; then : |
d0ac1c44 | 6713 | as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 |
bf307134 JB |
6714 | fi |
6715 | ||
783e057b DJ |
6716 | # Target-specific object files |
6717 | for i in ${gdb_target_obs}; do | |
6718 | case " $TARGET_OBS " in | |
6719 | *" ${i} "*) ;; | |
6720 | *) | |
6721 | TARGET_OBS="$TARGET_OBS ${i}" | |
6722 | ;; | |
6723 | esac | |
6724 | done | |
20e95c23 | 6725 | |
783e057b DJ |
6726 | # Check whether this target needs 64-bit CORE_ADDR |
6727 | if test x${want64} = xfalse; then | |
6728 | . ${srcdir}/../bfd/config.bfd | |
6729 | fi | |
b292c783 JK |
6730 | |
6731 | # Check whether this target is native and supports gcore. | |
6732 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6733 | && $gdb_have_gcore; then | |
6734 | HAVE_NATIVE_GCORE_TARGET=1 | |
6735 | fi | |
783e057b | 6736 | fi |
20e95c23 DJ |
6737 | done |
6738 | ||
783e057b DJ |
6739 | if test x${all_targets} = xtrue; then |
6740 | ||
6741 | # We want all 64-bit targets if we either: | |
6742 | # - run on a 64-bit host or | |
6743 | # - already require 64-bit support for some other target or | |
6744 | # - the --enable-64-bit-bfd option was supplied | |
6745 | # Otherwise we only support all 32-bit targets. | |
6746 | # | |
6747 | # NOTE: This test must be in sync with the corresponding | |
6748 | # tests in BFD! | |
20e95c23 | 6749 | |
783e057b | 6750 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6751 | # The cast to long int works around a bug in the HP C Compiler |
6752 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6753 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6754 | # This bug is HP SR number 8606223364. | |
6755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6756 | $as_echo_n "checking size of long... " >&6; } | |
d0ac1c44 | 6757 | if ${ac_cv_sizeof_long+:} false; then : |
81ecdfbb | 6758 | $as_echo_n "(cached) " >&6 |
c0993dbe | 6759 | else |
81ecdfbb | 6760 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6761 | |
81ecdfbb RW |
6762 | else |
6763 | if test "$ac_cv_type_long" = yes; then | |
6764 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6765 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
6766 | as_fn_error 77 "cannot compute sizeof (long) |
6767 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
6768 | else |
6769 | ac_cv_sizeof_long=0 | |
6770 | fi | |
c0993dbe | 6771 | fi |
81ecdfbb | 6772 | |
c0993dbe | 6773 | fi |
81ecdfbb RW |
6774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6775 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6776 | |
c0993dbe | 6777 | |
c0993dbe | 6778 | |
c0993dbe UW |
6779 | cat >>confdefs.h <<_ACEOF |
6780 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6781 | _ACEOF | |
6782 | ||
6783 | ||
6784 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6785 | want64=true | |
6786 | fi | |
6787 | fi | |
6788 | if test x${want64} = xtrue; then | |
6789 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6790 | else | |
6791 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6792 | fi | |
6793 | fi | |
6794 | ||
6795 | ||
6796 | ||
b292c783 | 6797 | |
c0993dbe UW |
6798 | # For other settings, only the main target counts. |
6799 | gdb_sim= | |
6800 | gdb_osabi= | |
c0993dbe UW |
6801 | targ=$target; . ${srcdir}/configure.tgt |
6802 | ||
6803 | # Fetch the default architecture and default target vector from BFD. | |
6804 | targ=$target; . $srcdir/../bfd/config.bfd | |
6805 | ||
6806 | # We only want the first architecture, so strip off the others if | |
6807 | # there is more than one. | |
6808 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6809 | ||
6810 | if test "x$targ_archs" != x; then | |
6811 | ||
6812 | cat >>confdefs.h <<_ACEOF | |
6813 | #define DEFAULT_BFD_ARCH $targ_archs | |
6814 | _ACEOF | |
6815 | ||
6816 | fi | |
6817 | if test "x$targ_defvec" != x; then | |
6818 | ||
6819 | cat >>confdefs.h <<_ACEOF | |
6820 | #define DEFAULT_BFD_VEC $targ_defvec | |
6821 | _ACEOF | |
6822 | ||
6823 | fi | |
6824 | ||
c0993dbe | 6825 | # Enable MI. |
81ecdfbb RW |
6826 | # Check whether --enable-gdbmi was given. |
6827 | if test "${enable_gdbmi+set}" = set; then : | |
6828 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6829 | yes | no) |
6830 | ;; | |
6831 | *) | |
d0ac1c44 | 6832 | as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6833 | esac |
6834 | else | |
6835 | enable_gdbmi=yes | |
81ecdfbb RW |
6836 | fi |
6837 | ||
c0993dbe | 6838 | if test x"$enable_gdbmi" = xyes; then |
0ad6b8ee | 6839 | if test -d "$srcdir/mi"; then |
c0993dbe UW |
6840 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" |
6841 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6842 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6843 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6844 | fi | |
6845 | fi | |
6846 | ||
6847 | # Enable TUI. | |
81ecdfbb RW |
6848 | # Check whether --enable-tui was given. |
6849 | if test "${enable_tui+set}" = set; then : | |
6850 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6851 | yes | no | auto) |
c0993dbe UW |
6852 | ;; |
6853 | *) | |
d0ac1c44 | 6854 | as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6855 | esac |
6856 | else | |
3ca64bd3 | 6857 | enable_tui=auto |
81ecdfbb RW |
6858 | fi |
6859 | ||
c0993dbe UW |
6860 | |
6861 | # Enable gdbtk. | |
81ecdfbb RW |
6862 | # Check whether --enable-gdbtk was given. |
6863 | if test "${enable_gdbtk+set}" = set; then : | |
6864 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6865 | yes | no) |
6866 | ;; | |
6867 | *) | |
d0ac1c44 | 6868 | as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6869 | esac |
6870 | else | |
0ad6b8ee | 6871 | if test -d "$srcdir/gdbtk"; then |
c0993dbe UW |
6872 | enable_gdbtk=yes |
6873 | else | |
6874 | enable_gdbtk=no | |
6875 | fi | |
81ecdfbb RW |
6876 | fi |
6877 | ||
c0993dbe UW |
6878 | # We unconditionally disable gdbtk tests on selected platforms. |
6879 | case $host_os in | |
6880 | go32* | windows*) | |
81ecdfbb RW |
6881 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6882 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6883 | enable_gdbtk=no ;; |
6884 | esac | |
6885 | ||
0d79cdc4 AM |
6886 | # Handle optional debuginfod support |
6887 | ||
f6720b1c AM |
6888 | |
6889 | ||
6890 | ||
6891 | ||
6892 | ||
6893 | ||
6894 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
6895 | if test -n "$ac_tool_prefix"; then | |
6896 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
6897 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
6898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6899 | $as_echo_n "checking for $ac_word... " >&6; } | |
6900 | if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
6901 | $as_echo_n "(cached) " >&6 | |
6902 | else | |
6903 | case $PKG_CONFIG in | |
6904 | [\\/]* | ?:[\\/]*) | |
6905 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
6906 | ;; | |
6907 | *) | |
6908 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6909 | for as_dir in $PATH | |
6910 | do | |
6911 | IFS=$as_save_IFS | |
6912 | test -z "$as_dir" && as_dir=. | |
6913 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6914 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6915 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6916 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6917 | break 2 | |
6918 | fi | |
6919 | done | |
6920 | done | |
6921 | IFS=$as_save_IFS | |
6922 | ||
6923 | ;; | |
6924 | esac | |
6925 | fi | |
6926 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
6927 | if test -n "$PKG_CONFIG"; then | |
6928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
6929 | $as_echo "$PKG_CONFIG" >&6; } | |
6930 | else | |
6931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6932 | $as_echo "no" >&6; } | |
6933 | fi | |
6934 | ||
6935 | ||
6936 | fi | |
6937 | if test -z "$ac_cv_path_PKG_CONFIG"; then | |
6938 | ac_pt_PKG_CONFIG=$PKG_CONFIG | |
6939 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
6940 | set dummy pkg-config; ac_word=$2 | |
6941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6942 | $as_echo_n "checking for $ac_word... " >&6; } | |
6943 | if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
6944 | $as_echo_n "(cached) " >&6 | |
6945 | else | |
6946 | case $ac_pt_PKG_CONFIG in | |
6947 | [\\/]* | ?:[\\/]*) | |
6948 | ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
6949 | ;; | |
6950 | *) | |
6951 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6952 | for as_dir in $PATH | |
6953 | do | |
6954 | IFS=$as_save_IFS | |
6955 | test -z "$as_dir" && as_dir=. | |
6956 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6957 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6958 | ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6959 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6960 | break 2 | |
6961 | fi | |
6962 | done | |
6963 | done | |
6964 | IFS=$as_save_IFS | |
6965 | ||
6966 | ;; | |
6967 | esac | |
6968 | fi | |
6969 | ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
6970 | if test -n "$ac_pt_PKG_CONFIG"; then | |
6971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
6972 | $as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
6973 | else | |
6974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6975 | $as_echo "no" >&6; } | |
6976 | fi | |
6977 | ||
6978 | if test "x$ac_pt_PKG_CONFIG" = x; then | |
6979 | PKG_CONFIG="" | |
6980 | else | |
6981 | case $cross_compiling:$ac_tool_warned in | |
6982 | yes:) | |
6983 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6984 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6985 | ac_tool_warned=yes ;; | |
6986 | esac | |
6987 | PKG_CONFIG=$ac_pt_PKG_CONFIG | |
6988 | fi | |
6989 | else | |
6990 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
6991 | fi | |
6992 | ||
6993 | fi | |
6994 | if test -n "$PKG_CONFIG"; then | |
6995 | _pkg_min_version=0.9.0 | |
6996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
6997 | $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
6998 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
6999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7000 | $as_echo "yes" >&6; } | |
7001 | else | |
7002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7003 | $as_echo "no" >&6; } | |
7004 | PKG_CONFIG="" | |
7005 | fi | |
7006 | fi | |
7007 | ||
7008 | # Handle optional debuginfod support | |
0d79cdc4 AM |
7009 | |
7010 | # Check whether --with-debuginfod was given. | |
7011 | if test "${with_debuginfod+set}" = set; then : | |
7012 | withval=$with_debuginfod; | |
7013 | else | |
7014 | with_debuginfod=auto | |
7015 | fi | |
7016 | ||
7017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5 | |
7018 | $as_echo_n "checking whether to use debuginfod... " >&6; } | |
7019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5 | |
7020 | $as_echo "$with_debuginfod" >&6; } | |
7021 | ||
f6720b1c | 7022 | if test "x$with_debuginfod" != xno; then |
0d79cdc4 | 7023 | |
f6720b1c AM |
7024 | pkg_failed=no |
7025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5 | |
7026 | $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; } | |
7027 | ||
7028 | if test -n "$DEBUGINFOD_CFLAGS"; then | |
7029 | pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS" | |
7030 | elif test -n "$PKG_CONFIG"; then | |
7031 | if test -n "$PKG_CONFIG" && \ | |
7032 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7033 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7034 | ac_status=$? | |
7035 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7036 | test $ac_status = 0; }; then | |
7037 | pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null` | |
7038 | test "x$?" != "x0" && pkg_failed=yes | |
0d79cdc4 | 7039 | else |
f6720b1c | 7040 | pkg_failed=yes |
0d79cdc4 | 7041 | fi |
f6720b1c AM |
7042 | else |
7043 | pkg_failed=untried | |
0d79cdc4 | 7044 | fi |
f6720b1c AM |
7045 | if test -n "$DEBUGINFOD_LIBS"; then |
7046 | pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS" | |
7047 | elif test -n "$PKG_CONFIG"; then | |
7048 | if test -n "$PKG_CONFIG" && \ | |
7049 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7050 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7051 | ac_status=$? | |
7052 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7053 | test $ac_status = 0; }; then | |
7054 | pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null` | |
7055 | test "x$?" != "x0" && pkg_failed=yes | |
7056 | else | |
7057 | pkg_failed=yes | |
0d79cdc4 | 7058 | fi |
f6720b1c AM |
7059 | else |
7060 | pkg_failed=untried | |
0d79cdc4 | 7061 | fi |
bec39cab | 7062 | |
377170fa L |
7063 | if test $pkg_failed = no; then |
7064 | pkg_save_LDFLAGS="$LDFLAGS" | |
7065 | LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS" | |
7066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d70f978b L |
7067 | /* end confdefs.h. */ |
7068 | ||
7069 | int | |
7070 | main () | |
7071 | { | |
377170fa | 7072 | |
d70f978b L |
7073 | ; |
7074 | return 0; | |
7075 | } | |
7076 | _ACEOF | |
7077 | if ac_fn_c_try_link "$LINENO"; then : | |
377170fa | 7078 | |
d70f978b L |
7079 | else |
7080 | pkg_failed=yes | |
7081 | fi | |
7082 | rm -f core conftest.err conftest.$ac_objext \ | |
7083 | conftest$ac_exeext conftest.$ac_ext | |
377170fa L |
7084 | LDFLAGS=$pkg_save_LDFLAGS |
7085 | fi | |
d70f978b | 7086 | |
0d79cdc4 | 7087 | |
0d79cdc4 | 7088 | |
f6720b1c AM |
7089 | if test $pkg_failed = yes; then |
7090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7091 | $as_echo "no" >&6; } | |
0d79cdc4 | 7092 | |
f6720b1c AM |
7093 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
7094 | _pkg_short_errors_supported=yes | |
7095 | else | |
7096 | _pkg_short_errors_supported=no | |
7097 | fi | |
7098 | if test $_pkg_short_errors_supported = yes; then | |
7099 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7100 | else | |
7101 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7102 | fi | |
7103 | # Put the nasty error message in config.log where it belongs | |
7104 | echo "$DEBUGINFOD_PKG_ERRORS" >&5 | |
0d79cdc4 | 7105 | |
f6720b1c AM |
7106 | if test "x$with_debuginfod" = xyes; then |
7107 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7108 | else | |
7109 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7110 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7111 | fi | |
7112 | elif test $pkg_failed = untried; then | |
7113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7114 | $as_echo "no" >&6; } | |
7115 | if test "x$with_debuginfod" = xyes; then | |
7116 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7117 | else | |
7118 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7119 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7120 | fi | |
7121 | else | |
7122 | DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS | |
7123 | DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS | |
7124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7125 | $as_echo "yes" >&6; } | |
7126 | ||
7127 | $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h | |
7128 | ||
7129 | fi | |
7130 | else | |
7131 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5 | |
7132 | $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;} | |
0d79cdc4 AM |
7133 | fi |
7134 | ||
7135 | ||
7136 | # Libunwind support for ia64. | |
05e7c244 JK |
7137 | |
7138 | # Check whether --with-libunwind-ia64 was given. | |
7139 | if test "${with_libunwind_ia64+set}" = set; then : | |
7140 | withval=$with_libunwind_ia64; | |
bec39cab | 7141 | else |
05e7c244 JK |
7142 | with_libunwind_ia64=auto |
7143 | fi | |
bec39cab | 7144 | |
05e7c244 JK |
7145 | |
7146 | # Backward compatibility option. | |
7147 | if test "${with_libunwind+set}" = set; then | |
7148 | if test x"$with_libunwind_ia64" != xauto; then | |
d0ac1c44 | 7149 | as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 |
05e7c244 JK |
7150 | fi |
7151 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
7152 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
7153 | with_libunwind_ia64="$with_libunwind" | |
7154 | fi | |
7155 | ||
7156 | case "$with_libunwind_ia64" in | |
7157 | yes | no) | |
7158 | ;; | |
7159 | auto) | |
7160 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 7161 | do : |
b54a8fd7 | 7162 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7163 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7164 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7165 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7166 | _ACEOF |
7167 | ||
7168 | fi | |
7169 | ||
7170 | done | |
7171 | ||
05e7c244 JK |
7172 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
7173 | ;; | |
7174 | *) | |
d0ac1c44 | 7175 | as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 |
05e7c244 JK |
7176 | ;; |
7177 | esac | |
bec39cab | 7178 | |
05e7c244 | 7179 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 7180 | for ac_header in libunwind-ia64.h |
81ecdfbb | 7181 | do : |
b54a8fd7 | 7182 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7183 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7184 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7185 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7186 | _ACEOF |
7187 | ||
7188 | fi | |
7189 | ||
7190 | done | |
7191 | ||
05e7c244 | 7192 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
d0ac1c44 | 7193 | as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 |
05e7c244 JK |
7194 | fi |
7195 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
7196 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
7197 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
7198 | fi |
7199 | ||
cb01cfba JB |
7200 | opt_curses=no |
7201 | ||
81ecdfbb RW |
7202 | # Check whether --with-curses was given. |
7203 | if test "${with_curses+set}" = set; then : | |
7204 | withval=$with_curses; opt_curses=$withval | |
7205 | fi | |
7206 | ||
cb01cfba | 7207 | |
76a39ba7 | 7208 | prefer_curses=no |
cb01cfba | 7209 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 7210 | prefer_curses=yes |
cb01cfba JB |
7211 | fi |
7212 | ||
a9322a30 | 7213 | # Profiling support. |
81ecdfbb RW |
7214 | # Check whether --enable-profiling was given. |
7215 | if test "${enable_profiling+set}" = set; then : | |
7216 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
7217 | yes | no) |
7218 | ;; | |
7219 | *) | |
d0ac1c44 | 7220 | as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
7221 | esac |
7222 | else | |
7223 | enable_profiling=no | |
81ecdfbb | 7224 | fi |
bec39cab | 7225 | |
a9322a30 TT |
7226 | |
7227 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
7228 | do : |
7229 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7230 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 7231 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
7232 | cat >>confdefs.h <<_ACEOF |
7233 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 7234 | _ACEOF |
a9322a30 | 7235 | |
81ecdfbb RW |
7236 | fi |
7237 | done | |
a9322a30 | 7238 | |
81ecdfbb RW |
7239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
7240 | $as_echo_n "checking for _etext... " >&6; } | |
d0ac1c44 | 7241 | if ${ac_cv_var__etext+:} false; then : |
81ecdfbb RW |
7242 | $as_echo_n "(cached) " >&6 |
7243 | else | |
7244 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7245 | /* end confdefs.h. */ | |
7246 | #include <stdlib.h> | |
5593a99a | 7247 | extern char _etext; |
a9322a30 TT |
7248 | int |
7249 | main () | |
7250 | { | |
7251 | free (&_etext); | |
5593a99a | 7252 | |
a9322a30 TT |
7253 | ; |
7254 | return 0; | |
7255 | } | |
bec39cab | 7256 | _ACEOF |
81ecdfbb | 7257 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7258 | ac_cv_var__etext=yes |
bec39cab | 7259 | else |
81ecdfbb | 7260 | ac_cv_var__etext=no |
5593a99a | 7261 | |
bec39cab | 7262 | fi |
81ecdfbb RW |
7263 | rm -f core conftest.err conftest.$ac_objext \ |
7264 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 7265 | |
bec39cab | 7266 | fi |
81ecdfbb RW |
7267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
7268 | $as_echo "$ac_cv_var__etext" >&6; } | |
0ad6b8ee | 7269 | if test "$ac_cv_var__etext" = yes; then |
60ca704f | 7270 | |
81ecdfbb | 7271 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 7272 | |
bec39cab | 7273 | fi |
81ecdfbb RW |
7274 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
7275 | $as_echo_n "checking for etext... " >&6; } | |
d0ac1c44 | 7276 | if ${ac_cv_var_etext+:} false; then : |
81ecdfbb | 7277 | $as_echo_n "(cached) " >&6 |
bec39cab | 7278 | else |
81ecdfbb | 7279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7280 | /* end confdefs.h. */ |
a9322a30 | 7281 | #include <stdlib.h> |
5593a99a | 7282 | extern char etext; |
bec39cab AC |
7283 | int |
7284 | main () | |
7285 | { | |
a9322a30 | 7286 | free (&etext); |
5593a99a | 7287 | |
bec39cab AC |
7288 | ; |
7289 | return 0; | |
7290 | } | |
7291 | _ACEOF | |
81ecdfbb | 7292 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7293 | ac_cv_var_etext=yes |
bec39cab | 7294 | else |
81ecdfbb | 7295 | ac_cv_var_etext=no |
5593a99a | 7296 | |
bec39cab | 7297 | fi |
81ecdfbb RW |
7298 | rm -f core conftest.err conftest.$ac_objext \ |
7299 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 7300 | |
bec39cab | 7301 | fi |
81ecdfbb RW |
7302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
7303 | $as_echo "$ac_cv_var_etext" >&6; } | |
0ad6b8ee | 7304 | if test "$ac_cv_var_etext" = yes; then |
a9322a30 | 7305 | |
81ecdfbb | 7306 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
7307 | |
7308 | fi | |
a9322a30 | 7309 | if test "$enable_profiling" = yes ; then |
0ad6b8ee | 7310 | if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then |
d0ac1c44 | 7311 | as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
7312 | fi |
7313 | PROFILE_CFLAGS=-pg | |
7314 | OLD_CFLAGS="$CFLAGS" | |
7315 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 7316 | |
81ecdfbb RW |
7317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
7318 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
d0ac1c44 | 7319 | if ${ac_cv_cc_supports_pg+:} false; then : |
81ecdfbb | 7320 | $as_echo_n "(cached) " >&6 |
bec39cab | 7321 | else |
81ecdfbb | 7322 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7323 | /* end confdefs.h. */ |
bec39cab AC |
7324 | |
7325 | int | |
7326 | main () | |
7327 | { | |
a9322a30 | 7328 | int x; |
bec39cab AC |
7329 | ; |
7330 | return 0; | |
7331 | } | |
7332 | _ACEOF | |
81ecdfbb | 7333 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7334 | ac_cv_cc_supports_pg=yes |
bec39cab | 7335 | else |
81ecdfbb | 7336 | ac_cv_cc_supports_pg=no |
5593a99a | 7337 | |
bec39cab | 7338 | fi |
81ecdfbb | 7339 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 7340 | |
bec39cab | 7341 | fi |
81ecdfbb RW |
7342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7343 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7344 | |
0ad6b8ee | 7345 | if test "$ac_cv_cc_supports_pg" = no; then |
d0ac1c44 | 7346 | as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7347 | fi |
bec39cab | 7348 | |
a9322a30 | 7349 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7350 | fi |
7351 | ||
44cee4fd TT |
7352 | CODESIGN_CERT= |
7353 | # Check whether --enable-codesign was given. | |
7354 | if test "${enable_codesign+set}" = set; then : | |
7355 | enableval=$enable_codesign; CODESIGN_CERT=$enableval | |
7356 | fi | |
7357 | ||
7358 | ||
7359 | ||
c16158bc JM |
7360 | |
7361 | ||
81ecdfbb RW |
7362 | # Check whether --with-pkgversion was given. |
7363 | if test "${with_pkgversion+set}" = set; then : | |
7364 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 7365 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
7366 | no) PKGVERSION= ;; |
7367 | *) PKGVERSION="($withval) " ;; | |
7368 | esac | |
7369 | else | |
7370 | PKGVERSION="(GDB) " | |
7371 | ||
81ecdfbb | 7372 | fi |
c16158bc JM |
7373 | |
7374 | ||
7375 | ||
7376 | ||
81ecdfbb RW |
7377 | |
7378 | # Check whether --with-bugurl was given. | |
7379 | if test "${with_bugurl+set}" = set; then : | |
7380 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 7381 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
7382 | no) BUGURL= |
7383 | ;; | |
7384 | *) BUGURL="$withval" | |
7385 | ;; | |
7386 | esac | |
7387 | else | |
112c22ed | 7388 | BUGURL="https://www.gnu.org/software/gdb/bugs/" |
c16158bc | 7389 | |
81ecdfbb RW |
7390 | fi |
7391 | ||
c16158bc JM |
7392 | case ${BUGURL} in |
7393 | "") | |
7394 | REPORT_BUGS_TO= | |
7395 | REPORT_BUGS_TEXI= | |
7396 | ;; | |
7397 | *) | |
7398 | REPORT_BUGS_TO="<$BUGURL>" | |
7399 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7400 | ;; | |
7401 | esac; | |
7402 | ||
7403 | ||
7404 | ||
7405 | ||
7406 | cat >>confdefs.h <<_ACEOF | |
7407 | #define PKGVERSION "$PKGVERSION" | |
7408 | _ACEOF | |
7409 | ||
7410 | ||
7411 | cat >>confdefs.h <<_ACEOF | |
7412 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7413 | _ACEOF | |
7414 | ||
7415 | ||
bec39cab AC |
7416 | # --------------------- # |
7417 | # Checks for programs. # | |
7418 | # --------------------- # | |
7419 | ||
7420 | for ac_prog in gawk mawk nawk awk | |
7421 | do | |
7422 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7423 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7425 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7426 | if ${ac_cv_prog_AWK+:} false; then : |
81ecdfbb | 7427 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7428 | else |
7429 | if test -n "$AWK"; then | |
7430 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7431 | else | |
7432 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7433 | for as_dir in $PATH | |
7434 | do | |
7435 | IFS=$as_save_IFS | |
7436 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7437 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7438 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7439 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7440 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7441 | break 2 |
7442 | fi | |
7443 | done | |
81ecdfbb RW |
7444 | done |
7445 | IFS=$as_save_IFS | |
bec39cab AC |
7446 | |
7447 | fi | |
7448 | fi | |
7449 | AWK=$ac_cv_prog_AWK | |
7450 | if test -n "$AWK"; then | |
81ecdfbb RW |
7451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7452 | $as_echo "$AWK" >&6; } | |
bec39cab | 7453 | else |
81ecdfbb RW |
7454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7455 | $as_echo "no" >&6; } | |
bec39cab AC |
7456 | fi |
7457 | ||
bec39cab | 7458 | |
81ecdfbb | 7459 | test -n "$AWK" && break |
bec39cab AC |
7460 | done |
7461 | ||
c971b7fa PA |
7462 | # Find a good install program. We prefer a C program (faster), |
7463 | # so one script is as good as another. But avoid the broken or | |
7464 | # incompatible versions: | |
7465 | # SysV /etc/install, /usr/sbin/install | |
7466 | # SunOS /usr/etc/install | |
7467 | # IRIX /sbin/install | |
7468 | # AIX /bin/install | |
7469 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7470 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7471 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7472 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7473 | # OS/2's system install, which has a completely different semantic | |
7474 | # ./install, which can be erroneously created by make from ./install.sh. | |
7475 | # Reject install programs that cannot install multiple files. | |
7476 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7477 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7478 | if test -z "$INSTALL"; then | |
d0ac1c44 | 7479 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
7480 | $as_echo_n "(cached) " >&6 |
7481 | else | |
7482 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7483 | for as_dir in $PATH | |
7484 | do | |
7485 | IFS=$as_save_IFS | |
7486 | test -z "$as_dir" && as_dir=. | |
7487 | # Account for people who put trailing slashes in PATH elements. | |
7488 | case $as_dir/ in #(( | |
7489 | ./ | .// | /[cC]/* | \ | |
7490 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7491 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7492 | /usr/ucb/* ) ;; | |
7493 | *) | |
7494 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7495 | # Don't use installbsd from OSF since it installs stuff as root | |
7496 | # by default. | |
7497 | for ac_prog in ginstall scoinst install; do | |
7498 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 7499 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
7500 | if test $ac_prog = install && |
7501 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7502 | # AIX install. It has an incompatible calling convention. | |
7503 | : | |
7504 | elif test $ac_prog = install && | |
7505 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7506 | # program-specific install script used by HP pwplus--don't use. | |
7507 | : | |
7508 | else | |
7509 | rm -rf conftest.one conftest.two conftest.dir | |
7510 | echo one > conftest.one | |
7511 | echo two > conftest.two | |
7512 | mkdir conftest.dir | |
7513 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7514 | test -s conftest.one && test -s conftest.two && | |
7515 | test -s conftest.dir/conftest.one && | |
7516 | test -s conftest.dir/conftest.two | |
7517 | then | |
7518 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7519 | break 3 | |
7520 | fi | |
7521 | fi | |
7522 | fi | |
7523 | done | |
7524 | done | |
7525 | ;; | |
7526 | esac | |
7527 | ||
7528 | done | |
7529 | IFS=$as_save_IFS | |
7530 | ||
7531 | rm -rf conftest.one conftest.two conftest.dir | |
7532 | ||
7533 | fi | |
7534 | if test "${ac_cv_path_install+set}" = set; then | |
7535 | INSTALL=$ac_cv_path_install | |
7536 | else | |
7537 | # As a last resort, use the slow shell script. Don't cache a | |
7538 | # value for INSTALL within a source directory, because that will | |
7539 | # break other packages using the cache if that directory is | |
7540 | # removed, or if the value is a relative name. | |
7541 | INSTALL=$ac_install_sh | |
7542 | fi | |
7543 | fi | |
7544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7545 | $as_echo "$INSTALL" >&6; } | |
7546 | ||
7547 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7548 | # It thinks the first close brace ends the variable substitution. | |
7549 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7550 | ||
7551 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7552 | ||
7553 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7554 | |
81ecdfbb RW |
7555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7556 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7557 | LN_S=$as_ln_s |
7558 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7560 | $as_echo "yes" >&6; } | |
bec39cab | 7561 | else |
81ecdfbb RW |
7562 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7563 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7564 | fi |
7565 | ||
7566 | if test -n "$ac_tool_prefix"; then | |
7567 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7568 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7570 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7571 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb | 7572 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7573 | else |
7574 | if test -n "$RANLIB"; then | |
7575 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7576 | else | |
7577 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7578 | for as_dir in $PATH | |
7579 | do | |
7580 | IFS=$as_save_IFS | |
7581 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7582 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7583 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7584 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7585 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7586 | break 2 |
7587 | fi | |
7588 | done | |
81ecdfbb RW |
7589 | done |
7590 | IFS=$as_save_IFS | |
bec39cab AC |
7591 | |
7592 | fi | |
7593 | fi | |
7594 | RANLIB=$ac_cv_prog_RANLIB | |
7595 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7596 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7597 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7598 | else |
81ecdfbb RW |
7599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7600 | $as_echo "no" >&6; } | |
bec39cab AC |
7601 | fi |
7602 | ||
81ecdfbb | 7603 | |
bec39cab AC |
7604 | fi |
7605 | if test -z "$ac_cv_prog_RANLIB"; then | |
7606 | ac_ct_RANLIB=$RANLIB | |
7607 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7608 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7610 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7611 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
81ecdfbb | 7612 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7613 | else |
7614 | if test -n "$ac_ct_RANLIB"; then | |
7615 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7616 | else | |
7617 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7618 | for as_dir in $PATH | |
7619 | do | |
7620 | IFS=$as_save_IFS | |
7621 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7622 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7623 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7624 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7625 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7626 | break 2 |
7627 | fi | |
7628 | done | |
81ecdfbb RW |
7629 | done |
7630 | IFS=$as_save_IFS | |
bec39cab | 7631 | |
bec39cab AC |
7632 | fi |
7633 | fi | |
7634 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7635 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7637 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7638 | else |
81ecdfbb RW |
7639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7640 | $as_echo "no" >&6; } | |
bec39cab AC |
7641 | fi |
7642 | ||
81ecdfbb RW |
7643 | if test "x$ac_ct_RANLIB" = x; then |
7644 | RANLIB=":" | |
7645 | else | |
7646 | case $cross_compiling:$ac_tool_warned in | |
7647 | yes:) | |
7648 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7649 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7650 | ac_tool_warned=yes ;; | |
7651 | esac | |
7652 | RANLIB=$ac_ct_RANLIB | |
7653 | fi | |
bec39cab AC |
7654 | else |
7655 | RANLIB="$ac_cv_prog_RANLIB" | |
7656 | fi | |
7657 | ||
7658 | for ac_prog in 'bison -y' byacc | |
7659 | do | |
7660 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7661 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7663 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7664 | if ${ac_cv_prog_YACC+:} false; then : |
81ecdfbb | 7665 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7666 | else |
7667 | if test -n "$YACC"; then | |
7668 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7669 | else | |
7670 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7671 | for as_dir in $PATH | |
7672 | do | |
7673 | IFS=$as_save_IFS | |
7674 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7675 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7676 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7677 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7678 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7679 | break 2 |
7680 | fi | |
7681 | done | |
81ecdfbb RW |
7682 | done |
7683 | IFS=$as_save_IFS | |
bec39cab AC |
7684 | |
7685 | fi | |
7686 | fi | |
7687 | YACC=$ac_cv_prog_YACC | |
7688 | if test -n "$YACC"; then | |
81ecdfbb RW |
7689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7690 | $as_echo "$YACC" >&6; } | |
bec39cab | 7691 | else |
81ecdfbb RW |
7692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7693 | $as_echo "no" >&6; } | |
bec39cab AC |
7694 | fi |
7695 | ||
81ecdfbb | 7696 | |
bec39cab AC |
7697 | test -n "$YACC" && break |
7698 | done | |
7699 | test -n "$YACC" || YACC="yacc" | |
7700 | ||
7701 | ||
7702 | if test -n "$ac_tool_prefix"; then | |
7703 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7704 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7705 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7706 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7707 | if ${ac_cv_prog_AR+:} false; then : |
81ecdfbb | 7708 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7709 | else |
7710 | if test -n "$AR"; then | |
7711 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7712 | else | |
7713 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7714 | for as_dir in $PATH | |
7715 | do | |
7716 | IFS=$as_save_IFS | |
7717 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7718 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7719 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7720 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7721 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7722 | break 2 |
7723 | fi | |
7724 | done | |
81ecdfbb RW |
7725 | done |
7726 | IFS=$as_save_IFS | |
bec39cab AC |
7727 | |
7728 | fi | |
7729 | fi | |
7730 | AR=$ac_cv_prog_AR | |
7731 | if test -n "$AR"; then | |
81ecdfbb RW |
7732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7733 | $as_echo "$AR" >&6; } | |
bec39cab | 7734 | else |
81ecdfbb RW |
7735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7736 | $as_echo "no" >&6; } | |
bec39cab AC |
7737 | fi |
7738 | ||
81ecdfbb | 7739 | |
bec39cab AC |
7740 | fi |
7741 | if test -z "$ac_cv_prog_AR"; then | |
7742 | ac_ct_AR=$AR | |
7743 | # Extract the first word of "ar", so it can be a program name with args. | |
7744 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7746 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7747 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
81ecdfbb | 7748 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7749 | else |
7750 | if test -n "$ac_ct_AR"; then | |
7751 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7752 | else | |
7753 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7754 | for as_dir in $PATH | |
7755 | do | |
7756 | IFS=$as_save_IFS | |
7757 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7758 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7759 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7760 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7761 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7762 | break 2 |
7763 | fi | |
7764 | done | |
81ecdfbb RW |
7765 | done |
7766 | IFS=$as_save_IFS | |
bec39cab AC |
7767 | |
7768 | fi | |
7769 | fi | |
7770 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7771 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7773 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7774 | else |
81ecdfbb RW |
7775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7776 | $as_echo "no" >&6; } | |
bec39cab AC |
7777 | fi |
7778 | ||
81ecdfbb RW |
7779 | if test "x$ac_ct_AR" = x; then |
7780 | AR="" | |
7781 | else | |
7782 | case $cross_compiling:$ac_tool_warned in | |
7783 | yes:) | |
7784 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7785 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7786 | ac_tool_warned=yes ;; | |
7787 | esac | |
7788 | AR=$ac_ct_AR | |
7789 | fi | |
bec39cab AC |
7790 | else |
7791 | AR="$ac_cv_prog_AR" | |
7792 | fi | |
7793 | ||
7794 | if test -n "$ac_tool_prefix"; then | |
7795 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7796 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7798 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7799 | if ${ac_cv_prog_DLLTOOL+:} false; then : |
81ecdfbb | 7800 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7801 | else |
7802 | if test -n "$DLLTOOL"; then | |
7803 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7804 | else | |
7805 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7806 | for as_dir in $PATH | |
7807 | do | |
7808 | IFS=$as_save_IFS | |
7809 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7810 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7811 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7812 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7813 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7814 | break 2 |
7815 | fi | |
7816 | done | |
81ecdfbb RW |
7817 | done |
7818 | IFS=$as_save_IFS | |
bec39cab AC |
7819 | |
7820 | fi | |
7821 | fi | |
7822 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7823 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7825 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7826 | else |
81ecdfbb RW |
7827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7828 | $as_echo "no" >&6; } | |
bec39cab AC |
7829 | fi |
7830 | ||
81ecdfbb | 7831 | |
bec39cab AC |
7832 | fi |
7833 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7834 | ac_ct_DLLTOOL=$DLLTOOL | |
7835 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7836 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7838 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7839 | if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : |
81ecdfbb | 7840 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7841 | else |
7842 | if test -n "$ac_ct_DLLTOOL"; then | |
7843 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7844 | else | |
7845 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7846 | for as_dir in $PATH | |
7847 | do | |
7848 | IFS=$as_save_IFS | |
7849 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7850 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7851 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7852 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7853 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7854 | break 2 |
7855 | fi | |
7856 | done | |
81ecdfbb RW |
7857 | done |
7858 | IFS=$as_save_IFS | |
bec39cab AC |
7859 | |
7860 | fi | |
7861 | fi | |
7862 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7863 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7865 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7866 | else |
81ecdfbb RW |
7867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7868 | $as_echo "no" >&6; } | |
bec39cab AC |
7869 | fi |
7870 | ||
81ecdfbb RW |
7871 | if test "x$ac_ct_DLLTOOL" = x; then |
7872 | DLLTOOL="" | |
7873 | else | |
7874 | case $cross_compiling:$ac_tool_warned in | |
7875 | yes:) | |
7876 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7877 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7878 | ac_tool_warned=yes ;; | |
7879 | esac | |
7880 | DLLTOOL=$ac_ct_DLLTOOL | |
7881 | fi | |
bec39cab AC |
7882 | else |
7883 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7884 | fi | |
7885 | ||
7886 | if test -n "$ac_tool_prefix"; then | |
7887 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7888 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7890 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7891 | if ${ac_cv_prog_WINDRES+:} false; then : |
81ecdfbb | 7892 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7893 | else |
7894 | if test -n "$WINDRES"; then | |
7895 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7896 | else | |
7897 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7898 | for as_dir in $PATH | |
7899 | do | |
7900 | IFS=$as_save_IFS | |
7901 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7902 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7903 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7904 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7905 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7906 | break 2 |
7907 | fi | |
7908 | done | |
81ecdfbb RW |
7909 | done |
7910 | IFS=$as_save_IFS | |
bec39cab AC |
7911 | |
7912 | fi | |
7913 | fi | |
7914 | WINDRES=$ac_cv_prog_WINDRES | |
7915 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7917 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7918 | else |
81ecdfbb RW |
7919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7920 | $as_echo "no" >&6; } | |
bec39cab AC |
7921 | fi |
7922 | ||
81ecdfbb | 7923 | |
bec39cab AC |
7924 | fi |
7925 | if test -z "$ac_cv_prog_WINDRES"; then | |
7926 | ac_ct_WINDRES=$WINDRES | |
7927 | # Extract the first word of "windres", so it can be a program name with args. | |
7928 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7930 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7931 | if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : |
81ecdfbb | 7932 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7933 | else |
7934 | if test -n "$ac_ct_WINDRES"; then | |
7935 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7936 | else | |
7937 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7938 | for as_dir in $PATH | |
7939 | do | |
7940 | IFS=$as_save_IFS | |
7941 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7942 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7943 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7944 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7945 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7946 | break 2 |
7947 | fi | |
7948 | done | |
81ecdfbb RW |
7949 | done |
7950 | IFS=$as_save_IFS | |
bec39cab AC |
7951 | |
7952 | fi | |
7953 | fi | |
7954 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7955 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7957 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7958 | else |
81ecdfbb RW |
7959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7960 | $as_echo "no" >&6; } | |
c906108c | 7961 | fi |
bec39cab | 7962 | |
81ecdfbb RW |
7963 | if test "x$ac_ct_WINDRES" = x; then |
7964 | WINDRES="" | |
7965 | else | |
7966 | case $cross_compiling:$ac_tool_warned in | |
7967 | yes:) | |
7968 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7969 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7970 | ac_tool_warned=yes ;; | |
7971 | esac | |
7972 | WINDRES=$ac_ct_WINDRES | |
7973 | fi | |
c906108c | 7974 | else |
bec39cab | 7975 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7976 | fi |
7977 | ||
bec39cab | 7978 | |
036c3acb TS |
7979 | case $host_os in |
7980 | gnu*) | |
7981 | # Needed for GNU Hurd hosts. | |
7982 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7983 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7984 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7986 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7987 | if ${ac_cv_prog_MIG+:} false; then : |
81ecdfbb | 7988 | $as_echo_n "(cached) " >&6 |
c906108c | 7989 | else |
bec39cab AC |
7990 | if test -n "$MIG"; then |
7991 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7992 | else | |
7993 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7994 | for as_dir in $PATH | |
7995 | do | |
7996 | IFS=$as_save_IFS | |
7997 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7998 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7999 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 8000 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 8001 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8002 | break 2 |
8003 | fi | |
8004 | done | |
81ecdfbb RW |
8005 | done |
8006 | IFS=$as_save_IFS | |
bec39cab | 8007 | |
c906108c | 8008 | fi |
bec39cab AC |
8009 | fi |
8010 | MIG=$ac_cv_prog_MIG | |
8011 | if test -n "$MIG"; then | |
81ecdfbb RW |
8012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
8013 | $as_echo "$MIG" >&6; } | |
c906108c | 8014 | else |
81ecdfbb RW |
8015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8016 | $as_echo "no" >&6; } | |
c906108c SS |
8017 | fi |
8018 | ||
81ecdfbb | 8019 | |
bec39cab AC |
8020 | fi |
8021 | if test -z "$ac_cv_prog_MIG"; then | |
8022 | ac_ct_MIG=$MIG | |
8023 | # Extract the first word of "mig", so it can be a program name with args. | |
8024 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
8025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8026 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 8027 | if ${ac_cv_prog_ac_ct_MIG+:} false; then : |
81ecdfbb | 8028 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8029 | else |
8030 | if test -n "$ac_ct_MIG"; then | |
8031 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
8032 | else | |
8033 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8034 | for as_dir in $PATH | |
8035 | do | |
8036 | IFS=$as_save_IFS | |
8037 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 8038 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 8039 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 8040 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 8041 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8042 | break 2 |
8043 | fi | |
8044 | done | |
81ecdfbb RW |
8045 | done |
8046 | IFS=$as_save_IFS | |
c906108c | 8047 | |
bec39cab AC |
8048 | fi |
8049 | fi | |
8050 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
8051 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
8052 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
8053 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 8054 | else |
81ecdfbb RW |
8055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8056 | $as_echo "no" >&6; } | |
bec39cab | 8057 | fi |
c906108c | 8058 | |
81ecdfbb RW |
8059 | if test "x$ac_ct_MIG" = x; then |
8060 | MIG="" | |
8061 | else | |
8062 | case $cross_compiling:$ac_tool_warned in | |
8063 | yes:) | |
8064 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8065 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8066 | ac_tool_warned=yes ;; | |
8067 | esac | |
8068 | MIG=$ac_ct_MIG | |
8069 | fi | |
bec39cab AC |
8070 | else |
8071 | MIG="$ac_cv_prog_MIG" | |
8072 | fi | |
c906108c | 8073 | |
036c3acb | 8074 | if test x"$MIG" = x; then |
d0ac1c44 | 8075 | as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 |
036c3acb TS |
8076 | fi |
8077 | ;; | |
8078 | esac | |
c906108c | 8079 | |
bec39cab AC |
8080 | # ---------------------- # |
8081 | # Checks for libraries. # | |
8082 | # ---------------------- # | |
c906108c | 8083 | |
bec39cab | 8084 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
8085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
8086 | $as_echo_n "checking for main in -lm... " >&6; } | |
d0ac1c44 | 8087 | if ${ac_cv_lib_m_main+:} false; then : |
81ecdfbb | 8088 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8089 | else |
8090 | ac_check_lib_save_LIBS=$LIBS | |
8091 | LIBS="-lm $LIBS" | |
81ecdfbb | 8092 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8093 | /* end confdefs.h. */ |
c906108c | 8094 | |
c906108c | 8095 | |
bec39cab AC |
8096 | int |
8097 | main () | |
8098 | { | |
81ecdfbb | 8099 | return main (); |
bec39cab AC |
8100 | ; |
8101 | return 0; | |
8102 | } | |
8103 | _ACEOF | |
81ecdfbb | 8104 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
8105 | ac_cv_lib_m_main=yes |
8106 | else | |
81ecdfbb | 8107 | ac_cv_lib_m_main=no |
bec39cab | 8108 | fi |
81ecdfbb RW |
8109 | rm -f core conftest.err conftest.$ac_objext \ |
8110 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
8111 | LIBS=$ac_check_lib_save_LIBS |
8112 | fi | |
81ecdfbb RW |
8113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
8114 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
d0ac1c44 | 8115 | if test "x$ac_cv_lib_m_main" = xyes; then : |
bec39cab AC |
8116 | cat >>confdefs.h <<_ACEOF |
8117 | #define HAVE_LIBM 1 | |
8118 | _ACEOF | |
8119 | ||
8120 | LIBS="-lm $LIBS" | |
c906108c | 8121 | |
c906108c | 8122 | fi |
bec39cab AC |
8123 | |
8124 | ||
bec39cab | 8125 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
8126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
8127 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
d0ac1c44 | 8128 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb | 8129 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8130 | else |
8131 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8133 | /* end confdefs.h. */ |
ddc9cd0f | 8134 | |
81ecdfbb RW |
8135 | /* Override any GCC internal prototype to avoid an error. |
8136 | Use char because int might match the return type of a GCC | |
8137 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
8138 | #ifdef __cplusplus |
8139 | extern "C" | |
8140 | #endif | |
bec39cab AC |
8141 | char gethostbyname (); |
8142 | int | |
8143 | main () | |
8144 | { | |
81ecdfbb | 8145 | return gethostbyname (); |
bec39cab AC |
8146 | ; |
8147 | return 0; | |
8148 | } | |
8149 | _ACEOF | |
81ecdfbb RW |
8150 | for ac_lib in '' nsl; do |
8151 | if test -z "$ac_lib"; then | |
8152 | ac_res="none required" | |
8153 | else | |
8154 | ac_res=-l$ac_lib | |
b4e70030 | 8155 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8156 | fi |
8157 | if ac_fn_c_try_link "$LINENO"; then : | |
8158 | ac_cv_search_gethostbyname=$ac_res | |
8159 | fi | |
8160 | rm -f core conftest.err conftest.$ac_objext \ | |
8161 | conftest$ac_exeext | |
d0ac1c44 | 8162 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb RW |
8163 | break |
8164 | fi | |
8165 | done | |
d0ac1c44 | 8166 | if ${ac_cv_search_gethostbyname+:} false; then : |
ddc9cd0f | 8167 | |
bec39cab | 8168 | else |
81ecdfbb | 8169 | ac_cv_search_gethostbyname=no |
bec39cab | 8170 | fi |
81ecdfbb | 8171 | rm conftest.$ac_ext |
bec39cab AC |
8172 | LIBS=$ac_func_search_save_LIBS |
8173 | fi | |
81ecdfbb RW |
8174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
8175 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
8176 | ac_res=$ac_cv_search_gethostbyname | |
8177 | if test "$ac_res" != no; then : | |
8178 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 8179 | |
bec39cab | 8180 | fi |
96baa820 | 8181 | |
c906108c | 8182 | |
b4e70030 | 8183 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
8184 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
8185 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
d0ac1c44 | 8186 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb | 8187 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
8188 | else |
8189 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8191 | /* end confdefs.h. */ |
8192 | ||
81ecdfbb RW |
8193 | /* Override any GCC internal prototype to avoid an error. |
8194 | Use char because int might match the return type of a GCC | |
8195 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
8196 | #ifdef __cplusplus |
8197 | extern "C" | |
8198 | #endif | |
b4e70030 JB |
8199 | char socketpair (); |
8200 | int | |
8201 | main () | |
8202 | { | |
81ecdfbb | 8203 | return socketpair (); |
b4e70030 JB |
8204 | ; |
8205 | return 0; | |
8206 | } | |
8207 | _ACEOF | |
81ecdfbb RW |
8208 | for ac_lib in '' socket; do |
8209 | if test -z "$ac_lib"; then | |
8210 | ac_res="none required" | |
8211 | else | |
8212 | ac_res=-l$ac_lib | |
b4e70030 | 8213 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8214 | fi |
8215 | if ac_fn_c_try_link "$LINENO"; then : | |
8216 | ac_cv_search_socketpair=$ac_res | |
8217 | fi | |
8218 | rm -f core conftest.err conftest.$ac_objext \ | |
8219 | conftest$ac_exeext | |
d0ac1c44 | 8220 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb RW |
8221 | break |
8222 | fi | |
8223 | done | |
d0ac1c44 | 8224 | if ${ac_cv_search_socketpair+:} false; then : |
b4e70030 | 8225 | |
b4e70030 | 8226 | else |
81ecdfbb | 8227 | ac_cv_search_socketpair=no |
b4e70030 | 8228 | fi |
81ecdfbb | 8229 | rm conftest.$ac_ext |
b4e70030 JB |
8230 | LIBS=$ac_func_search_save_LIBS |
8231 | fi | |
81ecdfbb RW |
8232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
8233 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
8234 | ac_res=$ac_cv_search_socketpair | |
8235 | if test "$ac_res" != no; then : | |
8236 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
8237 | |
8238 | fi | |
8239 | ||
8240 | ||
233a11ab | 8241 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 8242 | |
711a72d3 | 8243 | # Use the system's zlib library. |
39f3de7c L |
8244 | zlibdir="-L\$(top_builddir)/../zlib" |
8245 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 8246 | |
711a72d3 L |
8247 | # Check whether --with-system-zlib was given. |
8248 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
8249 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
8250 | zlibdir= | |
8251 | zlibinc= | |
8252 | fi | |
b040ad30 | 8253 | |
233a11ab | 8254 | fi |
233a11ab | 8255 | |
233a11ab | 8256 | |
233a11ab | 8257 | |
b040ad30 | 8258 | |
233a11ab | 8259 | |
77f120bf | 8260 | |
016a3251 DD |
8261 | if test "X$prefix" = "XNONE"; then |
8262 | acl_final_prefix="$ac_default_prefix" | |
8263 | else | |
8264 | acl_final_prefix="$prefix" | |
8265 | fi | |
8266 | if test "X$exec_prefix" = "XNONE"; then | |
8267 | acl_final_exec_prefix='${prefix}' | |
8268 | else | |
8269 | acl_final_exec_prefix="$exec_prefix" | |
8270 | fi | |
8271 | acl_save_prefix="$prefix" | |
8272 | prefix="$acl_final_prefix" | |
8273 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8274 | prefix="$acl_save_prefix" | |
8275 | ||
8276 | ||
8277 | # Check whether --with-gnu-ld was given. | |
8278 | if test "${with_gnu_ld+set}" = set; then : | |
8279 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8280 | else | |
8281 | with_gnu_ld=no | |
8282 | fi | |
8283 | ||
8284 | # Prepare PATH_SEPARATOR. | |
8285 | # The user is always right. | |
8286 | if test "${PATH_SEPARATOR+set}" != set; then | |
8287 | echo "#! /bin/sh" >conf$$.sh | |
8288 | echo "exit 0" >>conf$$.sh | |
8289 | chmod +x conf$$.sh | |
8290 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8291 | PATH_SEPARATOR=';' | |
8292 | else | |
8293 | PATH_SEPARATOR=: | |
8294 | fi | |
8295 | rm -f conf$$.sh | |
8296 | fi | |
8297 | ac_prog=ld | |
8298 | if test "$GCC" = yes; then | |
8299 | # Check if gcc -print-prog-name=ld gives a path. | |
8300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8301 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8302 | case $host in | |
8303 | *-*-mingw*) | |
8304 | # gcc leaves a trailing carriage return which upsets mingw | |
8305 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8306 | *) | |
8307 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8308 | esac | |
8309 | case $ac_prog in | |
8310 | # Accept absolute paths. | |
8311 | [\\/]* | [A-Za-z]:[\\/]*) | |
8312 | re_direlt='/[^/][^/]*/\.\./' | |
8313 | # Canonicalize the path of ld | |
8314 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8315 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8316 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8317 | done | |
8318 | test -z "$LD" && LD="$ac_prog" | |
8319 | ;; | |
8320 | "") | |
8321 | # If it fails, then pretend we aren't using GCC. | |
8322 | ac_prog=ld | |
8323 | ;; | |
8324 | *) | |
8325 | # If it is relative, then search for the first ld in PATH. | |
8326 | with_gnu_ld=unknown | |
8327 | ;; | |
8328 | esac | |
8329 | elif test "$with_gnu_ld" = yes; then | |
8330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8331 | $as_echo_n "checking for GNU ld... " >&6; } | |
8332 | else | |
8333 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8334 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8335 | fi | |
d0ac1c44 | 8336 | if ${acl_cv_path_LD+:} false; then : |
016a3251 DD |
8337 | $as_echo_n "(cached) " >&6 |
8338 | else | |
8339 | if test -z "$LD"; then | |
8340 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8341 | for ac_dir in $PATH; do | |
8342 | test -z "$ac_dir" && ac_dir=. | |
8343 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8344 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8345 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8346 | # but apparently some GNU ld's only accept -v. | |
8347 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8348 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8349 | test "$with_gnu_ld" != no && break | |
8350 | else | |
8351 | test "$with_gnu_ld" != yes && break | |
8352 | fi | |
8353 | fi | |
8354 | done | |
8355 | IFS="$ac_save_ifs" | |
8356 | else | |
8357 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8358 | fi | |
8359 | fi | |
8360 | ||
8361 | LD="$acl_cv_path_LD" | |
8362 | if test -n "$LD"; then | |
8363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8364 | $as_echo "$LD" >&6; } | |
8365 | else | |
8366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8367 | $as_echo "no" >&6; } | |
8368 | fi | |
d0ac1c44 | 8369 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
016a3251 DD |
8370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
8371 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
d0ac1c44 | 8372 | if ${acl_cv_prog_gnu_ld+:} false; then : |
016a3251 DD |
8373 | $as_echo_n "(cached) " >&6 |
8374 | else | |
8375 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8376 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8377 | acl_cv_prog_gnu_ld=yes | |
8378 | else | |
8379 | acl_cv_prog_gnu_ld=no | |
8380 | fi | |
8381 | fi | |
8382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8383 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8384 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8385 | ||
8386 | ||
8387 | ||
8388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8389 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
d0ac1c44 | 8390 | if ${acl_cv_rpath+:} false; then : |
016a3251 DD |
8391 | $as_echo_n "(cached) " >&6 |
8392 | else | |
8393 | ||
8394 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8395 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8396 | . ./conftest.sh | |
8397 | rm -f ./conftest.sh | |
8398 | acl_cv_rpath=done | |
8399 | ||
8400 | fi | |
8401 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8402 | $as_echo "$acl_cv_rpath" >&6; } | |
8403 | wl="$acl_cv_wl" | |
8404 | libext="$acl_cv_libext" | |
8405 | shlibext="$acl_cv_shlibext" | |
8406 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8407 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8408 | hardcode_direct="$acl_cv_hardcode_direct" | |
8409 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8410 | # Check whether --enable-rpath was given. | |
8411 | if test "${enable_rpath+set}" = set; then : | |
8412 | enableval=$enable_rpath; : | |
8413 | else | |
8414 | enable_rpath=yes | |
8415 | fi | |
8416 | ||
8417 | ||
8418 | ||
8419 | ||
8420 | ||
8421 | ||
8422 | ||
8423 | ||
8424 | use_additional=yes | |
8425 | ||
8426 | acl_save_prefix="$prefix" | |
8427 | prefix="$acl_final_prefix" | |
8428 | acl_save_exec_prefix="$exec_prefix" | |
8429 | exec_prefix="$acl_final_exec_prefix" | |
8430 | ||
8431 | eval additional_includedir=\"$includedir\" | |
8432 | eval additional_libdir=\"$libdir\" | |
8433 | ||
8434 | exec_prefix="$acl_save_exec_prefix" | |
8435 | prefix="$acl_save_prefix" | |
77f120bf | 8436 | |
6c7a06a3 | 8437 | |
81ecdfbb RW |
8438 | # Check whether --with-libiconv-prefix was given. |
8439 | if test "${with_libiconv_prefix+set}" = set; then : | |
8440 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8441 | if test "X$withval" = "Xno"; then |
8442 | use_additional=no | |
8443 | else | |
8444 | if test "X$withval" = "X"; then | |
8445 | ||
8446 | acl_save_prefix="$prefix" | |
8447 | prefix="$acl_final_prefix" | |
8448 | acl_save_exec_prefix="$exec_prefix" | |
8449 | exec_prefix="$acl_final_exec_prefix" | |
8450 | ||
8451 | eval additional_includedir=\"$includedir\" | |
8452 | eval additional_libdir=\"$libdir\" | |
8453 | ||
8454 | exec_prefix="$acl_save_exec_prefix" | |
8455 | prefix="$acl_save_prefix" | |
8456 | ||
8457 | else | |
8458 | additional_includedir="$withval/include" | |
8459 | additional_libdir="$withval/lib" | |
8460 | fi | |
8461 | fi | |
6c7a06a3 | 8462 | |
81ecdfbb RW |
8463 | fi |
8464 | ||
9f1528a1 AB |
8465 | |
8466 | # Check whether --with-libiconv-type was given. | |
8467 | if test "${with_libiconv_type+set}" = set; then : | |
8468 | withval=$with_libiconv_type; with_libiconv_type=$withval | |
8469 | else | |
8470 | with_libiconv_type=auto | |
8471 | fi | |
8472 | ||
8473 | lib_type=`eval echo \$with_libiconv_type` | |
8474 | ||
016a3251 DD |
8475 | LIBICONV= |
8476 | LTLIBICONV= | |
8477 | INCICONV= | |
8478 | rpathdirs= | |
8479 | ltrpathdirs= | |
8480 | names_already_handled= | |
8481 | names_next_round='iconv ' | |
8482 | while test -n "$names_next_round"; do | |
8483 | names_this_round="$names_next_round" | |
8484 | names_next_round= | |
8485 | for name in $names_this_round; do | |
8486 | already_handled= | |
8487 | for n in $names_already_handled; do | |
8488 | if test "$n" = "$name"; then | |
8489 | already_handled=yes | |
8490 | break | |
8491 | fi | |
8492 | done | |
8493 | if test -z "$already_handled"; then | |
8494 | names_already_handled="$names_already_handled $name" | |
8495 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8496 | eval value=\"\$HAVE_LIB$uppername\" | |
8497 | if test -n "$value"; then | |
8498 | if test "$value" = yes; then | |
8499 | eval value=\"\$LIB$uppername\" | |
8500 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8501 | eval value=\"\$LTLIB$uppername\" | |
8502 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8503 | else | |
8504 | : | |
8505 | fi | |
8506 | else | |
8507 | found_dir= | |
8508 | found_la= | |
8509 | found_so= | |
8510 | found_a= | |
8511 | if test $use_additional = yes; then | |
9f1528a1 | 8512 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8513 | found_dir="$additional_libdir" |
8514 | found_so="$additional_libdir/lib$name.$shlibext" | |
8515 | if test -f "$additional_libdir/lib$name.la"; then | |
8516 | found_la="$additional_libdir/lib$name.la" | |
8517 | fi | |
9f1528a1 | 8518 | elif test x$lib_type != xshared; then |
016a3251 DD |
8519 | if test -f "$additional_libdir/lib$name.$libext"; then |
8520 | found_dir="$additional_libdir" | |
8521 | found_a="$additional_libdir/lib$name.$libext" | |
8522 | if test -f "$additional_libdir/lib$name.la"; then | |
8523 | found_la="$additional_libdir/lib$name.la" | |
8524 | fi | |
8525 | fi | |
8526 | fi | |
8527 | fi | |
8528 | if test "X$found_dir" = "X"; then | |
8529 | for x in $LDFLAGS $LTLIBICONV; do | |
8530 | ||
8531 | acl_save_prefix="$prefix" | |
8532 | prefix="$acl_final_prefix" | |
8533 | acl_save_exec_prefix="$exec_prefix" | |
8534 | exec_prefix="$acl_final_exec_prefix" | |
8535 | eval x=\"$x\" | |
8536 | exec_prefix="$acl_save_exec_prefix" | |
8537 | prefix="$acl_save_prefix" | |
8538 | ||
8539 | case "$x" in | |
8540 | -L*) | |
8541 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 8542 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8543 | found_dir="$dir" |
8544 | found_so="$dir/lib$name.$shlibext" | |
8545 | if test -f "$dir/lib$name.la"; then | |
8546 | found_la="$dir/lib$name.la" | |
8547 | fi | |
9f1528a1 | 8548 | elif test x$lib_type != xshared; then |
016a3251 DD |
8549 | if test -f "$dir/lib$name.$libext"; then |
8550 | found_dir="$dir" | |
8551 | found_a="$dir/lib$name.$libext" | |
8552 | if test -f "$dir/lib$name.la"; then | |
8553 | found_la="$dir/lib$name.la" | |
8554 | fi | |
8555 | fi | |
8556 | fi | |
8557 | ;; | |
8558 | esac | |
8559 | if test "X$found_dir" != "X"; then | |
8560 | break | |
8561 | fi | |
8562 | done | |
8563 | fi | |
8564 | if test "X$found_dir" != "X"; then | |
8565 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8566 | if test "X$found_so" != "X"; then | |
8567 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8568 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8569 | else | |
8570 | haveit= | |
8571 | for x in $ltrpathdirs; do | |
8572 | if test "X$x" = "X$found_dir"; then | |
8573 | haveit=yes | |
8574 | break | |
8575 | fi | |
8576 | done | |
8577 | if test -z "$haveit"; then | |
8578 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8579 | fi | |
8580 | if test "$hardcode_direct" = yes; then | |
8581 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8582 | else | |
8583 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8584 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8585 | haveit= | |
8586 | for x in $rpathdirs; do | |
8587 | if test "X$x" = "X$found_dir"; then | |
8588 | haveit=yes | |
8589 | break | |
8590 | fi | |
8591 | done | |
8592 | if test -z "$haveit"; then | |
8593 | rpathdirs="$rpathdirs $found_dir" | |
8594 | fi | |
8595 | else | |
8596 | haveit= | |
8597 | for x in $LDFLAGS $LIBICONV; do | |
8598 | ||
8599 | acl_save_prefix="$prefix" | |
8600 | prefix="$acl_final_prefix" | |
8601 | acl_save_exec_prefix="$exec_prefix" | |
8602 | exec_prefix="$acl_final_exec_prefix" | |
8603 | eval x=\"$x\" | |
8604 | exec_prefix="$acl_save_exec_prefix" | |
8605 | prefix="$acl_save_prefix" | |
8606 | ||
8607 | if test "X$x" = "X-L$found_dir"; then | |
8608 | haveit=yes | |
8609 | break | |
8610 | fi | |
8611 | done | |
8612 | if test -z "$haveit"; then | |
8613 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8614 | fi | |
8615 | if test "$hardcode_minus_L" != no; then | |
8616 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8617 | else | |
8618 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8619 | fi | |
8620 | fi | |
8621 | fi | |
8622 | fi | |
8623 | else | |
8624 | if test "X$found_a" != "X"; then | |
8625 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8626 | else | |
8627 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8628 | fi | |
8629 | fi | |
8630 | additional_includedir= | |
8631 | case "$found_dir" in | |
8632 | */lib | */lib/) | |
8633 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8634 | additional_includedir="$basedir/include" | |
8635 | ;; | |
8636 | esac | |
8637 | if test "X$additional_includedir" != "X"; then | |
8638 | if test "X$additional_includedir" != "X/usr/include"; then | |
8639 | haveit= | |
8640 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8641 | if test -n "$GCC"; then | |
8642 | case $host_os in | |
8643 | linux*) haveit=yes;; | |
8644 | esac | |
8645 | fi | |
8646 | fi | |
8647 | if test -z "$haveit"; then | |
8648 | for x in $CPPFLAGS $INCICONV; do | |
8649 | ||
8650 | acl_save_prefix="$prefix" | |
8651 | prefix="$acl_final_prefix" | |
8652 | acl_save_exec_prefix="$exec_prefix" | |
8653 | exec_prefix="$acl_final_exec_prefix" | |
8654 | eval x=\"$x\" | |
8655 | exec_prefix="$acl_save_exec_prefix" | |
8656 | prefix="$acl_save_prefix" | |
8657 | ||
8658 | if test "X$x" = "X-I$additional_includedir"; then | |
8659 | haveit=yes | |
8660 | break | |
8661 | fi | |
8662 | done | |
8663 | if test -z "$haveit"; then | |
8664 | if test -d "$additional_includedir"; then | |
8665 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8666 | fi | |
8667 | fi | |
8668 | fi | |
8669 | fi | |
8670 | fi | |
8671 | if test -n "$found_la"; then | |
8672 | save_libdir="$libdir" | |
8673 | case "$found_la" in | |
8674 | */* | *\\*) . "$found_la" ;; | |
8675 | *) . "./$found_la" ;; | |
8676 | esac | |
8677 | libdir="$save_libdir" | |
8678 | for dep in $dependency_libs; do | |
8679 | case "$dep" in | |
8680 | -L*) | |
8681 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8682 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8683 | haveit= | |
8684 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8685 | if test -n "$GCC"; then | |
8686 | case $host_os in | |
8687 | linux*) haveit=yes;; | |
8688 | esac | |
8689 | fi | |
8690 | fi | |
8691 | if test -z "$haveit"; then | |
8692 | haveit= | |
8693 | for x in $LDFLAGS $LIBICONV; do | |
8694 | ||
8695 | acl_save_prefix="$prefix" | |
8696 | prefix="$acl_final_prefix" | |
8697 | acl_save_exec_prefix="$exec_prefix" | |
8698 | exec_prefix="$acl_final_exec_prefix" | |
8699 | eval x=\"$x\" | |
8700 | exec_prefix="$acl_save_exec_prefix" | |
8701 | prefix="$acl_save_prefix" | |
8702 | ||
8703 | if test "X$x" = "X-L$additional_libdir"; then | |
8704 | haveit=yes | |
8705 | break | |
8706 | fi | |
8707 | done | |
8708 | if test -z "$haveit"; then | |
8709 | if test -d "$additional_libdir"; then | |
8710 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8711 | fi | |
8712 | fi | |
8713 | haveit= | |
8714 | for x in $LDFLAGS $LTLIBICONV; do | |
8715 | ||
8716 | acl_save_prefix="$prefix" | |
8717 | prefix="$acl_final_prefix" | |
8718 | acl_save_exec_prefix="$exec_prefix" | |
8719 | exec_prefix="$acl_final_exec_prefix" | |
8720 | eval x=\"$x\" | |
8721 | exec_prefix="$acl_save_exec_prefix" | |
8722 | prefix="$acl_save_prefix" | |
8723 | ||
8724 | if test "X$x" = "X-L$additional_libdir"; then | |
8725 | haveit=yes | |
8726 | break | |
8727 | fi | |
8728 | done | |
8729 | if test -z "$haveit"; then | |
8730 | if test -d "$additional_libdir"; then | |
8731 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8732 | fi | |
8733 | fi | |
8734 | fi | |
8735 | fi | |
8736 | ;; | |
8737 | -R*) | |
8738 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8739 | if test "$enable_rpath" != no; then | |
8740 | haveit= | |
8741 | for x in $rpathdirs; do | |
8742 | if test "X$x" = "X$dir"; then | |
8743 | haveit=yes | |
8744 | break | |
8745 | fi | |
8746 | done | |
8747 | if test -z "$haveit"; then | |
8748 | rpathdirs="$rpathdirs $dir" | |
8749 | fi | |
8750 | haveit= | |
8751 | for x in $ltrpathdirs; do | |
8752 | if test "X$x" = "X$dir"; then | |
8753 | haveit=yes | |
8754 | break | |
8755 | fi | |
8756 | done | |
8757 | if test -z "$haveit"; then | |
8758 | ltrpathdirs="$ltrpathdirs $dir" | |
8759 | fi | |
8760 | fi | |
8761 | ;; | |
8762 | -l*) | |
8763 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8764 | ;; | |
8765 | *.la) | |
8766 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8767 | ;; | |
8768 | *) | |
8769 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8770 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8771 | ;; | |
8772 | esac | |
8773 | done | |
8774 | fi | |
8775 | else | |
9f1528a1 AB |
8776 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
8777 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8778 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8779 | else | |
8780 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext" | |
8781 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext" | |
8782 | fi | |
016a3251 DD |
8783 | fi |
8784 | fi | |
8785 | fi | |
8786 | done | |
8787 | done | |
8788 | if test "X$rpathdirs" != "X"; then | |
8789 | if test -n "$hardcode_libdir_separator"; then | |
8790 | alldirs= | |
8791 | for found_dir in $rpathdirs; do | |
8792 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8793 | done | |
8794 | acl_save_libdir="$libdir" | |
8795 | libdir="$alldirs" | |
8796 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8797 | libdir="$acl_save_libdir" | |
8798 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8799 | else | |
8800 | for found_dir in $rpathdirs; do | |
8801 | acl_save_libdir="$libdir" | |
8802 | libdir="$found_dir" | |
8803 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8804 | libdir="$acl_save_libdir" | |
8805 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8806 | done | |
8807 | fi | |
8808 | fi | |
8809 | if test "X$ltrpathdirs" != "X"; then | |
8810 | for found_dir in $ltrpathdirs; do | |
8811 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8812 | done | |
8813 | fi | |
8814 | ||
8815 | ||
8816 | ||
8817 | ||
8818 | ||
6c7a06a3 | 8819 | |
6c7a06a3 | 8820 | |
81ecdfbb RW |
8821 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8822 | $as_echo_n "checking for iconv... " >&6; } | |
d0ac1c44 | 8823 | if ${am_cv_func_iconv+:} false; then : |
81ecdfbb | 8824 | $as_echo_n "(cached) " >&6 |
d542061a | 8825 | else |
6c7a06a3 TT |
8826 | |
8827 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8828 | am_cv_lib_iconv=no | |
016a3251 DD |
8829 | am_save_CPPFLAGS="$CPPFLAGS" |
8830 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8831 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8832 | /* end confdefs.h. */ |
6c7a06a3 TT |
8833 | #include <stdlib.h> |
8834 | #include <iconv.h> | |
d542061a UW |
8835 | int |
8836 | main () | |
8837 | { | |
6c7a06a3 | 8838 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8839 | iconv(cd,NULL,NULL,NULL,NULL); |
8840 | iconv_close(cd); | |
d542061a UW |
8841 | ; |
8842 | return 0; | |
8843 | } | |
8844 | _ACEOF | |
81ecdfbb | 8845 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8846 | am_cv_func_iconv=yes |
d542061a | 8847 | fi |
81ecdfbb RW |
8848 | rm -f core conftest.err conftest.$ac_objext \ |
8849 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8850 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8851 | |
016a3251 DD |
8852 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8853 | for _libs in .libs _libs; do | |
8854 | am_save_CPPFLAGS="$CPPFLAGS" | |
8855 | am_save_LIBS="$LIBS" | |
8856 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8857 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8858 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8859 | /* end confdefs.h. */ |
6c7a06a3 TT |
8860 | #include <stdlib.h> |
8861 | #include <iconv.h> | |
d542061a UW |
8862 | int |
8863 | main () | |
8864 | { | |
6c7a06a3 | 8865 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8866 | iconv(cd,NULL,NULL,NULL,NULL); |
8867 | iconv_close(cd); | |
d542061a UW |
8868 | ; |
8869 | return 0; | |
8870 | } | |
8871 | _ACEOF | |
81ecdfbb | 8872 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8873 | INCICONV="-I../libiconv/include" |
8874 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8875 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8876 | am_cv_lib_iconv=yes | |
8877 | am_cv_func_iconv=yes | |
d542061a | 8878 | fi |
81ecdfbb RW |
8879 | rm -f core conftest.err conftest.$ac_objext \ |
8880 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8881 | CPPFLAGS="$am_save_CPPFLAGS" |
8882 | LIBS="$am_save_LIBS" | |
8883 | if test "$am_cv_func_iconv" = "yes"; then | |
8884 | break | |
8885 | fi | |
8886 | done | |
77f120bf | 8887 | fi |
94ae1714 | 8888 | |
4edb1e84 | 8889 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8890 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8891 | am_save_LIBS="$LIBS" |
5d762de0 | 8892 | CPPFLAGS="$CPPFLAGS $INCICONV" |
016a3251 | 8893 | LIBS="$LIBS $LIBICONV" |
81ecdfbb | 8894 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8895 | /* end confdefs.h. */ |
6c7a06a3 TT |
8896 | #include <stdlib.h> |
8897 | #include <iconv.h> | |
bec39cab AC |
8898 | int |
8899 | main () | |
8900 | { | |
6c7a06a3 TT |
8901 | iconv_t cd = iconv_open("",""); |
8902 | iconv(cd,NULL,NULL,NULL,NULL); | |
8903 | iconv_close(cd); | |
bec39cab AC |
8904 | ; |
8905 | return 0; | |
8906 | } | |
8907 | _ACEOF | |
81ecdfbb | 8908 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8909 | am_cv_lib_iconv=yes |
6c7a06a3 | 8910 | am_cv_func_iconv=yes |
627af7ea | 8911 | fi |
81ecdfbb RW |
8912 | rm -f core conftest.err conftest.$ac_objext \ |
8913 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8914 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8915 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8916 | fi |
8917 | ||
8918 | fi | |
81ecdfbb RW |
8919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8920 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8921 | if test "$am_cv_func_iconv" = yes; then |
8922 | ||
8923 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8924 | |
016a3251 | 8925 | fi |
fc3b640d | 8926 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8927 | |
8928 | for element in $INCICONV; do | |
8929 | haveit= | |
8930 | for x in $CPPFLAGS; do | |
8931 | ||
8932 | acl_save_prefix="$prefix" | |
8933 | prefix="$acl_final_prefix" | |
8934 | acl_save_exec_prefix="$exec_prefix" | |
8935 | exec_prefix="$acl_final_exec_prefix" | |
8936 | eval x=\"$x\" | |
8937 | exec_prefix="$acl_save_exec_prefix" | |
8938 | prefix="$acl_save_prefix" | |
8939 | ||
8940 | if test "X$x" = "X$element"; then | |
8941 | haveit=yes | |
8942 | break | |
8943 | fi | |
8944 | done | |
8945 | if test -z "$haveit"; then | |
8946 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8947 | fi | |
8948 | done | |
8949 | ||
8950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8951 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8953 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8954 | else |
016a3251 DD |
8955 | LIBICONV= |
8956 | LTLIBICONV= | |
fc3b640d | 8957 | fi |
94ae1714 | 8958 | |
6c7a06a3 | 8959 | |
6c7a06a3 | 8960 | |
016a3251 | 8961 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8962 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8963 | $as_echo_n "checking for iconv declaration... " >&6; } | |
d0ac1c44 | 8964 | if ${am_cv_proto_iconv+:} false; then : |
81ecdfbb | 8965 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8966 | else |
8967 | ||
81ecdfbb | 8968 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8969 | /* end confdefs.h. */ |
8970 | ||
6c7a06a3 TT |
8971 | #include <stdlib.h> |
8972 | #include <iconv.h> | |
8973 | extern | |
b4e70030 | 8974 | #ifdef __cplusplus |
6c7a06a3 | 8975 | "C" |
b4e70030 | 8976 | #endif |
6c7a06a3 TT |
8977 | #if defined(__STDC__) || defined(__cplusplus) |
8978 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8979 | #else | |
8980 | size_t iconv(); | |
8981 | #endif | |
8982 | ||
b4e70030 JB |
8983 | int |
8984 | main () | |
8985 | { | |
6c7a06a3 | 8986 | |
b4e70030 JB |
8987 | ; |
8988 | return 0; | |
8989 | } | |
8990 | _ACEOF | |
81ecdfbb | 8991 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8992 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8993 | else |
81ecdfbb | 8994 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8995 | fi |
81ecdfbb | 8996 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8997 | 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);" |
8998 | fi | |
8999 | ||
9000 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 9001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 9002 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
9003 | $as_echo "${ac_t:- |
9004 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
9005 | |
9006 | cat >>confdefs.h <<_ACEOF | |
9007 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
9008 | _ACEOF | |
9009 | ||
9010 | fi | |
6c7a06a3 TT |
9011 | |
9012 | ||
478aac75 DE |
9013 | # GDB may fork/exec the iconv program to get the list of supported character |
9014 | # sets. Allow the user to specify where to find it. | |
9015 | # There are several factors affecting the choice of option name: | |
9016 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
9017 | # the build-time location of libiconv files. | |
9018 | # - The program we need to find is iconv, which comes with glibc. The user | |
9019 | # doesn't necessarily have libiconv installed. Therefore naming this | |
9020 | # --with-libiconv-foo feels wrong. | |
9021 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
9022 | # defined to work on directories not files (though it really doesn't know | |
9023 | # the difference). | |
9024 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
9025 | # with --with-libiconv-prefix. | |
9026 | # Putting these together is why the option name is --with-iconv-bin. | |
9027 | ||
9028 | ||
9029 | # Check whether --with-iconv-bin was given. | |
9030 | if test "${with_iconv_bin+set}" = set; then : | |
9031 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
9032 | ||
9033 | cat >>confdefs.h <<_ACEOF | |
9034 | #define ICONV_BIN "${iconv_bin}" | |
9035 | _ACEOF | |
9036 | ||
9037 | ||
9038 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9039 | if test "x$prefix" = xNONE; then | |
9040 | test_prefix=/usr/local | |
9041 | else | |
9042 | test_prefix=$prefix | |
9043 | fi | |
9044 | else | |
9045 | test_prefix=$exec_prefix | |
9046 | fi | |
9047 | value=0 | |
9048 | case ${iconv_bin} in | |
9049 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9050 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9051 | value=1 | |
9052 | ;; | |
9053 | esac | |
9054 | ||
9055 | cat >>confdefs.h <<_ACEOF | |
9056 | #define ICONV_BIN_RELOCATABLE $value | |
9057 | _ACEOF | |
9058 | ||
9059 | ||
9060 | ||
9061 | fi | |
9062 | ||
9063 | ||
cb01cfba | 9064 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9065 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9066 | prefer_curses=yes |
9067 | fi | |
9068 | ||
9069 | curses_found=no | |
9070 | if test x"$prefer_curses" = xyes; then | |
9071 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9072 | # curses library because the latter might not provide all the | |
9073 | # functionality we need. However, this leads to problems on systems | |
9074 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9075 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9076 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9077 | # a situation. | |
81ecdfbb RW |
9078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9079 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
d0ac1c44 | 9080 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9081 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9082 | else |
9083 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9085 | /* end confdefs.h. */ |
9086 | ||
81ecdfbb RW |
9087 | /* Override any GCC internal prototype to avoid an error. |
9088 | Use char because int might match the return type of a GCC | |
9089 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9090 | #ifdef __cplusplus |
9091 | extern "C" | |
9092 | #endif | |
6c7a06a3 TT |
9093 | char waddstr (); |
9094 | int | |
9095 | main () | |
9096 | { | |
81ecdfbb | 9097 | return waddstr (); |
6c7a06a3 TT |
9098 | ; |
9099 | return 0; | |
9100 | } | |
9101 | _ACEOF | |
5007d765 | 9102 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
9103 | if test -z "$ac_lib"; then |
9104 | ac_res="none required" | |
9105 | else | |
9106 | ac_res=-l$ac_lib | |
9107 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9108 | fi | |
9109 | if ac_fn_c_try_link "$LINENO"; then : | |
9110 | ac_cv_search_waddstr=$ac_res | |
9111 | fi | |
9112 | rm -f core conftest.err conftest.$ac_objext \ | |
9113 | conftest$ac_exeext | |
d0ac1c44 | 9114 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb RW |
9115 | break |
9116 | fi | |
9117 | done | |
d0ac1c44 | 9118 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9119 | |
6c7a06a3 | 9120 | else |
81ecdfbb RW |
9121 | ac_cv_search_waddstr=no |
9122 | fi | |
9123 | rm conftest.$ac_ext | |
9124 | LIBS=$ac_func_search_save_LIBS | |
9125 | fi | |
9126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9127 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9128 | ac_res=$ac_cv_search_waddstr | |
9129 | if test "$ac_res" != no; then : | |
9130 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9131 | |
9132 | fi | |
9133 | ||
9134 | ||
cb01cfba JB |
9135 | if test "$ac_cv_search_waddstr" != no; then |
9136 | curses_found=yes | |
9137 | fi | |
9138 | fi | |
9139 | ||
9140 | # Check whether we should enable the TUI, but only do so if we really | |
9141 | # can. | |
9142 | if test x"$enable_tui" != xno; then | |
0ad6b8ee | 9143 | if test -d "$srcdir/tui"; then |
cb01cfba | 9144 | if test "$curses_found" != no; then |
6c7a06a3 TT |
9145 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9146 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9147 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9148 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
9149 | else |
9150 | if test x"$enable_tui" = xyes; then | |
d0ac1c44 | 9151 | as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9152 | else |
81ecdfbb RW |
9153 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9154 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9155 | fi |
9156 | fi | |
9157 | fi | |
9158 | fi | |
9159 | ||
9160 | # Since GDB uses Readline, we need termcap functionality. In many | |
9161 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 9162 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
9163 | |
9164 | case $host_os in | |
9165 | cygwin*) | |
0ad6b8ee | 9166 | if test -d "$srcdir/libtermcap"; then |
6c7a06a3 TT |
9167 | LIBS="../libtermcap/libtermcap.a $LIBS" |
9168 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9169 | fi ;; | |
9170 | go32* | *djgpp*) | |
9171 | ac_cv_search_tgetent="none required" | |
9172 | ;; | |
6c7a06a3 TT |
9173 | esac |
9174 | ||
9175 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9177 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
d0ac1c44 | 9178 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb | 9179 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9180 | else |
9181 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9183 | /* end confdefs.h. */ |
9184 | ||
81ecdfbb RW |
9185 | /* Override any GCC internal prototype to avoid an error. |
9186 | Use char because int might match the return type of a GCC | |
9187 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9188 | #ifdef __cplusplus |
9189 | extern "C" | |
9190 | #endif | |
6c7a06a3 TT |
9191 | char tgetent (); |
9192 | int | |
9193 | main () | |
9194 | { | |
81ecdfbb | 9195 | return tgetent (); |
6c7a06a3 TT |
9196 | ; |
9197 | return 0; | |
9198 | } | |
9199 | _ACEOF | |
2578ecb1 | 9200 | for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
9201 | if test -z "$ac_lib"; then |
9202 | ac_res="none required" | |
9203 | else | |
9204 | ac_res=-l$ac_lib | |
6c7a06a3 | 9205 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9206 | fi |
9207 | if ac_fn_c_try_link "$LINENO"; then : | |
9208 | ac_cv_search_tgetent=$ac_res | |
9209 | fi | |
9210 | rm -f core conftest.err conftest.$ac_objext \ | |
9211 | conftest$ac_exeext | |
d0ac1c44 | 9212 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb RW |
9213 | break |
9214 | fi | |
9215 | done | |
d0ac1c44 | 9216 | if ${ac_cv_search_tgetent+:} false; then : |
6c7a06a3 | 9217 | |
6c7a06a3 | 9218 | else |
81ecdfbb | 9219 | ac_cv_search_tgetent=no |
6c7a06a3 | 9220 | fi |
81ecdfbb | 9221 | rm conftest.$ac_ext |
6c7a06a3 TT |
9222 | LIBS=$ac_func_search_save_LIBS |
9223 | fi | |
81ecdfbb RW |
9224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9225 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9226 | ac_res=$ac_cv_search_tgetent | |
9227 | if test "$ac_res" != no; then : | |
9228 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9229 | |
06825bd1 MK |
9230 | fi |
9231 | ||
06825bd1 | 9232 | |
bec39cab | 9233 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 9234 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
9235 | fi |
9236 | ||
3841debe | 9237 | |
81ecdfbb RW |
9238 | # Check whether --with-system-readline was given. |
9239 | if test "${with_system_readline+set}" = set; then : | |
9240 | withval=$with_system_readline; | |
9241 | fi | |
6a30b0a5 | 9242 | |
6a30b0a5 AS |
9243 | |
9244 | if test "$with_system_readline" = yes; then | |
5593a99a | 9245 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 |
86c6b807 TT |
9246 | $as_echo_n "checking whether system readline is new enough... " >&6; } |
9247 | if ${gdb_cv_readline_ok+:} false; then : | |
9248 | $as_echo_n "(cached) " >&6 | |
9249 | else | |
9250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9251 | /* end confdefs.h. */ | |
9252 | #include <stdio.h> | |
5593a99a | 9253 | #include <readline/readline.h> |
86c6b807 TT |
9254 | int |
9255 | main () | |
9256 | { | |
9257 | #if RL_VERSION_MAJOR < 7 | |
5593a99a SM |
9258 | # error "readline version 7 required" |
9259 | #endif | |
9260 | ||
86c6b807 TT |
9261 | ; |
9262 | return 0; | |
9263 | } | |
9264 | _ACEOF | |
9265 | if ac_fn_c_try_compile "$LINENO"; then : | |
9266 | gdb_cv_readline_ok=yes | |
9267 | else | |
9268 | gdb_cv_readline_ok=no | |
5593a99a | 9269 | |
86c6b807 TT |
9270 | fi |
9271 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5593a99a | 9272 | |
86c6b807 TT |
9273 | fi |
9274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 | |
9275 | $as_echo "$gdb_cv_readline_ok" >&6; } | |
9276 | if test "$gdb_cv_readline_ok" != yes; then | |
9277 | as_fn_error $? "system readline is not new enough" "$LINENO" 5 | |
9278 | fi | |
9279 | ||
6a30b0a5 AS |
9280 | READLINE=-lreadline |
9281 | READLINE_DEPS= | |
9282 | READLINE_CFLAGS= | |
39037522 | 9283 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9284 | else |
9285 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9286 | READLINE_DEPS='$(READLINE)' | |
9287 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9288 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9289 | fi |
9290 | ||
9291 | ||
9292 | ||
9293 | ||
9294 | ||
f997c383 SD |
9295 | # Generate jit-reader.h |
9296 | ||
9297 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9298 | TARGET_PTR= | |
9299 | ||
9300 | # The cast to long int works around a bug in the HP C Compiler | |
9301 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9302 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9303 | # This bug is HP SR number 8606223364. | |
9304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
9305 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
d0ac1c44 | 9306 | if ${ac_cv_sizeof_unsigned_long_long+:} false; then : |
f997c383 SD |
9307 | $as_echo_n "(cached) " >&6 |
9308 | else | |
9309 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9310 | ||
9311 | else | |
9312 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
9313 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9314 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9315 | as_fn_error 77 "cannot compute sizeof (unsigned long long) |
9316 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9317 | else |
9318 | ac_cv_sizeof_unsigned_long_long=0 | |
9319 | fi | |
9320 | fi | |
9321 | ||
9322 | fi | |
9323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9324 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9325 | ||
9326 | ||
9327 | ||
9328 | cat >>confdefs.h <<_ACEOF | |
9329 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9330 | _ACEOF | |
9331 | ||
9332 | ||
9333 | # The cast to long int works around a bug in the HP C Compiler | |
9334 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9335 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9336 | # This bug is HP SR number 8606223364. | |
9337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9338 | $as_echo_n "checking size of unsigned long... " >&6; } | |
d0ac1c44 | 9339 | if ${ac_cv_sizeof_unsigned_long+:} false; then : |
f997c383 SD |
9340 | $as_echo_n "(cached) " >&6 |
9341 | else | |
9342 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9343 | ||
9344 | else | |
9345 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9346 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9347 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9348 | as_fn_error 77 "cannot compute sizeof (unsigned long) |
9349 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9350 | else |
9351 | ac_cv_sizeof_unsigned_long=0 | |
9352 | fi | |
9353 | fi | |
9354 | ||
9355 | fi | |
9356 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9357 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9358 | ||
9359 | ||
9360 | ||
9361 | cat >>confdefs.h <<_ACEOF | |
9362 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9363 | _ACEOF | |
9364 | ||
9365 | ||
9366 | # The cast to long int works around a bug in the HP C Compiler | |
9367 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9368 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9369 | # This bug is HP SR number 8606223364. | |
9370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9371 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
d0ac1c44 | 9372 | if ${ac_cv_sizeof_unsigned___int128+:} false; then : |
f997c383 SD |
9373 | $as_echo_n "(cached) " >&6 |
9374 | else | |
9375 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9376 | ||
9377 | else | |
9378 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9379 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9380 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9381 | as_fn_error 77 "cannot compute sizeof (unsigned __int128) |
9382 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9383 | else |
9384 | ac_cv_sizeof_unsigned___int128=0 | |
9385 | fi | |
9386 | fi | |
9387 | ||
9388 | fi | |
9389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9390 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9391 | ||
9392 | ||
9393 | ||
9394 | cat >>confdefs.h <<_ACEOF | |
9395 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9396 | _ACEOF | |
9397 | ||
9398 | ||
9399 | ||
9400 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9401 | TARGET_PTR="unsigned long" | |
9402 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9403 | TARGET_PTR="unsigned long long" | |
9404 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9405 | TARGET_PTR="unsigned __int128" | |
9406 | else | |
9407 | TARGET_PTR="unsigned long" | |
9408 | fi | |
9409 | ||
9410 | ||
9411 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9412 | ||
9413 | ||
a2d08b9e SD |
9414 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9415 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 9416 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9417 | $as_echo_n "(cached) " >&6 |
9418 | else | |
9419 | ac_func_search_save_LIBS=$LIBS | |
9420 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9421 | /* end confdefs.h. */ | |
9422 | ||
9423 | /* Override any GCC internal prototype to avoid an error. | |
9424 | Use char because int might match the return type of a GCC | |
9425 | builtin and then its argument prototype would still apply. */ | |
9426 | #ifdef __cplusplus | |
9427 | extern "C" | |
9428 | #endif | |
9429 | char dlopen (); | |
9430 | int | |
9431 | main () | |
9432 | { | |
9433 | return dlopen (); | |
9434 | ; | |
9435 | return 0; | |
9436 | } | |
9437 | _ACEOF | |
9438 | for ac_lib in '' dl; do | |
9439 | if test -z "$ac_lib"; then | |
9440 | ac_res="none required" | |
9441 | else | |
9442 | ac_res=-l$ac_lib | |
9443 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9444 | fi | |
9445 | if ac_fn_c_try_link "$LINENO"; then : | |
9446 | ac_cv_search_dlopen=$ac_res | |
9447 | fi | |
9448 | rm -f core conftest.err conftest.$ac_objext \ | |
9449 | conftest$ac_exeext | |
d0ac1c44 | 9450 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9451 | break |
9452 | fi | |
9453 | done | |
d0ac1c44 | 9454 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9455 | |
9456 | else | |
9457 | ac_cv_search_dlopen=no | |
9458 | fi | |
9459 | rm conftest.$ac_ext | |
9460 | LIBS=$ac_func_search_save_LIBS | |
9461 | fi | |
9462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9463 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9464 | ac_res=$ac_cv_search_dlopen | |
9465 | if test "$ac_res" != no; then : | |
9466 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9467 | ||
9468 | fi | |
9469 | ||
9470 | ||
39037522 | 9471 | |
b8e0a31c SD |
9472 | |
9473 | # Check whether --with-jit-reader-dir was given. | |
9474 | if test "${with_jit_reader_dir+set}" = set; then : | |
9475 | withval=$with_jit_reader_dir; | |
9476 | JIT_READER_DIR=$withval | |
9477 | else | |
9478 | JIT_READER_DIR=${libdir}/gdb | |
9479 | fi | |
9480 | ||
9481 | ||
9482 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9483 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9484 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9485 | ac_define_dir=`eval echo $ac_define_dir` | |
9486 | ||
9487 | cat >>confdefs.h <<_ACEOF | |
9488 | #define JIT_READER_DIR "$ac_define_dir" | |
9489 | _ACEOF | |
9490 | ||
9491 | ||
9492 | ||
9493 | ||
9494 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9495 | if test "x$prefix" = xNONE; then | |
9496 | test_prefix=/usr/local | |
9497 | else | |
9498 | test_prefix=$prefix | |
9499 | fi | |
9500 | else | |
9501 | test_prefix=$exec_prefix | |
9502 | fi | |
9503 | value=0 | |
9504 | case ${ac_define_dir} in | |
9505 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9506 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9507 | value=1 | |
9508 | ;; | |
9509 | esac | |
9510 | ||
9511 | cat >>confdefs.h <<_ACEOF | |
9512 | #define JIT_READER_DIR_RELOCATABLE $value | |
9513 | _ACEOF | |
9514 | ||
9515 | ||
9516 | ||
9517 | ||
9518 | ||
81ecdfbb RW |
9519 | # Check whether --with-expat was given. |
9520 | if test "${with_expat+set}" = set; then : | |
9521 | withval=$with_expat; | |
5c39566f DJ |
9522 | else |
9523 | with_expat=auto | |
81ecdfbb RW |
9524 | fi |
9525 | ||
9526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9527 | $as_echo_n "checking whether to use expat... " >&6; } | |
9528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9529 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9530 | |
9531 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9532 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9533 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9534 | HAVE_LIBEXPAT=no |
9535 | else | |
9536 | ||
3841debe DJ |
9537 | |
9538 | ||
9539 | ||
9540 | ||
9541 | ||
9542 | ||
9543 | ||
9544 | use_additional=yes | |
9545 | ||
9546 | acl_save_prefix="$prefix" | |
9547 | prefix="$acl_final_prefix" | |
9548 | acl_save_exec_prefix="$exec_prefix" | |
9549 | exec_prefix="$acl_final_exec_prefix" | |
9550 | ||
9551 | eval additional_includedir=\"$includedir\" | |
9552 | eval additional_libdir=\"$libdir\" | |
9553 | ||
9554 | exec_prefix="$acl_save_exec_prefix" | |
9555 | prefix="$acl_save_prefix" | |
9556 | ||
9557 | ||
81ecdfbb RW |
9558 | # Check whether --with-libexpat-prefix was given. |
9559 | if test "${with_libexpat_prefix+set}" = set; then : | |
9560 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9561 | if test "X$withval" = "Xno"; then |
9562 | use_additional=no | |
9563 | else | |
9564 | if test "X$withval" = "X"; then | |
9565 | ||
9566 | acl_save_prefix="$prefix" | |
9567 | prefix="$acl_final_prefix" | |
9568 | acl_save_exec_prefix="$exec_prefix" | |
9569 | exec_prefix="$acl_final_exec_prefix" | |
9570 | ||
9571 | eval additional_includedir=\"$includedir\" | |
9572 | eval additional_libdir=\"$libdir\" | |
9573 | ||
9574 | exec_prefix="$acl_save_exec_prefix" | |
9575 | prefix="$acl_save_prefix" | |
9576 | ||
9577 | else | |
9578 | additional_includedir="$withval/include" | |
9579 | additional_libdir="$withval/lib" | |
9580 | fi | |
9581 | fi | |
9582 | ||
81ecdfbb RW |
9583 | fi |
9584 | ||
9f1528a1 AB |
9585 | |
9586 | # Check whether --with-libexpat-type was given. | |
9587 | if test "${with_libexpat_type+set}" = set; then : | |
9588 | withval=$with_libexpat_type; with_libexpat_type=$withval | |
9589 | else | |
9590 | with_libexpat_type=auto | |
9591 | fi | |
9592 | ||
9593 | lib_type=`eval echo \$with_libexpat_type` | |
9594 | ||
3841debe DJ |
9595 | LIBEXPAT= |
9596 | LTLIBEXPAT= | |
9597 | INCEXPAT= | |
9598 | rpathdirs= | |
9599 | ltrpathdirs= | |
9600 | names_already_handled= | |
9601 | names_next_round='expat ' | |
9602 | while test -n "$names_next_round"; do | |
9603 | names_this_round="$names_next_round" | |
9604 | names_next_round= | |
9605 | for name in $names_this_round; do | |
9606 | already_handled= | |
9607 | for n in $names_already_handled; do | |
9608 | if test "$n" = "$name"; then | |
9609 | already_handled=yes | |
9610 | break | |
9611 | fi | |
9612 | done | |
9613 | if test -z "$already_handled"; then | |
9614 | names_already_handled="$names_already_handled $name" | |
9615 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9616 | eval value=\"\$HAVE_LIB$uppername\" | |
9617 | if test -n "$value"; then | |
9618 | if test "$value" = yes; then | |
9619 | eval value=\"\$LIB$uppername\" | |
9620 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9621 | eval value=\"\$LTLIB$uppername\" | |
9622 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9623 | else | |
9624 | : | |
9625 | fi | |
9626 | else | |
9627 | found_dir= | |
9628 | found_la= | |
9629 | found_so= | |
9630 | found_a= | |
9631 | if test $use_additional = yes; then | |
9f1528a1 | 9632 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9633 | found_dir="$additional_libdir" |
9634 | found_so="$additional_libdir/lib$name.$shlibext" | |
9635 | if test -f "$additional_libdir/lib$name.la"; then | |
9636 | found_la="$additional_libdir/lib$name.la" | |
9637 | fi | |
9f1528a1 | 9638 | elif test x$lib_type != xshared; then |
3841debe DJ |
9639 | if test -f "$additional_libdir/lib$name.$libext"; then |
9640 | found_dir="$additional_libdir" | |
9641 | found_a="$additional_libdir/lib$name.$libext" | |
9642 | if test -f "$additional_libdir/lib$name.la"; then | |
9643 | found_la="$additional_libdir/lib$name.la" | |
9644 | fi | |
9645 | fi | |
9646 | fi | |
9647 | fi | |
9648 | if test "X$found_dir" = "X"; then | |
9649 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9650 | ||
9651 | acl_save_prefix="$prefix" | |
9652 | prefix="$acl_final_prefix" | |
9653 | acl_save_exec_prefix="$exec_prefix" | |
9654 | exec_prefix="$acl_final_exec_prefix" | |
9655 | eval x=\"$x\" | |
9656 | exec_prefix="$acl_save_exec_prefix" | |
9657 | prefix="$acl_save_prefix" | |
9658 | ||
9659 | case "$x" in | |
9660 | -L*) | |
9661 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 9662 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9663 | found_dir="$dir" |
9664 | found_so="$dir/lib$name.$shlibext" | |
9665 | if test -f "$dir/lib$name.la"; then | |
9666 | found_la="$dir/lib$name.la" | |
9667 | fi | |
9f1528a1 | 9668 | elif test x$lib_type != xshared; then |
3841debe DJ |
9669 | if test -f "$dir/lib$name.$libext"; then |
9670 | found_dir="$dir" | |
9671 | found_a="$dir/lib$name.$libext" | |
9672 | if test -f "$dir/lib$name.la"; then | |
9673 | found_la="$dir/lib$name.la" | |
9674 | fi | |
9675 | fi | |
9676 | fi | |
9677 | ;; | |
9678 | esac | |
9679 | if test "X$found_dir" != "X"; then | |
9680 | break | |
9681 | fi | |
9682 | done | |
9683 | fi | |
9684 | if test "X$found_dir" != "X"; then | |
9685 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9686 | if test "X$found_so" != "X"; then | |
9687 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9688 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9689 | else | |
9690 | haveit= | |
9691 | for x in $ltrpathdirs; do | |
9692 | if test "X$x" = "X$found_dir"; then | |
9693 | haveit=yes | |
9694 | break | |
9695 | fi | |
9696 | done | |
9697 | if test -z "$haveit"; then | |
9698 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9699 | fi | |
9700 | if test "$hardcode_direct" = yes; then | |
9701 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9702 | else | |
9703 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9704 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9705 | haveit= | |
9706 | for x in $rpathdirs; do | |
9707 | if test "X$x" = "X$found_dir"; then | |
9708 | haveit=yes | |
9709 | break | |
9710 | fi | |
9711 | done | |
9712 | if test -z "$haveit"; then | |
9713 | rpathdirs="$rpathdirs $found_dir" | |
9714 | fi | |
9715 | else | |
9716 | haveit= | |
9717 | for x in $LDFLAGS $LIBEXPAT; do | |
9718 | ||
9719 | acl_save_prefix="$prefix" | |
9720 | prefix="$acl_final_prefix" | |
9721 | acl_save_exec_prefix="$exec_prefix" | |
9722 | exec_prefix="$acl_final_exec_prefix" | |
9723 | eval x=\"$x\" | |
9724 | exec_prefix="$acl_save_exec_prefix" | |
9725 | prefix="$acl_save_prefix" | |
9726 | ||
9727 | if test "X$x" = "X-L$found_dir"; then | |
9728 | haveit=yes | |
9729 | break | |
9730 | fi | |
9731 | done | |
9732 | if test -z "$haveit"; then | |
9733 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9734 | fi | |
9735 | if test "$hardcode_minus_L" != no; then | |
9736 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9737 | else | |
9738 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9739 | fi | |
9740 | fi | |
9741 | fi | |
9742 | fi | |
9743 | else | |
9744 | if test "X$found_a" != "X"; then | |
9745 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9746 | else | |
9747 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9748 | fi | |
9749 | fi | |
9750 | additional_includedir= | |
9751 | case "$found_dir" in | |
9752 | */lib | */lib/) | |
9753 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9754 | additional_includedir="$basedir/include" | |
9755 | ;; | |
9756 | esac | |
9757 | if test "X$additional_includedir" != "X"; then | |
9758 | if test "X$additional_includedir" != "X/usr/include"; then | |
9759 | haveit= | |
9760 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9761 | if test -n "$GCC"; then | |
9762 | case $host_os in | |
9763 | linux*) haveit=yes;; | |
9764 | esac | |
9765 | fi | |
9766 | fi | |
9767 | if test -z "$haveit"; then | |
9768 | for x in $CPPFLAGS $INCEXPAT; do | |
9769 | ||
9770 | acl_save_prefix="$prefix" | |
9771 | prefix="$acl_final_prefix" | |
9772 | acl_save_exec_prefix="$exec_prefix" | |
9773 | exec_prefix="$acl_final_exec_prefix" | |
9774 | eval x=\"$x\" | |
9775 | exec_prefix="$acl_save_exec_prefix" | |
9776 | prefix="$acl_save_prefix" | |
9777 | ||
9778 | if test "X$x" = "X-I$additional_includedir"; then | |
9779 | haveit=yes | |
9780 | break | |
9781 | fi | |
9782 | done | |
9783 | if test -z "$haveit"; then | |
9784 | if test -d "$additional_includedir"; then | |
9785 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9786 | fi | |
9787 | fi | |
9788 | fi | |
9789 | fi | |
9790 | fi | |
9791 | if test -n "$found_la"; then | |
9792 | save_libdir="$libdir" | |
9793 | case "$found_la" in | |
9794 | */* | *\\*) . "$found_la" ;; | |
9795 | *) . "./$found_la" ;; | |
9796 | esac | |
9797 | libdir="$save_libdir" | |
9798 | for dep in $dependency_libs; do | |
9799 | case "$dep" in | |
9800 | -L*) | |
9801 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9802 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9803 | haveit= | |
9804 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9805 | if test -n "$GCC"; then | |
9806 | case $host_os in | |
9807 | linux*) haveit=yes;; | |
9808 | esac | |
9809 | fi | |
9810 | fi | |
9811 | if test -z "$haveit"; then | |
9812 | haveit= | |
9813 | for x in $LDFLAGS $LIBEXPAT; do | |
9814 | ||
9815 | acl_save_prefix="$prefix" | |
9816 | prefix="$acl_final_prefix" | |
9817 | acl_save_exec_prefix="$exec_prefix" | |
9818 | exec_prefix="$acl_final_exec_prefix" | |
9819 | eval x=\"$x\" | |
9820 | exec_prefix="$acl_save_exec_prefix" | |
9821 | prefix="$acl_save_prefix" | |
9822 | ||
9823 | if test "X$x" = "X-L$additional_libdir"; then | |
9824 | haveit=yes | |
9825 | break | |
9826 | fi | |
9827 | done | |
9828 | if test -z "$haveit"; then | |
9829 | if test -d "$additional_libdir"; then | |
9830 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9831 | fi | |
9832 | fi | |
9833 | haveit= | |
9834 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9835 | ||
9836 | acl_save_prefix="$prefix" | |
9837 | prefix="$acl_final_prefix" | |
9838 | acl_save_exec_prefix="$exec_prefix" | |
9839 | exec_prefix="$acl_final_exec_prefix" | |
9840 | eval x=\"$x\" | |
9841 | exec_prefix="$acl_save_exec_prefix" | |
9842 | prefix="$acl_save_prefix" | |
9843 | ||
9844 | if test "X$x" = "X-L$additional_libdir"; then | |
9845 | haveit=yes | |
9846 | break | |
9847 | fi | |
9848 | done | |
9849 | if test -z "$haveit"; then | |
9850 | if test -d "$additional_libdir"; then | |
9851 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9852 | fi | |
9853 | fi | |
9854 | fi | |
9855 | fi | |
9856 | ;; | |
9857 | -R*) | |
9858 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9859 | if test "$enable_rpath" != no; then | |
9860 | haveit= | |
9861 | for x in $rpathdirs; do | |
9862 | if test "X$x" = "X$dir"; then | |
9863 | haveit=yes | |
9864 | break | |
9865 | fi | |
9866 | done | |
9867 | if test -z "$haveit"; then | |
9868 | rpathdirs="$rpathdirs $dir" | |
9869 | fi | |
9870 | haveit= | |
9871 | for x in $ltrpathdirs; do | |
9872 | if test "X$x" = "X$dir"; then | |
9873 | haveit=yes | |
9874 | break | |
9875 | fi | |
9876 | done | |
9877 | if test -z "$haveit"; then | |
9878 | ltrpathdirs="$ltrpathdirs $dir" | |
9879 | fi | |
9880 | fi | |
9881 | ;; | |
9882 | -l*) | |
9883 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9884 | ;; | |
9885 | *.la) | |
9886 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9887 | ;; | |
9888 | *) | |
9889 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9890 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9891 | ;; | |
81ecdfbb RW |
9892 | esac |
9893 | done | |
9894 | fi | |
9895 | else | |
9f1528a1 AB |
9896 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
9897 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9898 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9899 | else | |
9900 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext" | |
9901 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext" | |
9902 | fi | |
81ecdfbb RW |
9903 | fi |
9904 | fi | |
9905 | fi | |
9906 | done | |
9907 | done | |
9908 | if test "X$rpathdirs" != "X"; then | |
9909 | if test -n "$hardcode_libdir_separator"; then | |
9910 | alldirs= | |
9911 | for found_dir in $rpathdirs; do | |
9912 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9913 | done | |
9914 | acl_save_libdir="$libdir" | |
9915 | libdir="$alldirs" | |
9916 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9917 | libdir="$acl_save_libdir" | |
9918 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9919 | else | |
9920 | for found_dir in $rpathdirs; do | |
9921 | acl_save_libdir="$libdir" | |
9922 | libdir="$found_dir" | |
9923 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9924 | libdir="$acl_save_libdir" | |
9925 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9926 | done | |
9927 | fi | |
9928 | fi | |
9929 | if test "X$ltrpathdirs" != "X"; then | |
9930 | for found_dir in $ltrpathdirs; do | |
9931 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9932 | done | |
9933 | fi | |
a9322a30 TT |
9934 | |
9935 | ||
81ecdfbb | 9936 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9937 | |
81ecdfbb RW |
9938 | for element in $INCEXPAT; do |
9939 | haveit= | |
9940 | for x in $CPPFLAGS; do | |
a9322a30 | 9941 | |
81ecdfbb RW |
9942 | acl_save_prefix="$prefix" |
9943 | prefix="$acl_final_prefix" | |
9944 | acl_save_exec_prefix="$exec_prefix" | |
9945 | exec_prefix="$acl_final_exec_prefix" | |
9946 | eval x=\"$x\" | |
9947 | exec_prefix="$acl_save_exec_prefix" | |
9948 | prefix="$acl_save_prefix" | |
a8111142 | 9949 | |
81ecdfbb RW |
9950 | if test "X$x" = "X$element"; then |
9951 | haveit=yes | |
9952 | break | |
9953 | fi | |
9954 | done | |
9955 | if test -z "$haveit"; then | |
9956 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9957 | fi | |
9958 | done | |
a9322a30 TT |
9959 | |
9960 | ||
81ecdfbb RW |
9961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9962 | $as_echo_n "checking for libexpat... " >&6; } | |
d0ac1c44 | 9963 | if ${ac_cv_libexpat+:} false; then : |
81ecdfbb | 9964 | $as_echo_n "(cached) " >&6 |
bec39cab | 9965 | else |
bec39cab | 9966 | |
81ecdfbb RW |
9967 | ac_save_LIBS="$LIBS" |
9968 | LIBS="$LIBS $LIBEXPAT" | |
9969 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9970 | /* end confdefs.h. */ |
81ecdfbb RW |
9971 | #include "expat.h" |
9972 | int | |
9973 | main () | |
9974 | { | |
9975 | XML_Parser p = XML_ParserCreate (0); | |
9976 | ; | |
9977 | return 0; | |
9978 | } | |
bec39cab | 9979 | _ACEOF |
81ecdfbb RW |
9980 | if ac_fn_c_try_link "$LINENO"; then : |
9981 | ac_cv_libexpat=yes | |
c906108c | 9982 | else |
81ecdfbb | 9983 | ac_cv_libexpat=no |
bec39cab | 9984 | fi |
81ecdfbb RW |
9985 | rm -f core conftest.err conftest.$ac_objext \ |
9986 | conftest$ac_exeext conftest.$ac_ext | |
9987 | LIBS="$ac_save_LIBS" | |
c906108c | 9988 | |
95ca63c4 | 9989 | fi |
81ecdfbb RW |
9990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9991 | $as_echo "$ac_cv_libexpat" >&6; } | |
9992 | if test "$ac_cv_libexpat" = yes; then | |
9993 | HAVE_LIBEXPAT=yes | |
bec39cab | 9994 | |
81ecdfbb | 9995 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9996 | |
81ecdfbb RW |
9997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9998 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
10000 | $as_echo "$LIBEXPAT" >&6; } | |
10001 | else | |
10002 | HAVE_LIBEXPAT=no | |
10003 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10004 | LIBEXPAT= | |
10005 | LTLIBEXPAT= | |
10006 | fi | |
95ca63c4 CF |
10007 | |
10008 | ||
10009 | ||
7cb9022a MK |
10010 | |
10011 | ||
bec39cab | 10012 | |
81ecdfbb RW |
10013 | if test "$HAVE_LIBEXPAT" != yes; then |
10014 | if test "$with_expat" = yes; then | |
d0ac1c44 | 10015 | as_fn_error $? "expat is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
10016 | else |
10017 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
10018 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
10019 | fi | |
10020 | else | |
10021 | save_LIBS=$LIBS | |
10022 | LIBS="$LIBS $LIBEXPAT" | |
10023 | for ac_func in XML_StopParser | |
10024 | do : | |
10025 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
d0ac1c44 | 10026 | if test "x$ac_cv_func_XML_StopParser" = xyes; then : |
bec39cab | 10027 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10028 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10029 | _ACEOF |
95ca63c4 | 10030 | |
bec39cab | 10031 | fi |
bec39cab | 10032 | done |
95ca63c4 | 10033 | |
81ecdfbb RW |
10034 | LIBS=$save_LIBS |
10035 | fi | |
a9322a30 TT |
10036 | fi |
10037 | ||
2c947d9b JB |
10038 | # Verify that we have a usable GMP library. |
10039 | ||
10040 | ||
10041 | ||
10042 | ||
10043 | ||
10044 | ||
10045 | ||
10046 | ||
10047 | use_additional=yes | |
10048 | ||
10049 | acl_save_prefix="$prefix" | |
10050 | prefix="$acl_final_prefix" | |
10051 | acl_save_exec_prefix="$exec_prefix" | |
10052 | exec_prefix="$acl_final_exec_prefix" | |
10053 | ||
10054 | eval additional_includedir=\"$includedir\" | |
10055 | eval additional_libdir=\"$libdir\" | |
10056 | ||
10057 | exec_prefix="$acl_save_exec_prefix" | |
10058 | prefix="$acl_save_prefix" | |
10059 | ||
10060 | ||
10061 | # Check whether --with-libgmp-prefix was given. | |
10062 | if test "${with_libgmp_prefix+set}" = set; then : | |
10063 | withval=$with_libgmp_prefix; | |
10064 | if test "X$withval" = "Xno"; then | |
10065 | use_additional=no | |
10066 | else | |
10067 | if test "X$withval" = "X"; then | |
10068 | ||
10069 | acl_save_prefix="$prefix" | |
10070 | prefix="$acl_final_prefix" | |
10071 | acl_save_exec_prefix="$exec_prefix" | |
10072 | exec_prefix="$acl_final_exec_prefix" | |
10073 | ||
10074 | eval additional_includedir=\"$includedir\" | |
10075 | eval additional_libdir=\"$libdir\" | |
10076 | ||
10077 | exec_prefix="$acl_save_exec_prefix" | |
10078 | prefix="$acl_save_prefix" | |
10079 | ||
10080 | else | |
10081 | additional_includedir="$withval/include" | |
10082 | additional_libdir="$withval/lib" | |
10083 | fi | |
10084 | fi | |
10085 | ||
10086 | fi | |
10087 | ||
10088 | ||
10089 | # Check whether --with-libgmp-type was given. | |
10090 | if test "${with_libgmp_type+set}" = set; then : | |
10091 | withval=$with_libgmp_type; with_libgmp_type=$withval | |
10092 | else | |
10093 | with_libgmp_type=auto | |
10094 | fi | |
10095 | ||
10096 | lib_type=`eval echo \$with_libgmp_type` | |
10097 | ||
10098 | LIBGMP= | |
10099 | LTLIBGMP= | |
10100 | INCGMP= | |
10101 | rpathdirs= | |
10102 | ltrpathdirs= | |
10103 | names_already_handled= | |
10104 | names_next_round='gmp ' | |
10105 | while test -n "$names_next_round"; do | |
10106 | names_this_round="$names_next_round" | |
10107 | names_next_round= | |
10108 | for name in $names_this_round; do | |
10109 | already_handled= | |
10110 | for n in $names_already_handled; do | |
10111 | if test "$n" = "$name"; then | |
10112 | already_handled=yes | |
10113 | break | |
10114 | fi | |
10115 | done | |
10116 | if test -z "$already_handled"; then | |
10117 | names_already_handled="$names_already_handled $name" | |
10118 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10119 | eval value=\"\$HAVE_LIB$uppername\" | |
10120 | if test -n "$value"; then | |
10121 | if test "$value" = yes; then | |
10122 | eval value=\"\$LIB$uppername\" | |
10123 | test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value" | |
10124 | eval value=\"\$LTLIB$uppername\" | |
10125 | test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value" | |
10126 | else | |
10127 | : | |
10128 | fi | |
10129 | else | |
10130 | found_dir= | |
10131 | found_la= | |
10132 | found_so= | |
10133 | found_a= | |
10134 | if test $use_additional = yes; then | |
10135 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
10136 | found_dir="$additional_libdir" | |
10137 | found_so="$additional_libdir/lib$name.$shlibext" | |
10138 | if test -f "$additional_libdir/lib$name.la"; then | |
10139 | found_la="$additional_libdir/lib$name.la" | |
10140 | fi | |
10141 | elif test x$lib_type != xshared; then | |
10142 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10143 | found_dir="$additional_libdir" | |
10144 | found_a="$additional_libdir/lib$name.$libext" | |
10145 | if test -f "$additional_libdir/lib$name.la"; then | |
10146 | found_la="$additional_libdir/lib$name.la" | |
10147 | fi | |
10148 | fi | |
10149 | fi | |
10150 | fi | |
10151 | if test "X$found_dir" = "X"; then | |
10152 | for x in $LDFLAGS $LTLIBGMP; do | |
10153 | ||
10154 | acl_save_prefix="$prefix" | |
10155 | prefix="$acl_final_prefix" | |
10156 | acl_save_exec_prefix="$exec_prefix" | |
10157 | exec_prefix="$acl_final_exec_prefix" | |
10158 | eval x=\"$x\" | |
10159 | exec_prefix="$acl_save_exec_prefix" | |
10160 | prefix="$acl_save_prefix" | |
10161 | ||
10162 | case "$x" in | |
10163 | -L*) | |
10164 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10165 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
10166 | found_dir="$dir" | |
10167 | found_so="$dir/lib$name.$shlibext" | |
10168 | if test -f "$dir/lib$name.la"; then | |
10169 | found_la="$dir/lib$name.la" | |
10170 | fi | |
10171 | elif test x$lib_type != xshared; then | |
10172 | if test -f "$dir/lib$name.$libext"; then | |
10173 | found_dir="$dir" | |
10174 | found_a="$dir/lib$name.$libext" | |
10175 | if test -f "$dir/lib$name.la"; then | |
10176 | found_la="$dir/lib$name.la" | |
10177 | fi | |
10178 | fi | |
10179 | fi | |
10180 | ;; | |
10181 | esac | |
10182 | if test "X$found_dir" != "X"; then | |
10183 | break | |
10184 | fi | |
10185 | done | |
10186 | fi | |
10187 | if test "X$found_dir" != "X"; then | |
10188 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name" | |
10189 | if test "X$found_so" != "X"; then | |
10190 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10191 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10192 | else | |
10193 | haveit= | |
10194 | for x in $ltrpathdirs; do | |
10195 | if test "X$x" = "X$found_dir"; then | |
10196 | haveit=yes | |
10197 | break | |
10198 | fi | |
10199 | done | |
10200 | if test -z "$haveit"; then | |
10201 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10202 | fi | |
10203 | if test "$hardcode_direct" = yes; then | |
10204 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10205 | else | |
10206 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10207 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10208 | haveit= | |
10209 | for x in $rpathdirs; do | |
10210 | if test "X$x" = "X$found_dir"; then | |
10211 | haveit=yes | |
10212 | break | |
10213 | fi | |
10214 | done | |
10215 | if test -z "$haveit"; then | |
10216 | rpathdirs="$rpathdirs $found_dir" | |
10217 | fi | |
10218 | else | |
10219 | haveit= | |
10220 | for x in $LDFLAGS $LIBGMP; do | |
10221 | ||
10222 | acl_save_prefix="$prefix" | |
10223 | prefix="$acl_final_prefix" | |
10224 | acl_save_exec_prefix="$exec_prefix" | |
10225 | exec_prefix="$acl_final_exec_prefix" | |
10226 | eval x=\"$x\" | |
10227 | exec_prefix="$acl_save_exec_prefix" | |
10228 | prefix="$acl_save_prefix" | |
10229 | ||
10230 | if test "X$x" = "X-L$found_dir"; then | |
10231 | haveit=yes | |
10232 | break | |
10233 | fi | |
10234 | done | |
10235 | if test -z "$haveit"; then | |
10236 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir" | |
10237 | fi | |
10238 | if test "$hardcode_minus_L" != no; then | |
10239 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10240 | else | |
10241 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name" | |
10242 | fi | |
10243 | fi | |
10244 | fi | |
10245 | fi | |
10246 | else | |
10247 | if test "X$found_a" != "X"; then | |
10248 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a" | |
10249 | else | |
10250 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name" | |
10251 | fi | |
10252 | fi | |
10253 | additional_includedir= | |
10254 | case "$found_dir" in | |
10255 | */lib | */lib/) | |
10256 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10257 | additional_includedir="$basedir/include" | |
10258 | ;; | |
10259 | esac | |
10260 | if test "X$additional_includedir" != "X"; then | |
10261 | if test "X$additional_includedir" != "X/usr/include"; then | |
10262 | haveit= | |
10263 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10264 | if test -n "$GCC"; then | |
10265 | case $host_os in | |
10266 | linux*) haveit=yes;; | |
10267 | esac | |
10268 | fi | |
10269 | fi | |
10270 | if test -z "$haveit"; then | |
10271 | for x in $CPPFLAGS $INCGMP; do | |
10272 | ||
10273 | acl_save_prefix="$prefix" | |
10274 | prefix="$acl_final_prefix" | |
10275 | acl_save_exec_prefix="$exec_prefix" | |
10276 | exec_prefix="$acl_final_exec_prefix" | |
10277 | eval x=\"$x\" | |
10278 | exec_prefix="$acl_save_exec_prefix" | |
10279 | prefix="$acl_save_prefix" | |
10280 | ||
10281 | if test "X$x" = "X-I$additional_includedir"; then | |
10282 | haveit=yes | |
10283 | break | |
10284 | fi | |
10285 | done | |
10286 | if test -z "$haveit"; then | |
10287 | if test -d "$additional_includedir"; then | |
10288 | INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir" | |
10289 | fi | |
10290 | fi | |
10291 | fi | |
10292 | fi | |
10293 | fi | |
10294 | if test -n "$found_la"; then | |
10295 | save_libdir="$libdir" | |
10296 | case "$found_la" in | |
10297 | */* | *\\*) . "$found_la" ;; | |
10298 | *) . "./$found_la" ;; | |
10299 | esac | |
10300 | libdir="$save_libdir" | |
10301 | for dep in $dependency_libs; do | |
10302 | case "$dep" in | |
10303 | -L*) | |
10304 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10305 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10306 | haveit= | |
10307 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10308 | if test -n "$GCC"; then | |
10309 | case $host_os in | |
10310 | linux*) haveit=yes;; | |
10311 | esac | |
10312 | fi | |
10313 | fi | |
10314 | if test -z "$haveit"; then | |
10315 | haveit= | |
10316 | for x in $LDFLAGS $LIBGMP; do | |
10317 | ||
10318 | acl_save_prefix="$prefix" | |
10319 | prefix="$acl_final_prefix" | |
10320 | acl_save_exec_prefix="$exec_prefix" | |
10321 | exec_prefix="$acl_final_exec_prefix" | |
10322 | eval x=\"$x\" | |
10323 | exec_prefix="$acl_save_exec_prefix" | |
10324 | prefix="$acl_save_prefix" | |
10325 | ||
10326 | if test "X$x" = "X-L$additional_libdir"; then | |
10327 | haveit=yes | |
10328 | break | |
10329 | fi | |
10330 | done | |
10331 | if test -z "$haveit"; then | |
10332 | if test -d "$additional_libdir"; then | |
10333 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir" | |
10334 | fi | |
10335 | fi | |
10336 | haveit= | |
10337 | for x in $LDFLAGS $LTLIBGMP; do | |
10338 | ||
10339 | acl_save_prefix="$prefix" | |
10340 | prefix="$acl_final_prefix" | |
10341 | acl_save_exec_prefix="$exec_prefix" | |
10342 | exec_prefix="$acl_final_exec_prefix" | |
10343 | eval x=\"$x\" | |
10344 | exec_prefix="$acl_save_exec_prefix" | |
10345 | prefix="$acl_save_prefix" | |
10346 | ||
10347 | if test "X$x" = "X-L$additional_libdir"; then | |
10348 | haveit=yes | |
10349 | break | |
10350 | fi | |
10351 | done | |
10352 | if test -z "$haveit"; then | |
10353 | if test -d "$additional_libdir"; then | |
10354 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir" | |
10355 | fi | |
10356 | fi | |
10357 | fi | |
10358 | fi | |
10359 | ;; | |
10360 | -R*) | |
10361 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10362 | if test "$enable_rpath" != no; then | |
10363 | haveit= | |
10364 | for x in $rpathdirs; do | |
10365 | if test "X$x" = "X$dir"; then | |
10366 | haveit=yes | |
10367 | break | |
10368 | fi | |
10369 | done | |
10370 | if test -z "$haveit"; then | |
10371 | rpathdirs="$rpathdirs $dir" | |
10372 | fi | |
10373 | haveit= | |
10374 | for x in $ltrpathdirs; do | |
10375 | if test "X$x" = "X$dir"; then | |
10376 | haveit=yes | |
10377 | break | |
10378 | fi | |
10379 | done | |
10380 | if test -z "$haveit"; then | |
10381 | ltrpathdirs="$ltrpathdirs $dir" | |
10382 | fi | |
10383 | fi | |
10384 | ;; | |
10385 | -l*) | |
10386 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10387 | ;; | |
10388 | *.la) | |
10389 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10390 | ;; | |
10391 | *) | |
10392 | LIBGMP="${LIBGMP}${LIBGMP:+ }$dep" | |
10393 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep" | |
10394 | ;; | |
10395 | esac | |
10396 | done | |
10397 | fi | |
10398 | else | |
10399 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then | |
10400 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name" | |
10401 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name" | |
10402 | else | |
10403 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext" | |
10404 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext" | |
10405 | fi | |
10406 | fi | |
10407 | fi | |
10408 | fi | |
10409 | done | |
10410 | done | |
10411 | if test "X$rpathdirs" != "X"; then | |
10412 | if test -n "$hardcode_libdir_separator"; then | |
10413 | alldirs= | |
10414 | for found_dir in $rpathdirs; do | |
10415 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10416 | done | |
10417 | acl_save_libdir="$libdir" | |
10418 | libdir="$alldirs" | |
10419 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10420 | libdir="$acl_save_libdir" | |
10421 | LIBGMP="${LIBGMP}${LIBGMP:+ }$flag" | |
10422 | else | |
10423 | for found_dir in $rpathdirs; do | |
10424 | acl_save_libdir="$libdir" | |
10425 | libdir="$found_dir" | |
10426 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10427 | libdir="$acl_save_libdir" | |
10428 | LIBGMP="${LIBGMP}${LIBGMP:+ }$flag" | |
10429 | done | |
10430 | fi | |
10431 | fi | |
10432 | if test "X$ltrpathdirs" != "X"; then | |
10433 | for found_dir in $ltrpathdirs; do | |
10434 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir" | |
10435 | done | |
10436 | fi | |
10437 | ||
10438 | ||
10439 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10440 | ||
10441 | for element in $INCGMP; do | |
10442 | haveit= | |
10443 | for x in $CPPFLAGS; do | |
10444 | ||
10445 | acl_save_prefix="$prefix" | |
10446 | prefix="$acl_final_prefix" | |
10447 | acl_save_exec_prefix="$exec_prefix" | |
10448 | exec_prefix="$acl_final_exec_prefix" | |
10449 | eval x=\"$x\" | |
10450 | exec_prefix="$acl_save_exec_prefix" | |
10451 | prefix="$acl_save_prefix" | |
10452 | ||
10453 | if test "X$x" = "X$element"; then | |
10454 | haveit=yes | |
10455 | break | |
10456 | fi | |
10457 | done | |
10458 | if test -z "$haveit"; then | |
10459 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10460 | fi | |
10461 | done | |
10462 | ||
10463 | ||
10464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5 | |
10465 | $as_echo_n "checking for libgmp... " >&6; } | |
10466 | if ${ac_cv_libgmp+:} false; then : | |
10467 | $as_echo_n "(cached) " >&6 | |
10468 | else | |
10469 | ||
10470 | ac_save_LIBS="$LIBS" | |
10471 | LIBS="$LIBS $LIBGMP" | |
10472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10473 | /* end confdefs.h. */ | |
10474 | #include <gmp.h> | |
10475 | int | |
10476 | main () | |
10477 | { | |
10478 | mpz_t n; | |
10479 | mpz_init (n); | |
10480 | ; | |
10481 | return 0; | |
10482 | } | |
10483 | _ACEOF | |
10484 | if ac_fn_c_try_link "$LINENO"; then : | |
10485 | ac_cv_libgmp=yes | |
10486 | else | |
10487 | ac_cv_libgmp=no | |
10488 | fi | |
10489 | rm -f core conftest.err conftest.$ac_objext \ | |
10490 | conftest$ac_exeext conftest.$ac_ext | |
10491 | LIBS="$ac_save_LIBS" | |
10492 | ||
10493 | fi | |
10494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5 | |
10495 | $as_echo "$ac_cv_libgmp" >&6; } | |
10496 | if test "$ac_cv_libgmp" = yes; then | |
10497 | HAVE_LIBGMP=yes | |
10498 | ||
10499 | $as_echo "#define HAVE_LIBGMP 1" >>confdefs.h | |
10500 | ||
10501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5 | |
10502 | $as_echo_n "checking how to link with libgmp... " >&6; } | |
10503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5 | |
10504 | $as_echo "$LIBGMP" >&6; } | |
10505 | else | |
10506 | HAVE_LIBGMP=no | |
10507 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10508 | LIBGMP= | |
10509 | LTLIBGMP= | |
10510 | fi | |
10511 | ||
10512 | ||
10513 | ||
10514 | ||
10515 | ||
10516 | ||
1b4ac058 JB |
10517 | if test "$HAVE_LIBGMP" != yes; then |
10518 | as_fn_error $? "GMP is missing or unusable" "$LINENO" 5 | |
10519 | fi | |
2c947d9b | 10520 | |
2400729e UW |
10521 | |
10522 | # Check whether --with-mpfr was given. | |
10523 | if test "${with_mpfr+set}" = set; then : | |
10524 | withval=$with_mpfr; | |
10525 | else | |
10526 | with_mpfr=auto | |
10527 | fi | |
10528 | ||
10529 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
10530 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
10531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
10532 | $as_echo "$with_mpfr" >&6; } | |
10533 | ||
10534 | if test "${with_mpfr}" = no; then | |
10535 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
10536 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
10537 | HAVE_LIBMPFR=no | |
10538 | else | |
10539 | ||
10540 | ||
10541 | ||
10542 | ||
10543 | ||
10544 | ||
10545 | ||
10546 | ||
10547 | use_additional=yes | |
10548 | ||
10549 | acl_save_prefix="$prefix" | |
10550 | prefix="$acl_final_prefix" | |
10551 | acl_save_exec_prefix="$exec_prefix" | |
10552 | exec_prefix="$acl_final_exec_prefix" | |
10553 | ||
10554 | eval additional_includedir=\"$includedir\" | |
10555 | eval additional_libdir=\"$libdir\" | |
10556 | ||
10557 | exec_prefix="$acl_save_exec_prefix" | |
10558 | prefix="$acl_save_prefix" | |
10559 | ||
10560 | ||
10561 | # Check whether --with-libmpfr-prefix was given. | |
10562 | if test "${with_libmpfr_prefix+set}" = set; then : | |
10563 | withval=$with_libmpfr_prefix; | |
10564 | if test "X$withval" = "Xno"; then | |
10565 | use_additional=no | |
10566 | else | |
10567 | if test "X$withval" = "X"; then | |
10568 | ||
10569 | acl_save_prefix="$prefix" | |
10570 | prefix="$acl_final_prefix" | |
10571 | acl_save_exec_prefix="$exec_prefix" | |
10572 | exec_prefix="$acl_final_exec_prefix" | |
10573 | ||
10574 | eval additional_includedir=\"$includedir\" | |
10575 | eval additional_libdir=\"$libdir\" | |
10576 | ||
10577 | exec_prefix="$acl_save_exec_prefix" | |
10578 | prefix="$acl_save_prefix" | |
10579 | ||
10580 | else | |
10581 | additional_includedir="$withval/include" | |
10582 | additional_libdir="$withval/lib" | |
10583 | fi | |
10584 | fi | |
10585 | ||
10586 | fi | |
10587 | ||
9f1528a1 AB |
10588 | |
10589 | # Check whether --with-libmpfr-type was given. | |
10590 | if test "${with_libmpfr_type+set}" = set; then : | |
10591 | withval=$with_libmpfr_type; with_libmpfr_type=$withval | |
10592 | else | |
10593 | with_libmpfr_type=auto | |
10594 | fi | |
10595 | ||
10596 | lib_type=`eval echo \$with_libmpfr_type` | |
10597 | ||
2400729e UW |
10598 | LIBMPFR= |
10599 | LTLIBMPFR= | |
10600 | INCMPFR= | |
10601 | rpathdirs= | |
10602 | ltrpathdirs= | |
10603 | names_already_handled= | |
da658607 | 10604 | names_next_round='mpfr gmp' |
2400729e UW |
10605 | while test -n "$names_next_round"; do |
10606 | names_this_round="$names_next_round" | |
10607 | names_next_round= | |
10608 | for name in $names_this_round; do | |
10609 | already_handled= | |
10610 | for n in $names_already_handled; do | |
10611 | if test "$n" = "$name"; then | |
10612 | already_handled=yes | |
10613 | break | |
10614 | fi | |
10615 | done | |
10616 | if test -z "$already_handled"; then | |
10617 | names_already_handled="$names_already_handled $name" | |
10618 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10619 | eval value=\"\$HAVE_LIB$uppername\" | |
10620 | if test -n "$value"; then | |
10621 | if test "$value" = yes; then | |
10622 | eval value=\"\$LIB$uppername\" | |
10623 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
10624 | eval value=\"\$LTLIB$uppername\" | |
10625 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
10626 | else | |
10627 | : | |
10628 | fi | |
10629 | else | |
10630 | found_dir= | |
10631 | found_la= | |
10632 | found_so= | |
10633 | found_a= | |
10634 | if test $use_additional = yes; then | |
9f1528a1 | 10635 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10636 | found_dir="$additional_libdir" |
10637 | found_so="$additional_libdir/lib$name.$shlibext" | |
10638 | if test -f "$additional_libdir/lib$name.la"; then | |
10639 | found_la="$additional_libdir/lib$name.la" | |
10640 | fi | |
9f1528a1 | 10641 | elif test x$lib_type != xshared; then |
2400729e UW |
10642 | if test -f "$additional_libdir/lib$name.$libext"; then |
10643 | found_dir="$additional_libdir" | |
10644 | found_a="$additional_libdir/lib$name.$libext" | |
10645 | if test -f "$additional_libdir/lib$name.la"; then | |
10646 | found_la="$additional_libdir/lib$name.la" | |
10647 | fi | |
10648 | fi | |
10649 | fi | |
10650 | fi | |
10651 | if test "X$found_dir" = "X"; then | |
10652 | for x in $LDFLAGS $LTLIBMPFR; do | |
10653 | ||
10654 | acl_save_prefix="$prefix" | |
10655 | prefix="$acl_final_prefix" | |
10656 | acl_save_exec_prefix="$exec_prefix" | |
10657 | exec_prefix="$acl_final_exec_prefix" | |
10658 | eval x=\"$x\" | |
10659 | exec_prefix="$acl_save_exec_prefix" | |
10660 | prefix="$acl_save_prefix" | |
10661 | ||
10662 | case "$x" in | |
10663 | -L*) | |
10664 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 10665 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10666 | found_dir="$dir" |
10667 | found_so="$dir/lib$name.$shlibext" | |
10668 | if test -f "$dir/lib$name.la"; then | |
10669 | found_la="$dir/lib$name.la" | |
10670 | fi | |
9f1528a1 | 10671 | elif test x$lib_type != xshared; then |
2400729e UW |
10672 | if test -f "$dir/lib$name.$libext"; then |
10673 | found_dir="$dir" | |
10674 | found_a="$dir/lib$name.$libext" | |
10675 | if test -f "$dir/lib$name.la"; then | |
10676 | found_la="$dir/lib$name.la" | |
10677 | fi | |
10678 | fi | |
10679 | fi | |
10680 | ;; | |
10681 | esac | |
10682 | if test "X$found_dir" != "X"; then | |
10683 | break | |
10684 | fi | |
10685 | done | |
10686 | fi | |
10687 | if test "X$found_dir" != "X"; then | |
10688 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
10689 | if test "X$found_so" != "X"; then | |
10690 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10691 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10692 | else | |
10693 | haveit= | |
10694 | for x in $ltrpathdirs; do | |
10695 | if test "X$x" = "X$found_dir"; then | |
10696 | haveit=yes | |
10697 | break | |
10698 | fi | |
10699 | done | |
10700 | if test -z "$haveit"; then | |
10701 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10702 | fi | |
10703 | if test "$hardcode_direct" = yes; then | |
10704 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10705 | else | |
10706 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10707 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10708 | haveit= | |
10709 | for x in $rpathdirs; do | |
10710 | if test "X$x" = "X$found_dir"; then | |
10711 | haveit=yes | |
10712 | break | |
10713 | fi | |
10714 | done | |
10715 | if test -z "$haveit"; then | |
10716 | rpathdirs="$rpathdirs $found_dir" | |
10717 | fi | |
10718 | else | |
10719 | haveit= | |
10720 | for x in $LDFLAGS $LIBMPFR; do | |
10721 | ||
10722 | acl_save_prefix="$prefix" | |
10723 | prefix="$acl_final_prefix" | |
10724 | acl_save_exec_prefix="$exec_prefix" | |
10725 | exec_prefix="$acl_final_exec_prefix" | |
10726 | eval x=\"$x\" | |
10727 | exec_prefix="$acl_save_exec_prefix" | |
10728 | prefix="$acl_save_prefix" | |
10729 | ||
10730 | if test "X$x" = "X-L$found_dir"; then | |
10731 | haveit=yes | |
10732 | break | |
10733 | fi | |
10734 | done | |
10735 | if test -z "$haveit"; then | |
10736 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
10737 | fi | |
10738 | if test "$hardcode_minus_L" != no; then | |
10739 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10740 | else | |
10741 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10742 | fi | |
10743 | fi | |
10744 | fi | |
10745 | fi | |
10746 | else | |
10747 | if test "X$found_a" != "X"; then | |
10748 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
10749 | else | |
10750 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
10751 | fi | |
10752 | fi | |
10753 | additional_includedir= | |
10754 | case "$found_dir" in | |
10755 | */lib | */lib/) | |
10756 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10757 | additional_includedir="$basedir/include" | |
10758 | ;; | |
10759 | esac | |
10760 | if test "X$additional_includedir" != "X"; then | |
10761 | if test "X$additional_includedir" != "X/usr/include"; then | |
10762 | haveit= | |
10763 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10764 | if test -n "$GCC"; then | |
10765 | case $host_os in | |
10766 | linux*) haveit=yes;; | |
10767 | esac | |
10768 | fi | |
10769 | fi | |
10770 | if test -z "$haveit"; then | |
10771 | for x in $CPPFLAGS $INCMPFR; do | |
10772 | ||
10773 | acl_save_prefix="$prefix" | |
10774 | prefix="$acl_final_prefix" | |
10775 | acl_save_exec_prefix="$exec_prefix" | |
10776 | exec_prefix="$acl_final_exec_prefix" | |
10777 | eval x=\"$x\" | |
10778 | exec_prefix="$acl_save_exec_prefix" | |
10779 | prefix="$acl_save_prefix" | |
10780 | ||
10781 | if test "X$x" = "X-I$additional_includedir"; then | |
10782 | haveit=yes | |
10783 | break | |
10784 | fi | |
10785 | done | |
10786 | if test -z "$haveit"; then | |
10787 | if test -d "$additional_includedir"; then | |
10788 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
10789 | fi | |
10790 | fi | |
10791 | fi | |
10792 | fi | |
10793 | fi | |
10794 | if test -n "$found_la"; then | |
10795 | save_libdir="$libdir" | |
10796 | case "$found_la" in | |
10797 | */* | *\\*) . "$found_la" ;; | |
10798 | *) . "./$found_la" ;; | |
10799 | esac | |
10800 | libdir="$save_libdir" | |
10801 | for dep in $dependency_libs; do | |
10802 | case "$dep" in | |
10803 | -L*) | |
10804 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10805 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10806 | haveit= | |
10807 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10808 | if test -n "$GCC"; then | |
10809 | case $host_os in | |
10810 | linux*) haveit=yes;; | |
10811 | esac | |
10812 | fi | |
10813 | fi | |
10814 | if test -z "$haveit"; then | |
10815 | haveit= | |
10816 | for x in $LDFLAGS $LIBMPFR; do | |
10817 | ||
10818 | acl_save_prefix="$prefix" | |
10819 | prefix="$acl_final_prefix" | |
10820 | acl_save_exec_prefix="$exec_prefix" | |
10821 | exec_prefix="$acl_final_exec_prefix" | |
10822 | eval x=\"$x\" | |
10823 | exec_prefix="$acl_save_exec_prefix" | |
10824 | prefix="$acl_save_prefix" | |
10825 | ||
10826 | if test "X$x" = "X-L$additional_libdir"; then | |
10827 | haveit=yes | |
10828 | break | |
10829 | fi | |
10830 | done | |
10831 | if test -z "$haveit"; then | |
10832 | if test -d "$additional_libdir"; then | |
10833 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
10834 | fi | |
10835 | fi | |
10836 | haveit= | |
10837 | for x in $LDFLAGS $LTLIBMPFR; do | |
10838 | ||
10839 | acl_save_prefix="$prefix" | |
10840 | prefix="$acl_final_prefix" | |
10841 | acl_save_exec_prefix="$exec_prefix" | |
10842 | exec_prefix="$acl_final_exec_prefix" | |
10843 | eval x=\"$x\" | |
10844 | exec_prefix="$acl_save_exec_prefix" | |
10845 | prefix="$acl_save_prefix" | |
10846 | ||
10847 | if test "X$x" = "X-L$additional_libdir"; then | |
10848 | haveit=yes | |
10849 | break | |
10850 | fi | |
10851 | done | |
10852 | if test -z "$haveit"; then | |
10853 | if test -d "$additional_libdir"; then | |
10854 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
10855 | fi | |
10856 | fi | |
10857 | fi | |
10858 | fi | |
10859 | ;; | |
10860 | -R*) | |
10861 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10862 | if test "$enable_rpath" != no; then | |
10863 | haveit= | |
10864 | for x in $rpathdirs; do | |
10865 | if test "X$x" = "X$dir"; then | |
10866 | haveit=yes | |
10867 | break | |
10868 | fi | |
10869 | done | |
10870 | if test -z "$haveit"; then | |
10871 | rpathdirs="$rpathdirs $dir" | |
10872 | fi | |
10873 | haveit= | |
10874 | for x in $ltrpathdirs; do | |
10875 | if test "X$x" = "X$dir"; then | |
10876 | haveit=yes | |
10877 | break | |
10878 | fi | |
10879 | done | |
10880 | if test -z "$haveit"; then | |
10881 | ltrpathdirs="$ltrpathdirs $dir" | |
10882 | fi | |
10883 | fi | |
10884 | ;; | |
10885 | -l*) | |
10886 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10887 | ;; | |
10888 | *.la) | |
10889 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10890 | ;; | |
10891 | *) | |
10892 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10893 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10894 | ;; | |
10895 | esac | |
10896 | done | |
10897 | fi | |
10898 | else | |
9f1528a1 AB |
10899 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
10900 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10901 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10902 | else | |
10903 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext" | |
10904 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext" | |
10905 | fi | |
2400729e UW |
10906 | fi |
10907 | fi | |
10908 | fi | |
10909 | done | |
10910 | done | |
10911 | if test "X$rpathdirs" != "X"; then | |
10912 | if test -n "$hardcode_libdir_separator"; then | |
10913 | alldirs= | |
10914 | for found_dir in $rpathdirs; do | |
10915 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10916 | done | |
10917 | acl_save_libdir="$libdir" | |
10918 | libdir="$alldirs" | |
10919 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10920 | libdir="$acl_save_libdir" | |
10921 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10922 | else | |
10923 | for found_dir in $rpathdirs; do | |
10924 | acl_save_libdir="$libdir" | |
10925 | libdir="$found_dir" | |
10926 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10927 | libdir="$acl_save_libdir" | |
10928 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10929 | done | |
10930 | fi | |
10931 | fi | |
10932 | if test "X$ltrpathdirs" != "X"; then | |
10933 | for found_dir in $ltrpathdirs; do | |
10934 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10935 | done | |
10936 | fi | |
10937 | ||
10938 | ||
10939 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10940 | ||
10941 | for element in $INCMPFR; do | |
10942 | haveit= | |
10943 | for x in $CPPFLAGS; do | |
10944 | ||
10945 | acl_save_prefix="$prefix" | |
10946 | prefix="$acl_final_prefix" | |
10947 | acl_save_exec_prefix="$exec_prefix" | |
10948 | exec_prefix="$acl_final_exec_prefix" | |
10949 | eval x=\"$x\" | |
10950 | exec_prefix="$acl_save_exec_prefix" | |
10951 | prefix="$acl_save_prefix" | |
10952 | ||
10953 | if test "X$x" = "X$element"; then | |
10954 | haveit=yes | |
10955 | break | |
10956 | fi | |
10957 | done | |
10958 | if test -z "$haveit"; then | |
10959 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10960 | fi | |
10961 | done | |
10962 | ||
10963 | ||
10964 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10965 | $as_echo_n "checking for libmpfr... " >&6; } | |
d0ac1c44 | 10966 | if ${ac_cv_libmpfr+:} false; then : |
2400729e UW |
10967 | $as_echo_n "(cached) " >&6 |
10968 | else | |
10969 | ||
10970 | ac_save_LIBS="$LIBS" | |
10971 | LIBS="$LIBS $LIBMPFR" | |
10972 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10973 | /* end confdefs.h. */ | |
10974 | #include <mpfr.h> | |
10975 | int | |
10976 | main () | |
10977 | { | |
10978 | mpfr_exp_t exp; mpfr_t x; | |
10979 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10980 | ; | |
10981 | return 0; | |
10982 | } | |
10983 | _ACEOF | |
10984 | if ac_fn_c_try_link "$LINENO"; then : | |
10985 | ac_cv_libmpfr=yes | |
10986 | else | |
10987 | ac_cv_libmpfr=no | |
10988 | fi | |
10989 | rm -f core conftest.err conftest.$ac_objext \ | |
10990 | conftest$ac_exeext conftest.$ac_ext | |
10991 | LIBS="$ac_save_LIBS" | |
10992 | ||
10993 | fi | |
10994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
10995 | $as_echo "$ac_cv_libmpfr" >&6; } | |
10996 | if test "$ac_cv_libmpfr" = yes; then | |
10997 | HAVE_LIBMPFR=yes | |
10998 | ||
10999 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
11000 | ||
11001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
11002 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
11003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
11004 | $as_echo "$LIBMPFR" >&6; } | |
11005 | else | |
11006 | HAVE_LIBMPFR=no | |
11007 | CPPFLAGS="$ac_save_CPPFLAGS" | |
11008 | LIBMPFR= | |
11009 | LTLIBMPFR= | |
11010 | fi | |
11011 | ||
11012 | ||
11013 | ||
11014 | ||
11015 | ||
11016 | ||
11017 | if test "$HAVE_LIBMPFR" != yes; then | |
11018 | if test "$with_mpfr" = yes; then | |
d0ac1c44 | 11019 | as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 |
2400729e UW |
11020 | else |
11021 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
11022 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
11023 | fi | |
11024 | fi | |
11025 | fi | |
11026 | ||
d344e670 DE |
11027 | # --------------------- # |
11028 | # Check for libpython. # | |
11029 | # --------------------- # | |
11030 | ||
a9322a30 | 11031 | |
a9322a30 TT |
11032 | |
11033 | ||
ec685c5e | 11034 | |
0c4a4063 | 11035 | |
81ecdfbb RW |
11036 | # Check whether --with-python was given. |
11037 | if test "${with_python+set}" = set; then : | |
11038 | withval=$with_python; | |
bec39cab | 11039 | else |
81ecdfbb | 11040 | with_python=auto |
bec39cab | 11041 | fi |
bec39cab | 11042 | |
81ecdfbb RW |
11043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
11044 | $as_echo_n "checking whether to use python... " >&6; } | |
11045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
11046 | $as_echo "$with_python" >&6; } | |
9a156167 | 11047 | |
81ecdfbb RW |
11048 | if test "${with_python}" = no; then |
11049 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
11050 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
11051 | have_libpython=no | |
bec39cab | 11052 | else |
81ecdfbb | 11053 | case "${with_python}" in |
8c85a4e2 | 11054 | [\\/]* | ?:[\\/]*) |
0ad6b8ee | 11055 | if test -d "${with_python}"; then |
ec685c5e | 11056 | # Assume the python binary is ${with_python}/bin/python. |
ec685c5e | 11057 | python_prog="${with_python}/bin/python" |
0c4a4063 | 11058 | python_prefix= |
9c4ea6c5 JB |
11059 | # If python does not exit ${with_python}/bin, then try in |
11060 | # ${with_python}. On Windows/MinGW, this is where the Python | |
11061 | # executable is. | |
11062 | if test ! -x "${python_prog}"; then | |
11063 | python_prog="${with_python}/python" | |
11064 | python_prefix= | |
11065 | fi | |
e7a30f46 | 11066 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
11067 | # Fall back to gdb 7.0/7.1 behaviour. |
11068 | python_prog=missing | |
0c4a4063 | 11069 | python_prefix=${with_python} |
ec685c5e | 11070 | fi |
e7a30f46 | 11071 | elif test -x "${with_python}"; then |
ec685c5e DE |
11072 | # While we can't run python compiled for $host (unless host == build), |
11073 | # the user could write a script that provides the needed information, | |
11074 | # so we support that. | |
ec685c5e | 11075 | python_prog=${with_python} |
0c4a4063 | 11076 | python_prefix= |
ec685c5e | 11077 | else |
d0ac1c44 | 11078 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
ec685c5e | 11079 | fi |
81ecdfbb | 11080 | ;; |
ec685c5e DE |
11081 | */*) |
11082 | # Disallow --with-python=foo/bar. | |
d0ac1c44 | 11083 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
81ecdfbb | 11084 | ;; |
ec685c5e DE |
11085 | *) |
11086 | # The user has either specified auto, yes, or the name of the python | |
11087 | # program assumed to be in $PATH. | |
11088 | python_prefix= | |
11089 | case "${with_python}" in | |
11090 | yes | auto) | |
0ad6b8ee | 11091 | if test "${build}" = "${host}"; then |
ec685c5e DE |
11092 | # Extract the first word of "python", so it can be a program name with args. |
11093 | set dummy python; ac_word=$2 | |
11094 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11095 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11096 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
11097 | $as_echo_n "(cached) " >&6 |
11098 | else | |
11099 | case $python_prog_path in | |
11100 | [\\/]* | ?:[\\/]*) | |
11101 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
11102 | ;; | |
11103 | *) | |
11104 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11105 | for as_dir in $PATH | |
11106 | do | |
11107 | IFS=$as_save_IFS | |
11108 | test -z "$as_dir" && as_dir=. | |
11109 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11110 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
11111 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11112 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11113 | break 2 | |
11114 | fi | |
11115 | done | |
11116 | done | |
11117 | IFS=$as_save_IFS | |
11118 | ||
11119 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
11120 | ;; | |
11121 | esac | |
11122 | fi | |
11123 | python_prog_path=$ac_cv_path_python_prog_path | |
11124 | if test -n "$python_prog_path"; then | |
11125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
11126 | $as_echo "$python_prog_path" >&6; } | |
11127 | else | |
11128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11129 | $as_echo "no" >&6; } | |
11130 | fi | |
11131 | ||
11132 | ||
11133 | if test "${python_prog_path}" = missing; then | |
11134 | python_prog=missing | |
11135 | else | |
11136 | python_prog=${python_prog_path} | |
11137 | fi | |
11138 | else | |
11139 | # Not much we can do except assume the cross-compiler will find the | |
11140 | # right files. | |
11141 | python_prog=missing | |
11142 | fi | |
11143 | ;; | |
11144 | *) | |
11145 | # While we can't run python compiled for $host (unless host == build), | |
11146 | # the user could write a script that provides the needed information, | |
11147 | # so we support that. | |
11148 | python_prog="${with_python}" | |
11149 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
11150 | set dummy ${python_prog}; ac_word=$2 | |
11151 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11152 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11153 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
11154 | $as_echo_n "(cached) " >&6 |
11155 | else | |
11156 | case $python_prog_path in | |
11157 | [\\/]* | ?:[\\/]*) | |
11158 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
11159 | ;; | |
11160 | *) | |
11161 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11162 | for as_dir in $PATH | |
11163 | do | |
11164 | IFS=$as_save_IFS | |
11165 | test -z "$as_dir" && as_dir=. | |
11166 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11167 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
11168 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11169 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11170 | break 2 | |
11171 | fi | |
11172 | done | |
11173 | done | |
11174 | IFS=$as_save_IFS | |
11175 | ||
11176 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
11177 | ;; | |
11178 | esac | |
11179 | fi | |
11180 | python_prog_path=$ac_cv_path_python_prog_path | |
11181 | if test -n "$python_prog_path"; then | |
11182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
11183 | $as_echo "$python_prog_path" >&6; } | |
11184 | else | |
11185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11186 | $as_echo "no" >&6; } | |
11187 | fi | |
11188 | ||
11189 | ||
11190 | if test "${python_prog_path}" = missing; then | |
5593a99a | 11191 | as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 |
ec685c5e DE |
11192 | fi |
11193 | ;; | |
11194 | esac | |
81ecdfbb RW |
11195 | esac |
11196 | ||
ec685c5e | 11197 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
11198 | # We have a python program to use, but it may be too old. |
11199 | # Don't flag an error for --with-python=auto (the default). | |
11200 | have_python_config=yes | |
ec685c5e DE |
11201 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
11202 | if test $? != 0; then | |
e7a30f46 DE |
11203 | have_python_config=failed |
11204 | if test "${with_python}" != auto; then | |
5593a99a | 11205 | as_fn_error $? "failure running python-config --includes" "$LINENO" 5 |
e7a30f46 | 11206 | fi |
ec685c5e DE |
11207 | fi |
11208 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
11209 | if test $? != 0; then | |
e7a30f46 DE |
11210 | have_python_config=failed |
11211 | if test "${with_python}" != auto; then | |
5593a99a | 11212 | as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 |
e7a30f46 | 11213 | fi |
ec685c5e | 11214 | fi |
0c4a4063 DE |
11215 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
11216 | if test $? != 0; then | |
e7a30f46 DE |
11217 | have_python_config=failed |
11218 | if test "${with_python}" != auto; then | |
5593a99a | 11219 | as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 |
e7a30f46 | 11220 | fi |
0c4a4063 | 11221 | fi |
ec685c5e | 11222 | else |
ac534cba JB |
11223 | # We do not have a python executable we can use to determine where |
11224 | # to find the Python headers and libs. We cannot guess the include | |
11225 | # path from the python_prefix either, because that include path | |
11226 | # depends on the Python version. So, there is nothing much we can | |
11227 | # do except assume that the compiler will be able to find those files. | |
11228 | python_includes= | |
11229 | python_libs= | |
0c4a4063 | 11230 | have_python_config=no |
ec685c5e | 11231 | fi |
bec39cab | 11232 | |
ec685c5e DE |
11233 | # If we have python-config, only try the configuration it provides. |
11234 | # Otherwise fallback on the old way of trying different versions of | |
11235 | # python in turn. | |
81ecdfbb | 11236 | |
ec685c5e DE |
11237 | have_libpython=no |
11238 | if test "${have_python_config}" = yes; then | |
71737c43 | 11239 | |
ec685c5e DE |
11240 | |
11241 | new_CPPFLAGS=${python_includes} | |
11242 | new_LIBS=${python_libs} | |
71737c43 CB |
11243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11244 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e | 11245 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 11246 | save_LIBS=$LIBS |
ec685c5e | 11247 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 11248 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 11249 | found_usable_python=no |
81ecdfbb | 11250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11251 | /* end confdefs.h. */ |
ac534cba | 11252 | #include "Python.h" |
81ecdfbb RW |
11253 | int |
11254 | main () | |
11255 | { | |
11256 | Py_Initialize (); | |
11257 | ; | |
11258 | return 0; | |
11259 | } | |
bec39cab | 11260 | _ACEOF |
81ecdfbb | 11261 | if ac_fn_c_try_link "$LINENO"; then : |
71737c43 | 11262 | have_libpython=yes |
ec685c5e | 11263 | found_usable_python=yes |
ac534cba JB |
11264 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11265 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 11266 | fi |
81ecdfbb RW |
11267 | rm -f core conftest.err conftest.$ac_objext \ |
11268 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11269 | CPPFLAGS=$save_CPPFLAGS |
11270 | LIBS=$save_LIBS | |
ec685c5e DE |
11271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11272 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 11273 | |
e7a30f46 | 11274 | elif test "${have_python_config}" != failed; then |
ec685c5e | 11275 | if test "${have_libpython}" = no; then |
9a156167 | 11276 | |
420697bb TT |
11277 | |
11278 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 11279 | new_LIBS="-lpython2.7 ${python_libs}" |
71737c43 CB |
11280 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11281 | $as_echo_n "checking for python... " >&6; } | |
420697bb TT |
11282 | save_CPPFLAGS=$CPPFLAGS |
11283 | save_LIBS=$LIBS | |
11284 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 11285 | LIBS="$new_LIBS $LIBS" |
420697bb TT |
11286 | found_usable_python=no |
11287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11288 | /* end confdefs.h. */ | |
ac534cba | 11289 | #include "Python.h" |
420697bb TT |
11290 | int |
11291 | main () | |
11292 | { | |
11293 | Py_Initialize (); | |
11294 | ; | |
11295 | return 0; | |
11296 | } | |
11297 | _ACEOF | |
11298 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 11299 | have_libpython=yes |
420697bb | 11300 | found_usable_python=yes |
ac534cba JB |
11301 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11302 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
11303 | fi |
11304 | rm -f core conftest.err conftest.$ac_objext \ | |
11305 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11306 | CPPFLAGS=$save_CPPFLAGS |
11307 | LIBS=$save_LIBS | |
420697bb TT |
11308 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11309 | $as_echo "${found_usable_python}" >&6; } | |
11310 | ||
11311 | fi | |
11312 | if test "${have_libpython}" = no; then | |
11313 | ||
ec685c5e DE |
11314 | |
11315 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 11316 | new_LIBS="-lpython2.6 ${python_libs}" |
71737c43 CB |
11317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11318 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e DE |
11319 | save_CPPFLAGS=$CPPFLAGS |
11320 | save_LIBS=$LIBS | |
11321 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 11322 | LIBS="$new_LIBS $LIBS" |
ec685c5e DE |
11323 | found_usable_python=no |
11324 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11325 | /* end confdefs.h. */ | |
ac534cba | 11326 | #include "Python.h" |
ec685c5e DE |
11327 | int |
11328 | main () | |
11329 | { | |
11330 | Py_Initialize (); | |
11331 | ; | |
11332 | return 0; | |
11333 | } | |
11334 | _ACEOF | |
11335 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 11336 | have_libpython=yes |
ec685c5e | 11337 | found_usable_python=yes |
ac534cba JB |
11338 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11339 | PYTHON_LIBS=$new_LIBS | |
ec685c5e | 11340 | fi |
81ecdfbb RW |
11341 | rm -f core conftest.err conftest.$ac_objext \ |
11342 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11343 | CPPFLAGS=$save_CPPFLAGS |
11344 | LIBS=$save_LIBS | |
ec685c5e DE |
11345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11346 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 11347 | |
ec685c5e DE |
11348 | fi |
11349 | fi | |
ec685c5e DE |
11350 | |
11351 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
11352 | case "${with_python}" in |
11353 | yes) | |
d0ac1c44 | 11354 | as_fn_error $? "python is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
11355 | ;; |
11356 | auto) | |
11357 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
11358 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
11359 | ;; | |
11360 | *) | |
d0ac1c44 | 11361 | as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 |
81ecdfbb RW |
11362 | ;; |
11363 | esac | |
0c4a4063 DE |
11364 | else |
11365 | if test -n "${python_prefix}"; then | |
11366 | ||
11367 | cat >>confdefs.h <<_ACEOF | |
11368 | #define WITH_PYTHON_PATH "${python_prefix}" | |
11369 | _ACEOF | |
11370 | ||
11371 | ||
11372 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11373 | if test "x$prefix" = xNONE; then | |
11374 | test_prefix=/usr/local | |
11375 | else | |
11376 | test_prefix=$prefix | |
11377 | fi | |
11378 | else | |
11379 | test_prefix=$exec_prefix | |
11380 | fi | |
11381 | value=0 | |
11382 | case ${python_prefix} in | |
11383 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11384 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11385 | value=1 | |
11386 | ;; | |
11387 | esac | |
11388 | ||
11389 | cat >>confdefs.h <<_ACEOF | |
11390 | #define PYTHON_PATH_RELOCATABLE $value | |
11391 | _ACEOF | |
11392 | ||
11393 | ||
11394 | fi | |
81ecdfbb | 11395 | fi |
436868fb | 11396 | fi |
436868fb | 11397 | |
d13c7322 AB |
11398 | |
11399 | # Check whether --with-python-libdir was given. | |
11400 | if test "${with_python_libdir+set}" = set; then : | |
11401 | withval=$with_python_libdir; | |
11402 | else | |
11403 | ||
11404 | # If no python libdir is specified then select one based on | |
11405 | # python's prefix path. | |
11406 | if test -n "${python_prefix}"; then | |
11407 | with_python_libdir=${python_prefix}/lib | |
11408 | fi | |
11409 | ||
11410 | fi | |
11411 | ||
11412 | ||
ec685c5e | 11413 | if test "${have_libpython}" != no; then |
436868fb | 11414 | |
81ecdfbb | 11415 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 11416 | |
81ecdfbb RW |
11417 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
11418 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
11419 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 11420 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 11421 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 11422 | |
d13c7322 AB |
11423 | if test -n "${with_python_libdir}"; then |
11424 | ||
11425 | cat >>confdefs.h <<_ACEOF | |
11426 | #define WITH_PYTHON_LIBDIR "${with_python_libdir}" | |
11427 | _ACEOF | |
11428 | ||
11429 | ||
11430 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11431 | if test "x$prefix" = xNONE; then | |
11432 | test_prefix=/usr/local | |
11433 | else | |
11434 | test_prefix=$prefix | |
11435 | fi | |
11436 | else | |
11437 | test_prefix=$exec_prefix | |
11438 | fi | |
11439 | value=0 | |
11440 | case ${with_python_libdir} in | |
11441 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11442 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11443 | value=1 | |
11444 | ;; | |
11445 | esac | |
11446 | ||
11447 | cat >>confdefs.h <<_ACEOF | |
11448 | #define PYTHON_LIBDIR_RELOCATABLE $value | |
11449 | _ACEOF | |
11450 | ||
11451 | ||
11452 | fi | |
11453 | ||
81ecdfbb RW |
11454 | # Flags needed to compile Python code (taken from python-config --cflags). |
11455 | # We cannot call python-config directly because it will output whatever was | |
11456 | # used when compiling the Python interpreter itself, including flags which | |
11457 | # would make the python-related objects be compiled differently from the | |
11458 | # rest of GDB (e.g., -O2 and -fPIC). | |
11459 | if test "${GCC}" = yes; then | |
ae292b3a TT |
11460 | tentative_python_cflags="-fno-strict-aliasing -fwrapv" |
11461 | # Python headers recommend -DNDEBUG, but it's unclear if that just | |
11462 | # refers to building Python itself. In release mode, though, it | |
11463 | # doesn't hurt for the Python code in gdb to follow. | |
11464 | $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG" | |
81ecdfbb | 11465 | fi |
436868fb | 11466 | |
81ecdfbb RW |
11467 | if test "x${tentative_python_cflags}" != x; then |
11468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
11469 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
11470 | for flag in ${tentative_python_cflags}; do | |
11471 | # Check that the compiler accepts it | |
11472 | saved_CFLAGS="$CFLAGS" | |
11473 | CFLAGS="$CFLAGS $flag" | |
11474 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11475 | /* end confdefs.h. */ |
81ecdfbb | 11476 | |
a9322a30 TT |
11477 | int |
11478 | main () | |
11479 | { | |
a9322a30 TT |
11480 | |
11481 | ; | |
11482 | return 0; | |
11483 | } | |
bec39cab | 11484 | _ACEOF |
81ecdfbb RW |
11485 | if ac_fn_c_try_compile "$LINENO"; then : |
11486 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 11487 | fi |
81ecdfbb RW |
11488 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11489 | CFLAGS="$saved_CFLAGS" | |
11490 | done | |
11491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
11492 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
11493 | fi | |
043b6510 | 11494 | |
c83393b9 JB |
11495 | # On x64 Windows, Python's include headers, and pyconfig.h in |
11496 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
11497 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
11498 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
11499 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
11500 | # The issue was reported to the Python community, but still isn't | |
11501 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
11502 | ||
043b6510 | 11503 | case "$gdb_host" in |
c83393b9 JB |
11504 | mingw64) |
11505 | if test "${GCC}" = yes; then | |
11506 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
11507 | fi | |
11508 | ;; | |
043b6510 | 11509 | esac |
81ecdfbb | 11510 | else |
6dddc817 DE |
11511 | # Even if Python support is not compiled in, we need to have this file |
11512 | # included so that the "python" command, et.al., still exists. | |
8fd8d003 | 11513 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
6dddc817 | 11514 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
a9322a30 | 11515 | fi |
9a156167 | 11516 | |
a4a1c157 PA |
11517 | # Work around Python http://bugs.python.org/issue10112. See also |
11518 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
11519 | # no effect. Note that the only test after this that uses Python is | |
11520 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
11521 | # run without -export-dynamic too. | |
11522 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
11523 | ||
11524 | ||
ed3ef339 DE |
11525 | |
11526 | ||
4df42755 DE |
11527 | if test "${have_libpython}" != no; then |
11528 | HAVE_PYTHON_TRUE= | |
11529 | HAVE_PYTHON_FALSE='#' | |
11530 | else | |
11531 | HAVE_PYTHON_TRUE='#' | |
11532 | HAVE_PYTHON_FALSE= | |
11533 | fi | |
11534 | ||
ed3ef339 DE |
11535 | |
11536 | # -------------------- # | |
11537 | # Check for libguile. # | |
11538 | # -------------------- # | |
11539 | ||
11540 | ||
e1402065 DE |
11541 | |
11542 | ||
11543 | ||
11544 | ||
11545 | # Check whether --with-guile was given. | |
11546 | if test "${with_guile+set}" = set; then : | |
11547 | withval=$with_guile; | |
11548 | else | |
11549 | with_guile=auto | |
11550 | fi | |
11551 | ||
11552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
11553 | $as_echo_n "checking whether to use guile... " >&6; } | |
11554 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
11555 | $as_echo "$with_guile" >&6; } | |
11556 | ||
ed3ef339 DE |
11557 | # Extract the first word of "pkg-config", so it can be a program name with args. |
11558 | set dummy pkg-config; ac_word=$2 | |
11559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11560 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11561 | if ${ac_cv_path_pkg_config_prog_path+:} false; then : |
ed3ef339 DE |
11562 | $as_echo_n "(cached) " >&6 |
11563 | else | |
11564 | case $pkg_config_prog_path in | |
11565 | [\\/]* | ?:[\\/]*) | |
11566 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
11567 | ;; | |
11568 | *) | |
11569 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11570 | for as_dir in $PATH | |
11571 | do | |
11572 | IFS=$as_save_IFS | |
11573 | test -z "$as_dir" && as_dir=. | |
11574 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11575 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ed3ef339 DE |
11576 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11577 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11578 | break 2 | |
11579 | fi | |
11580 | done | |
11581 | done | |
11582 | IFS=$as_save_IFS | |
11583 | ||
11584 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
11585 | ;; | |
11586 | esac | |
11587 | fi | |
11588 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
11589 | if test -n "$pkg_config_prog_path"; then | |
11590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
11591 | $as_echo "$pkg_config_prog_path" >&6; } | |
11592 | else | |
11593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11594 | $as_echo "no" >&6; } | |
11595 | fi | |
11596 | ||
11597 | ||
11598 | ||
ae5369e7 | 11599 | try_guile_versions="guile-3.0 guile-2.2 guile-2.0" |
ed3ef339 DE |
11600 | have_libguile=no |
11601 | case "${with_guile}" in | |
11602 | no) | |
11603 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
11604 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
11605 | ;; | |
11606 | auto) | |
e1402065 DE |
11607 | if test "${pkg_config_prog_path}" = "missing"; then |
11608 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
11609 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
11610 | else | |
ed3ef339 DE |
11611 | |
11612 | pkg_config=${pkg_config_prog_path} | |
11613 | guile_version_list=${try_guile_versions} | |
11614 | flag_errors=no | |
11615 | ||
ed3ef339 DE |
11616 | found_usable_guile=checking |
11617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11618 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11619 | for guile_version in ${guile_version_list}; do | |
11620 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11621 | if test $? != 0; then | |
11622 | continue | |
11623 | fi | |
11624 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11625 | if test $? != 0; then | |
d0ac1c44 | 11626 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11627 | fi |
11628 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11629 | if test $? != 0; then | |
d0ac1c44 | 11630 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11631 | fi |
11632 | found_usable_guile=${guile_version} | |
11633 | break | |
11634 | done | |
11635 | if test "${found_usable_guile}" = "checking"; then | |
11636 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11637 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11638 | else |
11639 | found_usable_guile=no | |
11640 | fi | |
11641 | fi | |
11642 | if test "${found_usable_guile}" != no; then | |
11643 | save_CPPFLAGS=$CPPFLAGS | |
11644 | save_LIBS=$LIBS | |
11645 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11646 | LIBS="$LIBS $new_LIBS" | |
11647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11648 | /* end confdefs.h. */ | |
11649 | #include "libguile.h" | |
11650 | int | |
11651 | main () | |
11652 | { | |
11653 | scm_init_guile (); | |
11654 | ; | |
11655 | return 0; | |
11656 | } | |
11657 | _ACEOF | |
11658 | if ac_fn_c_try_link "$LINENO"; then : | |
11659 | have_libguile=yes | |
11660 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11661 | GUILE_LIBS=$new_LIBS | |
11662 | else | |
11663 | found_usable_guile=no | |
11664 | fi | |
11665 | rm -f core conftest.err conftest.$ac_objext \ | |
11666 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11667 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11668 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11669 | |
11670 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11671 | ||
11672 | ||
11673 | fi | |
11674 | ||
ed3ef339 DE |
11675 | CPPFLAGS=$save_CPPFLAGS |
11676 | LIBS=$save_LIBS | |
11677 | if test "${found_usable_guile}" = no; then | |
11678 | if test "${flag_errors}" = yes; then | |
11679 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11680 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11681 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11682 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11683 | fi |
11684 | fi | |
11685 | fi | |
11686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11687 | $as_echo "${found_usable_guile}" >&6; } | |
11688 | ||
e1402065 | 11689 | fi |
ed3ef339 DE |
11690 | ;; |
11691 | yes) | |
e1402065 | 11692 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11693 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11694 | fi |
ed3ef339 DE |
11695 | |
11696 | pkg_config=${pkg_config_prog_path} | |
11697 | guile_version_list=${try_guile_versions} | |
11698 | flag_errors=yes | |
11699 | ||
ed3ef339 DE |
11700 | found_usable_guile=checking |
11701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11702 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11703 | for guile_version in ${guile_version_list}; do | |
11704 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11705 | if test $? != 0; then | |
11706 | continue | |
11707 | fi | |
11708 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11709 | if test $? != 0; then | |
d0ac1c44 | 11710 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11711 | fi |
11712 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11713 | if test $? != 0; then | |
d0ac1c44 | 11714 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11715 | fi |
11716 | found_usable_guile=${guile_version} | |
11717 | break | |
11718 | done | |
11719 | if test "${found_usable_guile}" = "checking"; then | |
11720 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11721 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11722 | else |
11723 | found_usable_guile=no | |
11724 | fi | |
11725 | fi | |
11726 | if test "${found_usable_guile}" != no; then | |
11727 | save_CPPFLAGS=$CPPFLAGS | |
11728 | save_LIBS=$LIBS | |
11729 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11730 | LIBS="$LIBS $new_LIBS" | |
11731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11732 | /* end confdefs.h. */ | |
11733 | #include "libguile.h" | |
11734 | int | |
11735 | main () | |
11736 | { | |
11737 | scm_init_guile (); | |
11738 | ; | |
11739 | return 0; | |
11740 | } | |
11741 | _ACEOF | |
11742 | if ac_fn_c_try_link "$LINENO"; then : | |
11743 | have_libguile=yes | |
11744 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11745 | GUILE_LIBS=$new_LIBS | |
11746 | else | |
11747 | found_usable_guile=no | |
11748 | fi | |
11749 | rm -f core conftest.err conftest.$ac_objext \ | |
11750 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11751 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11752 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11753 | |
11754 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11755 | ||
11756 | ||
11757 | fi | |
11758 | ||
ed3ef339 DE |
11759 | CPPFLAGS=$save_CPPFLAGS |
11760 | LIBS=$save_LIBS | |
11761 | if test "${found_usable_guile}" = no; then | |
11762 | if test "${flag_errors}" = yes; then | |
11763 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11764 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11765 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11766 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11767 | fi |
11768 | fi | |
11769 | fi | |
11770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11771 | $as_echo "${found_usable_guile}" >&6; } | |
11772 | ||
11773 | ;; | |
11774 | [\\/]* | ?:[\\/]*) | |
e1402065 | 11775 | if test -x "${with_guile}"; then |
ed3ef339 DE |
11776 | |
11777 | pkg_config=${with_guile} | |
11778 | guile_version_list=${try_guile_versions} | |
11779 | flag_errors=yes | |
11780 | ||
ed3ef339 DE |
11781 | found_usable_guile=checking |
11782 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11783 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11784 | for guile_version in ${guile_version_list}; do | |
11785 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11786 | if test $? != 0; then | |
11787 | continue | |
11788 | fi | |
11789 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11790 | if test $? != 0; then | |
d0ac1c44 | 11791 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11792 | fi |
11793 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11794 | if test $? != 0; then | |
d0ac1c44 | 11795 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11796 | fi |
11797 | found_usable_guile=${guile_version} | |
11798 | break | |
11799 | done | |
11800 | if test "${found_usable_guile}" = "checking"; then | |
11801 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11802 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11803 | else |
11804 | found_usable_guile=no | |
11805 | fi | |
11806 | fi | |
11807 | if test "${found_usable_guile}" != no; then | |
11808 | save_CPPFLAGS=$CPPFLAGS | |
11809 | save_LIBS=$LIBS | |
11810 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11811 | LIBS="$LIBS $new_LIBS" | |
11812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11813 | /* end confdefs.h. */ | |
11814 | #include "libguile.h" | |
11815 | int | |
11816 | main () | |
11817 | { | |
11818 | scm_init_guile (); | |
11819 | ; | |
11820 | return 0; | |
11821 | } | |
11822 | _ACEOF | |
11823 | if ac_fn_c_try_link "$LINENO"; then : | |
11824 | have_libguile=yes | |
11825 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11826 | GUILE_LIBS=$new_LIBS | |
11827 | else | |
11828 | found_usable_guile=no | |
11829 | fi | |
11830 | rm -f core conftest.err conftest.$ac_objext \ | |
11831 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11832 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11833 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11834 | |
11835 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11836 | ||
11837 | ||
11838 | fi | |
11839 | ||
ed3ef339 DE |
11840 | CPPFLAGS=$save_CPPFLAGS |
11841 | LIBS=$save_LIBS | |
11842 | if test "${found_usable_guile}" = no; then | |
11843 | if test "${flag_errors}" = yes; then | |
11844 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11845 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11846 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11847 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11848 | fi |
11849 | fi | |
11850 | fi | |
11851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11852 | $as_echo "${found_usable_guile}" >&6; } | |
11853 | ||
e1402065 | 11854 | else |
d0ac1c44 | 11855 | as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 |
e1402065 | 11856 | fi |
ed3ef339 DE |
11857 | ;; |
11858 | "" | */*) | |
11859 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
d0ac1c44 | 11860 | as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 |
ed3ef339 DE |
11861 | ;; |
11862 | *) | |
11863 | # A space separate list of guile versions to try, in order. | |
e1402065 | 11864 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11865 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11866 | fi |
ed3ef339 DE |
11867 | |
11868 | pkg_config=${pkg_config_prog_path} | |
11869 | guile_version_list=${with_guile} | |
11870 | flag_errors=yes | |
11871 | ||
ed3ef339 DE |
11872 | found_usable_guile=checking |
11873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11874 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11875 | for guile_version in ${guile_version_list}; do | |
11876 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11877 | if test $? != 0; then | |
11878 | continue | |
11879 | fi | |
11880 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11881 | if test $? != 0; then | |
d0ac1c44 | 11882 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11883 | fi |
11884 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11885 | if test $? != 0; then | |
d0ac1c44 | 11886 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11887 | fi |
11888 | found_usable_guile=${guile_version} | |
11889 | break | |
11890 | done | |
11891 | if test "${found_usable_guile}" = "checking"; then | |
11892 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11893 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11894 | else |
11895 | found_usable_guile=no | |
11896 | fi | |
11897 | fi | |
11898 | if test "${found_usable_guile}" != no; then | |
11899 | save_CPPFLAGS=$CPPFLAGS | |
11900 | save_LIBS=$LIBS | |
11901 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11902 | LIBS="$LIBS $new_LIBS" | |
11903 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11904 | /* end confdefs.h. */ | |
11905 | #include "libguile.h" | |
11906 | int | |
11907 | main () | |
11908 | { | |
11909 | scm_init_guile (); | |
11910 | ; | |
11911 | return 0; | |
11912 | } | |
11913 | _ACEOF | |
11914 | if ac_fn_c_try_link "$LINENO"; then : | |
11915 | have_libguile=yes | |
11916 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11917 | GUILE_LIBS=$new_LIBS | |
11918 | else | |
11919 | found_usable_guile=no | |
11920 | fi | |
11921 | rm -f core conftest.err conftest.$ac_objext \ | |
11922 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11923 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11924 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11925 | |
11926 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11927 | ||
11928 | ||
11929 | fi | |
11930 | ||
ed3ef339 DE |
11931 | CPPFLAGS=$save_CPPFLAGS |
11932 | LIBS=$save_LIBS | |
11933 | if test "${found_usable_guile}" = no; then | |
11934 | if test "${flag_errors}" = yes; then | |
11935 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11936 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11937 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11938 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11939 | fi |
11940 | fi | |
11941 | fi | |
11942 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11943 | $as_echo "${found_usable_guile}" >&6; } | |
11944 | ||
11945 | ;; | |
11946 | esac | |
11947 | ||
e76c5d17 | 11948 | if test "${have_libguile}" != no; then |
d342a0da DE |
11949 | case "${with_guile}" in |
11950 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11951 | |
11952 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11953 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11954 | if ${ac_cv_guild_program_name+:} false; then : |
e76c5d17 DE |
11955 | $as_echo_n "(cached) " >&6 |
11956 | else | |
d342a0da | 11957 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11958 | |
11959 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11960 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11961 | # what the program name is, at the risk of getting it wrong if | |
11962 | # Guile was configured with '--program-suffix' or similar. | |
11963 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11964 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11965 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11966 | fi | |
11967 | ||
11968 | fi | |
11969 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11970 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11971 | ||
11972 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11973 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
e76c5d17 DE |
11974 | fi |
11975 | ||
11976 | GUILD="$ac_cv_guild_program_name" | |
11977 | ||
11978 | ||
d342a0da DE |
11979 | ;; |
11980 | *) | |
11981 | ||
11982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11983 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11984 | if ${ac_cv_guild_program_name+:} false; then : |
d342a0da DE |
11985 | $as_echo_n "(cached) " >&6 |
11986 | else | |
11987 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11988 | ||
11989 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11990 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11991 | # what the program name is, at the risk of getting it wrong if | |
11992 | # Guile was configured with '--program-suffix' or similar. | |
11993 | if test "x$ac_cv_guild_program_name" = "x"; then | |
11994 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
11995 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
11996 | fi | |
11997 | ||
11998 | fi | |
11999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
12000 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
12001 | ||
12002 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 12003 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
d342a0da DE |
12004 | fi |
12005 | ||
12006 | GUILD="$ac_cv_guild_program_name" | |
12007 | ||
12008 | ||
12009 | ;; | |
12010 | esac | |
e76c5d17 DE |
12011 | |
12012 | ||
12013 | if test "$cross_compiling" = no; then | |
12014 | GUILD_TARGET_FLAG= | |
12015 | else | |
12016 | GUILD_TARGET_FLAG="--target=$host" | |
12017 | fi | |
12018 | ||
12019 | ||
12020 | ||
12021 | ||
12022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
12023 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
d0ac1c44 | 12024 | if ${ac_cv_guild_ok+:} false; then : |
e76c5d17 DE |
12025 | $as_echo_n "(cached) " >&6 |
12026 | else | |
12027 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
12028 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
12029 | ac_cv_guild_ok=yes | |
12030 | else | |
12031 | ac_cv_guild_ok=no | |
12032 | fi | |
12033 | fi | |
12034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
12035 | $as_echo "$ac_cv_guild_ok" >&6; } | |
12036 | ||
12037 | if test "$ac_cv_guild_ok" = no; then | |
12038 | have_libguile=no | |
12039 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
12040 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
12041 | fi | |
12042 | fi | |
12043 | ||
ed3ef339 DE |
12044 | if test "${have_libguile}" != no; then |
12045 | ||
12046 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
12047 | ||
12048 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
12049 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
12050 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
12051 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
12052 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
12053 | |
12054 | save_LIBS="$LIBS" | |
12055 | save_CPPFLAGS="$CPPFLAGS" | |
12056 | LIBS="$GUILE_LIBS" | |
12057 | CPPFLAGS="$GUILE_CPPFLAGS" | |
12058 | for ac_func in scm_new_smob | |
12059 | do : | |
12060 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
d0ac1c44 | 12061 | if test "x$ac_cv_func_scm_new_smob" = xyes; then : |
16954d5d LC |
12062 | cat >>confdefs.h <<_ACEOF |
12063 | #define HAVE_SCM_NEW_SMOB 1 | |
12064 | _ACEOF | |
12065 | ||
12066 | fi | |
12067 | done | |
12068 | ||
12069 | LIBS="$save_LIBS" | |
12070 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
12071 | else |
12072 | # Even if Guile support is not compiled in, we need to have these files | |
12073 | # included. | |
bd810fff | 12074 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
ed3ef339 DE |
12075 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
12076 | fi | |
9a156167 | 12077 | |
ac534cba | 12078 | |
4df42755 DE |
12079 | if test "${have_libguile}" != no; then |
12080 | HAVE_GUILE_TRUE= | |
12081 | HAVE_GUILE_FALSE='#' | |
12082 | else | |
12083 | HAVE_GUILE_TRUE='#' | |
12084 | HAVE_GUILE_FALSE= | |
12085 | fi | |
12086 | ||
ac534cba | 12087 | |
62f29fda TT |
12088 | # ---------------------------- # |
12089 | # Check for source highlight. # | |
12090 | # ---------------------------- # | |
12091 | ||
12092 | SRCHIGH_LIBS= | |
12093 | SRCHIGH_CFLAGS= | |
189b8c2e ST |
12094 | |
12095 | # Check whether --enable-source-highlight was given. | |
12096 | if test "${enable_source_highlight+set}" = set; then : | |
12097 | enableval=$enable_source_highlight; case "${enableval}" in | |
12098 | yes) enable_source_highlight=yes ;; | |
12099 | no) enable_source_highlight=no ;; | |
12100 | *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; | |
12101 | esac | |
12102 | else | |
12103 | enable_source_highlight=auto | |
12104 | fi | |
12105 | ||
12106 | ||
12107 | if test "${enable_source_highlight}" != "no"; then | |
12108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 | |
6c28e44a | 12109 | $as_echo_n "checking for the source-highlight library... " >&6; } |
189b8c2e ST |
12110 | if test "${pkg_config_prog_path}" = "missing"; then |
12111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 | |
62f29fda | 12112 | $as_echo "no - pkg-config not found" >&6; } |
189b8c2e ST |
12113 | if test "${enable_source_highlight}" = "yes"; then |
12114 | as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 | |
12115 | fi | |
12116 | else | |
12117 | if ${pkg_config_prog_path} --exists source-highlight; then | |
0455b7d3 BE |
12118 | case "$LDFLAGS" in |
12119 | *static-libstdc*) | |
12120 | as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 | |
12121 | ;; | |
12122 | esac | |
12123 | ||
62f29fda TT |
12124 | SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` |
12125 | SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` | |
12126 | ||
12127 | $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h | |
12128 | ||
12129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12130 | $as_echo "yes" >&6; } | |
189b8c2e | 12131 | else |
62f29fda TT |
12132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12133 | $as_echo "no" >&6; } | |
189b8c2e ST |
12134 | if test "${enable_source_highlight}" = "yes"; then |
12135 | as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 | |
12136 | fi | |
12137 | fi | |
12138 | fi | |
62f29fda TT |
12139 | fi |
12140 | ||
12141 | ||
12142 | ||
05ea2a05 TT |
12143 | # ------------------------- # |
12144 | # Checks for header files. # | |
12145 | # ------------------------- # | |
58bfce93 | 12146 | |
05ea2a05 TT |
12147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
12148 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
12149 | if ${ac_cv_header_stdc+:} false; then : | |
12150 | $as_echo_n "(cached) " >&6 | |
58bfce93 | 12151 | else |
5599c404 MM |
12152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12153 | /* end confdefs.h. */ | |
05ea2a05 TT |
12154 | #include <stdlib.h> |
12155 | #include <stdarg.h> | |
12156 | #include <string.h> | |
12157 | #include <float.h> | |
5599c404 | 12158 | |
05ea2a05 TT |
12159 | int |
12160 | main () | |
12161 | { | |
5599c404 | 12162 | |
05ea2a05 TT |
12163 | ; |
12164 | return 0; | |
12165 | } | |
5599c404 | 12166 | _ACEOF |
05ea2a05 TT |
12167 | if ac_fn_c_try_compile "$LINENO"; then : |
12168 | ac_cv_header_stdc=yes | |
5599c404 | 12169 | else |
05ea2a05 | 12170 | ac_cv_header_stdc=no |
5599c404 | 12171 | fi |
05ea2a05 | 12172 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58bfce93 | 12173 | |
05ea2a05 TT |
12174 | if test $ac_cv_header_stdc = yes; then |
12175 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12177 | /* end confdefs.h. */ | |
12178 | #include <string.h> | |
58bfce93 | 12179 | |
05ea2a05 TT |
12180 | _ACEOF |
12181 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12182 | $EGREP "memchr" >/dev/null 2>&1; then : | |
58bfce93 | 12183 | |
05ea2a05 TT |
12184 | else |
12185 | ac_cv_header_stdc=no | |
12186 | fi | |
12187 | rm -f conftest* | |
58bfce93 | 12188 | |
05ea2a05 | 12189 | fi |
58bfce93 | 12190 | |
05ea2a05 TT |
12191 | if test $ac_cv_header_stdc = yes; then |
12192 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12193 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12194 | /* end confdefs.h. */ | |
12195 | #include <stdlib.h> | |
58bfce93 | 12196 | |
05ea2a05 TT |
12197 | _ACEOF |
12198 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12199 | $EGREP "free" >/dev/null 2>&1; then : | |
58bfce93 | 12200 | |
05ea2a05 TT |
12201 | else |
12202 | ac_cv_header_stdc=no | |
12203 | fi | |
12204 | rm -f conftest* | |
58bfce93 | 12205 | |
05ea2a05 | 12206 | fi |
58bfce93 | 12207 | |
05ea2a05 TT |
12208 | if test $ac_cv_header_stdc = yes; then |
12209 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12210 | if test "$cross_compiling" = yes; then : | |
12211 | : | |
12212 | else | |
12213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12214 | /* end confdefs.h. */ | |
12215 | #include <ctype.h> | |
12216 | #include <stdlib.h> | |
12217 | #if ((' ' & 0x0FF) == 0x020) | |
12218 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12219 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12220 | #else | |
12221 | # define ISLOWER(c) \ | |
12222 | (('a' <= (c) && (c) <= 'i') \ | |
12223 | || ('j' <= (c) && (c) <= 'r') \ | |
12224 | || ('s' <= (c) && (c) <= 'z')) | |
12225 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12226 | #endif | |
58bfce93 | 12227 | |
05ea2a05 TT |
12228 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
12229 | int | |
12230 | main () | |
12231 | { | |
12232 | int i; | |
12233 | for (i = 0; i < 256; i++) | |
12234 | if (XOR (islower (i), ISLOWER (i)) | |
12235 | || toupper (i) != TOUPPER (i)) | |
12236 | return 2; | |
12237 | return 0; | |
12238 | } | |
12239 | _ACEOF | |
12240 | if ac_fn_c_try_run "$LINENO"; then : | |
58bfce93 | 12241 | |
05ea2a05 TT |
12242 | else |
12243 | ac_cv_header_stdc=no | |
12244 | fi | |
12245 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12246 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12247 | fi | |
58bfce93 | 12248 | |
05ea2a05 TT |
12249 | fi |
12250 | fi | |
12251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
12252 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12253 | if test $ac_cv_header_stdc = yes; then | |
58bfce93 | 12254 | |
05ea2a05 | 12255 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
58bfce93 | 12256 | |
05ea2a05 | 12257 | fi |
58bfce93 | 12258 | |
05ea2a05 | 12259 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8ae8e197 | 12260 | for ac_header in nlist.h machine/reg.h \ |
05ea2a05 TT |
12261 | thread_db.h \ |
12262 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
12263 | sys/resource.h sys/ptrace.h ptrace.h \ | |
8ae8e197 | 12264 | sys/reg.h sys/debugreg.h \ |
05ea2a05 TT |
12265 | termios.h elf_hp.h |
12266 | do : | |
12267 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12268 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12269 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12270 | cat >>confdefs.h <<_ACEOF | |
12271 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12272 | _ACEOF | |
58bfce93 MM |
12273 | |
12274 | fi | |
12275 | ||
05ea2a05 | 12276 | done |
58bfce93 | 12277 | |
05ea2a05 TT |
12278 | for ac_header in sys/user.h |
12279 | do : | |
12280 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
12281 | # include <sys/param.h> | |
12282 | #endif | |
58bfce93 | 12283 | |
05ea2a05 TT |
12284 | " |
12285 | if test "x$ac_cv_header_sys_user_h" = xyes; then : | |
12286 | cat >>confdefs.h <<_ACEOF | |
12287 | #define HAVE_SYS_USER_H 1 | |
12288 | _ACEOF | |
58bfce93 | 12289 | |
05ea2a05 | 12290 | fi |
58bfce93 | 12291 | |
05ea2a05 | 12292 | done |
58bfce93 | 12293 | |
58bfce93 | 12294 | |
05ea2a05 TT |
12295 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
12296 | do : | |
12297 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12298 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12299 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12300 | cat >>confdefs.h <<_ACEOF | |
12301 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12302 | _ACEOF | |
58bfce93 | 12303 | |
05ea2a05 | 12304 | fi |
58bfce93 | 12305 | |
05ea2a05 | 12306 | done |
58bfce93 | 12307 | |
05ea2a05 TT |
12308 | for ac_header in term.h |
12309 | do : | |
12310 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
12311 | # include <curses.h> | |
12312 | #endif | |
58bfce93 | 12313 | |
05ea2a05 TT |
12314 | " |
12315 | if test "x$ac_cv_header_term_h" = xyes; then : | |
12316 | cat >>confdefs.h <<_ACEOF | |
12317 | #define HAVE_TERM_H 1 | |
12318 | _ACEOF | |
58bfce93 | 12319 | |
05ea2a05 | 12320 | fi |
58bfce93 | 12321 | |
05ea2a05 | 12322 | done |
58bfce93 | 12323 | |
58bfce93 | 12324 | |
95420d30 | 12325 | for ac_header in sys/socket.h |
05a6b8c2 | 12326 | do : |
95420d30 TV |
12327 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" |
12328 | if test "x$ac_cv_header_sys_socket_h" = xyes; then : | |
05a6b8c2 | 12329 | cat >>confdefs.h <<_ACEOF |
95420d30 | 12330 | #define HAVE_SYS_SOCKET_H 1 |
05a6b8c2 EZ |
12331 | _ACEOF |
12332 | ||
12333 | fi | |
12334 | ||
12335 | done | |
12336 | ||
12337 | for ac_header in ws2tcpip.h | |
12338 | do : | |
12339 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
12340 | if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : | |
12341 | cat >>confdefs.h <<_ACEOF | |
12342 | #define HAVE_WS2TCPIP_H 1 | |
12343 | _ACEOF | |
12344 | ||
12345 | fi | |
12346 | ||
12347 | done | |
12348 | ||
12349 | ||
05ea2a05 TT |
12350 | # ------------------------- # |
12351 | # Checks for declarations. # | |
12352 | # ------------------------- # | |
58bfce93 | 12353 | |
58bfce93 | 12354 | |
05ea2a05 TT |
12355 | # Check for presence and size of long long. |
12356 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
12357 | if test "x$ac_cv_type_long_long" = xyes; then : | |
58bfce93 | 12358 | |
05ea2a05 TT |
12359 | cat >>confdefs.h <<_ACEOF |
12360 | #define HAVE_LONG_LONG 1 | |
12361 | _ACEOF | |
12362 | ||
12363 | # The cast to long int works around a bug in the HP C Compiler | |
12364 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12365 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12366 | # This bug is HP SR number 8606223364. | |
12367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
12368 | $as_echo_n "checking size of long long... " >&6; } | |
12369 | if ${ac_cv_sizeof_long_long+:} false; then : | |
58bfce93 MM |
12370 | $as_echo_n "(cached) " >&6 |
12371 | else | |
05ea2a05 | 12372 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
58bfce93 | 12373 | |
58bfce93 | 12374 | else |
05ea2a05 TT |
12375 | if test "$ac_cv_type_long_long" = yes; then |
12376 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12377 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12378 | as_fn_error 77 "cannot compute sizeof (long long) | |
12379 | See \`config.log' for more details" "$LINENO" 5; } | |
12380 | else | |
12381 | ac_cv_sizeof_long_long=0 | |
12382 | fi | |
58bfce93 | 12383 | fi |
58bfce93 MM |
12384 | |
12385 | fi | |
05ea2a05 TT |
12386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
12387 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
58bfce93 | 12388 | |
58bfce93 | 12389 | |
58bfce93 | 12390 | |
05ea2a05 TT |
12391 | cat >>confdefs.h <<_ACEOF |
12392 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
12393 | _ACEOF | |
58bfce93 MM |
12394 | |
12395 | ||
05ea2a05 | 12396 | fi |
58bfce93 MM |
12397 | |
12398 | ||
05ea2a05 TT |
12399 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
12400 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
12401 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
12402 | ac_have_decl=1 | |
12403 | else | |
12404 | ac_have_decl=0 | |
12405 | fi | |
58bfce93 | 12406 | |
05ea2a05 TT |
12407 | cat >>confdefs.h <<_ACEOF |
12408 | #define HAVE_DECL_BASENAME $ac_have_decl | |
c56ccc05 | 12409 | _ACEOF |
05ea2a05 TT |
12410 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
12411 | if test "x$ac_cv_have_decl_ffs" = xyes; then : | |
12412 | ac_have_decl=1 | |
12413 | else | |
12414 | ac_have_decl=0 | |
c56ccc05 | 12415 | fi |
c56ccc05 MM |
12416 | |
12417 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12418 | #define HAVE_DECL_FFS $ac_have_decl |
c56ccc05 | 12419 | _ACEOF |
05ea2a05 TT |
12420 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" |
12421 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : | |
12422 | ac_have_decl=1 | |
12423 | else | |
12424 | ac_have_decl=0 | |
c56ccc05 | 12425 | fi |
c56ccc05 MM |
12426 | |
12427 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12428 | #define HAVE_DECL_ASPRINTF $ac_have_decl |
c56ccc05 | 12429 | _ACEOF |
05ea2a05 TT |
12430 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
12431 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : | |
12432 | ac_have_decl=1 | |
12433 | else | |
12434 | ac_have_decl=0 | |
12435 | fi | |
c56ccc05 | 12436 | |
05ea2a05 TT |
12437 | cat >>confdefs.h <<_ACEOF |
12438 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
12439 | _ACEOF | |
12440 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
12441 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12442 | ac_have_decl=1 | |
12443 | else | |
12444 | ac_have_decl=0 | |
c56ccc05 MM |
12445 | fi |
12446 | ||
05ea2a05 TT |
12447 | cat >>confdefs.h <<_ACEOF |
12448 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12449 | _ACEOF | |
12450 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
12451 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : | |
12452 | ac_have_decl=1 | |
12453 | else | |
12454 | ac_have_decl=0 | |
58bfce93 MM |
12455 | fi |
12456 | ||
05ea2a05 TT |
12457 | cat >>confdefs.h <<_ACEOF |
12458 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
12459 | _ACEOF | |
c890192f | 12460 | |
05ea2a05 TT |
12461 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
12462 | if test "x$ac_cv_have_decl_strtol" = xyes; then : | |
12463 | ac_have_decl=1 | |
bec39cab | 12464 | else |
05ea2a05 TT |
12465 | ac_have_decl=0 |
12466 | fi | |
81ecdfbb | 12467 | |
05ea2a05 TT |
12468 | cat >>confdefs.h <<_ACEOF |
12469 | #define HAVE_DECL_STRTOL $ac_have_decl | |
12470 | _ACEOF | |
12471 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
12472 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : | |
12473 | ac_have_decl=1 | |
12474 | else | |
12475 | ac_have_decl=0 | |
12476 | fi | |
a9322a30 | 12477 | |
05ea2a05 TT |
12478 | cat >>confdefs.h <<_ACEOF |
12479 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
bec39cab | 12480 | _ACEOF |
05ea2a05 TT |
12481 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
12482 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : | |
12483 | ac_have_decl=1 | |
bec39cab | 12484 | else |
05ea2a05 | 12485 | ac_have_decl=0 |
a9322a30 | 12486 | fi |
bec39cab | 12487 | |
05ea2a05 TT |
12488 | cat >>confdefs.h <<_ACEOF |
12489 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
12490 | _ACEOF | |
12491 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
12492 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : | |
12493 | ac_have_decl=1 | |
12494 | else | |
12495 | ac_have_decl=0 | |
12496 | fi | |
bec39cab | 12497 | |
05ea2a05 TT |
12498 | cat >>confdefs.h <<_ACEOF |
12499 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
81ecdfbb | 12500 | _ACEOF |
bec39cab | 12501 | |
05ea2a05 TT |
12502 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" |
12503 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : | |
12504 | ac_have_decl=1 | |
bec39cab | 12505 | else |
05ea2a05 | 12506 | ac_have_decl=0 |
81ecdfbb | 12507 | fi |
81ecdfbb | 12508 | |
05ea2a05 TT |
12509 | cat >>confdefs.h <<_ACEOF |
12510 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
12511 | _ACEOF | |
81ecdfbb | 12512 | |
81ecdfbb | 12513 | |
06825bd1 | 12514 | |
05ea2a05 TT |
12515 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
12516 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12517 | ac_have_decl=1 | |
81ecdfbb | 12518 | else |
05ea2a05 | 12519 | ac_have_decl=0 |
81ecdfbb | 12520 | fi |
bec39cab | 12521 | |
05ea2a05 TT |
12522 | cat >>confdefs.h <<_ACEOF |
12523 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12524 | _ACEOF | |
81ecdfbb | 12525 | |
05ea2a05 TT |
12526 | |
12527 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 | |
12528 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
12529 | if ${am_cv_val_LC_MESSAGES+:} false; then : | |
12530 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12531 | else |
81ecdfbb | 12532 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12533 | /* end confdefs.h. */ |
05ea2a05 | 12534 | #include <locale.h> |
a9322a30 TT |
12535 | int |
12536 | main () | |
12537 | { | |
05ea2a05 TT |
12538 | return LC_MESSAGES |
12539 | ; | |
a9322a30 TT |
12540 | return 0; |
12541 | } | |
bec39cab | 12542 | _ACEOF |
05ea2a05 TT |
12543 | if ac_fn_c_try_link "$LINENO"; then : |
12544 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 12545 | else |
05ea2a05 | 12546 | am_cv_val_LC_MESSAGES=no |
81ecdfbb | 12547 | fi |
05ea2a05 TT |
12548 | rm -f core conftest.err conftest.$ac_objext \ |
12549 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 12550 | fi |
05ea2a05 TT |
12551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
12552 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
12553 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 12554 | |
05ea2a05 | 12555 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
bec39cab | 12556 | |
05ea2a05 | 12557 | fi |
5ee754fc | 12558 | |
bec39cab | 12559 | |
05ea2a05 TT |
12560 | # ------------------ # |
12561 | # Checks for types. # | |
12562 | # ------------------ # | |
12563 | ||
12564 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | |
05a6b8c2 EZ |
12565 | #if HAVE_SYS_SOCKET_H |
12566 | # include <sys/socket.h> | |
12567 | #elif HAVE_WS2TCPIP_H | |
12568 | # include <ws2tcpip.h> | |
12569 | #endif | |
05ea2a05 TT |
12570 | |
12571 | " | |
12572 | if test "x$ac_cv_type_socklen_t" = xyes; then : | |
12573 | ||
12574 | cat >>confdefs.h <<_ACEOF | |
12575 | #define HAVE_SOCKLEN_T 1 | |
bec39cab | 12576 | _ACEOF |
c906108c | 12577 | |
05ea2a05 | 12578 | |
bec39cab | 12579 | fi |
81ecdfbb | 12580 | |
81ecdfbb | 12581 | |
05ea2a05 TT |
12582 | # ------------------------------------- # |
12583 | # Checks for compiler characteristics. # | |
12584 | # ------------------------------------- # | |
a9322a30 | 12585 | |
05ea2a05 TT |
12586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12587 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
12588 | if ${ac_cv_c_const+:} false; then : | |
12589 | $as_echo_n "(cached) " >&6 | |
12590 | else | |
12591 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12592 | /* end confdefs.h. */ | |
bec39cab | 12593 | |
05ea2a05 TT |
12594 | int |
12595 | main () | |
12596 | { | |
bec39cab | 12597 | |
05ea2a05 TT |
12598 | #ifndef __cplusplus |
12599 | /* Ultrix mips cc rejects this sort of thing. */ | |
12600 | typedef int charset[2]; | |
12601 | const charset cs = { 0, 0 }; | |
12602 | /* SunOS 4.1.1 cc rejects this. */ | |
12603 | char const *const *pcpcc; | |
12604 | char **ppc; | |
12605 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
12606 | struct point {int x, y;}; | |
12607 | static struct point const zero = {0,0}; | |
12608 | /* AIX XL C 1.02.0.0 rejects this. | |
12609 | It does not let you subtract one const X* pointer from another in | |
12610 | an arm of an if-expression whose if-part is not a constant | |
12611 | expression */ | |
12612 | const char *g = "string"; | |
12613 | pcpcc = &g + (g ? g-g : 0); | |
12614 | /* HPUX 7.0 cc rejects these. */ | |
12615 | ++pcpcc; | |
12616 | ppc = (char**) pcpcc; | |
12617 | pcpcc = (char const *const *) ppc; | |
12618 | { /* SCO 3.2v4 cc rejects this sort of thing. */ | |
12619 | char tx; | |
12620 | char *t = &tx; | |
12621 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5ee754fc | 12622 | |
05ea2a05 TT |
12623 | *t++ = 0; |
12624 | if (s) return 0; | |
12625 | } | |
12626 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12627 | int x[] = {25, 17}; | |
12628 | const int *foo = &x[0]; | |
12629 | ++foo; | |
12630 | } | |
12631 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12632 | typedef const int *iptr; | |
12633 | iptr p = 0; | |
12634 | ++p; | |
12635 | } | |
12636 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying | |
12637 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12638 | struct s { int j; const int *ap[3]; } bx; | |
12639 | struct s *b = &bx; b->j = 5; | |
12640 | } | |
12641 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12642 | const int foo = 10; | |
12643 | if (!foo) return 0; | |
12644 | } | |
12645 | return !cs[0] && !zero.x; | |
12646 | #endif | |
5ee754fc | 12647 | |
05ea2a05 TT |
12648 | ; |
12649 | return 0; | |
12650 | } | |
bec39cab | 12651 | _ACEOF |
05ea2a05 TT |
12652 | if ac_fn_c_try_compile "$LINENO"; then : |
12653 | ac_cv_c_const=yes | |
12654 | else | |
12655 | ac_cv_c_const=no | |
12656 | fi | |
12657 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ee754fc | 12658 | fi |
05ea2a05 TT |
12659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12660 | $as_echo "$ac_cv_c_const" >&6; } | |
12661 | if test $ac_cv_c_const = no; then | |
5ee754fc | 12662 | |
05ea2a05 | 12663 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12664 | |
05ea2a05 TT |
12665 | fi |
12666 | ||
12667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
12668 | $as_echo_n "checking for inline... " >&6; } | |
12669 | if ${ac_cv_c_inline+:} false; then : | |
12670 | $as_echo_n "(cached) " >&6 | |
12671 | else | |
12672 | ac_cv_c_inline=no | |
12673 | for ac_kw in inline __inline__ __inline; do | |
12674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12675 | /* end confdefs.h. */ | |
12676 | #ifndef __cplusplus | |
12677 | typedef int foo_t; | |
12678 | static $ac_kw foo_t static_foo () {return 0; } | |
12679 | $ac_kw foo_t foo () {return 0; } | |
81ecdfbb | 12680 | #endif |
bec39cab | 12681 | |
a8111142 | 12682 | _ACEOF |
05ea2a05 TT |
12683 | if ac_fn_c_try_compile "$LINENO"; then : |
12684 | ac_cv_c_inline=$ac_kw | |
a8111142 | 12685 | fi |
05ea2a05 TT |
12686 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12687 | test "$ac_cv_c_inline" != no && break | |
81ecdfbb | 12688 | done |
a8111142 | 12689 | |
05ea2a05 TT |
12690 | fi |
12691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
12692 | $as_echo "$ac_cv_c_inline" >&6; } | |
a8111142 | 12693 | |
05ea2a05 TT |
12694 | case $ac_cv_c_inline in |
12695 | inline | yes) ;; | |
12696 | *) | |
12697 | case $ac_cv_c_inline in | |
12698 | no) ac_val=;; | |
12699 | *) ac_val=$ac_cv_c_inline;; | |
12700 | esac | |
12701 | cat >>confdefs.h <<_ACEOF | |
12702 | #ifndef __cplusplus | |
12703 | #define inline $ac_val | |
12704 | #endif | |
07697489 | 12705 | _ACEOF |
05ea2a05 TT |
12706 | ;; |
12707 | esac | |
07697489 | 12708 | |
05ea2a05 TT |
12709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12710 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12711 | if ${ac_cv_c_bigendian+:} false; then : | |
07697489 PA |
12712 | $as_echo_n "(cached) " >&6 |
12713 | else | |
05ea2a05 TT |
12714 | ac_cv_c_bigendian=unknown |
12715 | # See if we're dealing with a universal compiler. | |
12716 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12717 | /* end confdefs.h. */ | |
12718 | #ifndef __APPLE_CC__ | |
12719 | not a universal capable compiler | |
12720 | #endif | |
12721 | typedef int dummy; | |
07697489 | 12722 | |
05ea2a05 TT |
12723 | _ACEOF |
12724 | if ac_fn_c_try_compile "$LINENO"; then : | |
07697489 | 12725 | |
05ea2a05 TT |
12726 | # Check for potential -arch flags. It is not universal unless |
12727 | # there are at least two -arch flags with different values. | |
12728 | ac_arch= | |
12729 | ac_prev= | |
12730 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12731 | if test -n "$ac_prev"; then | |
12732 | case $ac_word in | |
12733 | i?86 | x86_64 | ppc | ppc64) | |
12734 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12735 | ac_arch=$ac_word | |
12736 | else | |
12737 | ac_cv_c_bigendian=universal | |
12738 | break | |
12739 | fi | |
12740 | ;; | |
12741 | esac | |
12742 | ac_prev= | |
12743 | elif test "x$ac_word" = "x-arch"; then | |
12744 | ac_prev=arch | |
12745 | fi | |
12746 | done | |
07697489 | 12747 | fi |
05ea2a05 TT |
12748 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12749 | if test $ac_cv_c_bigendian = unknown; then | |
12750 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12751 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12752 | /* end confdefs.h. */ | |
12753 | #include <sys/types.h> | |
12754 | #include <sys/param.h> | |
07697489 | 12755 | |
05ea2a05 TT |
12756 | int |
12757 | main () | |
12758 | { | |
12759 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
12760 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12761 | && LITTLE_ENDIAN) | |
12762 | bogus endian macros | |
12763 | #endif | |
07697489 | 12764 | |
05ea2a05 TT |
12765 | ; |
12766 | return 0; | |
12767 | } | |
07697489 | 12768 | _ACEOF |
05ea2a05 TT |
12769 | if ac_fn_c_try_compile "$LINENO"; then : |
12770 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
12771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12772 | /* end confdefs.h. */ | |
12773 | #include <sys/types.h> | |
12774 | #include <sys/param.h> | |
07697489 | 12775 | |
05ea2a05 TT |
12776 | int |
12777 | main () | |
12778 | { | |
12779 | #if BYTE_ORDER != BIG_ENDIAN | |
12780 | not big endian | |
12781 | #endif | |
07697489 | 12782 | |
05ea2a05 TT |
12783 | ; |
12784 | return 0; | |
12785 | } | |
07697489 | 12786 | _ACEOF |
05ea2a05 TT |
12787 | if ac_fn_c_try_compile "$LINENO"; then : |
12788 | ac_cv_c_bigendian=yes | |
07697489 | 12789 | else |
05ea2a05 | 12790 | ac_cv_c_bigendian=no |
07697489 | 12791 | fi |
05ea2a05 | 12792 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12793 | fi |
05ea2a05 TT |
12794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12795 | fi | |
12796 | if test $ac_cv_c_bigendian = unknown; then | |
12797 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12798 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12799 | /* end confdefs.h. */ | |
12800 | #include <limits.h> | |
07697489 | 12801 | |
05ea2a05 TT |
12802 | int |
12803 | main () | |
12804 | { | |
12805 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12806 | bogus endian macros | |
12807 | #endif | |
07697489 | 12808 | |
05ea2a05 TT |
12809 | ; |
12810 | return 0; | |
12811 | } | |
07697489 | 12812 | _ACEOF |
05ea2a05 TT |
12813 | if ac_fn_c_try_compile "$LINENO"; then : |
12814 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12816 | /* end confdefs.h. */ | |
12817 | #include <limits.h> | |
07697489 | 12818 | |
05ea2a05 TT |
12819 | int |
12820 | main () | |
12821 | { | |
12822 | #ifndef _BIG_ENDIAN | |
12823 | not big endian | |
12824 | #endif | |
07697489 | 12825 | |
05ea2a05 TT |
12826 | ; |
12827 | return 0; | |
12828 | } | |
07697489 | 12829 | _ACEOF |
05ea2a05 TT |
12830 | if ac_fn_c_try_compile "$LINENO"; then : |
12831 | ac_cv_c_bigendian=yes | |
07697489 | 12832 | else |
05ea2a05 | 12833 | ac_cv_c_bigendian=no |
07697489 | 12834 | fi |
05ea2a05 | 12835 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12836 | fi |
05ea2a05 TT |
12837 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12838 | fi | |
12839 | if test $ac_cv_c_bigendian = unknown; then | |
12840 | # Compile a test program. | |
12841 | if test "$cross_compiling" = yes; then : | |
12842 | # Try to guess by grepping values from an object file. | |
12843 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12844 | /* end confdefs.h. */ | |
12845 | short int ascii_mm[] = | |
12846 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12847 | short int ascii_ii[] = | |
12848 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12849 | int use_ascii (int i) { | |
12850 | return ascii_mm[i] + ascii_ii[i]; | |
12851 | } | |
12852 | short int ebcdic_ii[] = | |
12853 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12854 | short int ebcdic_mm[] = | |
12855 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12856 | int use_ebcdic (int i) { | |
12857 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12858 | } | |
12859 | extern int foo; | |
07697489 | 12860 | |
05ea2a05 TT |
12861 | int |
12862 | main () | |
12863 | { | |
12864 | return use_ascii (foo) == use_ebcdic (foo); | |
12865 | ; | |
12866 | return 0; | |
12867 | } | |
07697489 | 12868 | _ACEOF |
05ea2a05 TT |
12869 | if ac_fn_c_try_compile "$LINENO"; then : |
12870 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12871 | ac_cv_c_bigendian=yes | |
12872 | fi | |
12873 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12874 | if test "$ac_cv_c_bigendian" = unknown; then | |
12875 | ac_cv_c_bigendian=no | |
12876 | else | |
12877 | # finding both strings is unlikely to happen, but who knows? | |
12878 | ac_cv_c_bigendian=unknown | |
12879 | fi | |
12880 | fi | |
07697489 | 12881 | fi |
05ea2a05 TT |
12882 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12883 | else | |
12884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12885 | /* end confdefs.h. */ | |
12886 | $ac_includes_default | |
12887 | int | |
12888 | main () | |
12889 | { | |
07697489 | 12890 | |
05ea2a05 TT |
12891 | /* Are we little or big endian? From Harbison&Steele. */ |
12892 | union | |
12893 | { | |
12894 | long int l; | |
12895 | char c[sizeof (long int)]; | |
12896 | } u; | |
12897 | u.l = 1; | |
12898 | return u.c[sizeof (long int) - 1] == 1; | |
12899 | ||
12900 | ; | |
12901 | return 0; | |
12902 | } | |
07697489 | 12903 | _ACEOF |
05ea2a05 TT |
12904 | if ac_fn_c_try_run "$LINENO"; then : |
12905 | ac_cv_c_bigendian=no | |
07697489 | 12906 | else |
05ea2a05 TT |
12907 | ac_cv_c_bigendian=yes |
12908 | fi | |
12909 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12910 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
07697489 PA |
12911 | fi |
12912 | ||
05ea2a05 | 12913 | fi |
07697489 | 12914 | fi |
05ea2a05 TT |
12915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
12916 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12917 | case $ac_cv_c_bigendian in #( | |
12918 | yes) | |
12919 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12920 | ;; #( | |
12921 | no) | |
12922 | ;; #( | |
12923 | universal) | |
07697489 | 12924 | |
05ea2a05 | 12925 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
07697489 | 12926 | |
05ea2a05 TT |
12927 | ;; #( |
12928 | *) | |
12929 | as_fn_error $? "unknown endianness | |
12930 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12931 | esac | |
07697489 PA |
12932 | |
12933 | ||
05ea2a05 TT |
12934 | # ------------------------------ # |
12935 | # Checks for library functions. # | |
12936 | # ------------------------------ # | |
81ecdfbb | 12937 | |
05ea2a05 | 12938 | for ac_func in getuid getgid \ |
8ae8e197 | 12939 | pipe pread pread64 pwrite resize_term \ |
05ea2a05 TT |
12940 | getpgid setsid \ |
12941 | sigaction sigsetmask socketpair \ | |
12942 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ | |
12943 | setrlimit getrlimit posix_madvise waitpid \ | |
12944 | use_default_colors | |
12945 | do : | |
12946 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12947 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12948 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
12949 | cat >>confdefs.h <<_ACEOF | |
12950 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
a9322a30 | 12951 | _ACEOF |
5ee754fc | 12952 | |
05ea2a05 TT |
12953 | fi |
12954 | done | |
5ee754fc | 12955 | |
05ea2a05 TT |
12956 | |
12957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
12958 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12959 | if ${am_cv_langinfo_codeset+:} false; then : | |
81ecdfbb | 12960 | $as_echo_n "(cached) " >&6 |
bec39cab | 12961 | else |
81ecdfbb | 12962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12963 | /* end confdefs.h. */ |
05ea2a05 | 12964 | #include <langinfo.h> |
a9322a30 TT |
12965 | int |
12966 | main () | |
12967 | { | |
05ea2a05 | 12968 | char* cs = nl_langinfo(CODESET); |
a9322a30 TT |
12969 | ; |
12970 | return 0; | |
12971 | } | |
bec39cab | 12972 | _ACEOF |
81ecdfbb | 12973 | if ac_fn_c_try_link "$LINENO"; then : |
05ea2a05 | 12974 | am_cv_langinfo_codeset=yes |
bec39cab | 12975 | else |
05ea2a05 | 12976 | am_cv_langinfo_codeset=no |
81ecdfbb RW |
12977 | fi |
12978 | rm -f core conftest.err conftest.$ac_objext \ | |
12979 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 12980 | |
81ecdfbb | 12981 | fi |
05ea2a05 TT |
12982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12983 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
12984 | if test $am_cv_langinfo_codeset = yes; then | |
bec39cab | 12985 | |
05ea2a05 | 12986 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
81ecdfbb RW |
12987 | |
12988 | fi | |
12989 | ||
05ea2a05 TT |
12990 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
12991 | if test "x$ac_cv_type_size_t" = xyes; then : | |
81ecdfbb | 12992 | |
05ea2a05 | 12993 | else |
81ecdfbb RW |
12994 | |
12995 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12996 | #define size_t unsigned int |
7eb368b3 | 12997 | _ACEOF |
7eb368b3 | 12998 | |
7eb368b3 | 12999 | fi |
7eb368b3 | 13000 | |
7eb368b3 | 13001 | |
a9322a30 | 13002 | |
7eb368b3 | 13003 | |
05ea2a05 TT |
13004 | for ac_header in $ac_header_list |
13005 | do : | |
13006 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13007 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
13008 | " | |
13009 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
13010 | cat >>confdefs.h <<_ACEOF | |
13011 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
13012 | _ACEOF | |
7eb368b3 | 13013 | |
05ea2a05 | 13014 | fi |
7eb368b3 | 13015 | |
05ea2a05 | 13016 | done |
a9322a30 | 13017 | |
05ea2a05 TT |
13018 | |
13019 | ||
13020 | ||
13021 | ||
13022 | ||
13023 | ||
13024 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
13025 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
13026 | ||
13027 | else | |
bec39cab | 13028 | |
a9322a30 | 13029 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 13030 | #define pid_t int |
a9322a30 TT |
13031 | _ACEOF |
13032 | ||
05ea2a05 TT |
13033 | fi |
13034 | ||
13035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
13036 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
13037 | if ${ac_cv_path_SED+:} false; then : | |
13038 | $as_echo_n "(cached) " >&6 | |
13039 | else | |
13040 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
13041 | for ac_i in 1 2 3 4 5 6 7; do | |
13042 | ac_script="$ac_script$as_nl$ac_script" | |
13043 | done | |
13044 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
13045 | { ac_script=; unset ac_script;} | |
13046 | if test -z "$SED"; then | |
13047 | ac_path_SED_found=false | |
13048 | # Loop through the user's path and test for each of PROGNAME-LIST | |
13049 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13050 | for as_dir in $PATH | |
13051 | do | |
13052 | IFS=$as_save_IFS | |
13053 | test -z "$as_dir" && as_dir=. | |
13054 | for ac_prog in sed gsed; do | |
13055 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13056 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
13057 | as_fn_executable_p "$ac_path_SED" || continue | |
13058 | # Check for GNU ac_path_SED and select it if it is found. | |
13059 | # Check for GNU $ac_path_SED | |
13060 | case `"$ac_path_SED" --version 2>&1` in | |
13061 | *GNU*) | |
13062 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
13063 | *) | |
13064 | ac_count=0 | |
13065 | $as_echo_n 0123456789 >"conftest.in" | |
13066 | while : | |
13067 | do | |
13068 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
13069 | mv "conftest.tmp" "conftest.in" | |
13070 | cp "conftest.in" "conftest.nl" | |
13071 | $as_echo '' >> "conftest.nl" | |
13072 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
13073 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
13074 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
13075 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
13076 | # Best one so far, save it but keep looking for a better one | |
13077 | ac_cv_path_SED="$ac_path_SED" | |
13078 | ac_path_SED_max=$ac_count | |
13079 | fi | |
13080 | # 10*(2^10) chars as input seems more than enough | |
13081 | test $ac_count -gt 10 && break | |
13082 | done | |
13083 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
13084 | esac | |
a9322a30 | 13085 | |
05ea2a05 TT |
13086 | $ac_path_SED_found && break 3 |
13087 | done | |
13088 | done | |
13089 | done | |
13090 | IFS=$as_save_IFS | |
13091 | if test -z "$ac_cv_path_SED"; then | |
13092 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
13093 | fi | |
13094 | else | |
13095 | ac_cv_path_SED=$SED | |
a9322a30 TT |
13096 | fi |
13097 | ||
05ea2a05 TT |
13098 | fi |
13099 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
13100 | $as_echo "$ac_cv_path_SED" >&6; } | |
13101 | SED="$ac_cv_path_SED" | |
13102 | rm -f conftest.sed | |
a9322a30 | 13103 | |
a9322a30 | 13104 | |
db6878ac SM |
13105 | # Set the 'development' global. |
13106 | . $srcdir/../bfd/development.sh | |
13107 | ||
05ea2a05 TT |
13108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
13109 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
13110 | if ${ac_cv_header_stdc+:} false; then : | |
81ecdfbb | 13111 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13112 | else |
81ecdfbb | 13113 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13114 | /* end confdefs.h. */ |
05ea2a05 TT |
13115 | #include <stdlib.h> |
13116 | #include <stdarg.h> | |
13117 | #include <string.h> | |
13118 | #include <float.h> | |
a9322a30 TT |
13119 | |
13120 | int | |
13121 | main () | |
13122 | { | |
d0ac1c44 | 13123 | |
a9322a30 TT |
13124 | ; |
13125 | return 0; | |
13126 | } | |
bec39cab | 13127 | _ACEOF |
81ecdfbb | 13128 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 13129 | ac_cv_header_stdc=yes |
5ee754fc | 13130 | else |
05ea2a05 | 13131 | ac_cv_header_stdc=no |
5ee754fc | 13132 | fi |
81ecdfbb | 13133 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 13134 | |
05ea2a05 TT |
13135 | if test $ac_cv_header_stdc = yes; then |
13136 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
13137 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13138 | /* end confdefs.h. */ | |
13139 | #include <string.h> | |
bec39cab | 13140 | |
05ea2a05 TT |
13141 | _ACEOF |
13142 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13143 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 13144 | |
bec39cab | 13145 | else |
05ea2a05 TT |
13146 | ac_cv_header_stdc=no |
13147 | fi | |
13148 | rm -f conftest* | |
13149 | ||
13150 | fi | |
13151 | ||
13152 | if test $ac_cv_header_stdc = yes; then | |
13153 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 13154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13155 | /* end confdefs.h. */ |
05ea2a05 | 13156 | #include <stdlib.h> |
a9322a30 | 13157 | |
bec39cab | 13158 | _ACEOF |
05ea2a05 TT |
13159 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13160 | $EGREP "free" >/dev/null 2>&1; then : | |
bec39cab | 13161 | |
05ea2a05 TT |
13162 | else |
13163 | ac_cv_header_stdc=no | |
5ee754fc | 13164 | fi |
05ea2a05 | 13165 | rm -f conftest* |
5ee754fc | 13166 | |
05ea2a05 | 13167 | fi |
bec39cab | 13168 | |
05ea2a05 TT |
13169 | if test $ac_cv_header_stdc = yes; then |
13170 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
13171 | if test "$cross_compiling" = yes; then : | |
13172 | : | |
bec39cab | 13173 | else |
05ea2a05 | 13174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
81ecdfbb | 13175 | /* end confdefs.h. */ |
05ea2a05 TT |
13176 | #include <ctype.h> |
13177 | #include <stdlib.h> | |
13178 | #if ((' ' & 0x0FF) == 0x020) | |
13179 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
13180 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
13181 | #else | |
13182 | # define ISLOWER(c) \ | |
13183 | (('a' <= (c) && (c) <= 'i') \ | |
13184 | || ('j' <= (c) && (c) <= 'r') \ | |
13185 | || ('s' <= (c) && (c) <= 'z')) | |
13186 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
13187 | #endif | |
a9322a30 | 13188 | |
05ea2a05 | 13189 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
a9322a30 TT |
13190 | int |
13191 | main () | |
13192 | { | |
05ea2a05 TT |
13193 | int i; |
13194 | for (i = 0; i < 256; i++) | |
13195 | if (XOR (islower (i), ISLOWER (i)) | |
13196 | || toupper (i) != TOUPPER (i)) | |
13197 | return 2; | |
a9322a30 TT |
13198 | return 0; |
13199 | } | |
bec39cab | 13200 | _ACEOF |
05ea2a05 | 13201 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13202 | |
5ee754fc | 13203 | else |
05ea2a05 | 13204 | ac_cv_header_stdc=no |
5ee754fc | 13205 | fi |
05ea2a05 TT |
13206 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13207 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
81ecdfbb | 13208 | fi |
bec39cab | 13209 | |
05ea2a05 TT |
13210 | fi |
13211 | fi | |
13212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
13213 | $as_echo "$ac_cv_header_stdc" >&6; } | |
13214 | if test $ac_cv_header_stdc = yes; then | |
81ecdfbb | 13215 | |
05ea2a05 TT |
13216 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
13217 | ||
13218 | fi | |
81ecdfbb | 13219 | |
05ea2a05 TT |
13220 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
13221 | # for constant arguments. Useless! | |
13222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
13223 | $as_echo_n "checking for working alloca.h... " >&6; } | |
13224 | if ${ac_cv_working_alloca_h+:} false; then : | |
13225 | $as_echo_n "(cached) " >&6 | |
13226 | else | |
13227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13228 | /* end confdefs.h. */ | |
13229 | #include <alloca.h> | |
7eb368b3 NR |
13230 | int |
13231 | main () | |
13232 | { | |
05ea2a05 TT |
13233 | char *p = (char *) alloca (2 * sizeof (int)); |
13234 | if (p) return 0; | |
7eb368b3 NR |
13235 | ; |
13236 | return 0; | |
13237 | } | |
13238 | _ACEOF | |
05ea2a05 TT |
13239 | if ac_fn_c_try_link "$LINENO"; then : |
13240 | ac_cv_working_alloca_h=yes | |
81ecdfbb | 13241 | else |
05ea2a05 | 13242 | ac_cv_working_alloca_h=no |
a9322a30 | 13243 | fi |
05ea2a05 TT |
13244 | rm -f core conftest.err conftest.$ac_objext \ |
13245 | conftest$ac_exeext conftest.$ac_ext | |
a9322a30 | 13246 | fi |
05ea2a05 TT |
13247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
13248 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
13249 | if test $ac_cv_working_alloca_h = yes; then | |
13250 | ||
13251 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
7eb368b3 | 13252 | |
7eb368b3 | 13253 | fi |
05ea2a05 TT |
13254 | |
13255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
13256 | $as_echo_n "checking for alloca... " >&6; } | |
13257 | if ${ac_cv_func_alloca_works+:} false; then : | |
13258 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13259 | else |
81ecdfbb | 13260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13261 | /* end confdefs.h. */ |
05ea2a05 TT |
13262 | #ifdef __GNUC__ |
13263 | # define alloca __builtin_alloca | |
13264 | #else | |
13265 | # ifdef _MSC_VER | |
13266 | # include <malloc.h> | |
13267 | # define alloca _alloca | |
13268 | # else | |
13269 | # ifdef HAVE_ALLOCA_H | |
13270 | # include <alloca.h> | |
13271 | # else | |
13272 | # ifdef _AIX | |
13273 | #pragma alloca | |
13274 | # else | |
13275 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
13276 | void *alloca (size_t); | |
13277 | # endif | |
13278 | # endif | |
13279 | # endif | |
13280 | # endif | |
13281 | #endif | |
13282 | ||
d3ea6809 MM |
13283 | int |
13284 | main () | |
13285 | { | |
05ea2a05 TT |
13286 | char *p = (char *) alloca (1); |
13287 | if (p) return 0; | |
81ecdfbb RW |
13288 | ; |
13289 | return 0; | |
d3ea6809 MM |
13290 | } |
13291 | _ACEOF | |
05ea2a05 TT |
13292 | if ac_fn_c_try_link "$LINENO"; then : |
13293 | ac_cv_func_alloca_works=yes | |
d3ea6809 | 13294 | else |
05ea2a05 | 13295 | ac_cv_func_alloca_works=no |
a9322a30 | 13296 | fi |
05ea2a05 TT |
13297 | rm -f core conftest.err conftest.$ac_objext \ |
13298 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 13299 | fi |
05ea2a05 TT |
13300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
13301 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
81ecdfbb | 13302 | |
05ea2a05 | 13303 | if test $ac_cv_func_alloca_works = yes; then |
d3ea6809 | 13304 | |
05ea2a05 | 13305 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
d3ea6809 | 13306 | |
05ea2a05 TT |
13307 | else |
13308 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13309 | # that cause trouble. Some versions do not even contain alloca or | |
13310 | # contain a buggy version. If you still want to use their alloca, | |
13311 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
d3ea6809 | 13312 | |
05ea2a05 | 13313 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
d0ac1c44 | 13314 | |
05ea2a05 | 13315 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
d0ac1c44 SM |
13316 | |
13317 | ||
05ea2a05 TT |
13318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
13319 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
13320 | if ${ac_cv_os_cray+:} false; then : | |
13321 | $as_echo_n "(cached) " >&6 | |
13322 | else | |
13323 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13324 | /* end confdefs.h. */ | |
13325 | #if defined CRAY && ! defined CRAY2 | |
13326 | webecray | |
13327 | #else | |
13328 | wenotbecray | |
13329 | #endif | |
13330 | ||
13331 | _ACEOF | |
13332 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13333 | $EGREP "webecray" >/dev/null 2>&1; then : | |
13334 | ac_cv_os_cray=yes | |
13335 | else | |
13336 | ac_cv_os_cray=no | |
13337 | fi | |
13338 | rm -f conftest* | |
13339 | ||
13340 | fi | |
13341 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
13342 | $as_echo "$ac_cv_os_cray" >&6; } | |
13343 | if test $ac_cv_os_cray = yes; then | |
13344 | for ac_func in _getb67 GETB67 getb67; do | |
13345 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13346 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13347 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
13348 | ||
13349 | cat >>confdefs.h <<_ACEOF | |
13350 | #define CRAY_STACKSEG_END $ac_func | |
13351 | _ACEOF | |
13352 | ||
13353 | break | |
13354 | fi | |
13355 | ||
13356 | done | |
13357 | fi | |
13358 | ||
13359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
13360 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
13361 | if ${ac_cv_c_stack_direction+:} false; then : | |
13362 | $as_echo_n "(cached) " >&6 | |
13363 | else | |
13364 | if test "$cross_compiling" = yes; then : | |
13365 | ac_cv_c_stack_direction=0 | |
13366 | else | |
13367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13368 | /* end confdefs.h. */ | |
13369 | $ac_includes_default | |
13370 | int | |
13371 | find_stack_direction (int *addr, int depth) | |
13372 | { | |
13373 | int dir, dummy = 0; | |
13374 | if (! addr) | |
13375 | addr = &dummy; | |
13376 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
13377 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
13378 | return dir + dummy; | |
13379 | } | |
13380 | ||
13381 | int | |
13382 | main (int argc, char **argv) | |
13383 | { | |
13384 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
13385 | } | |
13386 | _ACEOF | |
13387 | if ac_fn_c_try_run "$LINENO"; then : | |
13388 | ac_cv_c_stack_direction=1 | |
13389 | else | |
13390 | ac_cv_c_stack_direction=-1 | |
13391 | fi | |
13392 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13393 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13394 | fi | |
13395 | ||
13396 | fi | |
13397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13398 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
13399 | cat >>confdefs.h <<_ACEOF | |
13400 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13401 | _ACEOF | |
13402 | ||
13403 | ||
13404 | fi | |
13405 | ||
13406 | ||
13407 | WIN32APILIBS= | |
13408 | case ${host} in | |
13409 | *mingw32*) | |
13410 | ||
13411 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
13412 | ||
13413 | WIN32APILIBS="-lws2_32" | |
13414 | ;; | |
13415 | esac | |
13416 | ||
13417 | ||
13418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13419 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13420 | if ${am_cv_langinfo_codeset+:} false; then : | |
13421 | $as_echo_n "(cached) " >&6 | |
13422 | else | |
13423 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13424 | /* end confdefs.h. */ | |
13425 | #include <langinfo.h> | |
13426 | int | |
13427 | main () | |
13428 | { | |
13429 | char* cs = nl_langinfo(CODESET); | |
13430 | ; | |
13431 | return 0; | |
13432 | } | |
13433 | _ACEOF | |
13434 | if ac_fn_c_try_link "$LINENO"; then : | |
13435 | am_cv_langinfo_codeset=yes | |
13436 | else | |
13437 | am_cv_langinfo_codeset=no | |
13438 | fi | |
13439 | rm -f core conftest.err conftest.$ac_objext \ | |
13440 | conftest$ac_exeext conftest.$ac_ext | |
13441 | ||
13442 | fi | |
13443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
13444 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13445 | if test $am_cv_langinfo_codeset = yes; then | |
13446 | ||
13447 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
13448 | ||
13449 | fi | |
13450 | ||
13451 | ||
c8693053 | 13452 | 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 |
13453 | do : |
13454 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
05ea2a05 | 13455 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
d0ac1c44 | 13456 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
bec39cab | 13457 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13458 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 13459 | _ACEOF |
b757528f | 13460 | |
b757528f | 13461 | fi |
bec39cab | 13462 | |
a9322a30 | 13463 | done |
a3828db0 | 13464 | |
d0ac1c44 SM |
13465 | |
13466 | ||
a9322a30 | 13467 | for ac_func in getpagesize |
81ecdfbb RW |
13468 | do : |
13469 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d0ac1c44 | 13470 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
bec39cab | 13471 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13472 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 13473 | _ACEOF |
bcb3dc3d | 13474 | |
bcb3dc3d MK |
13475 | fi |
13476 | done | |
13477 | ||
81ecdfbb RW |
13478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
13479 | $as_echo_n "checking for working mmap... " >&6; } | |
d0ac1c44 | 13480 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
81ecdfbb | 13481 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13482 | else |
81ecdfbb | 13483 | if test "$cross_compiling" = yes; then : |
a9322a30 | 13484 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 13485 | else |
81ecdfbb | 13486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13487 | /* end confdefs.h. */ |
a9322a30 TT |
13488 | $ac_includes_default |
13489 | /* malloc might have been renamed as rpl_malloc. */ | |
13490 | #undef malloc | |
bec39cab | 13491 | |
a9322a30 TT |
13492 | /* Thanks to Mike Haertel and Jim Avera for this test. |
13493 | Here is a matrix of mmap possibilities: | |
13494 | mmap private not fixed | |
13495 | mmap private fixed at somewhere currently unmapped | |
13496 | mmap private fixed at somewhere already mapped | |
13497 | mmap shared not fixed | |
13498 | mmap shared fixed at somewhere currently unmapped | |
13499 | mmap shared fixed at somewhere already mapped | |
13500 | For private mappings, we should verify that changes cannot be read() | |
13501 | back from the file, nor mmap's back from the file at a different | |
13502 | address. (There have been systems where private was not correctly | |
13503 | implemented like the infamous i386 svr4.0, and systems where the | |
13504 | VM page cache was not coherent with the file system buffer cache | |
13505 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
13506 | For shared mappings, we should conversely verify that changes get | |
13507 | propagated back to all the places they're supposed to be. | |
bec39cab | 13508 | |
a9322a30 TT |
13509 | Grep wants private fixed already mapped. |
13510 | The main things grep needs to know about mmap are: | |
13511 | * does it exist and is it safe to write into the mmap'd area | |
13512 | * how to use it (BSD variants) */ | |
8b9cf735 | 13513 | |
a9322a30 TT |
13514 | #include <fcntl.h> |
13515 | #include <sys/mman.h> | |
8b9cf735 | 13516 | |
81ecdfbb | 13517 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 13518 | char *malloc (); |
a3828db0 MK |
13519 | #endif |
13520 | ||
a9322a30 | 13521 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 13522 | #ifndef HAVE_GETPAGESIZE |
a9322a30 TT |
13523 | # ifdef _SC_PAGESIZE |
13524 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
13525 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 13526 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
13527 | # include <sys/param.h> |
13528 | # ifdef EXEC_PAGESIZE | |
13529 | # define getpagesize() EXEC_PAGESIZE | |
13530 | # else /* no EXEC_PAGESIZE */ | |
13531 | # ifdef NBPG | |
13532 | # define getpagesize() NBPG * CLSIZE | |
13533 | # ifndef CLSIZE | |
13534 | # define CLSIZE 1 | |
13535 | # endif /* no CLSIZE */ | |
13536 | # else /* no NBPG */ | |
13537 | # ifdef NBPC | |
13538 | # define getpagesize() NBPC | |
13539 | # else /* no NBPC */ | |
13540 | # ifdef PAGESIZE | |
13541 | # define getpagesize() PAGESIZE | |
13542 | # endif /* PAGESIZE */ | |
13543 | # endif /* no NBPC */ | |
13544 | # endif /* no NBPG */ | |
13545 | # endif /* no EXEC_PAGESIZE */ | |
13546 | # else /* no HAVE_SYS_PARAM_H */ | |
13547 | # define getpagesize() 8192 /* punt totally */ | |
13548 | # endif /* no HAVE_SYS_PARAM_H */ | |
13549 | # endif /* no _SC_PAGESIZE */ | |
13550 | ||
13551 | #endif /* no HAVE_GETPAGESIZE */ | |
13552 | ||
bec39cab AC |
13553 | int |
13554 | main () | |
13555 | { | |
a9322a30 | 13556 | char *data, *data2, *data3; |
d0ac1c44 | 13557 | const char *cdata2; |
a9322a30 | 13558 | int i, pagesize; |
d0ac1c44 | 13559 | int fd, fd2; |
a9322a30 TT |
13560 | |
13561 | pagesize = getpagesize (); | |
13562 | ||
13563 | /* First, make a file with some known garbage in it. */ | |
13564 | data = (char *) malloc (pagesize); | |
13565 | if (!data) | |
81ecdfbb | 13566 | return 1; |
a9322a30 TT |
13567 | for (i = 0; i < pagesize; ++i) |
13568 | *(data + i) = rand (); | |
13569 | umask (0); | |
13570 | fd = creat ("conftest.mmap", 0600); | |
13571 | if (fd < 0) | |
d0ac1c44 | 13572 | return 2; |
a9322a30 | 13573 | if (write (fd, data, pagesize) != pagesize) |
d0ac1c44 | 13574 | return 3; |
a9322a30 TT |
13575 | close (fd); |
13576 | ||
d0ac1c44 SM |
13577 | /* Next, check that the tail of a page is zero-filled. File must have |
13578 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
13579 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
13580 | if (fd2 < 0) | |
13581 | return 4; | |
13582 | cdata2 = ""; | |
13583 | if (write (fd2, cdata2, 1) != 1) | |
13584 | return 5; | |
13585 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
13586 | if (data2 == MAP_FAILED) | |
13587 | return 6; | |
13588 | for (i = 0; i < pagesize; ++i) | |
13589 | if (*(data2 + i)) | |
13590 | return 7; | |
13591 | close (fd2); | |
13592 | if (munmap (data2, pagesize)) | |
13593 | return 8; | |
13594 | ||
a9322a30 TT |
13595 | /* Next, try to mmap the file at a fixed address which already has |
13596 | something else allocated at it. If we can, also make sure that | |
13597 | we see the same garbage. */ | |
13598 | fd = open ("conftest.mmap", O_RDWR); | |
13599 | if (fd < 0) | |
d0ac1c44 | 13600 | return 9; |
a9322a30 TT |
13601 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
13602 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
d0ac1c44 | 13603 | return 10; |
a9322a30 TT |
13604 | for (i = 0; i < pagesize; ++i) |
13605 | if (*(data + i) != *(data2 + i)) | |
d0ac1c44 | 13606 | return 11; |
a9322a30 TT |
13607 | |
13608 | /* Finally, make sure that changes to the mapped area do not | |
13609 | percolate back to the file as seen by read(). (This is a bug on | |
13610 | some variants of i386 svr4.0.) */ | |
13611 | for (i = 0; i < pagesize; ++i) | |
13612 | *(data2 + i) = *(data2 + i) + 1; | |
13613 | data3 = (char *) malloc (pagesize); | |
13614 | if (!data3) | |
d0ac1c44 | 13615 | return 12; |
a9322a30 | 13616 | if (read (fd, data3, pagesize) != pagesize) |
d0ac1c44 | 13617 | return 13; |
a9322a30 TT |
13618 | for (i = 0; i < pagesize; ++i) |
13619 | if (*(data + i) != *(data3 + i)) | |
d0ac1c44 | 13620 | return 14; |
a9322a30 | 13621 | close (fd); |
81ecdfbb | 13622 | return 0; |
bec39cab AC |
13623 | } |
13624 | _ACEOF | |
81ecdfbb | 13625 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13626 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 13627 | else |
81ecdfbb | 13628 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 13629 | fi |
81ecdfbb RW |
13630 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13631 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 13632 | fi |
81ecdfbb | 13633 | |
a9322a30 | 13634 | fi |
81ecdfbb RW |
13635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
13636 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
13637 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
13638 | ||
81ecdfbb | 13639 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 13640 | |
086ec9eb | 13641 | fi |
d0ac1c44 | 13642 | rm -f conftest.mmap conftest.txt |
a3828db0 | 13643 | |
05ea2a05 | 13644 | for ac_header in vfork.h |
81ecdfbb RW |
13645 | do : |
13646 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 13647 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
a3828db0 | 13648 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13649 | #define HAVE_VFORK_H 1 |
bec39cab | 13650 | _ACEOF |
c906108c SS |
13651 | |
13652 | fi | |
a9322a30 | 13653 | |
a3828db0 | 13654 | done |
c906108c | 13655 | |
a9322a30 | 13656 | for ac_func in fork vfork |
81ecdfbb RW |
13657 | do : |
13658 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13659 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13660 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
a3828db0 | 13661 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13662 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 13663 | _ACEOF |
b83266a0 | 13664 | |
97bf5e38 | 13665 | fi |
a3828db0 | 13666 | done |
b83266a0 | 13667 | |
a9322a30 | 13668 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
13669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
13670 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 13671 | if ${ac_cv_func_fork_works+:} false; then : |
81ecdfbb | 13672 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13673 | else |
81ecdfbb | 13674 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13675 | ac_cv_func_fork_works=cross |
13676 | else | |
81ecdfbb RW |
13677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13678 | /* end confdefs.h. */ | |
13679 | $ac_includes_default | |
13680 | int | |
13681 | main () | |
13682 | { | |
13683 | ||
13684 | /* By Ruediger Kuhlmann. */ | |
13685 | return fork () < 0; | |
13686 | ||
13687 | ; | |
13688 | return 0; | |
13689 | } | |
a9322a30 | 13690 | _ACEOF |
81ecdfbb | 13691 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13692 | ac_cv_func_fork_works=yes |
13693 | else | |
81ecdfbb | 13694 | ac_cv_func_fork_works=no |
a9322a30 | 13695 | fi |
81ecdfbb RW |
13696 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13697 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13698 | fi |
81ecdfbb | 13699 | |
a9322a30 | 13700 | fi |
81ecdfbb RW |
13701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
13702 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
13703 | |
13704 | else | |
13705 | ac_cv_func_fork_works=$ac_cv_func_fork | |
13706 | fi | |
13707 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13708 | case $host in | |
13709 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13710 | # Override, as these systems have only a dummy fork() stub | |
13711 | ac_cv_func_fork_works=no | |
13712 | ;; | |
13713 | *) | |
13714 | ac_cv_func_fork_works=yes | |
13715 | ;; | |
13716 | esac | |
81ecdfbb RW |
13717 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
13718 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13719 | fi |
13720 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
13721 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
13722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
13723 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 13724 | if ${ac_cv_func_vfork_works+:} false; then : |
81ecdfbb | 13725 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13726 | else |
81ecdfbb | 13727 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13728 | ac_cv_func_vfork_works=cross |
13729 | else | |
81ecdfbb | 13730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
13731 | /* end confdefs.h. */ |
13732 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 13733 | $ac_includes_default |
a9322a30 | 13734 | #include <sys/wait.h> |
81ecdfbb | 13735 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
13736 | # include <vfork.h> |
13737 | #endif | |
13738 | /* On some sparc systems, changes by the child to local and incoming | |
13739 | argument registers are propagated back to the parent. The compiler | |
13740 | is told about this with #include <vfork.h>, but some compilers | |
13741 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13742 | static variable whose address is put into a register that is | |
13743 | clobbered by the vfork. */ | |
13744 | static void | |
13745 | #ifdef __cplusplus | |
13746 | sparc_address_test (int arg) | |
13747 | # else | |
13748 | sparc_address_test (arg) int arg; | |
13749 | #endif | |
13750 | { | |
13751 | static pid_t child; | |
13752 | if (!child) { | |
13753 | child = vfork (); | |
13754 | if (child < 0) { | |
13755 | perror ("vfork"); | |
13756 | _exit(2); | |
13757 | } | |
13758 | if (!child) { | |
13759 | arg = getpid(); | |
13760 | write(-1, "", 0); | |
13761 | _exit (arg); | |
13762 | } | |
13763 | } | |
13764 | } | |
13765 | ||
13766 | int | |
13767 | main () | |
13768 | { | |
13769 | pid_t parent = getpid (); | |
13770 | pid_t child; | |
13771 | ||
13772 | sparc_address_test (0); | |
13773 | ||
13774 | child = vfork (); | |
13775 | ||
13776 | if (child == 0) { | |
13777 | /* Here is another test for sparc vfork register problems. This | |
13778 | test uses lots of local variables, at least as many local | |
13779 | variables as main has allocated so far including compiler | |
13780 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13781 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13782 | reuse the register of parent for one of the local variables, | |
13783 | since it will think that parent can't possibly be used any more | |
13784 | in this routine. Assigning to the local variable will thus | |
13785 | munge parent in the parent process. */ | |
13786 | pid_t | |
13787 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13788 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13789 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13790 | use the same hardware register for all 8 local variables. */ | |
13791 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13792 | || p != p5 || p != p6 || p != p7) | |
13793 | _exit(1); | |
13794 | ||
13795 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
13796 | from child file descriptors. If the child closes a descriptor | |
13797 | before it execs or exits, this munges the parent's descriptor | |
13798 | as well. Test for this by closing stdout in the child. */ | |
13799 | _exit(close(fileno(stdout)) != 0); | |
13800 | } else { | |
13801 | int status; | |
13802 | struct stat st; | |
13803 | ||
13804 | while (wait(&status) != child) | |
13805 | ; | |
81ecdfbb | 13806 | return ( |
a9322a30 TT |
13807 | /* Was there some problem with vforking? */ |
13808 | child < 0 | |
13809 | ||
13810 | /* Did the child fail? (This shouldn't happen.) */ | |
13811 | || status | |
13812 | ||
13813 | /* Did the vfork/compiler bug occur? */ | |
13814 | || parent != getpid() | |
13815 | ||
13816 | /* Did the file descriptor bug occur? */ | |
13817 | || fstat(fileno(stdout), &st) != 0 | |
13818 | ); | |
13819 | } | |
13820 | } | |
13821 | _ACEOF | |
81ecdfbb | 13822 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13823 | ac_cv_func_vfork_works=yes |
13824 | else | |
81ecdfbb | 13825 | ac_cv_func_vfork_works=no |
a9322a30 | 13826 | fi |
81ecdfbb RW |
13827 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13828 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13829 | fi |
81ecdfbb | 13830 | |
a9322a30 | 13831 | fi |
81ecdfbb RW |
13832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
13833 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
13834 | |
13835 | fi; | |
13836 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13837 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
13838 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
13839 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13840 | fi |
13841 | ||
13842 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
13843 | ||
81ecdfbb | 13844 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
13845 | |
13846 | else | |
13847 | ||
81ecdfbb | 13848 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
13849 | |
13850 | fi | |
13851 | if test "x$ac_cv_func_fork_works" = xyes; then | |
13852 | ||
81ecdfbb | 13853 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
13854 | |
13855 | fi | |
13856 | ||
8ae8e197 | 13857 | for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \ |
05ea2a05 TT |
13858 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
13859 | setpgid setpgrp getrusage getauxval | |
81ecdfbb RW |
13860 | do : |
13861 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13862 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13863 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
6c7a06a3 | 13864 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13865 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
13866 | _ACEOF |
13867 | ||
13868 | fi | |
13869 | done | |
13870 | ||
13871 | ||
05ea2a05 TT |
13872 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
13873 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
13874 | ac_have_decl=1 | |
d0ac1c44 | 13875 | else |
05ea2a05 TT |
13876 | ac_have_decl=0 |
13877 | fi | |
d0ac1c44 SM |
13878 | |
13879 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 TT |
13880 | #define HAVE_DECL_STRSTR $ac_have_decl |
13881 | _ACEOF | |
13882 | ||
13883 | ||
13884 | # ----------------------- # | |
13885 | # Checks for structures. # | |
13886 | # ----------------------- # | |
13887 | ||
13888 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
13889 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
13890 | ||
13891 | cat >>confdefs.h <<_ACEOF | |
13892 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
d0ac1c44 SM |
13893 | _ACEOF |
13894 | ||
05ea2a05 | 13895 | |
d0ac1c44 | 13896 | fi |
05ea2a05 TT |
13897 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
13898 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
d0ac1c44 | 13899 | |
05ea2a05 TT |
13900 | cat >>confdefs.h <<_ACEOF |
13901 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
13902 | _ACEOF | |
13903 | ||
13904 | ||
13905 | fi | |
13906 | ||
13907 | ||
e911c666 JB |
13908 | # On FreeBSD we need libutil for the kinfo_get* functions. On |
13909 | # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. | |
13910 | # Figure out which one to use. | |
05ea2a05 TT |
13911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 |
13912 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
13913 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
5e030278 TT |
13914 | $as_echo_n "(cached) " >&6 |
13915 | else | |
05ea2a05 TT |
13916 | ac_func_search_save_LIBS=$LIBS |
13917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13918 | /* end confdefs.h. */ |
3266f10b | 13919 | |
05ea2a05 TT |
13920 | /* Override any GCC internal prototype to avoid an error. |
13921 | Use char because int might match the return type of a GCC | |
13922 | builtin and then its argument prototype would still apply. */ | |
13923 | #ifdef __cplusplus | |
13924 | extern "C" | |
13925 | #endif | |
13926 | char kinfo_getfile (); | |
3266f10b TT |
13927 | int |
13928 | main () | |
13929 | { | |
05ea2a05 | 13930 | return kinfo_getfile (); |
3266f10b TT |
13931 | ; |
13932 | return 0; | |
13933 | } | |
13934 | _ACEOF | |
05ea2a05 TT |
13935 | for ac_lib in '' util util-freebsd; do |
13936 | if test -z "$ac_lib"; then | |
13937 | ac_res="none required" | |
13938 | else | |
13939 | ac_res=-l$ac_lib | |
13940 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13941 | fi | |
13942 | if ac_fn_c_try_link "$LINENO"; then : | |
13943 | ac_cv_search_kinfo_getfile=$ac_res | |
3266f10b | 13944 | fi |
05ea2a05 TT |
13945 | rm -f core conftest.err conftest.$ac_objext \ |
13946 | conftest$ac_exeext | |
13947 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
13948 | break | |
13949 | fi | |
13950 | done | |
13951 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
3266f10b TT |
13952 | |
13953 | else | |
05ea2a05 | 13954 | ac_cv_search_kinfo_getfile=no |
3266f10b | 13955 | fi |
05ea2a05 TT |
13956 | rm conftest.$ac_ext |
13957 | LIBS=$ac_func_search_save_LIBS | |
13958 | fi | |
13959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
13960 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
13961 | ac_res=$ac_cv_search_kinfo_getfile | |
13962 | if test "$ac_res" != no; then : | |
13963 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13964 | ||
e911c666 JB |
13965 | fi |
13966 | ||
13967 | ||
13968 | # Define HAVE_KINFO_GETFILE if kinfo_getfile is available. | |
13969 | for ac_func in kinfo_getfile | |
13970 | do : | |
13971 | ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile" | |
13972 | if test "x$ac_cv_func_kinfo_getfile" = xyes; then : | |
13973 | cat >>confdefs.h <<_ACEOF | |
13974 | #define HAVE_KINFO_GETFILE 1 | |
13975 | _ACEOF | |
3266f10b TT |
13976 | |
13977 | fi | |
e911c666 | 13978 | done |
3266f10b | 13979 | |
3266f10b | 13980 | |
05ea2a05 TT |
13981 | # Check for std::thread. This does not work on some platforms, like |
13982 | # mingw and DJGPP. | |
13983 | ac_ext=cpp | |
13984 | ac_cpp='$CXXCPP $CPPFLAGS' | |
13985 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13986 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13987 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3266f10b | 13988 | |
3266f10b | 13989 | |
3266f10b | 13990 | |
3266f10b | 13991 | |
3266f10b | 13992 | |
05ea2a05 TT |
13993 | ac_ext=c |
13994 | ac_cpp='$CPP $CPPFLAGS' | |
13995 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13996 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13997 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3266f10b | 13998 | |
05ea2a05 | 13999 | ax_pthread_ok=no |
3266f10b | 14000 | |
05ea2a05 TT |
14001 | # We used to check for pthread.h first, but this fails if pthread.h |
14002 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
14003 | # It gets checked for in the link test anyway. | |
3266f10b | 14004 | |
05ea2a05 TT |
14005 | # First of all, check if the user has set any of the PTHREAD_LIBS, |
14006 | # etcetera environment variables, and if threads linking works using | |
14007 | # them: | |
14008 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
14009 | ax_pthread_save_CC="$CC" | |
14010 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14011 | ax_pthread_save_LIBS="$LIBS" | |
14012 | if test "x$PTHREAD_CC" != "x"; then : | |
14013 | CC="$PTHREAD_CC" | |
3266f10b | 14014 | fi |
05ea2a05 TT |
14015 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
14016 | LIBS="$PTHREAD_LIBS $LIBS" | |
14017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
14018 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
14019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14020 | /* end confdefs.h. */ |
05ea2a05 TT |
14021 | |
14022 | /* Override any GCC internal prototype to avoid an error. | |
14023 | Use char because int might match the return type of a GCC | |
14024 | builtin and then its argument prototype would still apply. */ | |
14025 | #ifdef __cplusplus | |
14026 | extern "C" | |
14027 | #endif | |
14028 | char pthread_join (); | |
3266f10b TT |
14029 | int |
14030 | main () | |
14031 | { | |
05ea2a05 | 14032 | return pthread_join (); |
3266f10b TT |
14033 | ; |
14034 | return 0; | |
14035 | } | |
14036 | _ACEOF | |
14037 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 | 14038 | ax_pthread_ok=yes |
3266f10b TT |
14039 | fi |
14040 | rm -f core conftest.err conftest.$ac_objext \ | |
14041 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 TT |
14042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 |
14043 | $as_echo "$ax_pthread_ok" >&6; } | |
14044 | if test "x$ax_pthread_ok" = "xno"; then | |
14045 | PTHREAD_LIBS="" | |
14046 | PTHREAD_CFLAGS="" | |
14047 | fi | |
14048 | CC="$ax_pthread_save_CC" | |
14049 | CFLAGS="$ax_pthread_save_CFLAGS" | |
14050 | LIBS="$ax_pthread_save_LIBS" | |
3266f10b | 14051 | fi |
3266f10b | 14052 | |
05ea2a05 TT |
14053 | # We must check for the threads library under a number of different |
14054 | # names; the ordering is very important because some systems | |
14055 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
14056 | # libraries is broken (non-POSIX). | |
3266f10b | 14057 | |
05ea2a05 TT |
14058 | # Create a list of thread flags to try. Items starting with a "-" are |
14059 | # C compiler flags, and other items are library names, except for "none" | |
14060 | # which indicates that we try without any flags at all, and "pthread-config" | |
14061 | # which is a program returning the flags for the Pth emulation library. | |
3266f10b | 14062 | |
05ea2a05 | 14063 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
3266f10b | 14064 | |
05ea2a05 TT |
14065 | # The ordering *is* (sometimes) important. Some notes on the |
14066 | # individual items follow: | |
3266f10b | 14067 | |
05ea2a05 TT |
14068 | # pthreads: AIX (must check this before -lpthread) |
14069 | # none: in case threads are in libc; should be tried before -Kthread and | |
14070 | # other compiler flags to prevent continual compiler warnings | |
14071 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
14072 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
14073 | # (Note: HP C rejects this with "bad form for `-t' option") | |
14074 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
14075 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
14076 | # doesn't hurt to check since this sometimes defines pthreads and | |
14077 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
14078 | # is present but should not be used directly; and before -mthreads, | |
14079 | # because the compiler interprets this as "-mt" + "-hreads") | |
14080 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
14081 | # pthread: Linux, etcetera | |
14082 | # --thread-safe: KAI C++ | |
14083 | # pthread-config: use pthread-config program (for GNU Pth library) | |
3266f10b | 14084 | |
05ea2a05 | 14085 | case $host_os in |
3266f10b | 14086 | |
05ea2a05 | 14087 | freebsd*) |
3266f10b | 14088 | |
05ea2a05 TT |
14089 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
14090 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
3266f10b | 14091 | |
05ea2a05 TT |
14092 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" |
14093 | ;; | |
3266f10b | 14094 | |
05ea2a05 | 14095 | hpux*) |
3266f10b | 14096 | |
05ea2a05 TT |
14097 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable |
14098 | # multi-threading and also sets -lpthread." | |
14099 | ||
14100 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
14101 | ;; | |
14102 | ||
14103 | openedition*) | |
14104 | ||
14105 | # IBM z/OS requires a feature-test macro to be defined in order to | |
14106 | # enable POSIX threads at all, so give the user a hint if this is | |
14107 | # not set. (We don't define these ourselves, as they can affect | |
14108 | # other portions of the system API in unpredictable ways.) | |
14109 | ||
14110 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14111 | /* end confdefs.h. */ |
05ea2a05 TT |
14112 | |
14113 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
14114 | AX_PTHREAD_ZOS_MISSING | |
14115 | # endif | |
3266f10b TT |
14116 | |
14117 | _ACEOF | |
14118 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
05ea2a05 TT |
14119 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : |
14120 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
14121 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
3266f10b TT |
14122 | fi |
14123 | rm -f conftest* | |
14124 | ||
05ea2a05 | 14125 | ;; |
3266f10b | 14126 | |
05ea2a05 | 14127 | solaris*) |
3266f10b | 14128 | |
05ea2a05 TT |
14129 | # On Solaris (at least, for some versions), libc contains stubbed |
14130 | # (non-functional) versions of the pthreads routines, so link-based | |
14131 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
14132 | # pthread_cleanup_push, or rather a function called by this macro, | |
14133 | # so we could check for that, but who knows whether they'll stub | |
14134 | # that too in a future libc.) So we'll check first for the | |
14135 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
14136 | ||
14137 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
14138 | ;; | |
14139 | esac | |
14140 | ||
14141 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
14142 | ||
14143 | if test "x$GCC" = "xyes"; then : | |
14144 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
3266f10b TT |
14145 | fi |
14146 | ||
05ea2a05 TT |
14147 | # The presence of a feature test macro requesting re-entrant function |
14148 | # definitions is, on some systems, a strong hint that pthreads support is | |
14149 | # correctly enabled | |
14150 | ||
14151 | case $host_os in | |
14152 | darwin* | hpux* | linux* | osf* | solaris*) | |
14153 | ax_pthread_check_macro="_REENTRANT" | |
14154 | ;; | |
14155 | ||
14156 | aix*) | |
14157 | ax_pthread_check_macro="_THREAD_SAFE" | |
14158 | ;; | |
14159 | ||
14160 | *) | |
14161 | ax_pthread_check_macro="--" | |
14162 | ;; | |
14163 | esac | |
14164 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
14165 | ax_pthread_check_cond=0 | |
14166 | else | |
14167 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
3266f10b TT |
14168 | fi |
14169 | ||
05ea2a05 TT |
14170 | # Are we compiling with Clang? |
14171 | ||
14172 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
14173 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
14174 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
3266f10b TT |
14175 | $as_echo_n "(cached) " >&6 |
14176 | else | |
05ea2a05 TT |
14177 | ax_cv_PTHREAD_CLANG=no |
14178 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
14179 | if test "x$GCC" = "xyes"; then | |
14180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14181 | /* end confdefs.h. */ |
05ea2a05 TT |
14182 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ |
14183 | # if defined(__clang__) && defined(__llvm__) | |
14184 | AX_PTHREAD_CC_IS_CLANG | |
14185 | # endif | |
3266f10b | 14186 | |
3266f10b | 14187 | _ACEOF |
05ea2a05 TT |
14188 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
14189 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
14190 | ax_cv_PTHREAD_CLANG=yes | |
3266f10b | 14191 | fi |
05ea2a05 TT |
14192 | rm -f conftest* |
14193 | ||
14194 | fi | |
3266f10b TT |
14195 | |
14196 | fi | |
05ea2a05 TT |
14197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 |
14198 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
14199 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
3266f10b | 14200 | |
05ea2a05 | 14201 | ax_pthread_clang_warning=no |
3266f10b | 14202 | |
05ea2a05 TT |
14203 | # Clang needs special handling, because older versions handle the -pthread |
14204 | # option in a rather... idiosyncratic way | |
3266f10b | 14205 | |
05ea2a05 | 14206 | if test "x$ax_pthread_clang" = "xyes"; then |
3266f10b | 14207 | |
05ea2a05 | 14208 | # Clang takes -pthread; it has never supported any other flag |
b2ceabe8 | 14209 | |
05ea2a05 TT |
14210 | # (Note 1: This will need to be revisited if a system that Clang |
14211 | # supports has POSIX threads in a separate library. This tends not | |
14212 | # to be the way of modern systems, but it's conceivable.) | |
b2ceabe8 | 14213 | |
05ea2a05 TT |
14214 | # (Note 2: On some systems, notably Darwin, -pthread is not needed |
14215 | # to get POSIX threads support; the API is always present and | |
14216 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
14217 | # -pthread does define _REENTRANT, and while the Darwin headers | |
14218 | # ignore this macro, third-party headers might not.) | |
b2ceabe8 | 14219 | |
05ea2a05 TT |
14220 | PTHREAD_CFLAGS="-pthread" |
14221 | PTHREAD_LIBS= | |
3266f10b | 14222 | |
05ea2a05 TT |
14223 | ax_pthread_ok=yes |
14224 | ||
14225 | # However, older versions of Clang make a point of warning the user | |
14226 | # that, in an invocation where only linking and no compilation is | |
14227 | # taking place, the -pthread option has no effect ("argument unused | |
14228 | # during compilation"). They expect -pthread to be passed in only | |
14229 | # when source code is being compiled. | |
14230 | # | |
14231 | # Problem is, this is at odds with the way Automake and most other | |
14232 | # C build frameworks function, which is that the same flags used in | |
14233 | # compilation (CFLAGS) are also used in linking. Many systems | |
14234 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
14235 | # support, and in fact it is often not straightforward to specify a | |
14236 | # flag that is used only in the compilation phase and not in | |
14237 | # linking. Such a scenario is extremely rare in practice. | |
14238 | # | |
14239 | # Even though use of the -pthread flag in linking would only print | |
14240 | # a warning, this can be a nuisance for well-run software projects | |
14241 | # that build with -Werror. So if the active version of Clang has | |
14242 | # this misfeature, we search for an option to squash it. | |
14243 | ||
14244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
14245 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
14246 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
14247 | $as_echo_n "(cached) " >&6 | |
14248 | else | |
14249 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
14250 | # Create an alternate version of $ac_link that compiles and | |
14251 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
14252 | # (.c -> exe), because the warning occurs only in the second | |
14253 | # step | |
14254 | ax_pthread_save_ac_link="$ac_link" | |
14255 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
14256 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
14257 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
14258 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14259 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
14260 | if test "x$ax_pthread_try" = "xunknown"; then : | |
14261 | break | |
14262 | fi | |
14263 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
14264 | ac_link="$ax_pthread_save_ac_link" | |
14265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14266 | /* end confdefs.h. */ | |
14267 | int main(void){return 0;} | |
3266f10b TT |
14268 | _ACEOF |
14269 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
14270 | ac_link="$ax_pthread_2step_ac_link" |
14271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14272 | /* end confdefs.h. */ | |
14273 | int main(void){return 0;} | |
14274 | _ACEOF | |
14275 | if ac_fn_c_try_link "$LINENO"; then : | |
14276 | break | |
3266f10b TT |
14277 | fi |
14278 | rm -f core conftest.err conftest.$ac_objext \ | |
14279 | conftest$ac_exeext conftest.$ac_ext | |
14280 | ||
14281 | fi | |
05ea2a05 TT |
14282 | rm -f core conftest.err conftest.$ac_objext \ |
14283 | conftest$ac_exeext conftest.$ac_ext | |
14284 | done | |
14285 | ac_link="$ax_pthread_save_ac_link" | |
14286 | CFLAGS="$ax_pthread_save_CFLAGS" | |
14287 | if test "x$ax_pthread_try" = "x"; then : | |
14288 | ax_pthread_try=no | |
14289 | fi | |
14290 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
3266f10b | 14291 | |
05ea2a05 TT |
14292 | fi |
14293 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
14294 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
3266f10b | 14295 | |
05ea2a05 TT |
14296 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in |
14297 | no | unknown) ;; | |
14298 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
14299 | esac | |
3266f10b | 14300 | |
05ea2a05 | 14301 | fi # $ax_pthread_clang = yes |
3266f10b | 14302 | |
05ea2a05 TT |
14303 | if test "x$ax_pthread_ok" = "xno"; then |
14304 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
3266f10b | 14305 | |
05ea2a05 TT |
14306 | case $ax_pthread_try_flag in |
14307 | none) | |
14308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
14309 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
14310 | ;; | |
3266f10b | 14311 | |
05ea2a05 TT |
14312 | -mt,pthread) |
14313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
14314 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
14315 | PTHREAD_CFLAGS="-mt" | |
14316 | PTHREAD_LIBS="-lpthread" | |
14317 | ;; | |
3266f10b | 14318 | |
05ea2a05 TT |
14319 | -*) |
14320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
14321 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
14322 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
14323 | ;; | |
3266f10b | 14324 | |
05ea2a05 TT |
14325 | pthread-config) |
14326 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
14327 | set dummy pthread-config; ac_word=$2 | |
14328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14329 | $as_echo_n "checking for $ac_word... " >&6; } | |
14330 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
14331 | $as_echo_n "(cached) " >&6 | |
14332 | else | |
14333 | if test -n "$ax_pthread_config"; then | |
14334 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
14335 | else | |
14336 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14337 | for as_dir in $PATH | |
14338 | do | |
14339 | IFS=$as_save_IFS | |
14340 | test -z "$as_dir" && as_dir=. | |
14341 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14342 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14343 | ac_cv_prog_ax_pthread_config="yes" | |
14344 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14345 | break 2 | |
14346 | fi | |
3266f10b | 14347 | done |
05ea2a05 TT |
14348 | done |
14349 | IFS=$as_save_IFS | |
3266f10b | 14350 | |
05ea2a05 TT |
14351 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" |
14352 | fi | |
14353 | fi | |
14354 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
14355 | if test -n "$ax_pthread_config"; then | |
14356 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
14357 | $as_echo "$ax_pthread_config" >&6; } | |
3266f10b | 14358 | else |
05ea2a05 TT |
14359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14360 | $as_echo "no" >&6; } | |
3266f10b TT |
14361 | fi |
14362 | ||
5e030278 | 14363 | |
05ea2a05 TT |
14364 | if test "x$ax_pthread_config" = "xno"; then : |
14365 | continue | |
14366 | fi | |
14367 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
14368 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
14369 | ;; | |
5e030278 | 14370 | |
05ea2a05 TT |
14371 | *) |
14372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
14373 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
14374 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
14375 | ;; | |
14376 | esac | |
5e030278 | 14377 | |
5e030278 TT |
14378 | ax_pthread_save_CFLAGS="$CFLAGS" |
14379 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
14380 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
14381 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
14382 | |
14383 | # Check for various functions. We must include pthread.h, | |
14384 | # since some functions may be macros. (On the Sequent, we | |
14385 | # need a special flag -Kthread to make this header compile.) | |
14386 | # We check for pthread_join because it is in -lpthread on IRIX | |
14387 | # while pthread_create is in libc. We check for pthread_attr_init | |
14388 | # due to DEC craziness with -lpthreads. We check for | |
14389 | # pthread_cleanup_push because it is one of the few pthread | |
14390 | # functions on Solaris that doesn't have a non-functional libc stub. | |
14391 | # We try pthread_create on general principles. | |
14392 | ||
5e030278 TT |
14393 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14394 | /* end confdefs.h. */ | |
05ea2a05 TT |
14395 | #include <pthread.h> |
14396 | # if $ax_pthread_check_cond | |
14397 | # error "$ax_pthread_check_macro must be defined" | |
14398 | # endif | |
14399 | static void routine(void *a) { a = 0; } | |
14400 | static void *start_routine(void *a) { return a; } | |
5e030278 TT |
14401 | int |
14402 | main () | |
14403 | { | |
05ea2a05 TT |
14404 | pthread_t th; pthread_attr_t attr; |
14405 | pthread_create(&th, 0, start_routine, 0); | |
14406 | pthread_join(th, 0); | |
14407 | pthread_attr_init(&attr); | |
14408 | pthread_cleanup_push(routine, 0); | |
14409 | pthread_cleanup_pop(0) /* ; */ | |
5e030278 TT |
14410 | ; |
14411 | return 0; | |
14412 | } | |
14413 | _ACEOF | |
14414 | if ac_fn_c_try_link "$LINENO"; then : | |
14415 | ax_pthread_ok=yes | |
14416 | fi | |
14417 | rm -f core conftest.err conftest.$ac_objext \ | |
14418 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 14419 | |
5e030278 TT |
14420 | CFLAGS="$ax_pthread_save_CFLAGS" |
14421 | LIBS="$ax_pthread_save_LIBS" | |
05ea2a05 TT |
14422 | |
14423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
14424 | $as_echo "$ax_pthread_ok" >&6; } | |
14425 | if test "x$ax_pthread_ok" = "xyes"; then : | |
14426 | break | |
5e030278 TT |
14427 | fi |
14428 | ||
05ea2a05 TT |
14429 | PTHREAD_LIBS="" |
14430 | PTHREAD_CFLAGS="" | |
14431 | done | |
14432 | fi | |
5e030278 | 14433 | |
05ea2a05 TT |
14434 | # Various other checks: |
14435 | if test "x$ax_pthread_ok" = "xyes"; then | |
14436 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14437 | ax_pthread_save_LIBS="$LIBS" | |
14438 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
14439 | LIBS="$PTHREAD_LIBS $LIBS" | |
5e030278 | 14440 | |
05ea2a05 TT |
14441 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
14442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
14443 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
14444 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
14445 | $as_echo_n "(cached) " >&6 | |
14446 | else | |
14447 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
14448 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
14449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14450 | /* end confdefs.h. */ | |
14451 | #include <pthread.h> | |
14452 | int | |
14453 | main () | |
14454 | { | |
14455 | int attr = $ax_pthread_attr; return attr /* ; */ | |
14456 | ; | |
14457 | return 0; | |
14458 | } | |
14459 | _ACEOF | |
14460 | if ac_fn_c_try_link "$LINENO"; then : | |
14461 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
14462 | fi | |
14463 | rm -f core conftest.err conftest.$ac_objext \ | |
14464 | conftest$ac_exeext conftest.$ac_ext | |
14465 | done | |
5e030278 | 14466 | |
05ea2a05 TT |
14467 | fi |
14468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
14469 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
14470 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
14471 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
14472 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
5e030278 | 14473 | |
05ea2a05 TT |
14474 | cat >>confdefs.h <<_ACEOF |
14475 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
14476 | _ACEOF | |
5e030278 | 14477 | |
05ea2a05 | 14478 | ax_pthread_joinable_attr_defined=yes |
5e030278 | 14479 | |
05ea2a05 | 14480 | fi |
5e030278 | 14481 | |
05ea2a05 TT |
14482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 |
14483 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
14484 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
14485 | $as_echo_n "(cached) " >&6 | |
14486 | else | |
14487 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
14488 | case $host_os in | |
14489 | solaris*) | |
14490 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
14491 | ;; | |
14492 | esac | |
5e030278 | 14493 | |
05ea2a05 TT |
14494 | fi |
14495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
14496 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
14497 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
14498 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
14499 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
14500 | ax_pthread_special_flags_added=yes | |
14501 | fi | |
5e030278 | 14502 | |
05ea2a05 TT |
14503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 |
14504 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
14505 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
14506 | $as_echo_n "(cached) " >&6 | |
14507 | else | |
14508 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14509 | /* end confdefs.h. */ | |
14510 | #include <pthread.h> | |
14511 | int | |
14512 | main () | |
14513 | { | |
14514 | int i = PTHREAD_PRIO_INHERIT; | |
14515 | ; | |
14516 | return 0; | |
14517 | } | |
14518 | _ACEOF | |
14519 | if ac_fn_c_try_link "$LINENO"; then : | |
14520 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
14521 | else | |
14522 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
14523 | fi | |
14524 | rm -f core conftest.err conftest.$ac_objext \ | |
14525 | conftest$ac_exeext conftest.$ac_ext | |
5e030278 | 14526 | |
05ea2a05 TT |
14527 | fi |
14528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
14529 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
14530 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
14531 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
5e030278 | 14532 | |
05ea2a05 | 14533 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h |
5e030278 | 14534 | |
05ea2a05 | 14535 | ax_pthread_prio_inherit_defined=yes |
5e030278 | 14536 | |
05ea2a05 | 14537 | fi |
5e030278 | 14538 | |
05ea2a05 TT |
14539 | CFLAGS="$ax_pthread_save_CFLAGS" |
14540 | LIBS="$ax_pthread_save_LIBS" | |
5e030278 | 14541 | |
05ea2a05 TT |
14542 | # More AIX lossage: compile with *_r variant |
14543 | if test "x$GCC" != "xyes"; then | |
14544 | case $host_os in | |
14545 | aix*) | |
14546 | case "x/$CC" in #( | |
14547 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
14548 | #handle absolute path differently from PATH based program lookup | |
14549 | case "x$CC" in #( | |
14550 | x/*) : | |
14551 | if as_fn_executable_p ${CC}_r; then : | |
14552 | PTHREAD_CC="${CC}_r" | |
14553 | fi ;; #( | |
14554 | *) : | |
14555 | for ac_prog in ${CC}_r | |
14556 | do | |
14557 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
14558 | set dummy $ac_prog; ac_word=$2 | |
14559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14560 | $as_echo_n "checking for $ac_word... " >&6; } | |
14561 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
14562 | $as_echo_n "(cached) " >&6 | |
14563 | else | |
14564 | if test -n "$PTHREAD_CC"; then | |
14565 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
14566 | else | |
14567 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14568 | for as_dir in $PATH | |
14569 | do | |
14570 | IFS=$as_save_IFS | |
14571 | test -z "$as_dir" && as_dir=. | |
14572 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14573 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14574 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
14575 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14576 | break 2 | |
14577 | fi | |
14578 | done | |
14579 | done | |
14580 | IFS=$as_save_IFS | |
5e030278 | 14581 | |
5e030278 | 14582 | fi |
05ea2a05 TT |
14583 | fi |
14584 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
14585 | if test -n "$PTHREAD_CC"; then | |
14586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
14587 | $as_echo "$PTHREAD_CC" >&6; } | |
14588 | else | |
14589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14590 | $as_echo "no" >&6; } | |
14591 | fi | |
5e030278 | 14592 | |
5e030278 | 14593 | |
05ea2a05 TT |
14594 | test -n "$PTHREAD_CC" && break |
14595 | done | |
14596 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
14597 | ;; | |
14598 | esac ;; #( | |
14599 | *) : | |
14600 | ;; | |
5e030278 | 14601 | esac |
05ea2a05 TT |
14602 | ;; |
14603 | esac | |
14604 | fi | |
14605 | fi | |
5e030278 | 14606 | |
05ea2a05 | 14607 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
5e030278 | 14608 | |
5e030278 | 14609 | |
5e030278 | 14610 | |
5e030278 | 14611 | |
5e030278 | 14612 | |
05ea2a05 TT |
14613 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
14614 | if test "x$ax_pthread_ok" = "xyes"; then | |
14615 | threads=yes | |
14616 | : | |
5e030278 | 14617 | else |
05ea2a05 TT |
14618 | ax_pthread_ok=no |
14619 | threads=no | |
5e030278 | 14620 | fi |
05ea2a05 TT |
14621 | ac_ext=cpp |
14622 | ac_cpp='$CXXCPP $CPPFLAGS' | |
14623 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14624 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14625 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5e030278 | 14626 | |
5e030278 | 14627 | |
05ea2a05 TT |
14628 | if test "$threads" = "yes"; then |
14629 | save_LIBS="$LIBS" | |
14630 | LIBS="$PTHREAD_LIBS $LIBS" | |
14631 | save_CXXFLAGS="$CXXFLAGS" | |
14632 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
14633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
14634 | $as_echo_n "checking for std::thread... " >&6; } | |
14635 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
14636 | $as_echo_n "(cached) " >&6 | |
14637 | else | |
14638 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14639 | /* end confdefs.h. */ |
05ea2a05 TT |
14640 | #include <thread> |
14641 | void callback() { } | |
14642 | int | |
14643 | main () | |
14644 | { | |
14645 | std::thread t(callback); | |
14646 | ; | |
14647 | return 0; | |
14648 | } | |
5e030278 | 14649 | _ACEOF |
05ea2a05 TT |
14650 | if ac_fn_cxx_try_compile "$LINENO"; then : |
14651 | gdb_cv_cxx_std_thread=yes | |
14652 | else | |
14653 | gdb_cv_cxx_std_thread=no | |
5e030278 | 14654 | fi |
05ea2a05 TT |
14655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
14656 | fi | |
14657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
14658 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
5e030278 | 14659 | |
05ea2a05 TT |
14660 | # This check must be here, while LIBS includes any necessary |
14661 | # threading library. | |
14662 | for ac_func in pthread_sigmask pthread_setname_np | |
14663 | do : | |
14664 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14665 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14666 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
14667 | cat >>confdefs.h <<_ACEOF | |
14668 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14669 | _ACEOF | |
5e030278 TT |
14670 | |
14671 | fi | |
05ea2a05 | 14672 | done |
5e030278 | 14673 | |
5e030278 | 14674 | |
05ea2a05 TT |
14675 | LIBS="$save_LIBS" |
14676 | CXXFLAGS="$save_CXXFLAGS" | |
14677 | fi | |
14678 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
5e030278 | 14679 | |
05ea2a05 | 14680 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h |
5e030278 | 14681 | |
05ea2a05 TT |
14682 | fi |
14683 | ac_ext=c | |
14684 | ac_cpp='$CPP $CPPFLAGS' | |
14685 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14686 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14687 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5e030278 | 14688 | |
5e030278 | 14689 | |
05ea2a05 TT |
14690 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
14691 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
14692 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
14693 | $as_echo_n "(cached) " >&6 | |
14694 | else | |
14695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14696 | /* end confdefs.h. */ | |
b9442ec1 | 14697 | #include <setjmp.h> |
05ea2a05 TT |
14698 | int |
14699 | main () | |
14700 | { | |
b9442ec1 SM |
14701 | sigjmp_buf env; |
14702 | while (! sigsetjmp (env, 1)) | |
14703 | siglongjmp (env, 1); | |
14704 | ||
05ea2a05 TT |
14705 | ; |
14706 | return 0; | |
14707 | } | |
14708 | _ACEOF | |
14709 | if ac_fn_c_try_compile "$LINENO"; then : | |
14710 | gdb_cv_func_sigsetjmp=yes | |
14711 | else | |
14712 | gdb_cv_func_sigsetjmp=no | |
b9442ec1 | 14713 | |
05ea2a05 TT |
14714 | fi |
14715 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b9442ec1 | 14716 | |
05ea2a05 TT |
14717 | fi |
14718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
14719 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
14720 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 14721 | |
05ea2a05 | 14722 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 14723 | |
05ea2a05 TT |
14724 | fi |
14725 | ||
14726 | ||
14727 | # Check whether --with-intel_pt was given. | |
14728 | if test "${with_intel_pt+set}" = set; then : | |
14729 | withval=$with_intel_pt; | |
5e030278 | 14730 | else |
05ea2a05 | 14731 | with_intel_pt=auto |
5e030278 | 14732 | fi |
05ea2a05 TT |
14733 | |
14734 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
14735 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
14736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
14737 | $as_echo "$with_intel_pt" >&6; } | |
14738 | ||
14739 | if test "${with_intel_pt}" = no; then | |
14740 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
14741 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
14742 | HAVE_LIBIPT=no | |
14743 | else | |
14744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14745 | /* end confdefs.h. */ |
5e030278 | 14746 | |
05ea2a05 TT |
14747 | #include <linux/perf_event.h> |
14748 | #ifndef PERF_ATTR_SIZE_VER5 | |
14749 | # error | |
14750 | #endif | |
5e030278 | 14751 | |
05ea2a05 TT |
14752 | _ACEOF |
14753 | if ac_fn_c_try_cpp "$LINENO"; then : | |
14754 | perf_event=yes | |
14755 | else | |
14756 | perf_event=no | |
5e030278 | 14757 | fi |
05ea2a05 TT |
14758 | rm -f conftest.err conftest.i conftest.$ac_ext |
14759 | if test "$perf_event" != yes; then | |
14760 | if test "$with_intel_pt" = yes; then | |
14761 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
14762 | else | |
14763 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
14764 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
14765 | fi | |
14766 | fi | |
5e030278 | 14767 | |
5e030278 | 14768 | |
5e030278 | 14769 | |
5e030278 | 14770 | |
5e030278 | 14771 | |
5e030278 | 14772 | |
5e030278 | 14773 | |
5e030278 | 14774 | |
5e030278 | 14775 | |
05ea2a05 | 14776 | use_additional=yes |
5e030278 | 14777 | |
05ea2a05 TT |
14778 | acl_save_prefix="$prefix" |
14779 | prefix="$acl_final_prefix" | |
14780 | acl_save_exec_prefix="$exec_prefix" | |
14781 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14782 | |
05ea2a05 TT |
14783 | eval additional_includedir=\"$includedir\" |
14784 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14785 | |
05ea2a05 TT |
14786 | exec_prefix="$acl_save_exec_prefix" |
14787 | prefix="$acl_save_prefix" | |
5e030278 | 14788 | |
5e030278 | 14789 | |
05ea2a05 TT |
14790 | # Check whether --with-libipt-prefix was given. |
14791 | if test "${with_libipt_prefix+set}" = set; then : | |
14792 | withval=$with_libipt_prefix; | |
14793 | if test "X$withval" = "Xno"; then | |
14794 | use_additional=no | |
14795 | else | |
14796 | if test "X$withval" = "X"; then | |
5e030278 | 14797 | |
05ea2a05 TT |
14798 | acl_save_prefix="$prefix" |
14799 | prefix="$acl_final_prefix" | |
14800 | acl_save_exec_prefix="$exec_prefix" | |
14801 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14802 | |
05ea2a05 TT |
14803 | eval additional_includedir=\"$includedir\" |
14804 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14805 | |
05ea2a05 TT |
14806 | exec_prefix="$acl_save_exec_prefix" |
14807 | prefix="$acl_save_prefix" | |
5e030278 | 14808 | |
05ea2a05 TT |
14809 | else |
14810 | additional_includedir="$withval/include" | |
14811 | additional_libdir="$withval/lib" | |
14812 | fi | |
14813 | fi | |
5e030278 TT |
14814 | |
14815 | fi | |
5e030278 | 14816 | |
9f1528a1 AB |
14817 | |
14818 | # Check whether --with-libipt-type was given. | |
14819 | if test "${with_libipt_type+set}" = set; then : | |
14820 | withval=$with_libipt_type; with_libipt_type=$withval | |
14821 | else | |
14822 | with_libipt_type=auto | |
14823 | fi | |
14824 | ||
14825 | lib_type=`eval echo \$with_libipt_type` | |
14826 | ||
05ea2a05 TT |
14827 | LIBIPT= |
14828 | LTLIBIPT= | |
14829 | INCIPT= | |
14830 | rpathdirs= | |
14831 | ltrpathdirs= | |
14832 | names_already_handled= | |
14833 | names_next_round='ipt ' | |
14834 | while test -n "$names_next_round"; do | |
14835 | names_this_round="$names_next_round" | |
14836 | names_next_round= | |
14837 | for name in $names_this_round; do | |
14838 | already_handled= | |
14839 | for n in $names_already_handled; do | |
14840 | if test "$n" = "$name"; then | |
14841 | already_handled=yes | |
14842 | break | |
14843 | fi | |
14844 | done | |
14845 | if test -z "$already_handled"; then | |
14846 | names_already_handled="$names_already_handled $name" | |
14847 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14848 | eval value=\"\$HAVE_LIB$uppername\" | |
14849 | if test -n "$value"; then | |
14850 | if test "$value" = yes; then | |
14851 | eval value=\"\$LIB$uppername\" | |
14852 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
14853 | eval value=\"\$LTLIB$uppername\" | |
14854 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
14855 | else | |
14856 | : | |
14857 | fi | |
14858 | else | |
14859 | found_dir= | |
14860 | found_la= | |
14861 | found_so= | |
14862 | found_a= | |
14863 | if test $use_additional = yes; then | |
9f1528a1 | 14864 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14865 | found_dir="$additional_libdir" |
14866 | found_so="$additional_libdir/lib$name.$shlibext" | |
14867 | if test -f "$additional_libdir/lib$name.la"; then | |
14868 | found_la="$additional_libdir/lib$name.la" | |
14869 | fi | |
9f1528a1 | 14870 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14871 | if test -f "$additional_libdir/lib$name.$libext"; then |
14872 | found_dir="$additional_libdir" | |
14873 | found_a="$additional_libdir/lib$name.$libext" | |
14874 | if test -f "$additional_libdir/lib$name.la"; then | |
14875 | found_la="$additional_libdir/lib$name.la" | |
14876 | fi | |
14877 | fi | |
14878 | fi | |
14879 | fi | |
14880 | if test "X$found_dir" = "X"; then | |
14881 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 14882 | |
05ea2a05 TT |
14883 | acl_save_prefix="$prefix" |
14884 | prefix="$acl_final_prefix" | |
14885 | acl_save_exec_prefix="$exec_prefix" | |
14886 | exec_prefix="$acl_final_exec_prefix" | |
14887 | eval x=\"$x\" | |
14888 | exec_prefix="$acl_save_exec_prefix" | |
14889 | prefix="$acl_save_prefix" | |
5e030278 | 14890 | |
05ea2a05 TT |
14891 | case "$x" in |
14892 | -L*) | |
14893 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 14894 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14895 | found_dir="$dir" |
14896 | found_so="$dir/lib$name.$shlibext" | |
14897 | if test -f "$dir/lib$name.la"; then | |
14898 | found_la="$dir/lib$name.la" | |
14899 | fi | |
9f1528a1 | 14900 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14901 | if test -f "$dir/lib$name.$libext"; then |
14902 | found_dir="$dir" | |
14903 | found_a="$dir/lib$name.$libext" | |
14904 | if test -f "$dir/lib$name.la"; then | |
14905 | found_la="$dir/lib$name.la" | |
14906 | fi | |
14907 | fi | |
14908 | fi | |
14909 | ;; | |
14910 | esac | |
14911 | if test "X$found_dir" != "X"; then | |
14912 | break | |
14913 | fi | |
14914 | done | |
14915 | fi | |
14916 | if test "X$found_dir" != "X"; then | |
14917 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
14918 | if test "X$found_so" != "X"; then | |
14919 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14920 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14921 | else | |
14922 | haveit= | |
14923 | for x in $ltrpathdirs; do | |
14924 | if test "X$x" = "X$found_dir"; then | |
14925 | haveit=yes | |
14926 | break | |
14927 | fi | |
14928 | done | |
14929 | if test -z "$haveit"; then | |
14930 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14931 | fi | |
14932 | if test "$hardcode_direct" = yes; then | |
14933 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14934 | else | |
14935 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14936 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14937 | haveit= | |
14938 | for x in $rpathdirs; do | |
14939 | if test "X$x" = "X$found_dir"; then | |
14940 | haveit=yes | |
14941 | break | |
14942 | fi | |
14943 | done | |
14944 | if test -z "$haveit"; then | |
14945 | rpathdirs="$rpathdirs $found_dir" | |
14946 | fi | |
14947 | else | |
14948 | haveit= | |
14949 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 14950 | |
05ea2a05 TT |
14951 | acl_save_prefix="$prefix" |
14952 | prefix="$acl_final_prefix" | |
14953 | acl_save_exec_prefix="$exec_prefix" | |
14954 | exec_prefix="$acl_final_exec_prefix" | |
14955 | eval x=\"$x\" | |
14956 | exec_prefix="$acl_save_exec_prefix" | |
14957 | prefix="$acl_save_prefix" | |
5e030278 | 14958 | |
05ea2a05 TT |
14959 | if test "X$x" = "X-L$found_dir"; then |
14960 | haveit=yes | |
14961 | break | |
14962 | fi | |
14963 | done | |
14964 | if test -z "$haveit"; then | |
14965 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
14966 | fi | |
14967 | if test "$hardcode_minus_L" != no; then | |
14968 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14969 | else | |
14970 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
14971 | fi | |
14972 | fi | |
14973 | fi | |
14974 | fi | |
14975 | else | |
14976 | if test "X$found_a" != "X"; then | |
14977 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
14978 | else | |
14979 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
14980 | fi | |
14981 | fi | |
14982 | additional_includedir= | |
14983 | case "$found_dir" in | |
14984 | */lib | */lib/) | |
14985 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14986 | additional_includedir="$basedir/include" | |
14987 | ;; | |
14988 | esac | |
14989 | if test "X$additional_includedir" != "X"; then | |
14990 | if test "X$additional_includedir" != "X/usr/include"; then | |
14991 | haveit= | |
14992 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14993 | if test -n "$GCC"; then | |
14994 | case $host_os in | |
14995 | linux*) haveit=yes;; | |
14996 | esac | |
14997 | fi | |
14998 | fi | |
14999 | if test -z "$haveit"; then | |
15000 | for x in $CPPFLAGS $INCIPT; do | |
5e030278 | 15001 | |
05ea2a05 TT |
15002 | acl_save_prefix="$prefix" |
15003 | prefix="$acl_final_prefix" | |
15004 | acl_save_exec_prefix="$exec_prefix" | |
15005 | exec_prefix="$acl_final_exec_prefix" | |
15006 | eval x=\"$x\" | |
15007 | exec_prefix="$acl_save_exec_prefix" | |
15008 | prefix="$acl_save_prefix" | |
5e030278 | 15009 | |
05ea2a05 TT |
15010 | if test "X$x" = "X-I$additional_includedir"; then |
15011 | haveit=yes | |
15012 | break | |
15013 | fi | |
15014 | done | |
15015 | if test -z "$haveit"; then | |
15016 | if test -d "$additional_includedir"; then | |
15017 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
15018 | fi | |
15019 | fi | |
15020 | fi | |
15021 | fi | |
15022 | fi | |
15023 | if test -n "$found_la"; then | |
15024 | save_libdir="$libdir" | |
15025 | case "$found_la" in | |
15026 | */* | *\\*) . "$found_la" ;; | |
15027 | *) . "./$found_la" ;; | |
15028 | esac | |
15029 | libdir="$save_libdir" | |
15030 | for dep in $dependency_libs; do | |
15031 | case "$dep" in | |
15032 | -L*) | |
15033 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
15034 | if test "X$additional_libdir" != "X/usr/lib"; then | |
15035 | haveit= | |
15036 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
15037 | if test -n "$GCC"; then | |
15038 | case $host_os in | |
15039 | linux*) haveit=yes;; | |
15040 | esac | |
15041 | fi | |
15042 | fi | |
15043 | if test -z "$haveit"; then | |
15044 | haveit= | |
15045 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 15046 | |
05ea2a05 TT |
15047 | acl_save_prefix="$prefix" |
15048 | prefix="$acl_final_prefix" | |
15049 | acl_save_exec_prefix="$exec_prefix" | |
15050 | exec_prefix="$acl_final_exec_prefix" | |
15051 | eval x=\"$x\" | |
15052 | exec_prefix="$acl_save_exec_prefix" | |
15053 | prefix="$acl_save_prefix" | |
5e030278 | 15054 | |
05ea2a05 TT |
15055 | if test "X$x" = "X-L$additional_libdir"; then |
15056 | haveit=yes | |
15057 | break | |
15058 | fi | |
15059 | done | |
15060 | if test -z "$haveit"; then | |
15061 | if test -d "$additional_libdir"; then | |
15062 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
15063 | fi | |
15064 | fi | |
15065 | haveit= | |
15066 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 15067 | |
05ea2a05 TT |
15068 | acl_save_prefix="$prefix" |
15069 | prefix="$acl_final_prefix" | |
15070 | acl_save_exec_prefix="$exec_prefix" | |
15071 | exec_prefix="$acl_final_exec_prefix" | |
15072 | eval x=\"$x\" | |
15073 | exec_prefix="$acl_save_exec_prefix" | |
15074 | prefix="$acl_save_prefix" | |
5e030278 | 15075 | |
05ea2a05 TT |
15076 | if test "X$x" = "X-L$additional_libdir"; then |
15077 | haveit=yes | |
15078 | break | |
15079 | fi | |
15080 | done | |
15081 | if test -z "$haveit"; then | |
15082 | if test -d "$additional_libdir"; then | |
15083 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
15084 | fi | |
15085 | fi | |
15086 | fi | |
15087 | fi | |
15088 | ;; | |
15089 | -R*) | |
15090 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
15091 | if test "$enable_rpath" != no; then | |
15092 | haveit= | |
15093 | for x in $rpathdirs; do | |
15094 | if test "X$x" = "X$dir"; then | |
15095 | haveit=yes | |
15096 | break | |
15097 | fi | |
15098 | done | |
15099 | if test -z "$haveit"; then | |
15100 | rpathdirs="$rpathdirs $dir" | |
15101 | fi | |
15102 | haveit= | |
15103 | for x in $ltrpathdirs; do | |
15104 | if test "X$x" = "X$dir"; then | |
15105 | haveit=yes | |
15106 | break | |
15107 | fi | |
15108 | done | |
15109 | if test -z "$haveit"; then | |
15110 | ltrpathdirs="$ltrpathdirs $dir" | |
15111 | fi | |
15112 | fi | |
15113 | ;; | |
15114 | -l*) | |
15115 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
15116 | ;; | |
15117 | *.la) | |
15118 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
15119 | ;; | |
15120 | *) | |
15121 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
15122 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
15123 | ;; | |
15124 | esac | |
15125 | done | |
15126 | fi | |
15127 | else | |
9f1528a1 AB |
15128 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
15129 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
15130 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
15131 | else | |
15132 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" | |
15133 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" | |
15134 | fi | |
05ea2a05 | 15135 | fi |
5e030278 | 15136 | fi |
05ea2a05 TT |
15137 | fi |
15138 | done | |
15139 | done | |
15140 | if test "X$rpathdirs" != "X"; then | |
15141 | if test -n "$hardcode_libdir_separator"; then | |
15142 | alldirs= | |
15143 | for found_dir in $rpathdirs; do | |
15144 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
15145 | done | |
15146 | acl_save_libdir="$libdir" | |
15147 | libdir="$alldirs" | |
15148 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15149 | libdir="$acl_save_libdir" | |
15150 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
15151 | else | |
15152 | for found_dir in $rpathdirs; do | |
15153 | acl_save_libdir="$libdir" | |
15154 | libdir="$found_dir" | |
15155 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15156 | libdir="$acl_save_libdir" | |
15157 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
15158 | done | |
15159 | fi | |
15160 | fi | |
15161 | if test "X$ltrpathdirs" != "X"; then | |
15162 | for found_dir in $ltrpathdirs; do | |
15163 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
15164 | done | |
15165 | fi | |
5e030278 TT |
15166 | |
15167 | ||
05ea2a05 | 15168 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 15169 | |
05ea2a05 TT |
15170 | for element in $INCIPT; do |
15171 | haveit= | |
15172 | for x in $CPPFLAGS; do | |
5e030278 | 15173 | |
05ea2a05 TT |
15174 | acl_save_prefix="$prefix" |
15175 | prefix="$acl_final_prefix" | |
15176 | acl_save_exec_prefix="$exec_prefix" | |
15177 | exec_prefix="$acl_final_exec_prefix" | |
15178 | eval x=\"$x\" | |
15179 | exec_prefix="$acl_save_exec_prefix" | |
15180 | prefix="$acl_save_prefix" | |
5e030278 | 15181 | |
05ea2a05 TT |
15182 | if test "X$x" = "X$element"; then |
15183 | haveit=yes | |
15184 | break | |
15185 | fi | |
15186 | done | |
15187 | if test -z "$haveit"; then | |
15188 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
15189 | fi | |
15190 | done | |
5e030278 TT |
15191 | |
15192 | ||
05ea2a05 TT |
15193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 |
15194 | $as_echo_n "checking for libipt... " >&6; } | |
15195 | if ${ac_cv_libipt+:} false; then : | |
5e030278 TT |
15196 | $as_echo_n "(cached) " >&6 |
15197 | else | |
05ea2a05 TT |
15198 | |
15199 | ac_save_LIBS="$LIBS" | |
15200 | LIBS="$LIBS $LIBIPT" | |
15201 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 15202 | /* end confdefs.h. */ |
05ea2a05 | 15203 | #include "intel-pt.h" |
5e030278 TT |
15204 | int |
15205 | main () | |
15206 | { | |
05ea2a05 | 15207 | pt_insn_alloc_decoder (0); |
5e030278 TT |
15208 | ; |
15209 | return 0; | |
15210 | } | |
15211 | _ACEOF | |
05ea2a05 TT |
15212 | if ac_fn_c_try_link "$LINENO"; then : |
15213 | ac_cv_libipt=yes | |
5e030278 | 15214 | else |
05ea2a05 | 15215 | ac_cv_libipt=no |
5e030278 | 15216 | fi |
05ea2a05 TT |
15217 | rm -f core conftest.err conftest.$ac_objext \ |
15218 | conftest$ac_exeext conftest.$ac_ext | |
15219 | LIBS="$ac_save_LIBS" | |
15220 | ||
5e030278 | 15221 | fi |
05ea2a05 TT |
15222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
15223 | $as_echo "$ac_cv_libipt" >&6; } | |
15224 | if test "$ac_cv_libipt" = yes; then | |
15225 | HAVE_LIBIPT=yes | |
21987b9c | 15226 | |
05ea2a05 TT |
15227 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
15228 | ||
15229 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
15230 | $as_echo_n "checking how to link with libipt... " >&6; } | |
15231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
15232 | $as_echo "$LIBIPT" >&6; } | |
15233 | else | |
15234 | HAVE_LIBIPT=no | |
15235 | CPPFLAGS="$ac_save_CPPFLAGS" | |
15236 | LIBIPT= | |
15237 | LTLIBIPT= | |
15238 | fi | |
15239 | ||
15240 | ||
15241 | ||
15242 | ||
15243 | ||
15244 | ||
15245 | if test "$HAVE_LIBIPT" != yes; then | |
15246 | if test "$with_intel_pt" = yes; then | |
15247 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
15248 | else | |
15249 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
15250 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
15251 | fi | |
15252 | else | |
15253 | save_LIBS=$LIBS | |
15254 | LIBS="$LIBS $LIBIPT" | |
15255 | for ac_func in pt_insn_event | |
21987b9c | 15256 | do : |
05ea2a05 TT |
15257 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" |
15258 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
21987b9c | 15259 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 15260 | #define HAVE_PT_INSN_EVENT 1 |
21987b9c TT |
15261 | _ACEOF |
15262 | ||
15263 | fi | |
15264 | done | |
15265 | ||
05ea2a05 TT |
15266 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> |
15267 | " | |
15268 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
21987b9c | 15269 | |
05ea2a05 TT |
15270 | cat >>confdefs.h <<_ACEOF |
15271 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
15272 | _ACEOF | |
5e030278 | 15273 | |
5e030278 | 15274 | |
05ea2a05 TT |
15275 | fi |
15276 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
15277 | " | |
15278 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
15279 | ||
15280 | cat >>confdefs.h <<_ACEOF | |
15281 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
15282 | _ACEOF | |
5e030278 TT |
15283 | |
15284 | ||
05ea2a05 TT |
15285 | fi |
15286 | ||
15287 | LIBS=$save_LIBS | |
15288 | fi | |
15289 | fi | |
15290 | ||
c8693053 RO |
15291 | |
15292 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h | |
15293 | ||
15294 | for ac_header in sys/procfs.h | |
15295 | do : | |
15296 | ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default" | |
15297 | if test "x$ac_cv_header_sys_procfs_h" = xyes; then : | |
15298 | cat >>confdefs.h <<_ACEOF | |
15299 | #define HAVE_SYS_PROCFS_H 1 | |
15300 | _ACEOF | |
15301 | ||
15302 | fi | |
15303 | ||
15304 | done | |
15305 | ||
05ea2a05 | 15306 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
c8693053 RO |
15307 | |
15308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15309 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } |
15310 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
e9bcb658 GB |
15311 | $as_echo_n "(cached) " >&6 |
15312 | else | |
15313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15314 | /* end confdefs.h. */ | |
15315 | ||
05ea2a05 | 15316 | #define _SYSCALL32 |
05ea2a05 | 15317 | #include <sys/procfs.h> |
e9bcb658 GB |
15318 | int |
15319 | main () | |
15320 | { | |
05ea2a05 | 15321 | gregset_t avar |
e9bcb658 GB |
15322 | ; |
15323 | return 0; | |
15324 | } | |
15325 | _ACEOF | |
15326 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15327 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
e9bcb658 | 15328 | else |
05ea2a05 | 15329 | bfd_cv_have_sys_procfs_type_gregset_t=no |
54019719 PA |
15330 | |
15331 | fi | |
05ea2a05 | 15332 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
06825bd1 | 15333 | fi |
06825bd1 | 15334 | |
05ea2a05 | 15335 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
a3828db0 | 15336 | |
05ea2a05 | 15337 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
06825bd1 | 15338 | |
05ea2a05 TT |
15339 | fi |
15340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
15341 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
15342 | ||
c8693053 RO |
15343 | |
15344 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15345 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } |
15346 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
81ecdfbb | 15347 | $as_echo_n "(cached) " >&6 |
bec39cab | 15348 | else |
81ecdfbb | 15349 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15350 | /* end confdefs.h. */ |
05ea2a05 TT |
15351 | |
15352 | #define _SYSCALL32 | |
05ea2a05 | 15353 | #include <sys/procfs.h> |
bec39cab AC |
15354 | int |
15355 | main () | |
15356 | { | |
05ea2a05 | 15357 | fpregset_t avar |
064ef605 DJ |
15358 | ; |
15359 | return 0; | |
15360 | } | |
15361 | _ACEOF | |
9b30624b | 15362 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15363 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
15364 | else | |
15365 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
15366 | ||
15367 | fi | |
15368 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15369 | fi | |
15370 | ||
15371 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
15372 | ||
15373 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
15374 | ||
15375 | fi | |
15376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
15377 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
15378 | ||
c8693053 RO |
15379 | |
15380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15381 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } |
15382 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
15383 | $as_echo_n "(cached) " >&6 | |
064ef605 | 15384 | else |
81ecdfbb | 15385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15386 | /* end confdefs.h. */ |
05ea2a05 TT |
15387 | |
15388 | #define _SYSCALL32 | |
05ea2a05 | 15389 | #include <sys/procfs.h> |
064ef605 DJ |
15390 | int |
15391 | main () | |
15392 | { | |
05ea2a05 | 15393 | prgregset_t avar |
bec39cab AC |
15394 | ; |
15395 | return 0; | |
15396 | } | |
15397 | _ACEOF | |
9b30624b | 15398 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15399 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
70f9f479 | 15400 | else |
05ea2a05 TT |
15401 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
15402 | ||
70f9f479 | 15403 | fi |
81ecdfbb | 15404 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 15405 | fi |
bec39cab | 15406 | |
05ea2a05 | 15407 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
70f9f479 | 15408 | |
05ea2a05 TT |
15409 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
15410 | ||
15411 | fi | |
15412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
15413 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
15414 | ||
c8693053 RO |
15415 | |
15416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15417 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } |
15418 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
81ecdfbb | 15419 | $as_echo_n "(cached) " >&6 |
bec39cab | 15420 | else |
81ecdfbb | 15421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15422 | /* end confdefs.h. */ |
05ea2a05 TT |
15423 | |
15424 | #define _SYSCALL32 | |
05ea2a05 | 15425 | #include <sys/procfs.h> |
064ef605 DJ |
15426 | int |
15427 | main () | |
15428 | { | |
05ea2a05 | 15429 | prfpregset_t avar |
064ef605 DJ |
15430 | ; |
15431 | return 0; | |
15432 | } | |
15433 | _ACEOF | |
9b30624b | 15434 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15435 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
064ef605 | 15436 | else |
05ea2a05 | 15437 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
064ef605 | 15438 | |
5c7f2947 | 15439 | fi |
81ecdfbb | 15440 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
05ea2a05 TT |
15441 | fi |
15442 | ||
15443 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
15444 | ||
15445 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h | |
15446 | ||
15447 | fi | |
15448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
15449 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
15450 | ||
c8693053 RO |
15451 | |
15452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15453 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } |
15454 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
15455 | $as_echo_n "(cached) " >&6 | |
15456 | else | |
15457 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15458 | /* end confdefs.h. */ |
05ea2a05 TT |
15459 | |
15460 | #define _SYSCALL32 | |
05ea2a05 | 15461 | #include <sys/procfs.h> |
bec39cab AC |
15462 | int |
15463 | main () | |
15464 | { | |
05ea2a05 | 15465 | prgregset32_t avar |
bec39cab AC |
15466 | ; |
15467 | return 0; | |
15468 | } | |
15469 | _ACEOF | |
9b30624b | 15470 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15471 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
15472 | else | |
15473 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
a3828db0 | 15474 | |
064ef605 | 15475 | fi |
81ecdfbb | 15476 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 15477 | fi |
96d7229d | 15478 | |
05ea2a05 | 15479 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
78434e59 | 15480 | |
05ea2a05 | 15481 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
78434e59 | 15482 | |
05ea2a05 TT |
15483 | fi |
15484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
15485 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
54019719 | 15486 | |
c8693053 RO |
15487 | |
15488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15489 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } |
15490 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
81ecdfbb | 15491 | $as_echo_n "(cached) " >&6 |
bec39cab | 15492 | else |
81ecdfbb | 15493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15494 | /* end confdefs.h. */ |
05ea2a05 TT |
15495 | |
15496 | #define _SYSCALL32 | |
05ea2a05 | 15497 | #include <sys/procfs.h> |
bec39cab AC |
15498 | int |
15499 | main () | |
15500 | { | |
05ea2a05 | 15501 | lwpid_t avar |
bec39cab AC |
15502 | ; |
15503 | return 0; | |
15504 | } | |
15505 | _ACEOF | |
05ea2a05 TT |
15506 | if ac_fn_c_try_compile "$LINENO"; then : |
15507 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
c906108c | 15508 | else |
05ea2a05 TT |
15509 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
15510 | ||
c906108c | 15511 | fi |
05ea2a05 | 15512 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15513 | fi |
81ecdfbb | 15514 | |
05ea2a05 | 15515 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
a3828db0 | 15516 | |
05ea2a05 | 15517 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
97bf5e38 | 15518 | |
05ea2a05 TT |
15519 | fi |
15520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
15521 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
a3828db0 | 15522 | |
c8693053 RO |
15523 | |
15524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15525 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } |
15526 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
81ecdfbb | 15527 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15528 | else |
81ecdfbb | 15529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15530 | /* end confdefs.h. */ |
a3828db0 | 15531 | |
05ea2a05 | 15532 | #define _SYSCALL32 |
05ea2a05 | 15533 | #include <sys/procfs.h> |
bec39cab AC |
15534 | int |
15535 | main () | |
15536 | { | |
05ea2a05 | 15537 | psaddr_t avar |
bec39cab AC |
15538 | ; |
15539 | return 0; | |
15540 | } | |
15541 | _ACEOF | |
81ecdfbb | 15542 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15543 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 15544 | else |
05ea2a05 TT |
15545 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
15546 | ||
c906108c | 15547 | fi |
81ecdfbb | 15548 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 15549 | fi |
c3f6f71d | 15550 | |
05ea2a05 | 15551 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
c906108c | 15552 | |
05ea2a05 | 15553 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
db1ff28b | 15554 | |
05ea2a05 TT |
15555 | fi |
15556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
15557 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
15558 | ||
c8693053 RO |
15559 | |
15560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15561 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } |
15562 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
db1ff28b JK |
15563 | $as_echo_n "(cached) " >&6 |
15564 | else | |
15565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15566 | /* end confdefs.h. */ | |
05ea2a05 TT |
15567 | |
15568 | #define _SYSCALL32 | |
05ea2a05 | 15569 | #include <sys/procfs.h> |
db1ff28b JK |
15570 | int |
15571 | main () | |
15572 | { | |
05ea2a05 | 15573 | elf_fpregset_t avar |
db1ff28b JK |
15574 | ; |
15575 | return 0; | |
15576 | } | |
15577 | _ACEOF | |
15578 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15579 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
db1ff28b | 15580 | else |
05ea2a05 TT |
15581 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
15582 | ||
db1ff28b JK |
15583 | fi |
15584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15585 | fi | |
db1ff28b | 15586 | |
05ea2a05 | 15587 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
db1ff28b | 15588 | |
05ea2a05 | 15589 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
db1ff28b | 15590 | |
05ea2a05 TT |
15591 | fi |
15592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
15593 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
db1ff28b | 15594 | |
05ea2a05 TT |
15595 | fi |
15596 | ||
15597 | ||
15598 | # Check the return and argument types of ptrace. | |
15599 | ||
15600 | ||
15601 | for ac_header in sys/ptrace.h ptrace.h | |
15602 | do : | |
15603 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
15604 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
15605 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
15606 | cat >>confdefs.h <<_ACEOF | |
15607 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
15608 | _ACEOF | |
db1ff28b JK |
15609 | |
15610 | fi | |
15611 | ||
05ea2a05 TT |
15612 | done |
15613 | ||
81ecdfbb | 15614 | |
05ea2a05 TT |
15615 | gdb_ptrace_headers=' |
15616 | #include <sys/types.h> | |
15617 | #if HAVE_SYS_PTRACE_H | |
15618 | # include <sys/ptrace.h> | |
15619 | #endif | |
15620 | #if HAVE_UNISTD_H | |
15621 | # include <unistd.h> | |
15622 | #endif | |
15623 | ' | |
5c45e068 | 15624 | |
05ea2a05 TT |
15625 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
15626 | # empty argument list, so check for that explicitly. | |
15627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
15628 | $as_echo_n "checking return type of ptrace... " >&6; } | |
15629 | if ${gdb_cv_func_ptrace_ret+:} false; then : | |
81ecdfbb | 15630 | $as_echo_n "(cached) " >&6 |
bec39cab | 15631 | else |
81ecdfbb | 15632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15633 | /* end confdefs.h. */ |
5164c117 | 15634 | Â $gdb_ptrace_headers |
bec39cab AC |
15635 | int |
15636 | main () | |
15637 | { | |
05ea2a05 | 15638 | extern long ptrace (enum __ptrace_request, ...); |
5164c117 | 15639 | |
bec39cab AC |
15640 | ; |
15641 | return 0; | |
15642 | } | |
15643 | _ACEOF | |
81ecdfbb | 15644 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15645 | gdb_cv_func_ptrace_ret='long' |
bec39cab | 15646 | else |
81ecdfbb | 15647 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15648 | /* end confdefs.h. */ |
05ea2a05 | 15649 | $gdb_ptrace_headers |
bec39cab AC |
15650 | int |
15651 | main () | |
15652 | { | |
05ea2a05 | 15653 | extern int ptrace (); |
5164c117 | 15654 | |
bec39cab AC |
15655 | ; |
15656 | return 0; | |
15657 | } | |
15658 | _ACEOF | |
81ecdfbb | 15659 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15660 | gdb_cv_func_ptrace_ret='int' |
27ca5dad | 15661 | else |
05ea2a05 | 15662 | gdb_cv_func_ptrace_ret='long' |
b6fb30ed | 15663 | |
27ca5dad | 15664 | fi |
81ecdfbb | 15665 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15666 | |
27ca5dad | 15667 | fi |
05ea2a05 | 15668 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15669 | |
27ca5dad | 15670 | fi |
05ea2a05 TT |
15671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
15672 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
5c45e068 | 15673 | |
b6fb30ed | 15674 | |
5c45e068 | 15675 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 15676 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret |
bec39cab | 15677 | _ACEOF |
3862412b | 15678 | |
b6fb30ed | 15679 | |
05ea2a05 TT |
15680 | # Check argument types. |
15681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
15682 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
15683 | if ${gdb_cv_func_ptrace_args+:} false; then : | |
15684 | $as_echo_n "(cached) " >&6 | |
15685 | else | |
05ea2a05 TT |
15686 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15687 | /* end confdefs.h. */ | |
15688 | $gdb_ptrace_headers | |
15689 | int | |
15690 | main () | |
15691 | { | |
15692 | extern long ptrace (enum __ptrace_request, ...); | |
5164c117 | 15693 | |
05ea2a05 TT |
15694 | ; |
15695 | return 0; | |
15696 | } | |
bec39cab | 15697 | _ACEOF |
05ea2a05 TT |
15698 | if ac_fn_c_try_compile "$LINENO"; then : |
15699 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' | |
15700 | else | |
b6fb30ed SM |
15701 | for gdb_arg1 in 'int' 'long'; do |
15702 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
15703 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
15704 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
15705 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
15706 | /* end confdefs.h. */ |
15707 | $gdb_ptrace_headers | |
15708 | int | |
15709 | main () | |
15710 | { | |
b6fb30ed | 15711 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); |
5164c117 | 15712 | |
05ea2a05 TT |
15713 | ; |
15714 | return 0; | |
15715 | } | |
15716 | _ACEOF | |
15717 | if ac_fn_c_try_compile "$LINENO"; then : | |
15718 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | |
b6fb30ed SM |
15719 | break 4; |
15720 | ||
97bf5e38 | 15721 | fi |
05ea2a05 | 15722 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed SM |
15723 | |
15724 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
15725 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
15726 | /* end confdefs.h. */ |
15727 | $gdb_ptrace_headers | |
15728 | int | |
15729 | main () | |
15730 | { | |
b6fb30ed | 15731 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); |
5164c117 | 15732 | |
05ea2a05 TT |
15733 | ; |
15734 | return 0; | |
15735 | } | |
6fea9e18 | 15736 | _ACEOF |
05ea2a05 | 15737 | if ac_fn_c_try_compile "$LINENO"; then : |
b6fb30ed SM |
15738 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
15739 | break 5; | |
6fea9e18 | 15740 | |
05ea2a05 TT |
15741 | fi |
15742 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed SM |
15743 | done |
15744 | done | |
15745 | done | |
15746 | done | |
15747 | done | |
15748 | # Provide a safe default value. | |
15749 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
6fea9e18 L |
15750 | |
15751 | fi | |
05ea2a05 | 15752 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15753 | |
05ea2a05 TT |
15754 | fi |
15755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
15756 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
b6fb30ed | 15757 | |
05ea2a05 TT |
15758 | ac_save_IFS=$IFS; IFS=',' |
15759 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
15760 | IFS=$ac_save_IFS | |
15761 | shift | |
6fea9e18 L |
15762 | |
15763 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15764 | #define PTRACE_TYPE_ARG1 $1 |
6fea9e18 L |
15765 | _ACEOF |
15766 | ||
15767 | ||
05ea2a05 TT |
15768 | cat >>confdefs.h <<_ACEOF |
15769 | #define PTRACE_TYPE_ARG3 $3 | |
bec39cab | 15770 | _ACEOF |
451928c5 | 15771 | |
60ca704f | 15772 | |
05ea2a05 TT |
15773 | cat >>confdefs.h <<_ACEOF |
15774 | #define PTRACE_TYPE_ARG4 $4 | |
15775 | _ACEOF | |
15776 | ||
15777 | if test -n "$5"; then | |
15778 | ||
15779 | cat >>confdefs.h <<_ACEOF | |
15780 | #define PTRACE_TYPE_ARG5 $5 | |
15781 | _ACEOF | |
451928c5 | 15782 | |
97bf5e38 | 15783 | fi |
451928c5 | 15784 | |
05ea2a05 TT |
15785 | |
15786 | if test "$cross_compiling" = no; then | |
15787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15788 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15789 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15790 | $as_echo_n "(cached) " >&6 |
05ea2a05 TT |
15791 | else |
15792 | if test "$cross_compiling" = yes; then : | |
15793 | as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
451928c5 | 15794 | else |
81ecdfbb | 15795 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15796 | /* end confdefs.h. */ |
05ea2a05 | 15797 | $ac_includes_default |
bec39cab AC |
15798 | int |
15799 | main () | |
15800 | { | |
05ea2a05 TT |
15801 | /* If this system has a BSD-style setpgrp which takes arguments, |
15802 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
15803 | exit successfully. */ | |
15804 | return setpgrp (1,1) != -1; | |
bec39cab AC |
15805 | ; |
15806 | return 0; | |
15807 | } | |
15808 | _ACEOF | |
05ea2a05 TT |
15809 | if ac_fn_c_try_run "$LINENO"; then : |
15810 | ac_cv_func_setpgrp_void=no | |
451928c5 | 15811 | else |
05ea2a05 | 15812 | ac_cv_func_setpgrp_void=yes |
451928c5 | 15813 | fi |
05ea2a05 TT |
15814 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15815 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
451928c5 AC |
15816 | fi |
15817 | ||
05ea2a05 TT |
15818 | fi |
15819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 | |
15820 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15821 | if test $ac_cv_func_setpgrp_void = yes; then | |
60ca704f | 15822 | |
05ea2a05 | 15823 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
451928c5 | 15824 | |
97bf5e38 | 15825 | fi |
451928c5 | 15826 | |
05ea2a05 TT |
15827 | else |
15828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15829 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15830 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15831 | $as_echo_n "(cached) " >&6 |
3862412b | 15832 | else |
81ecdfbb | 15833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15834 | /* end confdefs.h. */ |
05ea2a05 | 15835 | #include <unistd.h> |
bec39cab AC |
15836 | int |
15837 | main () | |
15838 | { | |
5593a99a SM |
15839 | if (setpgrp(1,1) == -1) |
15840 | exit (0); | |
15841 | else | |
15842 | exit (1); | |
05ea2a05 | 15843 | |
bec39cab AC |
15844 | ; |
15845 | return 0; | |
15846 | } | |
15847 | _ACEOF | |
81ecdfbb | 15848 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15849 | ac_cv_func_setpgrp_void=no |
3862412b | 15850 | else |
05ea2a05 | 15851 | ac_cv_func_setpgrp_void=yes |
5593a99a | 15852 | |
3862412b | 15853 | fi |
81ecdfbb | 15854 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15855 | |
3862412b | 15856 | fi |
05ea2a05 TT |
15857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
15858 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15859 | if test "$ac_cv_func_setpgrp_void" = yes; then | |
15860 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h | |
3862412b | 15861 | |
05ea2a05 | 15862 | fi |
97bf5e38 | 15863 | fi |
3862412b | 15864 | |
05ea2a05 TT |
15865 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
15866 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
15867 | #include <sys/proc.h> | |
6e9567fe | 15868 | |
e6cdd38e | 15869 | " |
05ea2a05 | 15870 | if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : |
e6cdd38e JB |
15871 | |
15872 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15873 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
e6cdd38e JB |
15874 | _ACEOF |
15875 | ||
15876 | ||
15877 | fi | |
15878 | ||
6e9567fe | 15879 | |
05ea2a05 TT |
15880 | # See if <sys/lwp.h> defines `struct lwp`. |
15881 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 | |
15882 | $as_echo_n "checking for struct lwp... " >&6; } | |
15883 | if ${gdb_cv_struct_lwp+:} false; then : | |
81ecdfbb | 15884 | $as_echo_n "(cached) " >&6 |
596c9d4b | 15885 | else |
81ecdfbb | 15886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15887 | /* end confdefs.h. */ |
05ea2a05 | 15888 | #include <sys/param.h> |
5593a99a SM |
15889 | #define _KMEMUSER |
15890 | #include <sys/lwp.h> | |
bec39cab AC |
15891 | int |
15892 | main () | |
15893 | { | |
05ea2a05 | 15894 | struct lwp l; |
5593a99a | 15895 | |
bec39cab AC |
15896 | ; |
15897 | return 0; | |
15898 | } | |
15899 | _ACEOF | |
81ecdfbb | 15900 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15901 | gdb_cv_struct_lwp=yes |
596c9d4b | 15902 | else |
05ea2a05 | 15903 | gdb_cv_struct_lwp=no |
5593a99a | 15904 | |
596c9d4b | 15905 | fi |
81ecdfbb | 15906 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15907 | |
596c9d4b | 15908 | fi |
05ea2a05 TT |
15909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
15910 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
15911 | if test "$gdb_cv_struct_lwp" = yes; then | |
596c9d4b | 15912 | |
05ea2a05 | 15913 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
596c9d4b | 15914 | |
05ea2a05 | 15915 | fi |
451928c5 | 15916 | |
05ea2a05 TT |
15917 | # See if <machine/reg.h> degines `struct reg'. |
15918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 | |
15919 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
15920 | if ${gdb_cv_struct_reg+:} false; then : | |
81ecdfbb | 15921 | $as_echo_n "(cached) " >&6 |
d84dd0c5 | 15922 | else |
81ecdfbb | 15923 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15924 | /* end confdefs.h. */ |
05ea2a05 | 15925 | #include <sys/types.h> |
5593a99a | 15926 | #include <machine/reg.h> |
bec39cab AC |
15927 | int |
15928 | main () | |
15929 | { | |
05ea2a05 | 15930 | struct reg r; |
5593a99a | 15931 | |
bec39cab AC |
15932 | ; |
15933 | return 0; | |
15934 | } | |
15935 | _ACEOF | |
81ecdfbb | 15936 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15937 | gdb_cv_struct_reg=yes |
d84dd0c5 | 15938 | else |
05ea2a05 | 15939 | gdb_cv_struct_reg=no |
5593a99a | 15940 | |
d84dd0c5 | 15941 | fi |
81ecdfbb | 15942 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15943 | |
d84dd0c5 | 15944 | fi |
05ea2a05 TT |
15945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
15946 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
15947 | if test "$gdb_cv_struct_reg" = yes; then | |
d84dd0c5 | 15948 | |
05ea2a05 | 15949 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
bec39cab | 15950 | |
05ea2a05 | 15951 | fi |
d84dd0c5 | 15952 | |
05ea2a05 TT |
15953 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
15954 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
15955 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> | |
15956 | #include <machine/reg.h> | |
15957 | " | |
15958 | if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : | |
d84dd0c5 | 15959 | |
05ea2a05 TT |
15960 | cat >>confdefs.h <<_ACEOF |
15961 | #define HAVE_STRUCT_REG_R_FS 1 | |
15962 | _ACEOF | |
15963 | ||
15964 | ||
15965 | fi | |
15966 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> | |
15967 | #include <machine/reg.h> | |
15968 | " | |
15969 | if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : | |
15970 | ||
15971 | cat >>confdefs.h <<_ACEOF | |
15972 | #define HAVE_STRUCT_REG_R_GS 1 | |
15973 | _ACEOF | |
15974 | ||
15975 | ||
15976 | fi | |
15977 | ||
15978 | ||
05ea2a05 TT |
15979 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
15980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 | |
15981 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
15982 | if ${gdb_cv_have_ptrace_getregs+:} false; then : | |
81ecdfbb | 15983 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15984 | else |
81ecdfbb | 15985 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15986 | /* end confdefs.h. */ |
05ea2a05 | 15987 | #include <sys/ptrace.h> |
bec39cab AC |
15988 | int |
15989 | main () | |
15990 | { | |
05ea2a05 | 15991 | PTRACE_GETREGS; |
bec39cab AC |
15992 | ; |
15993 | return 0; | |
15994 | } | |
15995 | _ACEOF | |
81ecdfbb | 15996 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15997 | gdb_cv_have_ptrace_getregs=yes |
d45fe813 | 15998 | else |
05ea2a05 | 15999 | gdb_cv_have_ptrace_getregs=no |
5593a99a | 16000 | |
d45fe813 | 16001 | fi |
81ecdfbb | 16002 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16003 | |
d45fe813 KB |
16004 | fi |
16005 | ||
05ea2a05 TT |
16006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
16007 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
16008 | if test "$gdb_cv_have_ptrace_getregs" = yes; then | |
bec39cab | 16009 | |
05ea2a05 | 16010 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
d45fe813 | 16011 | |
05ea2a05 | 16012 | fi |
d45fe813 | 16013 | |
05ea2a05 TT |
16014 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
16015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 | |
16016 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
16017 | if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : | |
81ecdfbb | 16018 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16019 | else |
81ecdfbb | 16020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16021 | /* end confdefs.h. */ |
05ea2a05 | 16022 | #include <sys/ptrace.h> |
bec39cab AC |
16023 | int |
16024 | main () | |
16025 | { | |
05ea2a05 | 16026 | PTRACE_GETFPXREGS; |
bec39cab AC |
16027 | ; |
16028 | return 0; | |
16029 | } | |
16030 | _ACEOF | |
81ecdfbb | 16031 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16032 | gdb_cv_have_ptrace_getfpxregs=yes |
d45fe813 | 16033 | else |
05ea2a05 | 16034 | gdb_cv_have_ptrace_getfpxregs=no |
5593a99a | 16035 | |
d45fe813 | 16036 | fi |
81ecdfbb | 16037 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16038 | |
d45fe813 KB |
16039 | fi |
16040 | ||
05ea2a05 TT |
16041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
16042 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
16043 | if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then | |
bec39cab | 16044 | |
05ea2a05 | 16045 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
d45fe813 | 16046 | |
05ea2a05 | 16047 | fi |
d45fe813 | 16048 | |
05ea2a05 TT |
16049 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
16050 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 | |
16051 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
16052 | if ${gdb_cv_have_pt_getdbregs+:} false; then : | |
81ecdfbb | 16053 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16054 | else |
81ecdfbb | 16055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16056 | /* end confdefs.h. */ |
05ea2a05 | 16057 | #include <sys/types.h> |
5593a99a | 16058 | #include <sys/ptrace.h> |
bec39cab AC |
16059 | int |
16060 | main () | |
16061 | { | |
05ea2a05 | 16062 | PT_GETDBREGS; |
5593a99a | 16063 | |
bec39cab AC |
16064 | ; |
16065 | return 0; | |
16066 | } | |
16067 | _ACEOF | |
81ecdfbb | 16068 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16069 | gdb_cv_have_pt_getdbregs=yes |
d45fe813 | 16070 | else |
05ea2a05 | 16071 | gdb_cv_have_pt_getdbregs=no |
5593a99a | 16072 | |
d45fe813 | 16073 | fi |
81ecdfbb | 16074 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16075 | |
d45fe813 KB |
16076 | fi |
16077 | ||
05ea2a05 TT |
16078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
16079 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
16080 | if test "$gdb_cv_have_pt_getdbregs" = yes; then | |
bec39cab | 16081 | |
05ea2a05 | 16082 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
d45fe813 | 16083 | |
05ea2a05 | 16084 | fi |
c906108c | 16085 | |
05ea2a05 TT |
16086 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
16087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 | |
16088 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
16089 | if ${gdb_cv_have_pt_getxmmregs+:} false; then : | |
81ecdfbb | 16090 | $as_echo_n "(cached) " >&6 |
c906108c | 16091 | else |
81ecdfbb | 16092 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16093 | /* end confdefs.h. */ |
05ea2a05 | 16094 | #include <sys/types.h> |
5593a99a | 16095 | #include <sys/ptrace.h> |
bec39cab AC |
16096 | int |
16097 | main () | |
16098 | { | |
05ea2a05 | 16099 | PT_GETXMMREGS; |
5593a99a | 16100 | |
bec39cab AC |
16101 | ; |
16102 | return 0; | |
16103 | } | |
16104 | _ACEOF | |
81ecdfbb | 16105 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16106 | gdb_cv_have_pt_getxmmregs=yes |
c906108c | 16107 | else |
05ea2a05 | 16108 | gdb_cv_have_pt_getxmmregs=no |
5593a99a | 16109 | |
c906108c | 16110 | fi |
81ecdfbb | 16111 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16112 | |
c906108c SS |
16113 | fi |
16114 | ||
05ea2a05 TT |
16115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
16116 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
16117 | if test "$gdb_cv_have_pt_getxmmregs" = yes; then | |
bec39cab | 16118 | |
05ea2a05 | 16119 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
c906108c | 16120 | |
05ea2a05 | 16121 | fi |
c906108c | 16122 | |
05ea2a05 TT |
16123 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
16124 | # Older FreeBSD versions don't have the pl_tdname member of | |
16125 | # `struct ptrace_lwpinfo'. | |
16126 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
16127 | " | |
16128 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : | |
43b7e92b | 16129 | |
05ea2a05 TT |
16130 | cat >>confdefs.h <<_ACEOF |
16131 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
43b7e92b | 16132 | _ACEOF |
43b7e92b | 16133 | |
05ea2a05 | 16134 | |
43b7e92b GB |
16135 | fi |
16136 | ||
43b7e92b | 16137 | |
05ea2a05 TT |
16138 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
16139 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
16140 | # FreeBSD 10.3. | |
16141 | 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> | |
16142 | " | |
16143 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : | |
16144 | ||
16145 | cat >>confdefs.h <<_ACEOF | |
16146 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
16147 | _ACEOF | |
43b7e92b | 16148 | |
43b7e92b | 16149 | |
c906108c | 16150 | fi |
c906108c | 16151 | |
05ea2a05 | 16152 | |
bc8bcb4b | 16153 | # Check if the compiler supports the `long long' type. |
c906108c | 16154 | |
81ecdfbb RW |
16155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
16156 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
d0ac1c44 | 16157 | if ${gdb_cv_c_long_long+:} false; then : |
81ecdfbb | 16158 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16159 | else |
81ecdfbb | 16160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16161 | /* end confdefs.h. */ |
bc8bcb4b | 16162 | extern long long foo; |
bec39cab AC |
16163 | int |
16164 | main () | |
16165 | { | |
bc8bcb4b | 16166 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
16167 | ; |
16168 | return 0; | |
16169 | } | |
16170 | _ACEOF | |
81ecdfbb | 16171 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
16172 | gdb_cv_c_long_long=yes |
16173 | else | |
81ecdfbb | 16174 | gdb_cv_c_long_long=no |
97bf5e38 | 16175 | fi |
81ecdfbb | 16176 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16177 | fi |
81ecdfbb RW |
16178 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
16179 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
0ad6b8ee | 16180 | if test "$gdb_cv_c_long_long" != yes; then |
74a0d9f6 | 16181 | # libdecnumber requires long long. |
d0ac1c44 | 16182 | as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 |
97bf5e38 MK |
16183 | fi |
16184 | ||
bc8bcb4b | 16185 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 16186 | |
81ecdfbb RW |
16187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
16188 | $as_echo_n "checking for long long support in printf... " >&6; } | |
d0ac1c44 | 16189 | if ${gdb_cv_printf_has_long_long+:} false; then : |
81ecdfbb | 16190 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16191 | else |
81ecdfbb | 16192 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16193 | gdb_cv_printf_has_long_long=no |
16194 | else | |
81ecdfbb | 16195 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16196 | /* end confdefs.h. */ |
bc8bcb4b MK |
16197 | $ac_includes_default |
16198 | int | |
16199 | main () | |
16200 | { | |
16201 | char buf[32]; | |
97bf5e38 MK |
16202 | long long l = 0; |
16203 | l = (l << 16) + 0x0123; | |
16204 | l = (l << 16) + 0x4567; | |
16205 | l = (l << 16) + 0x89ab; | |
16206 | l = (l << 16) + 0xcdef; | |
16207 | sprintf (buf, "0x%016llx", l); | |
16208 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
16209 | ; |
16210 | return 0; | |
c906108c | 16211 | } |
bec39cab | 16212 | _ACEOF |
81ecdfbb | 16213 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
16214 | gdb_cv_printf_has_long_long=yes |
16215 | else | |
81ecdfbb | 16216 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 16217 | fi |
81ecdfbb RW |
16218 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16219 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 16220 | fi |
81ecdfbb | 16221 | |
97bf5e38 | 16222 | fi |
81ecdfbb RW |
16223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
16224 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
0ad6b8ee | 16225 | if test "$gdb_cv_printf_has_long_long" = yes; then |
bc8bcb4b | 16226 | |
81ecdfbb | 16227 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
16228 | |
16229 | fi | |
97bf5e38 | 16230 | |
1a619819 LM |
16231 | # Check if the compiler and runtime support printing decfloats. |
16232 | ||
81ecdfbb RW |
16233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
16234 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
d0ac1c44 | 16235 | if ${gdb_cv_printf_has_decfloat+:} false; then : |
81ecdfbb | 16236 | $as_echo_n "(cached) " >&6 |
1a619819 | 16237 | else |
81ecdfbb | 16238 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
16239 | gdb_cv_printf_has_decfloat=no |
16240 | else | |
81ecdfbb | 16241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
16242 | /* end confdefs.h. */ |
16243 | $ac_includes_default | |
16244 | int | |
16245 | main () | |
16246 | { | |
16247 | char buf[64]; | |
16248 | _Decimal32 d32 = 1.2345df; | |
16249 | _Decimal64 d64 = 1.2345dd; | |
16250 | _Decimal128 d128 = 1.2345dl; | |
16251 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
16252 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
16253 | ; | |
16254 | return 0; | |
16255 | } | |
16256 | _ACEOF | |
81ecdfbb | 16257 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
16258 | gdb_cv_printf_has_decfloat=yes |
16259 | else | |
81ecdfbb | 16260 | gdb_cv_printf_has_decfloat=no |
1a619819 | 16261 | fi |
81ecdfbb RW |
16262 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16263 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 16264 | fi |
81ecdfbb | 16265 | |
1a619819 | 16266 | fi |
81ecdfbb RW |
16267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
16268 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
0ad6b8ee | 16269 | if test "$gdb_cv_printf_has_decfloat" = yes; then |
1a619819 | 16270 | |
81ecdfbb | 16271 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
16272 | |
16273 | fi | |
16274 | ||
bc8bcb4b MK |
16275 | # Check if the compiler supports the `long double' type. We can't use |
16276 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
16277 | # constants defined in <float.h> that fail on some systems, | |
16278 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 16279 | |
81ecdfbb RW |
16280 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
16281 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
d0ac1c44 | 16282 | if ${gdb_cv_c_long_double+:} false; then : |
81ecdfbb | 16283 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16284 | else |
81ecdfbb | 16285 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16286 | /* end confdefs.h. */ |
97bf5e38 | 16287 | long double foo; |
bec39cab | 16288 | _ACEOF |
81ecdfbb | 16289 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 16290 | gdb_cv_c_long_double=yes |
97bf5e38 | 16291 | else |
81ecdfbb | 16292 | gdb_cv_c_long_double=no |
97bf5e38 | 16293 | fi |
81ecdfbb | 16294 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16295 | fi |
81ecdfbb RW |
16296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
16297 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
0ad6b8ee | 16298 | if test "$gdb_cv_c_long_double" = yes; then |
c906108c | 16299 | |
81ecdfbb | 16300 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16301 | |
16302 | fi | |
16303 | ||
bc8bcb4b | 16304 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 16305 | |
81ecdfbb RW |
16306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
16307 | $as_echo_n "checking for long double support in printf... " >&6; } | |
d0ac1c44 | 16308 | if ${gdb_cv_printf_has_long_double+:} false; then : |
81ecdfbb | 16309 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16310 | else |
81ecdfbb | 16311 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16312 | gdb_cv_printf_has_long_double=no |
16313 | else | |
81ecdfbb | 16314 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16315 | /* end confdefs.h. */ |
bc8bcb4b MK |
16316 | $ac_includes_default |
16317 | int | |
16318 | main () | |
16319 | { | |
16320 | char buf[16]; | |
97bf5e38 MK |
16321 | long double f = 3.141592653; |
16322 | sprintf (buf, "%Lg", f); | |
16323 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
16324 | ; |
16325 | return 0; | |
97bf5e38 | 16326 | } |
bec39cab | 16327 | _ACEOF |
81ecdfbb | 16328 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 16329 | gdb_cv_printf_has_long_double=yes |
c906108c | 16330 | else |
81ecdfbb | 16331 | gdb_cv_printf_has_long_double=no |
c906108c | 16332 | fi |
81ecdfbb RW |
16333 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16334 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 16335 | fi |
81ecdfbb | 16336 | |
c906108c | 16337 | fi |
81ecdfbb RW |
16338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
16339 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
0ad6b8ee | 16340 | if test "$gdb_cv_printf_has_long_double" = yes; then |
bc8bcb4b | 16341 | |
81ecdfbb | 16342 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16343 | |
16344 | fi | |
97bf5e38 | 16345 | |
bc8bcb4b | 16346 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 16347 | |
81ecdfbb RW |
16348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
16349 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
d0ac1c44 | 16350 | if ${gdb_cv_scanf_has_long_double+:} false; then : |
81ecdfbb | 16351 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16352 | else |
81ecdfbb | 16353 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16354 | gdb_cv_scanf_has_long_double=no |
16355 | else | |
81ecdfbb | 16356 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16357 | /* end confdefs.h. */ |
bc8bcb4b MK |
16358 | #include <stdio.h> |
16359 | int | |
16360 | main () | |
16361 | { | |
16362 | char *buf = "3.141592653"; | |
97bf5e38 MK |
16363 | long double f = 0; |
16364 | sscanf (buf, "%Lg", &f); | |
16365 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
16366 | ; |
16367 | return 0; | |
97bf5e38 | 16368 | } |
bec39cab | 16369 | _ACEOF |
81ecdfbb | 16370 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
16371 | gdb_cv_scanf_has_long_double=yes |
16372 | else | |
81ecdfbb | 16373 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 16374 | fi |
81ecdfbb RW |
16375 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16376 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 16377 | fi |
81ecdfbb | 16378 | |
c906108c | 16379 | fi |
81ecdfbb RW |
16380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
16381 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
0ad6b8ee | 16382 | if test "$gdb_cv_scanf_has_long_double" = yes; then |
bc8bcb4b | 16383 | |
81ecdfbb | 16384 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16385 | |
16386 | fi | |
c906108c | 16387 | |
438013df AO |
16388 | case ${host_os} in |
16389 | aix*) | |
81ecdfbb RW |
16390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
16391 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d0ac1c44 | 16392 | if ${gdb_cv_bigtoc+:} false; then : |
81ecdfbb | 16393 | $as_echo_n "(cached) " >&6 |
438013df | 16394 | else |
5593a99a | 16395 | SAVE_LDFLAGS=$LDFLAGS |
bec39cab | 16396 | |
5593a99a SM |
16397 | case $GCC in |
16398 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
16399 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
16400 | esac | |
438013df | 16401 | |
5593a99a SM |
16402 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
16403 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16404 | /* end confdefs.h. */ |
438013df | 16405 | |
bec39cab AC |
16406 | int |
16407 | main () | |
16408 | { | |
438013df | 16409 | int i; |
bec39cab AC |
16410 | ; |
16411 | return 0; | |
16412 | } | |
16413 | _ACEOF | |
81ecdfbb | 16414 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16415 | |
81ecdfbb RW |
16416 | else |
16417 | gdb_cv_bigtoc= | |
5593a99a | 16418 | |
438013df | 16419 | fi |
81ecdfbb RW |
16420 | rm -f core conftest.err conftest.$ac_objext \ |
16421 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 16422 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 16423 | |
bec39cab | 16424 | fi |
81ecdfbb RW |
16425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
16426 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
16427 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
16428 | ;; | |
16429 | esac | |
16430 | ||
38f6b338 | 16431 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 16432 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
16433 | dynamic_list=false |
16434 | if test "${gdb_native}" = yes; then | |
16435 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
16436 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
16437 | # may not be supported there. | |
16438 | old_LDFLAGS="$LDFLAGS" | |
16439 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
16440 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
16441 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
16442 | if test "${have_libpython}" = no; then | |
16443 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
16444 | /* end confdefs.h. */ |
16445 | ||
16446 | int | |
16447 | main () | |
16448 | { | |
16449 | ||
16450 | ; | |
16451 | return 0; | |
16452 | } | |
16453 | _ACEOF | |
16454 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
16455 | dynamic_list=true |
16456 | fi | |
16457 | rm -f core conftest.err conftest.$ac_objext \ | |
16458 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
16459 | else |
16460 | # Workaround http://bugs.python.org/issue4434 where static | |
16461 | # libpythonX.Y.a would get its symbols required for | |
16462 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
16463 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
16464 | |
16465 | # Note the workaround for Python | |
16466 | # http://bugs.python.org/issue10112 earlier has removed | |
16467 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
16468 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
16469 | # always pass. | |
38f6b338 JK |
16470 | old_CFLAGS="$CFLAGS" |
16471 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
16472 | old_LIBS="$LIBS" |
16473 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
16474 | old_CPPFLAGS="$CPPFLAGS" |
16475 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 16476 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 16477 | true |
f6528abd | 16478 | else |
3bebe2f2 JK |
16479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16480 | /* end confdefs.h. */ | |
1b4f615e | 16481 | #include "Python.h" |
3bebe2f2 JK |
16482 | int |
16483 | main () | |
16484 | { | |
16485 | int err; | |
38f6b338 | 16486 | Py_Initialize (); |
3fed4c0b | 16487 | err = PyRun_SimpleString ("import ctypes\n"); |
38f6b338 JK |
16488 | Py_Finalize (); |
16489 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
16490 | ; |
16491 | return 0; | |
16492 | } | |
16493 | _ACEOF | |
16494 | if ac_fn_c_try_run "$LINENO"; then : | |
16495 | dynamic_list=true | |
16496 | fi | |
16497 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16498 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16499 | fi | |
16500 | ||
8c1fb155 | 16501 | LIBS="$old_LIBS" |
38f6b338 | 16502 | CFLAGS="$old_CFLAGS" |
1b4f615e | 16503 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
16504 | fi |
16505 | LDFLAGS="$old_LDFLAGS" | |
16506 | fi | |
16507 | if $dynamic_list; then | |
16508 | found="-Wl,--dynamic-list" | |
16509 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 16510 | else |
38f6b338 JK |
16511 | found="-rdynamic" |
16512 | RDYNAMIC="-rdynamic" | |
f6528abd | 16513 | fi |
f6528abd | 16514 | |
38f6b338 | 16515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 16516 | $as_echo "$found" >&6; } |
0407b3f1 | 16517 | |
f6528abd | 16518 | |
0ad6b8ee | 16519 | if test "${build}" = "${host}" -a "${host}" = "${target}" ; then |
c906108c | 16520 | case ${host_os} in |
d92419e5 | 16521 | aix*) |
81ecdfbb RW |
16522 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
16523 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
d0ac1c44 | 16524 | if ${gdb_cv_have_aix_thread_debug+:} false; then : |
81ecdfbb | 16525 | $as_echo_n "(cached) " >&6 |
bec39cab | 16526 | else |
81ecdfbb | 16527 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16528 | /* end confdefs.h. */ |
d92419e5 | 16529 | #include <sys/pthdebug.h> |
bec39cab AC |
16530 | int |
16531 | main () | |
16532 | { | |
d92419e5 | 16533 | #ifndef PTHDB_VERSION_3 |
5593a99a SM |
16534 | #error |
16535 | #endif | |
16536 | ||
bec39cab AC |
16537 | ; |
16538 | return 0; | |
16539 | } | |
16540 | _ACEOF | |
81ecdfbb | 16541 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
16542 | gdb_cv_have_aix_thread_debug=yes |
16543 | else | |
81ecdfbb | 16544 | gdb_cv_have_aix_thread_debug=no |
5593a99a | 16545 | |
d92419e5 | 16546 | fi |
81ecdfbb | 16547 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16548 | |
d92419e5 JB |
16549 | fi |
16550 | ||
81ecdfbb RW |
16551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
16552 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
0ad6b8ee | 16553 | if test "$gdb_cv_have_aix_thread_debug" = yes; then |
d92419e5 | 16554 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" |
3483b318 | 16555 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 16556 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
16557 | |
16558 | # Older versions of AIX do not provide the declaration for | |
16559 | # the getthrds function (it appears that it was introduced | |
16560 | # with AIX 6.x). | |
16561 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
16562 | " | |
d0ac1c44 | 16563 | if test "x$ac_cv_have_decl_getthrds" = xyes; then : |
d645e32e JB |
16564 | ac_have_decl=1 |
16565 | else | |
16566 | ac_have_decl=0 | |
16567 | fi | |
16568 | ||
16569 | cat >>confdefs.h <<_ACEOF | |
16570 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
16571 | _ACEOF | |
16572 | ||
d92419e5 JB |
16573 | fi |
16574 | ;; | |
c906108c | 16575 | esac |
bec39cab | 16576 | |
c906108c SS |
16577 | fi |
16578 | ||
3f47be5c | 16579 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
5593a99a | 16580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
81ecdfbb | 16581 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } |
d0ac1c44 | 16582 | if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : |
81ecdfbb | 16583 | $as_echo_n "(cached) " >&6 |
bec39cab | 16584 | else |
81ecdfbb | 16585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16586 | /* end confdefs.h. */ |
3f47be5c | 16587 | #include <thread_db.h> |
bec39cab AC |
16588 | int |
16589 | main () | |
16590 | { | |
3f47be5c | 16591 | int i = TD_NOTALLOC; |
5593a99a | 16592 | |
bec39cab AC |
16593 | ; |
16594 | return 0; | |
16595 | } | |
16596 | _ACEOF | |
81ecdfbb | 16597 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
16598 | gdb_cv_thread_db_h_has_td_notalloc=yes |
16599 | else | |
81ecdfbb | 16600 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 16601 | |
3f47be5c | 16602 | fi |
81ecdfbb | 16603 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 16604 | |
bec39cab | 16605 | fi |
81ecdfbb RW |
16606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
16607 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
5593a99a SM |
16608 | |
16609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
81ecdfbb | 16610 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } |
d0ac1c44 | 16611 | if ${gdb_cv_thread_db_h_has_td_version+:} false; then : |
81ecdfbb | 16612 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16613 | else |
81ecdfbb | 16614 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16615 | /* end confdefs.h. */ |
16616 | #include <thread_db.h> | |
16617 | int | |
16618 | main () | |
16619 | { | |
16620 | int i = TD_VERSION; | |
5593a99a | 16621 | |
59f80f10 DJ |
16622 | ; |
16623 | return 0; | |
16624 | } | |
16625 | _ACEOF | |
81ecdfbb | 16626 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16627 | gdb_cv_thread_db_h_has_td_version=yes |
16628 | else | |
81ecdfbb | 16629 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
16630 | |
16631 | fi | |
81ecdfbb | 16632 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16633 | |
16634 | fi | |
81ecdfbb RW |
16635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
16636 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
5593a99a SM |
16637 | |
16638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
81ecdfbb | 16639 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } |
d0ac1c44 | 16640 | if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : |
81ecdfbb | 16641 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16642 | else |
81ecdfbb | 16643 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16644 | /* end confdefs.h. */ |
16645 | #include <thread_db.h> | |
16646 | int | |
16647 | main () | |
16648 | { | |
16649 | int i = TD_NOTLS; | |
5593a99a | 16650 | |
59f80f10 DJ |
16651 | ; |
16652 | return 0; | |
16653 | } | |
16654 | _ACEOF | |
81ecdfbb | 16655 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16656 | gdb_cv_thread_db_h_has_td_notls=yes |
16657 | else | |
81ecdfbb | 16658 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
16659 | |
16660 | fi | |
81ecdfbb | 16661 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16662 | |
16663 | fi | |
81ecdfbb RW |
16664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
16665 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
16666 | fi |
16667 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 16668 | |
81ecdfbb | 16669 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 16670 | |
59f80f10 DJ |
16671 | fi |
16672 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
16673 | ||
81ecdfbb | 16674 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
16675 | |
16676 | fi | |
16677 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
16678 | ||
81ecdfbb | 16679 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 16680 | |
3f47be5c EZ |
16681 | fi |
16682 | ||
e655c1a2 PA |
16683 | case $host_os in |
16684 | go32* | *djgpp*) | |
16685 | gdbinit=gdb.ini | |
16686 | ;; | |
16687 | *) | |
16688 | gdbinit=.gdbinit | |
16689 | ;; | |
16690 | esac | |
16691 | ||
16692 | cat >>confdefs.h <<_ACEOF | |
16693 | #define GDBINIT "$gdbinit" | |
16694 | _ACEOF | |
16695 | ||
16696 | ||
fb40c209 | 16697 | |
92e4e97a AB |
16698 | cat >>confdefs.h <<_ACEOF |
16699 | #define GDBEARLYINIT ".gdbearlyinit" | |
16700 | _ACEOF | |
16701 | ||
16702 | ||
16703 | ||
f83d8a90 DE |
16704 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
16705 | # except that the argument to --with-sysroot is optional. | |
16706 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
16707 | if test "x$with_sysroot" = xyes; then | |
16708 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
16709 | fi | |
bec39cab | 16710 | |
81ecdfbb RW |
16711 | # Check whether --with-sysroot was given. |
16712 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
16713 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
16714 | else | |
16715 | TARGET_SYSTEM_ROOT= | |
16716 | fi | |
030292b7 | 16717 | |
030292b7 | 16718 | |
f83d8a90 DE |
16719 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
16720 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16721 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
16722 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 16723 | |
f83d8a90 DE |
16724 | cat >>confdefs.h <<_ACEOF |
16725 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
16726 | _ACEOF | |
bec39cab | 16727 | |
030292b7 | 16728 | |
b14b1491 | 16729 | |
f83d8a90 DE |
16730 | |
16731 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16732 | if test "x$prefix" = xNONE; then | |
16733 | test_prefix=/usr/local | |
16734 | else | |
16735 | test_prefix=$prefix | |
16736 | fi | |
16737 | else | |
16738 | test_prefix=$exec_prefix | |
16739 | fi | |
16740 | value=0 | |
16741 | case ${ac_define_dir} in | |
16742 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16743 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16744 | value=1 | |
16745 | ;; | |
16746 | esac | |
16747 | ||
16748 | cat >>confdefs.h <<_ACEOF | |
16749 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
16750 | _ACEOF | |
030292b7 DJ |
16751 | |
16752 | ||
16753 | ||
16e7150e | 16754 | |
16e7150e | 16755 | |
81ecdfbb RW |
16756 | # Check whether --with-system-gdbinit was given. |
16757 | if test "${with_system_gdbinit+set}" = set; then : | |
16758 | withval=$with_system_gdbinit; | |
b14b1491 TT |
16759 | SYSTEM_GDBINIT=$withval |
16760 | else | |
16761 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
16762 | fi |
16763 | ||
16e7150e JG |
16764 | |
16765 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16766 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 16767 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
16768 | ac_define_dir=`eval echo $ac_define_dir` |
16769 | ||
16770 | cat >>confdefs.h <<_ACEOF | |
16771 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
16772 | _ACEOF | |
16773 | ||
16774 | ||
16775 | ||
0c4a4063 | 16776 | |
b14b1491 TT |
16777 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
16778 | if test "x$prefix" = xNONE; then | |
16779 | test_prefix=/usr/local | |
16780 | else | |
16781 | test_prefix=$prefix | |
16782 | fi | |
16783 | else | |
16784 | test_prefix=$exec_prefix | |
16785 | fi | |
16786 | value=0 | |
16787 | case ${ac_define_dir} in | |
16788 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16789 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16790 | value=1 | |
16791 | ;; | |
16792 | esac | |
16e7150e | 16793 | |
b14b1491 TT |
16794 | cat >>confdefs.h <<_ACEOF |
16795 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
16796 | _ACEOF |
16797 | ||
b14b1491 | 16798 | |
16e7150e | 16799 | |
0c4a4063 | 16800 | |
b835bb52 | 16801 | |
ed2a2229 CB |
16802 | # Check whether --with-system-gdbinit-dir was given. |
16803 | if test "${with_system_gdbinit_dir+set}" = set; then : | |
16804 | withval=$with_system_gdbinit_dir; | |
16805 | SYSTEM_GDBINIT_DIR=$withval | |
16806 | else | |
16807 | SYSTEM_GDBINIT_DIR= | |
16808 | fi | |
16809 | ||
16810 | ||
16811 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16812 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16813 | ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR` | |
16814 | ac_define_dir=`eval echo $ac_define_dir` | |
16815 | ||
16816 | cat >>confdefs.h <<_ACEOF | |
16817 | #define SYSTEM_GDBINIT_DIR "$ac_define_dir" | |
16818 | _ACEOF | |
16819 | ||
16820 | ||
16821 | ||
16822 | ||
16823 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16824 | if test "x$prefix" = xNONE; then | |
16825 | test_prefix=/usr/local | |
16826 | else | |
16827 | test_prefix=$prefix | |
16828 | fi | |
16829 | else | |
16830 | test_prefix=$exec_prefix | |
16831 | fi | |
16832 | value=0 | |
16833 | case ${ac_define_dir} in | |
16834 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16835 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16836 | value=1 | |
16837 | ;; | |
16838 | esac | |
16839 | ||
16840 | cat >>confdefs.h <<_ACEOF | |
16841 | #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value | |
16842 | _ACEOF | |
16843 | ||
16844 | ||
16845 | ||
16846 | ||
16847 | ||
81ecdfbb RW |
16848 | # Check whether --enable-werror was given. |
16849 | if test "${enable_werror+set}" = set; then : | |
16850 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
16851 | yes | y) ERROR_ON_WARNING="yes" ;; |
16852 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 16853 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 16854 | esac |
81ecdfbb RW |
16855 | fi |
16856 | ||
094a342e | 16857 | |
9a084706 PA |
16858 | # Enable -Werror by default when using gcc. Turn it off for releases. |
16859 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
16860 | ERROR_ON_WARNING=yes |
16861 | fi | |
16862 | ||
16863 | WERROR_CFLAGS="" | |
16864 | if test "${ERROR_ON_WARNING}" = yes ; then | |
16865 | WERROR_CFLAGS="-Werror" | |
16866 | fi | |
16867 | ||
cf6de44d | 16868 | # The options we'll try to enable. |
aac331e4 | 16869 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 16870 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
aac331e4 | 16871 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 16872 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 16873 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
7f8a5d38 | 16874 | -Wno-mismatched-tags \ |
632e107b | 16875 | -Wno-error=deprecated-register \ |
85e26832 | 16876 | -Wsuggest-override \ |
1a34f210 | 16877 | -Wimplicit-fallthrough=3 \ |
96643e35 | 16878 | -Wduplicated-cond \ |
33a6bc35 TT |
16879 | -Wshadow=local \ |
16880 | -Wdeprecated-copy \ | |
16881 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 16882 | -Wredundant-move \ |
8ddd8e0e | 16883 | -Wmissing-declarations \ |
a0761e34 | 16884 | -Wmissing-prototypes \ |
898e7f60 SM |
16885 | -Wstrict-null-sentinel \ |
16886 | " | |
3bc3d82a | 16887 | |
3526781e | 16888 | case "${host}" in |
4fa7574e RO |
16889 | *-*-mingw32*) |
16890 | # Enable -Wno-format by default when using gcc on mingw since many | |
16891 | # GCC versions complain about %I64. | |
16892 | build_warnings="$build_warnings -Wno-format" ;; | |
16893 | *-*-solaris*) | |
16894 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
16895 | # doesn't understand. | |
16896 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
16897 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
16898 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
16899 | *) |
16900 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
16901 | # but there's a special case for this below. | |
16902 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
3526781e DJ |
16903 | esac |
16904 | ||
81ecdfbb RW |
16905 | # Check whether --enable-build-warnings was given. |
16906 | if test "${enable_build_warnings+set}" = set; then : | |
16907 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
16908 | yes) ;; |
16909 | no) build_warnings="-w";; | |
16910 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16911 | build_warnings="${build_warnings} ${t}";; | |
16912 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16913 | build_warnings="${t} ${build_warnings}";; | |
16914 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16915 | esac | |
d4f3574e | 16916 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 16917 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 16918 | fi |
81ecdfbb RW |
16919 | fi |
16920 | # Check whether --enable-gdb-build-warnings was given. | |
16921 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
16922 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
16923 | yes) ;; |
16924 | no) build_warnings="-w";; | |
16925 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16926 | build_warnings="${build_warnings} ${t}";; | |
16927 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16928 | build_warnings="${t} ${build_warnings}";; | |
16929 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16930 | esac | |
16931 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
16932 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
16933 | fi | |
81ecdfbb | 16934 | fi |
3bc3d82a PA |
16935 | |
16936 | # The set of warnings supported by a C++ compiler is not the same as | |
16937 | # of the C compiler. | |
cf6de44d | 16938 | ac_ext=cpp |
3bc3d82a PA |
16939 | ac_cpp='$CXXCPP $CPPFLAGS' |
16940 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16941 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16942 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
16943 | ||
3bc3d82a | 16944 | |
81ecdfbb | 16945 | WARN_CFLAGS="" |
c906108c SS |
16946 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
16947 | then | |
81ecdfbb RW |
16948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
16949 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
16950 | # Separate out the -Werror flag as some files just cannot be |
16951 | # compiled with it enabled. | |
16952 | for w in ${build_warnings}; do | |
7544db95 PA |
16953 | # GCC does not complain about -Wno-unknown-warning. Invert |
16954 | # and test -Wunknown-warning instead. | |
16955 | case $w in | |
16956 | -Wno-*) | |
16957 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
16958 | -Wformat-nonliteral) |
16959 | # gcc requires -Wformat before -Wformat-nonliteral | |
16960 | # will work, so stick them together. | |
16961 | w="-Wformat $w" | |
16962 | wtest="$w" | |
16963 | ;; | |
7544db95 PA |
16964 | *) |
16965 | wtest=$w ;; | |
16966 | esac | |
16967 | ||
746a987d AC |
16968 | case $w in |
16969 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
16970 | *) |
16971 | # Check whether GCC accepts it. | |
4536bbc6 | 16972 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 16973 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 16974 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 16975 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
16976 | if test "x$w" = "x-Wunused-variable"; then |
16977 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
16978 | # fixed in GCC 4.9. This test is derived from the gdb | |
16979 | # source code that triggered this bug in GCC. | |
16980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16981 | /* end confdefs.h. */ | |
16982 | struct scoped_restore_base {}; | |
864ca435 SM |
16983 | struct scoped_restore_tmpl : public scoped_restore_base { |
16984 | ~scoped_restore_tmpl() {} | |
16985 | }; | |
a0de763e TT |
16986 | int |
16987 | main () | |
16988 | { | |
16989 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
864ca435 | 16990 | |
a0de763e TT |
16991 | ; |
16992 | return 0; | |
16993 | } | |
16994 | _ACEOF | |
16995 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
16996 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
16997 | fi | |
16998 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16999 | else | |
17000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 17001 | /* end confdefs.h. */ |
4536bbc6 | 17002 | |
bec39cab AC |
17003 | int |
17004 | main () | |
17005 | { | |
4536bbc6 | 17006 | |
bec39cab AC |
17007 | ; |
17008 | return 0; | |
17009 | } | |
17010 | _ACEOF | |
3bc3d82a | 17011 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 17012 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 17013 | fi |
81ecdfbb | 17014 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a0de763e | 17015 | fi |
4536bbc6 | 17016 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 17017 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
17018 | esac |
17019 | done | |
81ecdfbb RW |
17020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
17021 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
17022 | fi |
17023 | ||
17024 | ||
104c1213 | 17025 | |
cf6de44d | 17026 | ac_ext=c |
3bc3d82a PA |
17027 | ac_cpp='$CPP $CPPFLAGS' |
17028 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17029 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17030 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17031 | ||
3bc3d82a | 17032 | |
b835bb52 | 17033 | |
f35d5ade TT |
17034 | # Check whether --enable-ubsan was given. |
17035 | if test "${enable_ubsan+set}" = set; then : | |
17036 | enableval=$enable_ubsan; | |
17037 | else | |
eff98030 | 17038 | enable_ubsan=no |
f35d5ade TT |
17039 | fi |
17040 | ||
17041 | if test "x$enable_ubsan" = xauto; then | |
17042 | if $development; then | |
17043 | enable_ubsan=yes | |
17044 | fi | |
17045 | fi | |
17046 | ac_ext=cpp | |
17047 | ac_cpp='$CXXCPP $CPPFLAGS' | |
17048 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17049 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17050 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17051 | ||
17052 | if test "x$enable_ubsan" = xyes; then | |
17053 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5 | |
17054 | $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; } | |
17055 | saved_CXXFLAGS="$CXXFLAGS" | |
17056 | CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
17057 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17058 | /* end confdefs.h. */ | |
17059 | ||
17060 | int | |
17061 | main () | |
17062 | { | |
17063 | ||
17064 | ; | |
17065 | return 0; | |
17066 | } | |
17067 | _ACEOF | |
17068 | if ac_fn_cxx_try_link "$LINENO"; then : | |
17069 | enable_ubsan=yes | |
17070 | else | |
17071 | enable_ubsan=no | |
ad6dba1c | 17072 | |
f35d5ade TT |
17073 | fi |
17074 | rm -f core conftest.err conftest.$ac_objext \ | |
17075 | conftest$ac_exeext conftest.$ac_ext | |
17076 | CXXFLAGS="$saved_CXXFLAGS" | |
17077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 | |
17078 | $as_echo "$enable_ubsan" >&6; } | |
17079 | if test "x$enable_ubsan" = xyes; then | |
17080 | WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
17081 | CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined" | |
17082 | fi | |
17083 | fi | |
17084 | ac_ext=c | |
17085 | ac_cpp='$CPP $CPPFLAGS' | |
17086 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17087 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17088 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17089 | ||
17090 | ||
17091 | ||
7a292a7a | 17092 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
17093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
17094 | $as_echo_n "checking for cygwin... " >&6; } | |
d0ac1c44 | 17095 | if ${gdb_cv_os_cygwin+:} false; then : |
81ecdfbb | 17096 | $as_echo_n "(cached) " >&6 |
bec39cab | 17097 | else |
81ecdfbb | 17098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 17099 | /* end confdefs.h. */ |
7a292a7a SS |
17100 | |
17101 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
17102 | lose | |
17103 | #endif | |
bec39cab | 17104 | _ACEOF |
7a292a7a | 17105 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 17106 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
17107 | gdb_cv_os_cygwin=yes |
17108 | else | |
7a292a7a SS |
17109 | gdb_cv_os_cygwin=no |
17110 | fi | |
17111 | rm -f conftest* | |
17112 | ||
17113 | fi | |
81ecdfbb RW |
17114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
17115 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 17116 | |
aff38e61 | 17117 | |
3eb25fda | 17118 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 17119 | case ${host} in |
95cbc983 AC |
17120 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
17121 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 17122 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
c1168a2f | 17123 | *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;; |
aff38e61 AC |
17124 | esac |
17125 | ||
17126 | ||
cd0fc7c3 SS |
17127 | # libreadline needs libuser32.a in a cygwin environment |
17128 | WIN32LIBS= | |
0ad6b8ee | 17129 | if test x"$gdb_cv_os_cygwin" = xyes; then |
c5394b80 JM |
17130 | WIN32LIBS="-luser32" |
17131 | case "${target}" in | |
17132 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
17133 | ;; | |
17134 | esac | |
cd0fc7c3 | 17135 | fi |
c906108c | 17136 | |
b4505029 | 17137 | # The ser-tcp.c module requires sockets. |
b2ceabe8 TT |
17138 | # Note that WIN32APILIBS is set by GDB_AC_COMMON. |
17139 | WIN32LIBS="$WIN32LIBS $WIN32APILIBS" | |
7a292a7a | 17140 | |
31d99776 | 17141 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
17142 | |
17143 | OLD_CFLAGS=$CFLAGS | |
17144 | OLD_LDFLAGS=$LDFLAGS | |
17145 | OLD_LIBS=$LIBS | |
17146 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
17147 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
17148 | # always want our bfd. | |
17149 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
17150 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
17151 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 17152 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 17153 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 17154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb | 17155 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
d0ac1c44 | 17156 | if ${gdb_cv_var_elf+:} false; then : |
81ecdfbb | 17157 | $as_echo_n "(cached) " >&6 |
31d99776 | 17158 | else |
81ecdfbb | 17159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
17160 | /* end confdefs.h. */ |
17161 | #include <stdlib.h> | |
b4132322 | 17162 | #include <string.h> |
294f2697 SM |
17163 | #include "bfd.h" |
17164 | #include "elf-bfd.h" | |
31d99776 DJ |
17165 | int |
17166 | main () | |
17167 | { | |
def63ff0 | 17168 | return bfd_get_elf_phdr_upper_bound (NULL); |
294f2697 | 17169 | |
31d99776 DJ |
17170 | ; |
17171 | return 0; | |
17172 | } | |
17173 | _ACEOF | |
81ecdfbb | 17174 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
17175 | gdb_cv_var_elf=yes |
17176 | else | |
81ecdfbb | 17177 | gdb_cv_var_elf=no |
294f2697 | 17178 | |
31d99776 | 17179 | fi |
81ecdfbb RW |
17180 | rm -f core conftest.err conftest.$ac_objext \ |
17181 | conftest$ac_exeext conftest.$ac_ext | |
294f2697 | 17182 | |
31d99776 | 17183 | fi |
81ecdfbb RW |
17184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
17185 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
17186 | CFLAGS=$OLD_CFLAGS |
17187 | LDFLAGS=$OLD_LDFLAGS | |
17188 | LIBS=$OLD_LIBS | |
0ad6b8ee | 17189 | if test "$gdb_cv_var_elf" = yes; then |
fb8f3fc0 AB |
17190 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \ |
17191 | gcore-elf.o elf-none-tdep.o" | |
31d99776 | 17192 | |
81ecdfbb | 17193 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 17194 | |
075ff26d JK |
17195 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
17196 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
17197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
17198 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 17199 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17200 | $as_echo_n "(cached) " >&6 |
17201 | else | |
17202 | ac_func_search_save_LIBS=$LIBS | |
17203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17204 | /* end confdefs.h. */ | |
17205 | ||
17206 | /* Override any GCC internal prototype to avoid an error. | |
17207 | Use char because int might match the return type of a GCC | |
17208 | builtin and then its argument prototype would still apply. */ | |
17209 | #ifdef __cplusplus | |
17210 | extern "C" | |
17211 | #endif | |
17212 | char dlopen (); | |
17213 | int | |
17214 | main () | |
17215 | { | |
17216 | return dlopen (); | |
17217 | ; | |
17218 | return 0; | |
17219 | } | |
17220 | _ACEOF | |
17221 | for ac_lib in '' dl; do | |
17222 | if test -z "$ac_lib"; then | |
17223 | ac_res="none required" | |
17224 | else | |
17225 | ac_res=-l$ac_lib | |
17226 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
17227 | fi | |
17228 | if ac_fn_c_try_link "$LINENO"; then : | |
17229 | ac_cv_search_dlopen=$ac_res | |
17230 | fi | |
17231 | rm -f core conftest.err conftest.$ac_objext \ | |
17232 | conftest$ac_exeext | |
d0ac1c44 | 17233 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17234 | break |
17235 | fi | |
17236 | done | |
d0ac1c44 | 17237 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17238 | |
17239 | else | |
17240 | ac_cv_search_dlopen=no | |
17241 | fi | |
17242 | rm conftest.$ac_ext | |
17243 | LIBS=$ac_func_search_save_LIBS | |
17244 | fi | |
17245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
17246 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
17247 | ac_res=$ac_cv_search_dlopen | |
17248 | if test "$ac_res" != no; then : | |
17249 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
17250 | ||
17251 | fi | |
17252 | ||
075ff26d | 17253 | fi |
31d99776 | 17254 | fi |
31d99776 | 17255 | |
4f05add4 TT |
17256 | # Add macho support to GDB, but only if BFD includes it. |
17257 | ||
17258 | OLD_CFLAGS=$CFLAGS | |
17259 | OLD_LDFLAGS=$LDFLAGS | |
17260 | OLD_LIBS=$LIBS | |
17261 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
17262 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
17263 | # always want our bfd. | |
17264 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
17265 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
17266 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 17267 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 17268 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
17269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
17270 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
d0ac1c44 | 17271 | if ${gdb_cv_var_macho+:} false; then : |
4f05add4 TT |
17272 | $as_echo_n "(cached) " >&6 |
17273 | else | |
17274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17275 | /* end confdefs.h. */ | |
17276 | #include <stdlib.h> | |
b4132322 | 17277 | #include <string.h> |
294f2697 SM |
17278 | #include "bfd.h" |
17279 | #include "mach-o.h" | |
4f05add4 TT |
17280 | int |
17281 | main () | |
17282 | { | |
17283 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
294f2697 | 17284 | |
4f05add4 TT |
17285 | ; |
17286 | return 0; | |
17287 | } | |
17288 | _ACEOF | |
17289 | if ac_fn_c_try_link "$LINENO"; then : | |
17290 | gdb_cv_var_macho=yes | |
17291 | else | |
17292 | gdb_cv_var_macho=no | |
294f2697 | 17293 | |
4f05add4 TT |
17294 | fi |
17295 | rm -f core conftest.err conftest.$ac_objext \ | |
17296 | conftest$ac_exeext conftest.$ac_ext | |
294f2697 | 17297 | |
4f05add4 TT |
17298 | fi |
17299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
17300 | $as_echo "$gdb_cv_var_macho" >&6; } | |
17301 | CFLAGS=$OLD_CFLAGS | |
17302 | LDFLAGS=$OLD_LDFLAGS | |
17303 | LIBS=$OLD_LIBS | |
0ad6b8ee | 17304 | if test "$gdb_cv_var_macho" = yes; then |
4f05add4 TT |
17305 | CONFIG_OBS="$CONFIG_OBS machoread.o" |
17306 | fi | |
17307 | ||
121ce6e5 DJ |
17308 | # Add any host-specific objects to GDB. |
17309 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
17310 | ||
608e2dbb | 17311 | # If building on ELF, look for lzma support for embedded compressed debug info. |
0ad6b8ee | 17312 | if test "$gdb_cv_var_elf" = yes; then |
608e2dbb TT |
17313 | |
17314 | # Check whether --with-lzma was given. | |
17315 | if test "${with_lzma+set}" = set; then : | |
17316 | withval=$with_lzma; | |
17317 | else | |
17318 | with_lzma=auto | |
17319 | fi | |
17320 | ||
17321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
17322 | $as_echo_n "checking whether to use lzma... " >&6; } | |
17323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
17324 | $as_echo "$with_lzma" >&6; } | |
17325 | ||
17326 | if test "${with_lzma}" != no; then | |
17327 | ||
17328 | ||
17329 | ||
17330 | ||
17331 | ||
17332 | ||
17333 | ||
17334 | ||
17335 | use_additional=yes | |
17336 | ||
17337 | acl_save_prefix="$prefix" | |
17338 | prefix="$acl_final_prefix" | |
17339 | acl_save_exec_prefix="$exec_prefix" | |
17340 | exec_prefix="$acl_final_exec_prefix" | |
17341 | ||
17342 | eval additional_includedir=\"$includedir\" | |
17343 | eval additional_libdir=\"$libdir\" | |
17344 | ||
17345 | exec_prefix="$acl_save_exec_prefix" | |
17346 | prefix="$acl_save_prefix" | |
17347 | ||
17348 | ||
17349 | # Check whether --with-liblzma-prefix was given. | |
17350 | if test "${with_liblzma_prefix+set}" = set; then : | |
17351 | withval=$with_liblzma_prefix; | |
17352 | if test "X$withval" = "Xno"; then | |
17353 | use_additional=no | |
17354 | else | |
17355 | if test "X$withval" = "X"; then | |
17356 | ||
17357 | acl_save_prefix="$prefix" | |
17358 | prefix="$acl_final_prefix" | |
17359 | acl_save_exec_prefix="$exec_prefix" | |
17360 | exec_prefix="$acl_final_exec_prefix" | |
17361 | ||
17362 | eval additional_includedir=\"$includedir\" | |
17363 | eval additional_libdir=\"$libdir\" | |
17364 | ||
17365 | exec_prefix="$acl_save_exec_prefix" | |
17366 | prefix="$acl_save_prefix" | |
17367 | ||
17368 | else | |
17369 | additional_includedir="$withval/include" | |
17370 | additional_libdir="$withval/lib" | |
17371 | fi | |
17372 | fi | |
17373 | ||
17374 | fi | |
17375 | ||
9f1528a1 AB |
17376 | |
17377 | # Check whether --with-liblzma-type was given. | |
17378 | if test "${with_liblzma_type+set}" = set; then : | |
17379 | withval=$with_liblzma_type; with_liblzma_type=$withval | |
17380 | else | |
17381 | with_liblzma_type=auto | |
17382 | fi | |
17383 | ||
17384 | lib_type=`eval echo \$with_liblzma_type` | |
17385 | ||
608e2dbb TT |
17386 | LIBLZMA= |
17387 | LTLIBLZMA= | |
17388 | INCLZMA= | |
17389 | rpathdirs= | |
17390 | ltrpathdirs= | |
17391 | names_already_handled= | |
17392 | names_next_round='lzma ' | |
17393 | while test -n "$names_next_round"; do | |
17394 | names_this_round="$names_next_round" | |
17395 | names_next_round= | |
17396 | for name in $names_this_round; do | |
17397 | already_handled= | |
17398 | for n in $names_already_handled; do | |
17399 | if test "$n" = "$name"; then | |
17400 | already_handled=yes | |
17401 | break | |
17402 | fi | |
17403 | done | |
17404 | if test -z "$already_handled"; then | |
17405 | names_already_handled="$names_already_handled $name" | |
17406 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17407 | eval value=\"\$HAVE_LIB$uppername\" | |
17408 | if test -n "$value"; then | |
17409 | if test "$value" = yes; then | |
17410 | eval value=\"\$LIB$uppername\" | |
17411 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
17412 | eval value=\"\$LTLIB$uppername\" | |
17413 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
17414 | else | |
17415 | : | |
17416 | fi | |
17417 | else | |
17418 | found_dir= | |
17419 | found_la= | |
17420 | found_so= | |
17421 | found_a= | |
17422 | if test $use_additional = yes; then | |
9f1528a1 | 17423 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17424 | found_dir="$additional_libdir" |
17425 | found_so="$additional_libdir/lib$name.$shlibext" | |
17426 | if test -f "$additional_libdir/lib$name.la"; then | |
17427 | found_la="$additional_libdir/lib$name.la" | |
17428 | fi | |
9f1528a1 | 17429 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17430 | if test -f "$additional_libdir/lib$name.$libext"; then |
17431 | found_dir="$additional_libdir" | |
17432 | found_a="$additional_libdir/lib$name.$libext" | |
17433 | if test -f "$additional_libdir/lib$name.la"; then | |
17434 | found_la="$additional_libdir/lib$name.la" | |
17435 | fi | |
17436 | fi | |
17437 | fi | |
17438 | fi | |
17439 | if test "X$found_dir" = "X"; then | |
17440 | for x in $LDFLAGS $LTLIBLZMA; do | |
17441 | ||
17442 | acl_save_prefix="$prefix" | |
17443 | prefix="$acl_final_prefix" | |
17444 | acl_save_exec_prefix="$exec_prefix" | |
17445 | exec_prefix="$acl_final_exec_prefix" | |
17446 | eval x=\"$x\" | |
17447 | exec_prefix="$acl_save_exec_prefix" | |
17448 | prefix="$acl_save_prefix" | |
17449 | ||
17450 | case "$x" in | |
17451 | -L*) | |
17452 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 17453 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17454 | found_dir="$dir" |
17455 | found_so="$dir/lib$name.$shlibext" | |
17456 | if test -f "$dir/lib$name.la"; then | |
17457 | found_la="$dir/lib$name.la" | |
17458 | fi | |
9f1528a1 | 17459 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17460 | if test -f "$dir/lib$name.$libext"; then |
17461 | found_dir="$dir" | |
17462 | found_a="$dir/lib$name.$libext" | |
17463 | if test -f "$dir/lib$name.la"; then | |
17464 | found_la="$dir/lib$name.la" | |
17465 | fi | |
17466 | fi | |
17467 | fi | |
17468 | ;; | |
17469 | esac | |
17470 | if test "X$found_dir" != "X"; then | |
17471 | break | |
17472 | fi | |
17473 | done | |
17474 | fi | |
17475 | if test "X$found_dir" != "X"; then | |
17476 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
17477 | if test "X$found_so" != "X"; then | |
17478 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17479 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17480 | else | |
17481 | haveit= | |
17482 | for x in $ltrpathdirs; do | |
17483 | if test "X$x" = "X$found_dir"; then | |
17484 | haveit=yes | |
17485 | break | |
17486 | fi | |
17487 | done | |
17488 | if test -z "$haveit"; then | |
17489 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17490 | fi | |
17491 | if test "$hardcode_direct" = yes; then | |
17492 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17493 | else | |
17494 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17495 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17496 | haveit= | |
17497 | for x in $rpathdirs; do | |
17498 | if test "X$x" = "X$found_dir"; then | |
17499 | haveit=yes | |
17500 | break | |
17501 | fi | |
17502 | done | |
17503 | if test -z "$haveit"; then | |
17504 | rpathdirs="$rpathdirs $found_dir" | |
17505 | fi | |
17506 | else | |
17507 | haveit= | |
17508 | for x in $LDFLAGS $LIBLZMA; do | |
17509 | ||
17510 | acl_save_prefix="$prefix" | |
17511 | prefix="$acl_final_prefix" | |
17512 | acl_save_exec_prefix="$exec_prefix" | |
17513 | exec_prefix="$acl_final_exec_prefix" | |
17514 | eval x=\"$x\" | |
17515 | exec_prefix="$acl_save_exec_prefix" | |
17516 | prefix="$acl_save_prefix" | |
17517 | ||
17518 | if test "X$x" = "X-L$found_dir"; then | |
17519 | haveit=yes | |
17520 | break | |
17521 | fi | |
17522 | done | |
17523 | if test -z "$haveit"; then | |
17524 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
17525 | fi | |
17526 | if test "$hardcode_minus_L" != no; then | |
17527 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17528 | else | |
17529 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17530 | fi | |
17531 | fi | |
17532 | fi | |
17533 | fi | |
17534 | else | |
17535 | if test "X$found_a" != "X"; then | |
17536 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
17537 | else | |
17538 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
17539 | fi | |
17540 | fi | |
17541 | additional_includedir= | |
17542 | case "$found_dir" in | |
17543 | */lib | */lib/) | |
17544 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17545 | additional_includedir="$basedir/include" | |
17546 | ;; | |
17547 | esac | |
17548 | if test "X$additional_includedir" != "X"; then | |
17549 | if test "X$additional_includedir" != "X/usr/include"; then | |
17550 | haveit= | |
17551 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17552 | if test -n "$GCC"; then | |
17553 | case $host_os in | |
17554 | linux*) haveit=yes;; | |
17555 | esac | |
17556 | fi | |
17557 | fi | |
17558 | if test -z "$haveit"; then | |
17559 | for x in $CPPFLAGS $INCLZMA; do | |
17560 | ||
17561 | acl_save_prefix="$prefix" | |
17562 | prefix="$acl_final_prefix" | |
17563 | acl_save_exec_prefix="$exec_prefix" | |
17564 | exec_prefix="$acl_final_exec_prefix" | |
17565 | eval x=\"$x\" | |
17566 | exec_prefix="$acl_save_exec_prefix" | |
17567 | prefix="$acl_save_prefix" | |
17568 | ||
17569 | if test "X$x" = "X-I$additional_includedir"; then | |
17570 | haveit=yes | |
17571 | break | |
17572 | fi | |
17573 | done | |
17574 | if test -z "$haveit"; then | |
17575 | if test -d "$additional_includedir"; then | |
17576 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
17577 | fi | |
17578 | fi | |
17579 | fi | |
17580 | fi | |
17581 | fi | |
17582 | if test -n "$found_la"; then | |
17583 | save_libdir="$libdir" | |
17584 | case "$found_la" in | |
17585 | */* | *\\*) . "$found_la" ;; | |
17586 | *) . "./$found_la" ;; | |
17587 | esac | |
17588 | libdir="$save_libdir" | |
17589 | for dep in $dependency_libs; do | |
17590 | case "$dep" in | |
17591 | -L*) | |
17592 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17593 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17594 | haveit= | |
17595 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17596 | if test -n "$GCC"; then | |
17597 | case $host_os in | |
17598 | linux*) haveit=yes;; | |
17599 | esac | |
17600 | fi | |
17601 | fi | |
17602 | if test -z "$haveit"; then | |
17603 | haveit= | |
17604 | for x in $LDFLAGS $LIBLZMA; do | |
17605 | ||
17606 | acl_save_prefix="$prefix" | |
17607 | prefix="$acl_final_prefix" | |
17608 | acl_save_exec_prefix="$exec_prefix" | |
17609 | exec_prefix="$acl_final_exec_prefix" | |
17610 | eval x=\"$x\" | |
17611 | exec_prefix="$acl_save_exec_prefix" | |
17612 | prefix="$acl_save_prefix" | |
17613 | ||
17614 | if test "X$x" = "X-L$additional_libdir"; then | |
17615 | haveit=yes | |
17616 | break | |
17617 | fi | |
17618 | done | |
17619 | if test -z "$haveit"; then | |
17620 | if test -d "$additional_libdir"; then | |
17621 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
17622 | fi | |
17623 | fi | |
17624 | haveit= | |
17625 | for x in $LDFLAGS $LTLIBLZMA; do | |
17626 | ||
17627 | acl_save_prefix="$prefix" | |
17628 | prefix="$acl_final_prefix" | |
17629 | acl_save_exec_prefix="$exec_prefix" | |
17630 | exec_prefix="$acl_final_exec_prefix" | |
17631 | eval x=\"$x\" | |
17632 | exec_prefix="$acl_save_exec_prefix" | |
17633 | prefix="$acl_save_prefix" | |
17634 | ||
17635 | if test "X$x" = "X-L$additional_libdir"; then | |
17636 | haveit=yes | |
17637 | break | |
17638 | fi | |
17639 | done | |
17640 | if test -z "$haveit"; then | |
17641 | if test -d "$additional_libdir"; then | |
17642 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
17643 | fi | |
17644 | fi | |
17645 | fi | |
17646 | fi | |
17647 | ;; | |
17648 | -R*) | |
17649 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17650 | if test "$enable_rpath" != no; then | |
17651 | haveit= | |
17652 | for x in $rpathdirs; do | |
17653 | if test "X$x" = "X$dir"; then | |
17654 | haveit=yes | |
17655 | break | |
17656 | fi | |
17657 | done | |
17658 | if test -z "$haveit"; then | |
17659 | rpathdirs="$rpathdirs $dir" | |
17660 | fi | |
17661 | haveit= | |
17662 | for x in $ltrpathdirs; do | |
17663 | if test "X$x" = "X$dir"; then | |
17664 | haveit=yes | |
17665 | break | |
17666 | fi | |
17667 | done | |
17668 | if test -z "$haveit"; then | |
17669 | ltrpathdirs="$ltrpathdirs $dir" | |
17670 | fi | |
17671 | fi | |
17672 | ;; | |
17673 | -l*) | |
17674 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17675 | ;; | |
17676 | *.la) | |
17677 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17678 | ;; | |
17679 | *) | |
17680 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
17681 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
17682 | ;; | |
17683 | esac | |
17684 | done | |
17685 | fi | |
17686 | else | |
9f1528a1 AB |
17687 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
17688 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17689 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
17690 | else | |
17691 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext" | |
17692 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext" | |
17693 | fi | |
608e2dbb TT |
17694 | fi |
17695 | fi | |
17696 | fi | |
17697 | done | |
17698 | done | |
17699 | if test "X$rpathdirs" != "X"; then | |
17700 | if test -n "$hardcode_libdir_separator"; then | |
17701 | alldirs= | |
17702 | for found_dir in $rpathdirs; do | |
17703 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17704 | done | |
17705 | acl_save_libdir="$libdir" | |
17706 | libdir="$alldirs" | |
17707 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17708 | libdir="$acl_save_libdir" | |
17709 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17710 | else | |
17711 | for found_dir in $rpathdirs; do | |
17712 | acl_save_libdir="$libdir" | |
17713 | libdir="$found_dir" | |
17714 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17715 | libdir="$acl_save_libdir" | |
17716 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17717 | done | |
17718 | fi | |
17719 | fi | |
17720 | if test "X$ltrpathdirs" != "X"; then | |
17721 | for found_dir in $ltrpathdirs; do | |
17722 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
17723 | done | |
17724 | fi | |
17725 | ||
17726 | ||
17727 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17728 | ||
17729 | for element in $INCLZMA; do | |
17730 | haveit= | |
17731 | for x in $CPPFLAGS; do | |
17732 | ||
17733 | acl_save_prefix="$prefix" | |
17734 | prefix="$acl_final_prefix" | |
17735 | acl_save_exec_prefix="$exec_prefix" | |
17736 | exec_prefix="$acl_final_exec_prefix" | |
17737 | eval x=\"$x\" | |
17738 | exec_prefix="$acl_save_exec_prefix" | |
17739 | prefix="$acl_save_prefix" | |
17740 | ||
17741 | if test "X$x" = "X$element"; then | |
17742 | haveit=yes | |
17743 | break | |
17744 | fi | |
17745 | done | |
17746 | if test -z "$haveit"; then | |
17747 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17748 | fi | |
17749 | done | |
17750 | ||
17751 | ||
17752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
17753 | $as_echo_n "checking for liblzma... " >&6; } | |
d0ac1c44 | 17754 | if ${ac_cv_liblzma+:} false; then : |
608e2dbb TT |
17755 | $as_echo_n "(cached) " >&6 |
17756 | else | |
17757 | ||
17758 | ac_save_LIBS="$LIBS" | |
17759 | LIBS="$LIBS $LIBLZMA" | |
17760 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17761 | /* end confdefs.h. */ | |
17762 | #include "lzma.h" | |
17763 | int | |
17764 | main () | |
17765 | { | |
17766 | lzma_index_iter iter; | |
17767 | lzma_index_iter_init (&iter, 0); | |
17768 | lzma_mf_is_supported (LZMA_MF_HC3); | |
17769 | ; | |
17770 | return 0; | |
17771 | } | |
17772 | _ACEOF | |
17773 | if ac_fn_c_try_link "$LINENO"; then : | |
17774 | ac_cv_liblzma=yes | |
17775 | else | |
17776 | ac_cv_liblzma=no | |
17777 | fi | |
17778 | rm -f core conftest.err conftest.$ac_objext \ | |
17779 | conftest$ac_exeext conftest.$ac_ext | |
17780 | LIBS="$ac_save_LIBS" | |
17781 | ||
17782 | fi | |
17783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
17784 | $as_echo "$ac_cv_liblzma" >&6; } | |
17785 | if test "$ac_cv_liblzma" = yes; then | |
17786 | HAVE_LIBLZMA=yes | |
17787 | ||
17788 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
17789 | ||
17790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
17791 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
17792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
17793 | $as_echo "$LIBLZMA" >&6; } | |
17794 | else | |
17795 | HAVE_LIBLZMA=no | |
17796 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17797 | LIBLZMA= | |
17798 | LTLIBLZMA= | |
17799 | fi | |
17800 | ||
17801 | ||
17802 | ||
17803 | ||
17804 | ||
17805 | ||
17806 | if test "$HAVE_LIBLZMA" != yes; then | |
17807 | if test "$with_lzma" = yes; then | |
d0ac1c44 | 17808 | as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 |
608e2dbb TT |
17809 | fi |
17810 | fi | |
17811 | fi | |
17812 | fi | |
17813 | ||
3fc11d3e JM |
17814 | LIBGUI="../libgui/src/libgui.a" |
17815 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
17816 | ||
17817 | ||
7a292a7a | 17818 | |
3fc11d3e JM |
17819 | WIN32LDAPP= |
17820 | ||
17821 | ||
17822 | ||
d91670b9 | 17823 | case "${host}" in |
686a5eed | 17824 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
17825 | configdir="win" |
17826 | ;; | |
17827 | *) | |
17828 | configdir="unix" | |
17829 | ;; | |
17830 | esac | |
3fc11d3e JM |
17831 | |
17832 | GDBTKLIBS= | |
17833 | if test "${enable_gdbtk}" = "yes"; then | |
17834 | ||
d1c3b63a KS |
17835 | # Gdbtk must have an absolute path to srcdir in order to run |
17836 | # properly when not installed. | |
17837 | here=`pwd` | |
17838 | cd ${srcdir} | |
17839 | GDBTK_SRC_DIR=`pwd` | |
17840 | cd $here | |
17841 | ||
bec39cab | 17842 | |
5062cc19 KS |
17843 | # |
17844 | # Ok, lets find the tcl configuration | |
17845 | # First, look for one uninstalled. | |
17846 | # the alternative search directory is invoked by --with-tcl | |
17847 | # | |
3fc11d3e | 17848 | |
5062cc19 KS |
17849 | if test x"${no_tcl}" = x ; then |
17850 | # we reset no_tcl in case something fails here | |
17851 | no_tcl=true | |
bec39cab | 17852 | |
81ecdfbb RW |
17853 | # Check whether --with-tcl was given. |
17854 | if test "${with_tcl+set}" = set; then : | |
17855 | withval=$with_tcl; with_tclconfig=${withval} | |
17856 | fi | |
17857 | ||
17858 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
17859 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
d0ac1c44 | 17860 | if ${ac_cv_c_tclconfig+:} false; then : |
81ecdfbb | 17861 | $as_echo_n "(cached) " >&6 |
3fc11d3e | 17862 | else |
bec39cab | 17863 | |
3fc11d3e | 17864 | |
5062cc19 KS |
17865 | # First check to see if --with-tcl was specified. |
17866 | case "${host}" in | |
17867 | *-*-cygwin*) platDir="win" ;; | |
17868 | *) platDir="unix" ;; | |
17869 | esac | |
17870 | if test x"${with_tclconfig}" != x ; then | |
17871 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
17872 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
17873 | else | |
d0ac1c44 | 17874 | as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17875 | fi |
17876 | fi | |
17877 | ||
17878 | # then check for a private Tcl installation | |
17879 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17880 | for i in \ | |
17881 | ../tcl \ | |
17882 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17883 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
17884 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17885 | ../../tcl \ | |
17886 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17887 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17888 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17889 | ../../../tcl \ | |
17890 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17891 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17892 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17893 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17894 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17895 | break | |
17896 | fi | |
17897 | done | |
17898 | fi | |
17899 | ||
17900 | # on Darwin, check in Framework installation locations | |
17901 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
17902 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
17903 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
17904 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
17905 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
17906 | ; do | |
17907 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
17908 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
17909 | break | |
17910 | fi | |
17911 | done | |
17912 | fi | |
17913 | ||
17914 | # check in a few common install locations | |
17915 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17916 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
17917 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
17918 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
17919 | `ls -d /usr/local/lib 2>/dev/null` \ | |
17920 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
17921 | `ls -d /usr/lib 2>/dev/null` \ | |
17922 | ; do | |
17923 | if test -f "$i/tclConfig.sh" ; then | |
17924 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
17925 | break | |
17926 | fi | |
17927 | done | |
17928 | fi | |
3fc11d3e | 17929 | |
5062cc19 KS |
17930 | # check in a few other private locations |
17931 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17932 | for i in \ | |
17933 | ${srcdir}/../tcl \ | |
17934 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17935 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
17936 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17937 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17938 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17939 | break | |
17940 | fi | |
17941 | done | |
17942 | fi | |
bec39cab | 17943 | |
3fc11d3e JM |
17944 | fi |
17945 | ||
5062cc19 KS |
17946 | |
17947 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17948 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
17949 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
17950 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
17951 | else |
17952 | no_tcl= | |
17953 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
17954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17955 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
17956 | fi |
17957 | fi | |
3fc11d3e | 17958 | |
bec39cab | 17959 | |
85541719 DE |
17960 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
17961 | # point to doing Tcl. | |
bec39cab | 17962 | |
5062cc19 KS |
17963 | # |
17964 | # Ok, lets find the tk configuration | |
17965 | # First, look for one uninstalled. | |
17966 | # the alternative search directory is invoked by --with-tk | |
17967 | # | |
3fc11d3e | 17968 | |
5062cc19 KS |
17969 | if test x"${no_tk}" = x ; then |
17970 | # we reset no_tk in case something fails here | |
17971 | no_tk=true | |
bec39cab | 17972 | |
81ecdfbb RW |
17973 | # Check whether --with-tk was given. |
17974 | if test "${with_tk+set}" = set; then : | |
17975 | withval=$with_tk; with_tkconfig=${withval} | |
17976 | fi | |
17977 | ||
17978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
17979 | $as_echo_n "checking for Tk configuration... " >&6; } | |
d0ac1c44 | 17980 | if ${ac_cv_c_tkconfig+:} false; then : |
81ecdfbb | 17981 | $as_echo_n "(cached) " >&6 |
bec39cab | 17982 | else |
3fc11d3e JM |
17983 | |
17984 | ||
5062cc19 KS |
17985 | # First check to see if --with-tkconfig was specified. |
17986 | if test x"${with_tkconfig}" != x ; then | |
17987 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
17988 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
17989 | else | |
d0ac1c44 | 17990 | as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17991 | fi |
17992 | fi | |
3fc11d3e | 17993 | |
5062cc19 KS |
17994 | # then check for a private Tk library |
17995 | case "${host}" in | |
17996 | *-*-cygwin*) platDir="win" ;; | |
17997 | *) platDir="unix" ;; | |
17998 | esac | |
17999 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18000 | for i in \ | |
18001 | ../tk \ | |
18002 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18003 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
18004 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
18005 | ../../tk \ | |
18006 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18007 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
18008 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
18009 | ../../../tk \ | |
18010 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18011 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
18012 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
18013 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
18014 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
18015 | break | |
18016 | fi | |
18017 | done | |
18018 | fi | |
18019 | ||
18020 | # on Darwin, check in Framework installation locations | |
18021 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
18022 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
18023 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
18024 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
18025 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
18026 | ; do | |
18027 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
18028 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
18029 | break | |
18030 | fi | |
18031 | done | |
18032 | fi | |
18033 | ||
18034 | # check in a few common install locations | |
18035 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18036 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
18037 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
18038 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
18039 | `ls -d /usr/local/lib 2>/dev/null` \ | |
18040 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
18041 | `ls -d /usr/lib 2>/dev/null` \ | |
18042 | ; do | |
18043 | if test -f "$i/tkConfig.sh" ; then | |
18044 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
18045 | break | |
18046 | fi | |
18047 | done | |
18048 | fi | |
18049 | # check in a few other private locations | |
18050 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18051 | for i in \ | |
18052 | ${srcdir}/../tk \ | |
18053 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18054 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
18055 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
18056 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
18057 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
18058 | break | |
18059 | fi | |
18060 | done | |
18061 | fi | |
3fc11d3e | 18062 | |
3fc11d3e JM |
18063 | fi |
18064 | ||
18065 | ||
5062cc19 KS |
18066 | if test x"${ac_cv_c_tkconfig}" = x ; then |
18067 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
18068 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
18069 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
18070 | else |
18071 | no_tk= | |
18072 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
18073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18074 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 18075 | fi |
3fc11d3e | 18076 | fi |
dd2504ab | 18077 | |
dd2504ab | 18078 | |
85541719 DE |
18079 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
18080 | ||
81ecdfbb RW |
18081 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18082 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
18083 | |
18084 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
18085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
18086 | $as_echo "loading" >&6; } | |
85541719 DE |
18087 | . ${TCL_BIN_DIR}/tclConfig.sh |
18088 | else | |
81ecdfbb RW |
18089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18090 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
18091 | fi |
18092 | ||
18093 | # eval is required to do the TCL_DBGX substitution | |
18094 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
18095 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
18096 | ||
18097 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
18098 | # then set the common variable name to the value of the build variables. | |
18099 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
18100 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
18101 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
18102 | # installed and uninstalled version of Tcl. | |
18103 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
18104 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
18105 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
18106 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
18107 | elif test "`uname -s`" = "Darwin"; then | |
18108 | # If Tcl was built as a framework, attempt to use the libraries | |
18109 | # from the framework at the given location so that linking works | |
a68ffae9 | 18110 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
18111 | case ${TCL_DEFS} in |
18112 | *TCL_FRAMEWORK*) | |
18113 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
18114 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
18115 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
18116 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
18117 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
18118 | break | |
18119 | fi | |
18120 | done | |
18121 | fi | |
18122 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
18123 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
18124 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
18125 | fi | |
18126 | ;; | |
18127 | esac | |
18128 | fi | |
18129 | ||
18130 | # eval is required to do the TCL_DBGX substitution | |
18131 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
18132 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
18133 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
18134 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
18135 | ||
18136 | ||
18137 | ||
18138 | ||
18139 | ||
18140 | ||
18141 | ||
18142 | ||
18143 | ||
18144 | ||
18145 | ||
18146 | ||
18147 | ||
18148 | ||
18149 | ||
18150 | # Check for in-tree tcl | |
18151 | here=`pwd` | |
18152 | cd ${srcdir}/.. | |
18153 | topdir=`pwd` | |
18154 | cd ${here} | |
18155 | ||
18156 | intree="no" | |
18157 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
18158 | intree="yes" | |
18159 | fi | |
18160 | ||
18161 | # Find Tcl private headers | |
18162 | if test x"${intree}" = xno; then | |
18163 | ||
81ecdfbb RW |
18164 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
18165 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
18166 | private_dir="" |
18167 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
18168 | if test -f ${dir}/tclInt.h ; then | |
18169 | private_dir=${dir} | |
18170 | fi | |
18171 | ||
18172 | if test x"${private_dir}" = x; then | |
d0ac1c44 | 18173 | as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
18174 | else |
18175 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
18176 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
18177 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
18178 | fi |
18179 | ||
18180 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
18181 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
18182 | TCL_DEPS="" | |
18183 | else | |
18184 | # If building tcl in the same src tree, private headers | |
18185 | # are not needed, but we need to be sure to use the right | |
18186 | # headers library | |
18187 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
18188 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
18189 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
18190 | fi | |
18191 | ||
18192 | ||
18193 | ||
18194 | ||
18195 | ||
81ecdfbb RW |
18196 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18197 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 18198 | |
5062cc19 | 18199 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
18200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
18201 | $as_echo "loading" >&6; } | |
5062cc19 | 18202 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 18203 | else |
81ecdfbb RW |
18204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18205 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 18206 | fi |
bec39cab | 18207 | |
5062cc19 KS |
18208 | # eval is required to do the TK_DBGX substitution |
18209 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
18210 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
18211 | ||
18212 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
18213 | # then set the common variable name to the value of the build variables. | |
18214 | # For example, the variable TK_LIB_SPEC will be set to the value | |
18215 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
18216 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
18217 | # installed and uninstalled version of Tcl. | |
85541719 | 18218 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
18219 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
18220 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
18221 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
18222 | elif test "`uname -s`" = "Darwin"; then | |
18223 | # If Tk was built as a framework, attempt to use the libraries | |
18224 | # from the framework at the given location so that linking works | |
a68ffae9 | 18225 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
18226 | case ${TK_DEFS} in |
18227 | *TK_FRAMEWORK*) | |
85541719 | 18228 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
18229 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
18230 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
18231 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
18232 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
18233 | break | |
18234 | fi | |
18235 | done | |
18236 | fi | |
85541719 | 18237 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
18238 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
18239 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
18240 | fi | |
18241 | ;; | |
18242 | esac | |
3fc11d3e JM |
18243 | fi |
18244 | ||
5062cc19 KS |
18245 | # eval is required to do the TK_DBGX substitution |
18246 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
18247 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
18248 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
18249 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 18250 | |
3fc11d3e JM |
18251 | |
18252 | ||
bec39cab AC |
18253 | |
18254 | ||
18255 | ||
18256 | ||
18257 | ||
18258 | ||
18259 | ||
3fc11d3e | 18260 | |
3fc11d3e | 18261 | |
bec39cab | 18262 | |
bec39cab | 18263 | |
85541719 DE |
18264 | # Check for in-tree Tk |
18265 | intree="no" | |
18266 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
18267 | intree="yes" | |
18268 | fi | |
3fc11d3e | 18269 | |
85541719 DE |
18270 | # Find Tk private headers |
18271 | if test x"${intree}" = xno; then | |
3fc11d3e | 18272 | |
81ecdfbb RW |
18273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
18274 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
18275 | private_dir="" |
18276 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
18277 | if test -f ${dir}/tkInt.h; then | |
18278 | private_dir=${dir} | |
3fc11d3e | 18279 | fi |
bec39cab | 18280 | |
5062cc19 | 18281 | if test x"${private_dir}" = x; then |
d0ac1c44 | 18282 | as_fn_error $? "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 18283 | else |
5062cc19 | 18284 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
18285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
18286 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 18287 | fi |
3fc11d3e | 18288 | |
85541719 DE |
18289 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
18290 | TK_LIBRARY=${TK_LIB_SPEC} | |
18291 | TK_DEPS="" | |
18292 | else | |
18293 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
18294 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
18295 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
18296 | fi | |
3fc11d3e JM |
18297 | |
18298 | ||
3fc11d3e JM |
18299 | |
18300 | ||
3fc11d3e | 18301 | |
85541719 | 18302 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 18303 | |
85541719 DE |
18304 | # Include some libraries that Tcl and Tk want. |
18305 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
18306 | # Yes, the ordering seems wrong here. But it isn't. | |
18307 | # TK_LIBS is the list of libraries that need to be linked | |
18308 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
18309 | # were in LIBS then any link tests after this point would | |
18310 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
18311 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 18312 | |
85541719 DE |
18313 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
18314 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
18315 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
18316 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
18317 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
18318 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
18319 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 18320 | |
0ad6b8ee | 18321 | if test x"$gdb_cv_os_cygwin" = xyes; then |
85541719 DE |
18322 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" |
18323 | WIN32LDAPP="-Wl,--subsystem,console" | |
18324 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 18325 | fi |
ffc6a242 | 18326 | |
f99d1d37 TT |
18327 | |
18328 | ||
18329 | subdirs="$subdirs gdbtk" | |
3ace7edb | 18330 | |
85541719 | 18331 | fi |
3fc11d3e JM |
18332 | fi |
18333 | ||
18334 | ||
18335 | ||
18336 | ||
18337 | ||
18338 | ||
18339 | ||
18340 | ||
81ecdfbb RW |
18341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
18342 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 18343 | |
c906108c | 18344 | |
81ecdfbb RW |
18345 | # Check whether --with-x was given. |
18346 | if test "${with_x+set}" = set; then : | |
18347 | withval=$with_x; | |
18348 | fi | |
c906108c SS |
18349 | |
18350 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
18351 | if test "x$with_x" = xno; then | |
18352 | # The user explicitly disabled X. | |
18353 | have_x=disabled | |
18354 | else | |
81ecdfbb | 18355 | case $x_includes,$x_libraries in #( |
d0ac1c44 SM |
18356 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
18357 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
81ecdfbb | 18358 | $as_echo_n "(cached) " >&6 |
c906108c SS |
18359 | else |
18360 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 18361 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 18362 | rm -f -r conftest.dir |
bec39cab AC |
18363 | if mkdir conftest.dir; then |
18364 | cd conftest.dir | |
bec39cab | 18365 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
18366 | incroot: |
18367 | @echo incroot='${INCROOT}' | |
18368 | usrlibdir: | |
18369 | @echo usrlibdir='${USRLIBDIR}' | |
18370 | libdir: | |
18371 | @echo libdir='${LIBDIR}' | |
18372 | _ACEOF | |
18373 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
d0ac1c44 | 18374 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
81ecdfbb RW |
18375 | for ac_var in incroot usrlibdir libdir; do |
18376 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
18377 | done | |
c906108c | 18378 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
18379 | for ac_extension in a so sl dylib la dll; do |
18380 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
18381 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 18382 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
18383 | fi |
18384 | done | |
18385 | # Screen out bogus values from the imake configuration. They are | |
18386 | # bogus both because they are the default anyway, and because | |
18387 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 18388 | case $ac_im_incroot in |
81ecdfbb | 18389 | /usr/include) ac_x_includes= ;; |
bec39cab | 18390 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 18391 | esac |
bec39cab | 18392 | case $ac_im_usrlibdir in |
81ecdfbb | 18393 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 18394 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
18395 | esac |
18396 | fi | |
18397 | cd .. | |
81ecdfbb | 18398 | rm -f -r conftest.dir |
c906108c SS |
18399 | fi |
18400 | ||
bec39cab AC |
18401 | # Standard set of common directories for X headers. |
18402 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
18403 | ac_x_header_dirs=' | |
18404 | /usr/X11/include | |
81ecdfbb | 18405 | /usr/X11R7/include |
bec39cab AC |
18406 | /usr/X11R6/include |
18407 | /usr/X11R5/include | |
18408 | /usr/X11R4/include | |
18409 | ||
18410 | /usr/include/X11 | |
81ecdfbb | 18411 | /usr/include/X11R7 |
bec39cab AC |
18412 | /usr/include/X11R6 |
18413 | /usr/include/X11R5 | |
18414 | /usr/include/X11R4 | |
18415 | ||
18416 | /usr/local/X11/include | |
81ecdfbb | 18417 | /usr/local/X11R7/include |
bec39cab AC |
18418 | /usr/local/X11R6/include |
18419 | /usr/local/X11R5/include | |
18420 | /usr/local/X11R4/include | |
18421 | ||
18422 | /usr/local/include/X11 | |
81ecdfbb | 18423 | /usr/local/include/X11R7 |
bec39cab AC |
18424 | /usr/local/include/X11R6 |
18425 | /usr/local/include/X11R5 | |
18426 | /usr/local/include/X11R4 | |
18427 | ||
18428 | /usr/X386/include | |
18429 | /usr/x386/include | |
18430 | /usr/XFree86/include/X11 | |
18431 | ||
18432 | /usr/include | |
18433 | /usr/local/include | |
18434 | /usr/unsupported/include | |
18435 | /usr/athena/include | |
18436 | /usr/local/x11r5/include | |
18437 | /usr/lpp/Xamples/include | |
18438 | ||
18439 | /usr/openwin/include | |
18440 | /usr/openwin/share/include' | |
18441 | ||
18442 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 18443 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 18444 | # First, try using that file with no special directory specified. |
81ecdfbb | 18445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 18446 | /* end confdefs.h. */ |
81ecdfbb | 18447 | #include <X11/Xlib.h> |
bec39cab | 18448 | _ACEOF |
81ecdfbb | 18449 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
18450 | # We can compile using X headers with no special include directory. |
18451 | ac_x_includes= | |
18452 | else | |
bec39cab | 18453 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 18454 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
18455 | ac_x_includes=$ac_dir |
18456 | break | |
18457 | fi | |
18458 | done | |
c906108c | 18459 | fi |
d0ac1c44 | 18460 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 18461 | fi # $ac_x_includes = no |
c906108c | 18462 | |
bec39cab | 18463 | if test "$ac_x_libraries" = no; then |
c906108c | 18464 | # Check for the libraries. |
c906108c SS |
18465 | # See if we find them without any special options. |
18466 | # Don't add to $LIBS permanently. | |
bec39cab | 18467 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
18468 | LIBS="-lX11 $LIBS" |
18469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 18470 | /* end confdefs.h. */ |
81ecdfbb | 18471 | #include <X11/Xlib.h> |
bec39cab AC |
18472 | int |
18473 | main () | |
18474 | { | |
81ecdfbb | 18475 | XrmInitialize () |
bec39cab AC |
18476 | ; |
18477 | return 0; | |
18478 | } | |
18479 | _ACEOF | |
81ecdfbb | 18480 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 18481 | LIBS=$ac_save_LIBS |
c906108c SS |
18482 | # We can link X programs with no special library path. |
18483 | ac_x_libraries= | |
18484 | else | |
81ecdfbb RW |
18485 | LIBS=$ac_save_LIBS |
18486 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 18487 | do |
bec39cab | 18488 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
18489 | for ac_extension in a so sl dylib la dll; do |
18490 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
18491 | ac_x_libraries=$ac_dir |
18492 | break 2 | |
18493 | fi | |
18494 | done | |
18495 | done | |
18496 | fi | |
81ecdfbb RW |
18497 | rm -f core conftest.err conftest.$ac_objext \ |
18498 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 18499 | fi # $ac_x_libraries = no |
c906108c | 18500 | |
81ecdfbb RW |
18501 | case $ac_x_includes,$ac_x_libraries in #( |
18502 | no,* | *,no | *\'*) | |
18503 | # Didn't find X, or a directory has "'" in its name. | |
18504 | ac_cv_have_x="have_x=no";; #( | |
18505 | *) | |
18506 | # Record where we found X for the cache. | |
18507 | ac_cv_have_x="have_x=yes\ | |
18508 | ac_x_includes='$ac_x_includes'\ | |
18509 | ac_x_libraries='$ac_x_libraries'" | |
18510 | esac | |
c906108c | 18511 | fi |
81ecdfbb RW |
18512 | ;; #( |
18513 | *) have_x=yes;; | |
18514 | esac | |
c906108c SS |
18515 | eval "$ac_cv_have_x" |
18516 | fi # $with_x != no | |
18517 | ||
18518 | if test "$have_x" != yes; then | |
81ecdfbb RW |
18519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
18520 | $as_echo "$have_x" >&6; } | |
c906108c SS |
18521 | no_x=yes |
18522 | else | |
18523 | # If each of the values was on the command line, it overrides each guess. | |
18524 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
18525 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
18526 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
18527 | ac_cv_have_x="have_x=yes\ |
18528 | ac_x_includes='$x_includes'\ | |
18529 | ac_x_libraries='$x_libraries'" | |
18530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
18531 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
18532 | fi |
18533 | ||
18534 | ||
bec39cab | 18535 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 18536 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
18537 | # This code just checks for a few cases where we'd like to ignore those |
18538 | # definitions, even when they're present in the '.mt' file. These cases | |
18539 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 18540 | # not part of the source tree. |
7a292a7a | 18541 | # |
81ecdfbb RW |
18542 | # Check whether --enable-sim was given. |
18543 | if test "${enable_sim+set}" = set; then : | |
18544 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
18545 | echo "enableval = ${enableval}"; |
18546 | case "${enableval}" in | |
18547 | yes) ignore_sim=false ;; | |
18548 | no) ignore_sim=true ;; | |
18549 | *) ignore_sim=false ;; | |
18550 | esac | |
18551 | else | |
18552 | ignore_sim=false | |
81ecdfbb RW |
18553 | fi |
18554 | ||
7a292a7a SS |
18555 | |
18556 | if test ! -d "${srcdir}/../sim"; then | |
18557 | ignore_sim=true | |
18558 | fi | |
18559 | ||
9b624dbe UW |
18560 | SIM= |
18561 | SIM_OBS= | |
18562 | if test "${ignore_sim}" = "false"; then | |
18563 | if test x"${gdb_sim}" != x ; then | |
18564 | SIM="${gdb_sim}" | |
18565 | SIM_OBS="remote-sim.o" | |
60ca704f | 18566 | |
81ecdfbb | 18567 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 18568 | |
976102cd PA |
18569 | |
18570 | # Some tdep code should only be compiled in when the ppc sim is | |
18571 | # built. PR sim/13418. | |
18572 | case $target in | |
18573 | powerpc*-*-*) | |
18574 | ||
18575 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
18576 | ||
18577 | ;; | |
18578 | esac | |
9b624dbe | 18579 | fi |
7a292a7a SS |
18580 | fi |
18581 | ||
18582 | ||
18583 | ||
c906108c SS |
18584 | |
18585 | ||
18586 | ||
18587 | ||
18588 | ||
18589 | ||
dfcd3bfb | 18590 | |
e56ac5c3 AC |
18591 | |
18592 | ||
b3a90332 AC |
18593 | |
18594 | ||
c35f4ffc | 18595 | # List of host floatformats. |
bec39cab AC |
18596 | |
18597 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18598 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 18599 | _ACEOF |
c35f4ffc | 18600 | |
bec39cab AC |
18601 | |
18602 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18603 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
18604 | _ACEOF |
18605 | ||
c35f4ffc | 18606 | |
bec39cab | 18607 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 18608 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 18609 | _ACEOF |
c35f4ffc AC |
18610 | |
18611 | ||
c906108c SS |
18612 | # target_subdir is used by the testsuite to find the target libraries. |
18613 | target_subdir= | |
18614 | if test "${host}" != "${target}"; then | |
18615 | target_subdir="${target_alias}/" | |
18616 | fi | |
18617 | ||
18618 | ||
21ea5acd | 18619 | # Import nat definitions. |
2b351b19 | 18620 | nat_makefile_frag=/dev/null |
771b4502 | 18621 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
18622 | . ${srcdir}/configure.nat |
18623 | nativefile=$NAT_FILE | |
c906108c | 18624 | fi |
c906108c | 18625 | |
c906108c SS |
18626 | |
18627 | ||
18628 | ||
21ea5acd SDJ |
18629 | |
18630 | ||
18631 | ||
18632 | ||
18633 | ||
c906108c SS |
18634 | |
18635 | ||
b00a8037 | 18636 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
18637 | |
18638 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 18639 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 18640 | _ACEOF |
b00a8037 DJ |
18641 | |
18642 | fi | |
18643 | ||
393fd4c3 YQ |
18644 | # Check for babeltrace and babeltrace-ctf |
18645 | ||
18646 | # Check whether --with-babeltrace was given. | |
18647 | if test "${with_babeltrace+set}" = set; then : | |
18648 | withval=$with_babeltrace; | |
18649 | else | |
18650 | with_babeltrace=auto | |
18651 | fi | |
18652 | ||
18653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
18654 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
18655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
18656 | $as_echo "$with_babeltrace" >&6; } | |
18657 | ||
18658 | if test "x$with_babeltrace" = "xno"; then | |
18659 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
18660 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
18661 | else | |
18662 | # Append -Werror to CFLAGS so that configure can catch the warning | |
18663 | # "assignment from incompatible pointer type", which is related to | |
18664 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
18665 | # in GDB, while babeltrace 1.0.3 is broken. | |
18666 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
18667 | # safe to save and restore CFLAGS here. | |
18668 | saved_CFLAGS=$CFLAGS | |
18669 | CFLAGS="$CFLAGS -Werror" | |
18670 | ||
18671 | ||
18672 | ||
18673 | ||
18674 | ||
18675 | ||
18676 | ||
18677 | ||
18678 | use_additional=yes | |
18679 | ||
18680 | acl_save_prefix="$prefix" | |
18681 | prefix="$acl_final_prefix" | |
18682 | acl_save_exec_prefix="$exec_prefix" | |
18683 | exec_prefix="$acl_final_exec_prefix" | |
18684 | ||
18685 | eval additional_includedir=\"$includedir\" | |
18686 | eval additional_libdir=\"$libdir\" | |
18687 | ||
18688 | exec_prefix="$acl_save_exec_prefix" | |
18689 | prefix="$acl_save_prefix" | |
18690 | ||
18691 | ||
18692 | # Check whether --with-libbabeltrace-prefix was given. | |
18693 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
18694 | withval=$with_libbabeltrace_prefix; | |
18695 | if test "X$withval" = "Xno"; then | |
18696 | use_additional=no | |
18697 | else | |
18698 | if test "X$withval" = "X"; then | |
18699 | ||
18700 | acl_save_prefix="$prefix" | |
18701 | prefix="$acl_final_prefix" | |
18702 | acl_save_exec_prefix="$exec_prefix" | |
18703 | exec_prefix="$acl_final_exec_prefix" | |
18704 | ||
18705 | eval additional_includedir=\"$includedir\" | |
18706 | eval additional_libdir=\"$libdir\" | |
18707 | ||
18708 | exec_prefix="$acl_save_exec_prefix" | |
18709 | prefix="$acl_save_prefix" | |
18710 | ||
18711 | else | |
18712 | additional_includedir="$withval/include" | |
18713 | additional_libdir="$withval/lib" | |
18714 | fi | |
18715 | fi | |
18716 | ||
18717 | fi | |
18718 | ||
9f1528a1 AB |
18719 | |
18720 | # Check whether --with-libbabeltrace-type was given. | |
18721 | if test "${with_libbabeltrace_type+set}" = set; then : | |
18722 | withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval | |
18723 | else | |
18724 | with_libbabeltrace_type=auto | |
18725 | fi | |
18726 | ||
18727 | lib_type=`eval echo \$with_libbabeltrace_type` | |
18728 | ||
393fd4c3 YQ |
18729 | LIBBABELTRACE= |
18730 | LTLIBBABELTRACE= | |
18731 | INCBABELTRACE= | |
18732 | rpathdirs= | |
18733 | ltrpathdirs= | |
18734 | names_already_handled= | |
18735 | names_next_round='babeltrace babeltrace-ctf' | |
18736 | while test -n "$names_next_round"; do | |
18737 | names_this_round="$names_next_round" | |
18738 | names_next_round= | |
18739 | for name in $names_this_round; do | |
18740 | already_handled= | |
18741 | for n in $names_already_handled; do | |
18742 | if test "$n" = "$name"; then | |
18743 | already_handled=yes | |
18744 | break | |
18745 | fi | |
18746 | done | |
18747 | if test -z "$already_handled"; then | |
18748 | names_already_handled="$names_already_handled $name" | |
18749 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
18750 | eval value=\"\$HAVE_LIB$uppername\" | |
18751 | if test -n "$value"; then | |
18752 | if test "$value" = yes; then | |
18753 | eval value=\"\$LIB$uppername\" | |
18754 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
18755 | eval value=\"\$LTLIB$uppername\" | |
18756 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
18757 | else | |
18758 | : | |
18759 | fi | |
18760 | else | |
18761 | found_dir= | |
18762 | found_la= | |
18763 | found_so= | |
18764 | found_a= | |
18765 | if test $use_additional = yes; then | |
9f1528a1 | 18766 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18767 | found_dir="$additional_libdir" |
18768 | found_so="$additional_libdir/lib$name.$shlibext" | |
18769 | if test -f "$additional_libdir/lib$name.la"; then | |
18770 | found_la="$additional_libdir/lib$name.la" | |
18771 | fi | |
9f1528a1 | 18772 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18773 | if test -f "$additional_libdir/lib$name.$libext"; then |
18774 | found_dir="$additional_libdir" | |
18775 | found_a="$additional_libdir/lib$name.$libext" | |
18776 | if test -f "$additional_libdir/lib$name.la"; then | |
18777 | found_la="$additional_libdir/lib$name.la" | |
18778 | fi | |
18779 | fi | |
18780 | fi | |
18781 | fi | |
18782 | if test "X$found_dir" = "X"; then | |
18783 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18784 | ||
18785 | acl_save_prefix="$prefix" | |
18786 | prefix="$acl_final_prefix" | |
18787 | acl_save_exec_prefix="$exec_prefix" | |
18788 | exec_prefix="$acl_final_exec_prefix" | |
18789 | eval x=\"$x\" | |
18790 | exec_prefix="$acl_save_exec_prefix" | |
18791 | prefix="$acl_save_prefix" | |
18792 | ||
18793 | case "$x" in | |
18794 | -L*) | |
18795 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 18796 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18797 | found_dir="$dir" |
18798 | found_so="$dir/lib$name.$shlibext" | |
18799 | if test -f "$dir/lib$name.la"; then | |
18800 | found_la="$dir/lib$name.la" | |
18801 | fi | |
9f1528a1 | 18802 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18803 | if test -f "$dir/lib$name.$libext"; then |
18804 | found_dir="$dir" | |
18805 | found_a="$dir/lib$name.$libext" | |
18806 | if test -f "$dir/lib$name.la"; then | |
18807 | found_la="$dir/lib$name.la" | |
18808 | fi | |
18809 | fi | |
18810 | fi | |
18811 | ;; | |
18812 | esac | |
18813 | if test "X$found_dir" != "X"; then | |
18814 | break | |
18815 | fi | |
18816 | done | |
18817 | fi | |
18818 | if test "X$found_dir" != "X"; then | |
18819 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
18820 | if test "X$found_so" != "X"; then | |
18821 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
18822 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18823 | else | |
18824 | haveit= | |
18825 | for x in $ltrpathdirs; do | |
18826 | if test "X$x" = "X$found_dir"; then | |
18827 | haveit=yes | |
18828 | break | |
18829 | fi | |
18830 | done | |
18831 | if test -z "$haveit"; then | |
18832 | ltrpathdirs="$ltrpathdirs $found_dir" | |
18833 | fi | |
18834 | if test "$hardcode_direct" = yes; then | |
18835 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18836 | else | |
18837 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
18838 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18839 | haveit= | |
18840 | for x in $rpathdirs; do | |
18841 | if test "X$x" = "X$found_dir"; then | |
18842 | haveit=yes | |
18843 | break | |
18844 | fi | |
18845 | done | |
18846 | if test -z "$haveit"; then | |
18847 | rpathdirs="$rpathdirs $found_dir" | |
18848 | fi | |
18849 | else | |
18850 | haveit= | |
18851 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18852 | ||
18853 | acl_save_prefix="$prefix" | |
18854 | prefix="$acl_final_prefix" | |
18855 | acl_save_exec_prefix="$exec_prefix" | |
18856 | exec_prefix="$acl_final_exec_prefix" | |
18857 | eval x=\"$x\" | |
18858 | exec_prefix="$acl_save_exec_prefix" | |
18859 | prefix="$acl_save_prefix" | |
18860 | ||
18861 | if test "X$x" = "X-L$found_dir"; then | |
18862 | haveit=yes | |
18863 | break | |
18864 | fi | |
18865 | done | |
18866 | if test -z "$haveit"; then | |
18867 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
18868 | fi | |
18869 | if test "$hardcode_minus_L" != no; then | |
18870 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18871 | else | |
18872 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
18873 | fi | |
18874 | fi | |
18875 | fi | |
18876 | fi | |
18877 | else | |
18878 | if test "X$found_a" != "X"; then | |
18879 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
18880 | else | |
18881 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
18882 | fi | |
18883 | fi | |
18884 | additional_includedir= | |
18885 | case "$found_dir" in | |
18886 | */lib | */lib/) | |
18887 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
18888 | additional_includedir="$basedir/include" | |
18889 | ;; | |
18890 | esac | |
18891 | if test "X$additional_includedir" != "X"; then | |
18892 | if test "X$additional_includedir" != "X/usr/include"; then | |
18893 | haveit= | |
18894 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
18895 | if test -n "$GCC"; then | |
18896 | case $host_os in | |
18897 | linux*) haveit=yes;; | |
18898 | esac | |
18899 | fi | |
18900 | fi | |
18901 | if test -z "$haveit"; then | |
18902 | for x in $CPPFLAGS $INCBABELTRACE; do | |
18903 | ||
18904 | acl_save_prefix="$prefix" | |
18905 | prefix="$acl_final_prefix" | |
18906 | acl_save_exec_prefix="$exec_prefix" | |
18907 | exec_prefix="$acl_final_exec_prefix" | |
18908 | eval x=\"$x\" | |
18909 | exec_prefix="$acl_save_exec_prefix" | |
18910 | prefix="$acl_save_prefix" | |
18911 | ||
18912 | if test "X$x" = "X-I$additional_includedir"; then | |
18913 | haveit=yes | |
18914 | break | |
18915 | fi | |
18916 | done | |
18917 | if test -z "$haveit"; then | |
18918 | if test -d "$additional_includedir"; then | |
18919 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
18920 | fi | |
18921 | fi | |
18922 | fi | |
18923 | fi | |
18924 | fi | |
18925 | if test -n "$found_la"; then | |
18926 | save_libdir="$libdir" | |
18927 | case "$found_la" in | |
18928 | */* | *\\*) . "$found_la" ;; | |
18929 | *) . "./$found_la" ;; | |
18930 | esac | |
18931 | libdir="$save_libdir" | |
18932 | for dep in $dependency_libs; do | |
18933 | case "$dep" in | |
18934 | -L*) | |
18935 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
18936 | if test "X$additional_libdir" != "X/usr/lib"; then | |
18937 | haveit= | |
18938 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
18939 | if test -n "$GCC"; then | |
18940 | case $host_os in | |
18941 | linux*) haveit=yes;; | |
18942 | esac | |
18943 | fi | |
18944 | fi | |
18945 | if test -z "$haveit"; then | |
18946 | haveit= | |
18947 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18948 | ||
18949 | acl_save_prefix="$prefix" | |
18950 | prefix="$acl_final_prefix" | |
18951 | acl_save_exec_prefix="$exec_prefix" | |
18952 | exec_prefix="$acl_final_exec_prefix" | |
18953 | eval x=\"$x\" | |
18954 | exec_prefix="$acl_save_exec_prefix" | |
18955 | prefix="$acl_save_prefix" | |
18956 | ||
18957 | if test "X$x" = "X-L$additional_libdir"; then | |
18958 | haveit=yes | |
18959 | break | |
18960 | fi | |
18961 | done | |
18962 | if test -z "$haveit"; then | |
18963 | if test -d "$additional_libdir"; then | |
18964 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
18965 | fi | |
18966 | fi | |
18967 | haveit= | |
18968 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18969 | ||
18970 | acl_save_prefix="$prefix" | |
18971 | prefix="$acl_final_prefix" | |
18972 | acl_save_exec_prefix="$exec_prefix" | |
18973 | exec_prefix="$acl_final_exec_prefix" | |
18974 | eval x=\"$x\" | |
18975 | exec_prefix="$acl_save_exec_prefix" | |
18976 | prefix="$acl_save_prefix" | |
18977 | ||
18978 | if test "X$x" = "X-L$additional_libdir"; then | |
18979 | haveit=yes | |
18980 | break | |
18981 | fi | |
18982 | done | |
18983 | if test -z "$haveit"; then | |
18984 | if test -d "$additional_libdir"; then | |
18985 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
18986 | fi | |
18987 | fi | |
18988 | fi | |
18989 | fi | |
18990 | ;; | |
18991 | -R*) | |
18992 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
18993 | if test "$enable_rpath" != no; then | |
18994 | haveit= | |
18995 | for x in $rpathdirs; do | |
18996 | if test "X$x" = "X$dir"; then | |
18997 | haveit=yes | |
18998 | break | |
18999 | fi | |
19000 | done | |
19001 | if test -z "$haveit"; then | |
19002 | rpathdirs="$rpathdirs $dir" | |
19003 | fi | |
19004 | haveit= | |
19005 | for x in $ltrpathdirs; do | |
19006 | if test "X$x" = "X$dir"; then | |
19007 | haveit=yes | |
19008 | break | |
19009 | fi | |
19010 | done | |
19011 | if test -z "$haveit"; then | |
19012 | ltrpathdirs="$ltrpathdirs $dir" | |
19013 | fi | |
19014 | fi | |
19015 | ;; | |
19016 | -l*) | |
19017 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
19018 | ;; | |
19019 | *.la) | |
19020 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19021 | ;; | |
19022 | *) | |
19023 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
19024 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
19025 | ;; | |
19026 | esac | |
19027 | done | |
19028 | fi | |
19029 | else | |
9f1528a1 AB |
19030 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19031 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
19032 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
19033 | else | |
19034 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext" | |
19035 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext" | |
19036 | fi | |
393fd4c3 YQ |
19037 | fi |
19038 | fi | |
19039 | fi | |
19040 | done | |
19041 | done | |
19042 | if test "X$rpathdirs" != "X"; then | |
19043 | if test -n "$hardcode_libdir_separator"; then | |
19044 | alldirs= | |
19045 | for found_dir in $rpathdirs; do | |
19046 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19047 | done | |
19048 | acl_save_libdir="$libdir" | |
19049 | libdir="$alldirs" | |
19050 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19051 | libdir="$acl_save_libdir" | |
19052 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
19053 | else | |
19054 | for found_dir in $rpathdirs; do | |
19055 | acl_save_libdir="$libdir" | |
19056 | libdir="$found_dir" | |
19057 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19058 | libdir="$acl_save_libdir" | |
19059 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
19060 | done | |
19061 | fi | |
19062 | fi | |
19063 | if test "X$ltrpathdirs" != "X"; then | |
19064 | for found_dir in $ltrpathdirs; do | |
19065 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
19066 | done | |
19067 | fi | |
19068 | ||
19069 | ||
19070 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19071 | ||
19072 | for element in $INCBABELTRACE; do | |
19073 | haveit= | |
19074 | for x in $CPPFLAGS; do | |
19075 | ||
19076 | acl_save_prefix="$prefix" | |
19077 | prefix="$acl_final_prefix" | |
19078 | acl_save_exec_prefix="$exec_prefix" | |
19079 | exec_prefix="$acl_final_exec_prefix" | |
19080 | eval x=\"$x\" | |
19081 | exec_prefix="$acl_save_exec_prefix" | |
19082 | prefix="$acl_save_prefix" | |
19083 | ||
19084 | if test "X$x" = "X$element"; then | |
19085 | haveit=yes | |
19086 | break | |
19087 | fi | |
19088 | done | |
19089 | if test -z "$haveit"; then | |
19090 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19091 | fi | |
19092 | done | |
19093 | ||
19094 | ||
19095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
19096 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
d0ac1c44 | 19097 | if ${ac_cv_libbabeltrace+:} false; then : |
393fd4c3 YQ |
19098 | $as_echo_n "(cached) " >&6 |
19099 | else | |
19100 | ||
19101 | ac_save_LIBS="$LIBS" | |
19102 | LIBS="$LIBS $LIBBABELTRACE" | |
19103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19104 | /* end confdefs.h. */ | |
19105 | #include <babeltrace/babeltrace.h> | |
19106 | #include <babeltrace/ctf/events.h> | |
19107 | #include <babeltrace/ctf/iterator.h> | |
19108 | int | |
19109 | main () | |
19110 | { | |
19111 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
19112 | struct bt_ctf_event *event = NULL; | |
19113 | const struct bt_definition *scope; | |
19114 | ||
13cdc2af | 19115 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 19116 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
19117 | scope = bt_ctf_get_top_level_scope (event, |
19118 | BT_STREAM_EVENT_HEADER); | |
19119 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
19120 | ||
19121 | ; | |
19122 | return 0; | |
19123 | } | |
19124 | _ACEOF | |
19125 | if ac_fn_c_try_link "$LINENO"; then : | |
19126 | ac_cv_libbabeltrace=yes | |
19127 | else | |
19128 | ac_cv_libbabeltrace=no | |
19129 | fi | |
19130 | rm -f core conftest.err conftest.$ac_objext \ | |
19131 | conftest$ac_exeext conftest.$ac_ext | |
19132 | LIBS="$ac_save_LIBS" | |
19133 | ||
19134 | fi | |
19135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
19136 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
19137 | if test "$ac_cv_libbabeltrace" = yes; then | |
19138 | HAVE_LIBBABELTRACE=yes | |
19139 | ||
19140 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
19141 | ||
19142 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
19143 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
19144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
19145 | $as_echo "$LIBBABELTRACE" >&6; } | |
19146 | else | |
19147 | HAVE_LIBBABELTRACE=no | |
19148 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19149 | LIBBABELTRACE= | |
19150 | LTLIBBABELTRACE= | |
19151 | fi | |
19152 | ||
19153 | ||
19154 | ||
19155 | ||
19156 | ||
19157 | ||
19158 | CFLAGS=$saved_CFLAGS | |
19159 | ||
19160 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
19161 | if test "$with_babeltrace" = yes; then | |
d0ac1c44 | 19162 | as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 |
393fd4c3 YQ |
19163 | else |
19164 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
19165 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
19166 | fi | |
19167 | fi | |
19168 | fi | |
19169 | ||
ccb1ba62 CB |
19170 | # Check for xxhash |
19171 | ||
19172 | # Check whether --with-xxhash was given. | |
19173 | if test "${with_xxhash+set}" = set; then : | |
19174 | withval=$with_xxhash; | |
19175 | else | |
19176 | with_xxhash=auto | |
19177 | fi | |
19178 | ||
19179 | ||
1776e3e5 NA |
19180 | # Check whether --enable-libctf was given. |
19181 | if test "${enable_libctf+set}" = set; then : | |
19182 | enableval=$enable_libctf; | |
19183 | case "$enableval" in | |
19184 | yes|no) ;; | |
19185 | *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;; | |
19186 | esac | |
19187 | ||
19188 | else | |
19189 | enable_libctf=yes | |
19190 | fi | |
19191 | ||
19192 | ||
19193 | if test x${enable_static} = xno; then | |
19194 | LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so" | |
19195 | CTF_DEPS="../libctf/.libs/libctf.so" | |
19196 | else | |
19197 | LIBCTF="../libctf/.libs/libctf.a" | |
19198 | CTF_DEPS="$LIBCTF" | |
19199 | fi | |
19200 | if test "${enable_libctf}" = yes; then | |
19201 | ||
19202 | $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h | |
19203 | ||
19204 | else | |
19205 | LIBCTF= | |
19206 | CTF_DEPS= | |
19207 | fi | |
19208 | ||
19209 | ||
19210 | ||
19211 | ||
19212 | # If nativefile (NAT_FILE) is not set in configure.nat, we link to an | |
19213 | # empty version. | |
19214 | ||
ccb1ba62 CB |
19215 | if test "x$with_xxhash" != "xno"; then |
19216 | ||
19217 | ||
19218 | ||
19219 | ||
19220 | ||
19221 | ||
19222 | ||
19223 | ||
19224 | use_additional=yes | |
19225 | ||
19226 | acl_save_prefix="$prefix" | |
19227 | prefix="$acl_final_prefix" | |
19228 | acl_save_exec_prefix="$exec_prefix" | |
19229 | exec_prefix="$acl_final_exec_prefix" | |
19230 | ||
19231 | eval additional_includedir=\"$includedir\" | |
19232 | eval additional_libdir=\"$libdir\" | |
19233 | ||
19234 | exec_prefix="$acl_save_exec_prefix" | |
19235 | prefix="$acl_save_prefix" | |
19236 | ||
19237 | ||
19238 | # Check whether --with-libxxhash-prefix was given. | |
19239 | if test "${with_libxxhash_prefix+set}" = set; then : | |
19240 | withval=$with_libxxhash_prefix; | |
19241 | if test "X$withval" = "Xno"; then | |
19242 | use_additional=no | |
19243 | else | |
19244 | if test "X$withval" = "X"; then | |
19245 | ||
19246 | acl_save_prefix="$prefix" | |
19247 | prefix="$acl_final_prefix" | |
19248 | acl_save_exec_prefix="$exec_prefix" | |
19249 | exec_prefix="$acl_final_exec_prefix" | |
19250 | ||
19251 | eval additional_includedir=\"$includedir\" | |
19252 | eval additional_libdir=\"$libdir\" | |
19253 | ||
19254 | exec_prefix="$acl_save_exec_prefix" | |
19255 | prefix="$acl_save_prefix" | |
19256 | ||
19257 | else | |
19258 | additional_includedir="$withval/include" | |
19259 | additional_libdir="$withval/lib" | |
19260 | fi | |
19261 | fi | |
19262 | ||
19263 | fi | |
19264 | ||
9f1528a1 AB |
19265 | |
19266 | # Check whether --with-libxxhash-type was given. | |
19267 | if test "${with_libxxhash_type+set}" = set; then : | |
19268 | withval=$with_libxxhash_type; with_libxxhash_type=$withval | |
19269 | else | |
19270 | with_libxxhash_type=auto | |
19271 | fi | |
19272 | ||
19273 | lib_type=`eval echo \$with_libxxhash_type` | |
19274 | ||
ccb1ba62 CB |
19275 | LIBXXHASH= |
19276 | LTLIBXXHASH= | |
19277 | INCXXHASH= | |
19278 | rpathdirs= | |
19279 | ltrpathdirs= | |
19280 | names_already_handled= | |
19281 | names_next_round='xxhash ' | |
19282 | while test -n "$names_next_round"; do | |
19283 | names_this_round="$names_next_round" | |
19284 | names_next_round= | |
19285 | for name in $names_this_round; do | |
19286 | already_handled= | |
19287 | for n in $names_already_handled; do | |
19288 | if test "$n" = "$name"; then | |
19289 | already_handled=yes | |
19290 | break | |
19291 | fi | |
19292 | done | |
19293 | if test -z "$already_handled"; then | |
19294 | names_already_handled="$names_already_handled $name" | |
19295 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
19296 | eval value=\"\$HAVE_LIB$uppername\" | |
19297 | if test -n "$value"; then | |
19298 | if test "$value" = yes; then | |
19299 | eval value=\"\$LIB$uppername\" | |
19300 | test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" | |
19301 | eval value=\"\$LTLIB$uppername\" | |
19302 | test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" | |
19303 | else | |
19304 | : | |
19305 | fi | |
19306 | else | |
19307 | found_dir= | |
19308 | found_la= | |
19309 | found_so= | |
19310 | found_a= | |
19311 | if test $use_additional = yes; then | |
9f1528a1 | 19312 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
19313 | found_dir="$additional_libdir" |
19314 | found_so="$additional_libdir/lib$name.$shlibext" | |
19315 | if test -f "$additional_libdir/lib$name.la"; then | |
19316 | found_la="$additional_libdir/lib$name.la" | |
19317 | fi | |
9f1528a1 | 19318 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
19319 | if test -f "$additional_libdir/lib$name.$libext"; then |
19320 | found_dir="$additional_libdir" | |
19321 | found_a="$additional_libdir/lib$name.$libext" | |
19322 | if test -f "$additional_libdir/lib$name.la"; then | |
19323 | found_la="$additional_libdir/lib$name.la" | |
19324 | fi | |
19325 | fi | |
19326 | fi | |
19327 | fi | |
19328 | if test "X$found_dir" = "X"; then | |
19329 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19330 | ||
19331 | acl_save_prefix="$prefix" | |
19332 | prefix="$acl_final_prefix" | |
19333 | acl_save_exec_prefix="$exec_prefix" | |
19334 | exec_prefix="$acl_final_exec_prefix" | |
19335 | eval x=\"$x\" | |
19336 | exec_prefix="$acl_save_exec_prefix" | |
19337 | prefix="$acl_save_prefix" | |
19338 | ||
19339 | case "$x" in | |
19340 | -L*) | |
19341 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 19342 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
19343 | found_dir="$dir" |
19344 | found_so="$dir/lib$name.$shlibext" | |
19345 | if test -f "$dir/lib$name.la"; then | |
19346 | found_la="$dir/lib$name.la" | |
19347 | fi | |
9f1528a1 | 19348 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
19349 | if test -f "$dir/lib$name.$libext"; then |
19350 | found_dir="$dir" | |
19351 | found_a="$dir/lib$name.$libext" | |
19352 | if test -f "$dir/lib$name.la"; then | |
19353 | found_la="$dir/lib$name.la" | |
19354 | fi | |
19355 | fi | |
19356 | fi | |
19357 | ;; | |
19358 | esac | |
19359 | if test "X$found_dir" != "X"; then | |
19360 | break | |
19361 | fi | |
19362 | done | |
19363 | fi | |
19364 | if test "X$found_dir" != "X"; then | |
19365 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name" | |
19366 | if test "X$found_so" != "X"; then | |
19367 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
19368 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19369 | else | |
19370 | haveit= | |
19371 | for x in $ltrpathdirs; do | |
19372 | if test "X$x" = "X$found_dir"; then | |
19373 | haveit=yes | |
19374 | break | |
19375 | fi | |
19376 | done | |
19377 | if test -z "$haveit"; then | |
19378 | ltrpathdirs="$ltrpathdirs $found_dir" | |
19379 | fi | |
19380 | if test "$hardcode_direct" = yes; then | |
19381 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19382 | else | |
19383 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
19384 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19385 | haveit= | |
19386 | for x in $rpathdirs; do | |
19387 | if test "X$x" = "X$found_dir"; then | |
19388 | haveit=yes | |
19389 | break | |
19390 | fi | |
19391 | done | |
19392 | if test -z "$haveit"; then | |
19393 | rpathdirs="$rpathdirs $found_dir" | |
19394 | fi | |
19395 | else | |
19396 | haveit= | |
19397 | for x in $LDFLAGS $LIBXXHASH; do | |
19398 | ||
19399 | acl_save_prefix="$prefix" | |
19400 | prefix="$acl_final_prefix" | |
19401 | acl_save_exec_prefix="$exec_prefix" | |
19402 | exec_prefix="$acl_final_exec_prefix" | |
19403 | eval x=\"$x\" | |
19404 | exec_prefix="$acl_save_exec_prefix" | |
19405 | prefix="$acl_save_prefix" | |
19406 | ||
19407 | if test "X$x" = "X-L$found_dir"; then | |
19408 | haveit=yes | |
19409 | break | |
19410 | fi | |
19411 | done | |
19412 | if test -z "$haveit"; then | |
19413 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" | |
19414 | fi | |
19415 | if test "$hardcode_minus_L" != no; then | |
19416 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19417 | else | |
19418 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19419 | fi | |
19420 | fi | |
19421 | fi | |
19422 | fi | |
19423 | else | |
19424 | if test "X$found_a" != "X"; then | |
19425 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" | |
19426 | else | |
19427 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" | |
19428 | fi | |
19429 | fi | |
19430 | additional_includedir= | |
19431 | case "$found_dir" in | |
19432 | */lib | */lib/) | |
19433 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
19434 | additional_includedir="$basedir/include" | |
19435 | ;; | |
19436 | esac | |
19437 | if test "X$additional_includedir" != "X"; then | |
19438 | if test "X$additional_includedir" != "X/usr/include"; then | |
19439 | haveit= | |
19440 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
19441 | if test -n "$GCC"; then | |
19442 | case $host_os in | |
19443 | linux*) haveit=yes;; | |
19444 | esac | |
19445 | fi | |
19446 | fi | |
19447 | if test -z "$haveit"; then | |
19448 | for x in $CPPFLAGS $INCXXHASH; do | |
19449 | ||
19450 | acl_save_prefix="$prefix" | |
19451 | prefix="$acl_final_prefix" | |
19452 | acl_save_exec_prefix="$exec_prefix" | |
19453 | exec_prefix="$acl_final_exec_prefix" | |
19454 | eval x=\"$x\" | |
19455 | exec_prefix="$acl_save_exec_prefix" | |
19456 | prefix="$acl_save_prefix" | |
19457 | ||
19458 | if test "X$x" = "X-I$additional_includedir"; then | |
19459 | haveit=yes | |
19460 | break | |
19461 | fi | |
19462 | done | |
19463 | if test -z "$haveit"; then | |
19464 | if test -d "$additional_includedir"; then | |
19465 | INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" | |
19466 | fi | |
19467 | fi | |
19468 | fi | |
19469 | fi | |
19470 | fi | |
19471 | if test -n "$found_la"; then | |
19472 | save_libdir="$libdir" | |
19473 | case "$found_la" in | |
19474 | */* | *\\*) . "$found_la" ;; | |
19475 | *) . "./$found_la" ;; | |
19476 | esac | |
19477 | libdir="$save_libdir" | |
19478 | for dep in $dependency_libs; do | |
19479 | case "$dep" in | |
19480 | -L*) | |
19481 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
19482 | if test "X$additional_libdir" != "X/usr/lib"; then | |
19483 | haveit= | |
19484 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
19485 | if test -n "$GCC"; then | |
19486 | case $host_os in | |
19487 | linux*) haveit=yes;; | |
19488 | esac | |
19489 | fi | |
19490 | fi | |
19491 | if test -z "$haveit"; then | |
19492 | haveit= | |
19493 | for x in $LDFLAGS $LIBXXHASH; do | |
19494 | ||
19495 | acl_save_prefix="$prefix" | |
19496 | prefix="$acl_final_prefix" | |
19497 | acl_save_exec_prefix="$exec_prefix" | |
19498 | exec_prefix="$acl_final_exec_prefix" | |
19499 | eval x=\"$x\" | |
19500 | exec_prefix="$acl_save_exec_prefix" | |
19501 | prefix="$acl_save_prefix" | |
19502 | ||
19503 | if test "X$x" = "X-L$additional_libdir"; then | |
19504 | haveit=yes | |
19505 | break | |
19506 | fi | |
19507 | done | |
19508 | if test -z "$haveit"; then | |
19509 | if test -d "$additional_libdir"; then | |
19510 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" | |
19511 | fi | |
19512 | fi | |
19513 | haveit= | |
19514 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19515 | ||
19516 | acl_save_prefix="$prefix" | |
19517 | prefix="$acl_final_prefix" | |
19518 | acl_save_exec_prefix="$exec_prefix" | |
19519 | exec_prefix="$acl_final_exec_prefix" | |
19520 | eval x=\"$x\" | |
19521 | exec_prefix="$acl_save_exec_prefix" | |
19522 | prefix="$acl_save_prefix" | |
19523 | ||
19524 | if test "X$x" = "X-L$additional_libdir"; then | |
19525 | haveit=yes | |
19526 | break | |
19527 | fi | |
19528 | done | |
19529 | if test -z "$haveit"; then | |
19530 | if test -d "$additional_libdir"; then | |
19531 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" | |
19532 | fi | |
19533 | fi | |
19534 | fi | |
19535 | fi | |
19536 | ;; | |
19537 | -R*) | |
19538 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
19539 | if test "$enable_rpath" != no; then | |
19540 | haveit= | |
19541 | for x in $rpathdirs; do | |
19542 | if test "X$x" = "X$dir"; then | |
19543 | haveit=yes | |
19544 | break | |
19545 | fi | |
19546 | done | |
19547 | if test -z "$haveit"; then | |
19548 | rpathdirs="$rpathdirs $dir" | |
19549 | fi | |
19550 | haveit= | |
19551 | for x in $ltrpathdirs; do | |
19552 | if test "X$x" = "X$dir"; then | |
19553 | haveit=yes | |
19554 | break | |
19555 | fi | |
19556 | done | |
19557 | if test -z "$haveit"; then | |
19558 | ltrpathdirs="$ltrpathdirs $dir" | |
19559 | fi | |
19560 | fi | |
19561 | ;; | |
19562 | -l*) | |
19563 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
19564 | ;; | |
19565 | *.la) | |
19566 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19567 | ;; | |
19568 | *) | |
19569 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" | |
19570 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" | |
19571 | ;; | |
19572 | esac | |
19573 | done | |
19574 | fi | |
19575 | else | |
9f1528a1 AB |
19576 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19577 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19578 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" | |
19579 | else | |
19580 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext" | |
19581 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext" | |
19582 | fi | |
ccb1ba62 CB |
19583 | fi |
19584 | fi | |
19585 | fi | |
19586 | done | |
19587 | done | |
19588 | if test "X$rpathdirs" != "X"; then | |
19589 | if test -n "$hardcode_libdir_separator"; then | |
19590 | alldirs= | |
19591 | for found_dir in $rpathdirs; do | |
19592 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19593 | done | |
19594 | acl_save_libdir="$libdir" | |
19595 | libdir="$alldirs" | |
19596 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19597 | libdir="$acl_save_libdir" | |
19598 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19599 | else | |
19600 | for found_dir in $rpathdirs; do | |
19601 | acl_save_libdir="$libdir" | |
19602 | libdir="$found_dir" | |
19603 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19604 | libdir="$acl_save_libdir" | |
19605 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19606 | done | |
19607 | fi | |
19608 | fi | |
19609 | if test "X$ltrpathdirs" != "X"; then | |
19610 | for found_dir in $ltrpathdirs; do | |
19611 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" | |
19612 | done | |
19613 | fi | |
19614 | ||
19615 | ||
19616 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19617 | ||
19618 | for element in $INCXXHASH; do | |
19619 | haveit= | |
19620 | for x in $CPPFLAGS; do | |
19621 | ||
19622 | acl_save_prefix="$prefix" | |
19623 | prefix="$acl_final_prefix" | |
19624 | acl_save_exec_prefix="$exec_prefix" | |
19625 | exec_prefix="$acl_final_exec_prefix" | |
19626 | eval x=\"$x\" | |
19627 | exec_prefix="$acl_save_exec_prefix" | |
19628 | prefix="$acl_save_prefix" | |
19629 | ||
19630 | if test "X$x" = "X$element"; then | |
19631 | haveit=yes | |
19632 | break | |
19633 | fi | |
19634 | done | |
19635 | if test -z "$haveit"; then | |
19636 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19637 | fi | |
19638 | done | |
19639 | ||
19640 | ||
19641 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 | |
19642 | $as_echo_n "checking for libxxhash... " >&6; } | |
19643 | if ${ac_cv_libxxhash+:} false; then : | |
19644 | $as_echo_n "(cached) " >&6 | |
19645 | else | |
19646 | ||
19647 | ac_save_LIBS="$LIBS" | |
19648 | LIBS="$LIBS $LIBXXHASH" | |
19649 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19650 | /* end confdefs.h. */ | |
19651 | #include <xxhash.h> | |
19652 | int | |
19653 | main () | |
19654 | { | |
19655 | XXH32("foo", 3, 0); | |
19656 | ||
19657 | ; | |
19658 | return 0; | |
19659 | } | |
19660 | _ACEOF | |
19661 | if ac_fn_c_try_link "$LINENO"; then : | |
19662 | ac_cv_libxxhash=yes | |
19663 | else | |
19664 | ac_cv_libxxhash=no | |
19665 | fi | |
19666 | rm -f core conftest.err conftest.$ac_objext \ | |
19667 | conftest$ac_exeext conftest.$ac_ext | |
19668 | LIBS="$ac_save_LIBS" | |
19669 | ||
19670 | fi | |
19671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 | |
19672 | $as_echo "$ac_cv_libxxhash" >&6; } | |
19673 | if test "$ac_cv_libxxhash" = yes; then | |
19674 | HAVE_LIBXXHASH=yes | |
19675 | ||
19676 | $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h | |
19677 | ||
19678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 | |
19679 | $as_echo_n "checking how to link with libxxhash... " >&6; } | |
19680 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 | |
19681 | $as_echo "$LIBXXHASH" >&6; } | |
19682 | else | |
19683 | HAVE_LIBXXHASH=no | |
19684 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19685 | LIBXXHASH= | |
19686 | LTLIBXXHASH= | |
19687 | fi | |
19688 | ||
19689 | ||
19690 | ||
19691 | ||
19692 | ||
19693 | ||
19694 | if test "$HAVE_LIBXXHASH" != yes; then | |
19695 | if test "$with_xxhash" = yes; then | |
19696 | as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 | |
19697 | fi | |
19698 | fi | |
19699 | if test "x$with_xxhash" = "xauto"; then | |
19700 | with_xxhash="$HAVE_LIBXXHASH" | |
19701 | fi | |
19702 | fi | |
19703 | ||
19704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 | |
19705 | $as_echo_n "checking whether to use xxhash... " >&6; } | |
19706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 | |
19707 | $as_echo "$with_xxhash" >&6; } | |
19708 | ||
a0a461e5 | 19709 | NM_H= |
c906108c SS |
19710 | rm -f nm.h |
19711 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
19712 | case "${nativefile}" in |
19713 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
19714 | * ) GDB_NM_FILE="${nativefile}" | |
19715 | esac | |
a0a461e5 TT |
19716 | ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE" |
19717 | ||
60ca704f SE |
19718 | |
19719 | cat >>confdefs.h <<_ACEOF | |
b78960be | 19720 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 19721 | _ACEOF |
5a2402b8 | 19722 | |
a0a461e5 | 19723 | NM_H=nm.h |
c906108c | 19724 | fi |
5a2402b8 AC |
19725 | |
19726 | ||
a0a461e5 | 19727 | |
e3487908 GKB |
19728 | for ac_prog in xsltproc |
19729 | do | |
19730 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
19731 | set dummy $ac_prog; ac_word=$2 | |
19732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
19733 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 19734 | if ${ac_cv_path_XSLTPROC+:} false; then : |
e3487908 GKB |
19735 | $as_echo_n "(cached) " >&6 |
19736 | else | |
19737 | case $XSLTPROC in | |
19738 | [\\/]* | ?:[\\/]*) | |
19739 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
19740 | ;; | |
19741 | *) | |
19742 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
19743 | for as_dir in $PATH | |
19744 | do | |
19745 | IFS=$as_save_IFS | |
19746 | test -z "$as_dir" && as_dir=. | |
19747 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 19748 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e3487908 GKB |
19749 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" |
19750 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
19751 | break 2 | |
19752 | fi | |
19753 | done | |
19754 | done | |
19755 | IFS=$as_save_IFS | |
19756 | ||
19757 | ;; | |
19758 | esac | |
19759 | fi | |
19760 | XSLTPROC=$ac_cv_path_XSLTPROC | |
19761 | if test -n "$XSLTPROC"; then | |
19762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
19763 | $as_echo "$XSLTPROC" >&6; } | |
19764 | else | |
19765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
19766 | $as_echo "no" >&6; } | |
19767 | fi | |
19768 | ||
19769 | ||
19770 | test -n "$XSLTPROC" && break | |
19771 | done | |
19772 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
19773 | ||
19774 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
19775 | if test "${XSLTPROC}" = missing; then | |
d0ac1c44 | 19776 | as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 |
e3487908 GKB |
19777 | fi |
19778 | fi | |
19779 | ||
19780 | ||
c906108c SS |
19781 | |
19782 | ||
c906108c | 19783 | |
81ecdfbb | 19784 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 19785 | |
bec39cab | 19786 | |
8ecfd7bd SDJ |
19787 | |
19788 | # Check whether we will enable the inclusion of unit tests when | |
19789 | # compiling GDB. | |
19790 | # | |
19791 | # The default value of this option changes depending whether we're on | |
19792 | # development mode (in which case it's "true") or not (in which case | |
db6878ac SM |
19793 | # it's "false"). The $development variable is set by the GDB_AC_COMMON |
19794 | # macro, which must therefore be used before GDB_AC_SELFTEST. | |
4d696a5c SM |
19795 | |
19796 | if test "x$development" != xtrue && test "x$development" != xfalse; then : | |
19797 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 | |
19798 | fi | |
19799 | ||
8ecfd7bd SDJ |
19800 | # Check whether --enable-unit-tests was given. |
19801 | if test "${enable_unit_tests+set}" = set; then : | |
19802 | enableval=$enable_unit_tests; case "${enableval}" in | |
19803 | yes) enable_unittests=true ;; | |
19804 | no) enable_unittests=false ;; | |
19805 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
19806 | esac | |
19807 | else | |
19808 | enable_unittests=$development | |
19809 | fi | |
19810 | ||
19811 | ||
19812 | if $enable_unittests; then | |
dcd1f979 TT |
19813 | |
19814 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
19815 | ||
8ecfd7bd | 19816 | |
74cd3f9d SM |
19817 | CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)" |
19818 | CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)" | |
8ecfd7bd | 19819 | |
dcd1f979 TT |
19820 | fi |
19821 | ||
b292c783 | 19822 | |
8ecfd7bd | 19823 | |
f6a88844 JM |
19824 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
19825 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
19826 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
19827 | GDB_TRANSFORM_NAME=gdb | |
19828 | fi | |
19829 | ||
19830 | ||
19831 | ||
19832 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19833 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
19834 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
19835 | GCORE_TRANSFORM_NAME=gcore | |
19836 | fi | |
19837 | ||
b292c783 JK |
19838 | |
19839 | ac_config_files="$ac_config_files gcore" | |
19840 | ||
141ec9f6 | 19841 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" |
81ecdfbb | 19842 | |
f99d1d37 TT |
19843 | # Transform the name of some programs for the testsuite/lib/pdtrace |
19844 | # test tool. | |
19845 | ||
19846 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19847 | STRIP_TRANSFORM_NAME=`echo strip | sed -e "$gdb_ac_transform"` | |
19848 | if test "x$STRIP_TRANSFORM_NAME" = x; then | |
19849 | STRIP_TRANSFORM_NAME=strip | |
19850 | fi | |
19851 | ||
19852 | ||
19853 | ||
19854 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19855 | READELF_TRANSFORM_NAME=`echo readelf | sed -e "$gdb_ac_transform"` | |
19856 | if test "x$READELF_TRANSFORM_NAME" = x; then | |
19857 | READELF_TRANSFORM_NAME=readelf | |
19858 | fi | |
19859 | ||
19860 | ||
19861 | ||
19862 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19863 | GAS_TRANSFORM_NAME=`echo as | sed -e "$gdb_ac_transform"` | |
19864 | if test "x$GAS_TRANSFORM_NAME" = x; then | |
19865 | GAS_TRANSFORM_NAME=as | |
19866 | fi | |
19867 | ||
19868 | ||
19869 | ||
19870 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19871 | NM_TRANSFORM_NAME=`echo nm | sed -e "$gdb_ac_transform"` | |
19872 | if test "x$NM_TRANSFORM_NAME" = x; then | |
19873 | NM_TRANSFORM_NAME=nm | |
19874 | fi | |
19875 | ||
19876 | ||
19877 | ac_config_files="$ac_config_files testsuite/lib/pdtrace" | |
19878 | ||
19879 | ac_config_files="$ac_config_files testsuite/Makefile" | |
19880 | ||
89a34d1b | 19881 | |
bec39cab AC |
19882 | cat >confcache <<\_ACEOF |
19883 | # This file is a shell script that caches the results of configure | |
19884 | # tests run on this system so they can be shared between configure | |
19885 | # scripts and configure runs, see configure's option --config-cache. | |
19886 | # It is not useful on other systems. If it contains results you don't | |
19887 | # want to keep, you may remove or edit it. | |
19888 | # | |
19889 | # config.status only pays attention to the cache file if you give it | |
19890 | # the --recheck option to rerun configure. | |
19891 | # | |
19892 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
19893 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
19894 | # following values. | |
19895 | ||
19896 | _ACEOF | |
19897 | ||
19898 | # The following way of writing the cache mishandles newlines in values, | |
19899 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 19900 | # So, we kill variables containing newlines. |
bec39cab AC |
19901 | # Ultrix sh set writes to stderr and can't be redirected directly, |
19902 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
19903 | ( |
19904 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
19905 | eval ac_val=\$$ac_var | |
19906 | case $ac_val in #( | |
19907 | *${as_nl}*) | |
19908 | case $ac_var in #( | |
19909 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
19910 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
19911 | esac | |
19912 | case $ac_var in #( | |
19913 | _ | IFS | as_nl) ;; #( | |
19914 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
19915 | *) { eval $ac_var=; unset $ac_var;} ;; | |
19916 | esac ;; | |
19917 | esac | |
19918 | done | |
19919 | ||
bec39cab | 19920 | (set) 2>&1 | |
81ecdfbb RW |
19921 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
19922 | *${as_nl}ac_space=\ *) | |
19923 | # `set' does not quote correctly, so add quotes: double-quote | |
19924 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
19925 | sed -n \ |
19926 | "s/'/'\\\\''/g; | |
19927 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 19928 | ;; #( |
bec39cab AC |
19929 | *) |
19930 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 19931 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 19932 | ;; |
81ecdfbb RW |
19933 | esac | |
19934 | sort | |
19935 | ) | | |
bec39cab | 19936 | sed ' |
81ecdfbb | 19937 | /^ac_cv_env_/b end |
bec39cab | 19938 | t clear |
81ecdfbb | 19939 | :clear |
bec39cab AC |
19940 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
19941 | t end | |
81ecdfbb RW |
19942 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
19943 | :end' >>confcache | |
19944 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
19945 | if test -w "$cache_file"; then | |
d0ac1c44 | 19946 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
19947 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
19948 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
19949 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
19950 | cat confcache >"$cache_file" | |
19951 | else | |
19952 | case $cache_file in #( | |
19953 | */* | ?:*) | |
19954 | mv -f confcache "$cache_file"$$ && | |
19955 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
19956 | *) | |
19957 | mv -f confcache "$cache_file" ;; | |
19958 | esac | |
19959 | fi | |
19960 | fi | |
bec39cab | 19961 | else |
81ecdfbb RW |
19962 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
19963 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
19964 | fi |
19965 | fi | |
19966 | rm -f confcache | |
19967 | ||
19968 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
19969 | # Let make expand exec_prefix. | |
19970 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
19971 | ||
bec39cab AC |
19972 | DEFS=-DHAVE_CONFIG_H |
19973 | ||
19974 | ac_libobjs= | |
19975 | ac_ltlibobjs= | |
d0ac1c44 | 19976 | U= |
bec39cab AC |
19977 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
19978 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
19979 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
19980 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
19981 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
19982 | # will be set to the directory where LIBOBJS objects are built. | |
19983 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
19984 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
19985 | done |
19986 | LIBOBJS=$ac_libobjs | |
19987 | ||
19988 | LTLIBOBJS=$ac_ltlibobjs | |
19989 | ||
19990 | ||
85981d60 | 19991 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 19992 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
81ecdfbb | 19993 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
85981d60 | 19994 | fi |
4df42755 | 19995 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
d0ac1c44 | 19996 | as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. |
4df42755 DE |
19997 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19998 | fi | |
19999 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
d0ac1c44 | 20000 | as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. |
4df42755 DE |
20001 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
20002 | fi | |
81ecdfbb RW |
20003 | |
20004 | ||
d0ac1c44 | 20005 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 20006 | ac_write_fail=0 |
bec39cab AC |
20007 | ac_clean_files_save=$ac_clean_files |
20008 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
20009 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
20010 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
20011 | as_write_fail=0 | |
20012 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
20013 | #! $SHELL |
20014 | # Generated by $as_me. | |
20015 | # Run this file to recreate the current configuration. | |
20016 | # Compiler output produced by configure, useful for debugging | |
20017 | # configure, is in config.log if it exists. | |
20018 | ||
20019 | debug=false | |
20020 | ac_cs_recheck=false | |
20021 | ac_cs_silent=false | |
bec39cab | 20022 | |
81ecdfbb RW |
20023 | SHELL=\${CONFIG_SHELL-$SHELL} |
20024 | export SHELL | |
20025 | _ASEOF | |
20026 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
20027 | ## -------------------- ## | |
20028 | ## M4sh Initialization. ## | |
20029 | ## -------------------- ## | |
20030 | ||
20031 | # Be more Bourne compatible | |
20032 | DUALCASE=1; export DUALCASE # for MKS sh | |
20033 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
20034 | emulate sh |
20035 | NULLCMD=: | |
81ecdfbb | 20036 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
20037 | # is contrary to our usage. Disable this feature. |
20038 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
20039 | setopt NO_GLOB_SUBST |
20040 | else | |
20041 | case `(set -o) 2>/dev/null` in #( | |
20042 | *posix*) : | |
20043 | set -o posix ;; #( | |
20044 | *) : | |
20045 | ;; | |
20046 | esac | |
bec39cab | 20047 | fi |
bec39cab | 20048 | |
81ecdfbb RW |
20049 | |
20050 | as_nl=' | |
20051 | ' | |
20052 | export as_nl | |
20053 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
20054 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
20055 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
20056 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
20057 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
20058 | # but without wasting forks for bash or zsh. | |
20059 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
20060 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
20061 | as_echo='print -r --' | |
20062 | as_echo_n='print -rn --' | |
20063 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
20064 | as_echo='printf %s\n' | |
20065 | as_echo_n='printf %s' | |
20066 | else | |
20067 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
20068 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
20069 | as_echo_n='/usr/ucb/echo -n' | |
20070 | else | |
20071 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
20072 | as_echo_n_body='eval | |
20073 | arg=$1; | |
20074 | case $arg in #( | |
20075 | *"$as_nl"*) | |
20076 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
20077 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
20078 | esac; | |
20079 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
20080 | ' | |
20081 | export as_echo_n_body | |
20082 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
20083 | fi | |
20084 | export as_echo_body | |
20085 | as_echo='sh -c $as_echo_body as_echo' | |
20086 | fi | |
20087 | ||
20088 | # The user is always right. | |
20089 | if test "${PATH_SEPARATOR+set}" != set; then | |
20090 | PATH_SEPARATOR=: | |
20091 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
20092 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
20093 | PATH_SEPARATOR=';' | |
20094 | } | |
bec39cab AC |
20095 | fi |
20096 | ||
20097 | ||
81ecdfbb RW |
20098 | # IFS |
20099 | # We need space, tab and new line, in precisely that order. Quoting is | |
20100 | # there to prevent editors from complaining about space-tab. | |
20101 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
20102 | # splitting by setting IFS to empty value.) | |
20103 | IFS=" "" $as_nl" | |
20104 | ||
20105 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 20106 | as_myself= |
81ecdfbb RW |
20107 | case $0 in #(( |
20108 | *[\\/]* ) as_myself=$0 ;; | |
20109 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20110 | for as_dir in $PATH | |
20111 | do | |
20112 | IFS=$as_save_IFS | |
20113 | test -z "$as_dir" && as_dir=. | |
20114 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
20115 | done | |
20116 | IFS=$as_save_IFS | |
20117 | ||
20118 | ;; | |
20119 | esac | |
20120 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
20121 | # in which case we are not to be found in the path. | |
20122 | if test "x$as_myself" = x; then | |
20123 | as_myself=$0 | |
20124 | fi | |
20125 | if test ! -f "$as_myself"; then | |
20126 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
20127 | exit 1 | |
20128 | fi | |
20129 | ||
20130 | # Unset variables that we do not need and which cause bugs (e.g. in | |
20131 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
20132 | # suppresses any "Segmentation fault" message there. '((' could | |
20133 | # trigger a bug in pdksh 5.2.14. | |
20134 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
20135 | do eval test x\${$as_var+set} = xset \ | |
20136 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
20137 | done | |
bec39cab AC |
20138 | PS1='$ ' |
20139 | PS2='> ' | |
20140 | PS4='+ ' | |
20141 | ||
20142 | # NLS nuisances. | |
81ecdfbb RW |
20143 | LC_ALL=C |
20144 | export LC_ALL | |
20145 | LANGUAGE=C | |
20146 | export LANGUAGE | |
20147 | ||
20148 | # CDPATH. | |
20149 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
20150 | ||
20151 | ||
d0ac1c44 SM |
20152 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
20153 | # ---------------------------------------- | |
81ecdfbb RW |
20154 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
20155 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 20156 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
20157 | as_fn_error () |
20158 | { | |
d0ac1c44 SM |
20159 | as_status=$1; test $as_status -eq 0 && as_status=1 |
20160 | if test "$4"; then | |
20161 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
20162 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 20163 | fi |
d0ac1c44 | 20164 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
20165 | as_fn_exit $as_status |
20166 | } # as_fn_error | |
20167 | ||
20168 | ||
20169 | # as_fn_set_status STATUS | |
20170 | # ----------------------- | |
20171 | # Set $? to STATUS, without forking. | |
20172 | as_fn_set_status () | |
20173 | { | |
20174 | return $1 | |
20175 | } # as_fn_set_status | |
20176 | ||
20177 | # as_fn_exit STATUS | |
20178 | # ----------------- | |
20179 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
20180 | as_fn_exit () | |
20181 | { | |
20182 | set +e | |
20183 | as_fn_set_status $1 | |
20184 | exit $1 | |
20185 | } # as_fn_exit | |
20186 | ||
20187 | # as_fn_unset VAR | |
20188 | # --------------- | |
20189 | # Portably unset VAR. | |
20190 | as_fn_unset () | |
20191 | { | |
20192 | { eval $1=; unset $1;} | |
20193 | } | |
20194 | as_unset=as_fn_unset | |
20195 | # as_fn_append VAR VALUE | |
20196 | # ---------------------- | |
20197 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
20198 | # advantage of any shell optimizations that allow amortized linear growth over | |
20199 | # repeated appends, instead of the typical quadratic growth present in naive | |
20200 | # implementations. | |
20201 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
20202 | eval 'as_fn_append () | |
20203 | { | |
20204 | eval $1+=\$2 | |
20205 | }' | |
20206 | else | |
20207 | as_fn_append () | |
20208 | { | |
20209 | eval $1=\$$1\$2 | |
20210 | } | |
20211 | fi # as_fn_append | |
20212 | ||
20213 | # as_fn_arith ARG... | |
20214 | # ------------------ | |
20215 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
20216 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
20217 | # must be portable across $(()) and expr. | |
20218 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
20219 | eval 'as_fn_arith () | |
20220 | { | |
20221 | as_val=$(( $* )) | |
20222 | }' | |
20223 | else | |
20224 | as_fn_arith () | |
20225 | { | |
20226 | as_val=`expr "$@" || test $? -eq 1` | |
20227 | } | |
20228 | fi # as_fn_arith | |
bec39cab | 20229 | |
81ecdfbb RW |
20230 | |
20231 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
20232 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
20233 | as_expr=expr |
20234 | else | |
20235 | as_expr=false | |
20236 | fi | |
20237 | ||
81ecdfbb | 20238 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
20239 | as_basename=basename |
20240 | else | |
20241 | as_basename=false | |
20242 | fi | |
20243 | ||
81ecdfbb RW |
20244 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
20245 | as_dirname=dirname | |
20246 | else | |
20247 | as_dirname=false | |
20248 | fi | |
bec39cab | 20249 | |
81ecdfbb | 20250 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
20251 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
20252 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
20253 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
20254 | $as_echo X/"$0" | | |
20255 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
20256 | s//\1/ | |
20257 | q | |
20258 | } | |
20259 | /^X\/\(\/\/\)$/{ | |
20260 | s//\1/ | |
20261 | q | |
20262 | } | |
20263 | /^X\/\(\/\).*/{ | |
20264 | s//\1/ | |
20265 | q | |
20266 | } | |
20267 | s/.*/./; q'` | |
b4e70030 | 20268 | |
b4e70030 JB |
20269 | # Avoid depending upon Character Ranges. |
20270 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
20271 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
20272 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
20273 | as_cr_digits='0123456789' | |
20274 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
20275 | ||
81ecdfbb RW |
20276 | ECHO_C= ECHO_N= ECHO_T= |
20277 | case `echo -n x` in #((((( | |
20278 | -n*) | |
20279 | case `echo 'xy\c'` in | |
20280 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
20281 | xy) ECHO_C='\c';; | |
20282 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
20283 | ECHO_T=' ';; | |
20284 | esac;; | |
20285 | *) | |
20286 | ECHO_N='-n';; | |
bec39cab AC |
20287 | esac |
20288 | ||
81ecdfbb RW |
20289 | rm -f conf$$ conf$$.exe conf$$.file |
20290 | if test -d conf$$.dir; then | |
20291 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 20292 | else |
81ecdfbb RW |
20293 | rm -f conf$$.dir |
20294 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 20295 | fi |
81ecdfbb RW |
20296 | if (echo >conf$$.file) 2>/dev/null; then |
20297 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 20298 | as_ln_s='ln -s' |
81ecdfbb RW |
20299 | # ... but there are two gotchas: |
20300 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
20301 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 20302 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 20303 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 20304 | as_ln_s='cp -pR' |
81ecdfbb RW |
20305 | elif ln conf$$.file conf$$ 2>/dev/null; then |
20306 | as_ln_s=ln | |
20307 | else | |
d0ac1c44 | 20308 | as_ln_s='cp -pR' |
b4e70030 | 20309 | fi |
bec39cab | 20310 | else |
d0ac1c44 | 20311 | as_ln_s='cp -pR' |
bec39cab | 20312 | fi |
81ecdfbb RW |
20313 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
20314 | rmdir conf$$.dir 2>/dev/null | |
20315 | ||
20316 | ||
20317 | # as_fn_mkdir_p | |
20318 | # ------------- | |
20319 | # Create "$as_dir" as a directory, including parents if necessary. | |
20320 | as_fn_mkdir_p () | |
20321 | { | |
20322 | ||
20323 | case $as_dir in #( | |
20324 | -*) as_dir=./$as_dir;; | |
20325 | esac | |
20326 | test -d "$as_dir" || eval $as_mkdir_p || { | |
20327 | as_dirs= | |
20328 | while :; do | |
20329 | case $as_dir in #( | |
20330 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
20331 | *) as_qdir=$as_dir;; | |
20332 | esac | |
20333 | as_dirs="'$as_qdir' $as_dirs" | |
20334 | as_dir=`$as_dirname -- "$as_dir" || | |
20335 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
20336 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
20337 | X"$as_dir" : 'X\(//\)$' \| \ | |
20338 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
20339 | $as_echo X"$as_dir" | | |
20340 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
20341 | s//\1/ | |
20342 | q | |
20343 | } | |
20344 | /^X\(\/\/\)[^/].*/{ | |
20345 | s//\1/ | |
20346 | q | |
20347 | } | |
20348 | /^X\(\/\/\)$/{ | |
20349 | s//\1/ | |
20350 | q | |
20351 | } | |
20352 | /^X\(\/\).*/{ | |
20353 | s//\1/ | |
20354 | q | |
20355 | } | |
20356 | s/.*/./; q'` | |
20357 | test -d "$as_dir" && break | |
20358 | done | |
20359 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 20360 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb | 20361 | |
bec39cab | 20362 | |
81ecdfbb | 20363 | } # as_fn_mkdir_p |
bec39cab | 20364 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 20365 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
20366 | else |
20367 | test -d ./-p && rmdir ./-p | |
20368 | as_mkdir_p=false | |
20369 | fi | |
20370 | ||
d0ac1c44 SM |
20371 | |
20372 | # as_fn_executable_p FILE | |
20373 | # ----------------------- | |
20374 | # Test if FILE is an executable regular file. | |
20375 | as_fn_executable_p () | |
20376 | { | |
20377 | test -f "$1" && test -x "$1" | |
20378 | } # as_fn_executable_p | |
20379 | as_test_x='test -x' | |
20380 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
20381 | |
20382 | # Sed expression to map a string onto a valid CPP name. | |
20383 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
20384 | ||
20385 | # Sed expression to map a string onto a valid variable name. | |
20386 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
20387 | ||
20388 | ||
bec39cab | 20389 | exec 6>&1 |
81ecdfbb RW |
20390 | ## ----------------------------------- ## |
20391 | ## Main body of $CONFIG_STATUS script. ## | |
20392 | ## ----------------------------------- ## | |
20393 | _ASEOF | |
20394 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
20395 | ||
20396 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20397 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 20398 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
20399 | # values after options handling. |
20400 | ac_log=" | |
bec39cab | 20401 | This file was extended by $as_me, which was |
d0ac1c44 | 20402 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
20403 | |
20404 | CONFIG_FILES = $CONFIG_FILES | |
20405 | CONFIG_HEADERS = $CONFIG_HEADERS | |
20406 | CONFIG_LINKS = $CONFIG_LINKS | |
20407 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
20408 | $ $0 $@ | |
20409 | ||
81ecdfbb RW |
20410 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
20411 | " | |
20412 | ||
bec39cab AC |
20413 | _ACEOF |
20414 | ||
81ecdfbb RW |
20415 | case $ac_config_files in *" |
20416 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
20417 | esac | |
234b45d4 | 20418 | |
81ecdfbb RW |
20419 | case $ac_config_headers in *" |
20420 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
20421 | esac | |
b4e70030 | 20422 | |
b4e70030 | 20423 | |
81ecdfbb RW |
20424 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
20425 | # Files that config.status was made for. | |
20426 | config_files="$ac_config_files" | |
20427 | config_headers="$ac_config_headers" | |
20428 | config_links="$ac_config_links" | |
20429 | config_commands="$ac_config_commands" | |
234b45d4 | 20430 | |
81ecdfbb | 20431 | _ACEOF |
b4e70030 | 20432 | |
81ecdfbb | 20433 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 20434 | ac_cs_usage="\ |
81ecdfbb RW |
20435 | \`$as_me' instantiates files and other configuration actions |
20436 | from templates according to the current configuration. Unless the files | |
20437 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 20438 | |
81ecdfbb | 20439 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 20440 | |
bec39cab | 20441 | -h, --help print this help, then exit |
81ecdfbb | 20442 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 20443 | --config print configuration, then exit |
81ecdfbb RW |
20444 | -q, --quiet, --silent |
20445 | do not print progress messages | |
bec39cab AC |
20446 | -d, --debug don't remove temporary files |
20447 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
20448 | --file=FILE[:TEMPLATE] |
20449 | instantiate the configuration file FILE | |
20450 | --header=FILE[:TEMPLATE] | |
20451 | instantiate the configuration header FILE | |
234b45d4 | 20452 | |
bec39cab AC |
20453 | Configuration files: |
20454 | $config_files | |
234b45d4 | 20455 | |
bec39cab AC |
20456 | Configuration headers: |
20457 | $config_headers | |
234b45d4 | 20458 | |
bec39cab AC |
20459 | Configuration links: |
20460 | $config_links | |
234b45d4 | 20461 | |
bec39cab AC |
20462 | Configuration commands: |
20463 | $config_commands | |
20464 | ||
81ecdfbb | 20465 | Report bugs to the package provider." |
b4e70030 | 20466 | |
81ecdfbb RW |
20467 | _ACEOF |
20468 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20469 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
20470 | ac_cs_version="\\ |
20471 | config.status | |
d0ac1c44 SM |
20472 | configured by $0, generated by GNU Autoconf 2.69, |
20473 | with options \\"\$ac_cs_config\\" | |
bec39cab | 20474 | |
d0ac1c44 | 20475 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
20476 | This config.status script is free software; the Free Software Foundation |
20477 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
20478 | |
20479 | ac_pwd='$ac_pwd' | |
20480 | srcdir='$srcdir' | |
20481 | INSTALL='$INSTALL' | |
81ecdfbb RW |
20482 | AWK='$AWK' |
20483 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
20484 | _ACEOF |
20485 | ||
81ecdfbb RW |
20486 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20487 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
20488 | ac_need_defaults=: |
20489 | while test $# != 0 | |
20490 | do | |
20491 | case $1 in | |
d0ac1c44 | 20492 | --*=?*) |
81ecdfbb RW |
20493 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
20494 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 20495 | ac_shift=: |
c906108c | 20496 | ;; |
d0ac1c44 SM |
20497 | --*=) |
20498 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
20499 | ac_optarg= | |
20500 | ac_shift=: | |
20501 | ;; | |
81ecdfbb | 20502 | *) |
bec39cab AC |
20503 | ac_option=$1 |
20504 | ac_optarg=$2 | |
20505 | ac_shift=shift | |
c906108c | 20506 | ;; |
bec39cab | 20507 | esac |
c906108c | 20508 | |
bec39cab AC |
20509 | case $ac_option in |
20510 | # Handling of the options. | |
bec39cab AC |
20511 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
20512 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
20513 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
20514 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
20515 | --config | --confi | --conf | --con | --co | --c ) |
20516 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 20517 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
20518 | debug=: ;; |
20519 | --file | --fil | --fi | --f ) | |
20520 | $ac_shift | |
81ecdfbb RW |
20521 | case $ac_optarg in |
20522 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 20523 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
20524 | esac |
20525 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
20526 | ac_need_defaults=false;; |
20527 | --header | --heade | --head | --hea ) | |
20528 | $ac_shift | |
81ecdfbb RW |
20529 | case $ac_optarg in |
20530 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
20531 | esac | |
20532 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 20533 | ac_need_defaults=false;; |
81ecdfbb RW |
20534 | --he | --h) |
20535 | # Conflict between --help and --header | |
d0ac1c44 | 20536 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
20537 | Try \`$0 --help' for more information.";; |
20538 | --help | --hel | -h ) | |
20539 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
20540 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
20541 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
20542 | ac_cs_silent=: ;; | |
c906108c | 20543 | |
bec39cab | 20544 | # This is an error. |
d0ac1c44 | 20545 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 20546 | Try \`$0 --help' for more information." ;; |
c906108c | 20547 | |
81ecdfbb RW |
20548 | *) as_fn_append ac_config_targets " $1" |
20549 | ac_need_defaults=false ;; | |
c906108c | 20550 | |
bec39cab AC |
20551 | esac |
20552 | shift | |
20553 | done | |
c906108c | 20554 | |
bec39cab | 20555 | ac_configure_extra_args= |
c906108c | 20556 | |
bec39cab AC |
20557 | if $ac_cs_silent; then |
20558 | exec 6>/dev/null | |
20559 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
20560 | fi | |
c906108c | 20561 | |
bec39cab | 20562 | _ACEOF |
81ecdfbb | 20563 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 20564 | if \$ac_cs_recheck; then |
d0ac1c44 | 20565 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
20566 | shift |
20567 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
20568 | CONFIG_SHELL='$SHELL' | |
20569 | export CONFIG_SHELL | |
20570 | exec "\$@" | |
bec39cab AC |
20571 | fi |
20572 | ||
20573 | _ACEOF | |
81ecdfbb RW |
20574 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20575 | exec 5>>config.log | |
20576 | { | |
20577 | echo | |
20578 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
20579 | ## Running $as_me. ## | |
20580 | _ASBOX | |
20581 | $as_echo "$ac_log" | |
20582 | } >&5 | |
bec39cab | 20583 | |
81ecdfbb RW |
20584 | _ACEOF |
20585 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 20586 | # |
81ecdfbb | 20587 | # INIT-COMMANDS |
c906108c | 20588 | # |
a417dc56 | 20589 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
a0a461e5 | 20590 | GDB_NM_FILE=$GDB_NM_FILE |
b4e70030 | 20591 | |
bec39cab AC |
20592 | _ACEOF |
20593 | ||
81ecdfbb | 20594 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 20595 | |
81ecdfbb | 20596 | # Handling of arguments. |
bec39cab | 20597 | for ac_config_target in $ac_config_targets |
c906108c | 20598 | do |
81ecdfbb RW |
20599 | case $ac_config_target in |
20600 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
20601 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 20602 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
a0a461e5 | 20603 | "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;; |
b292c783 | 20604 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 20605 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 20606 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
141ec9f6 | 20607 | "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; |
5ae98d25 | 20608 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 20609 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
f99d1d37 TT |
20610 | "testsuite/lib/pdtrace") CONFIG_FILES="$CONFIG_FILES testsuite/lib/pdtrace" ;; |
20611 | "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; | |
81ecdfbb | 20612 | |
d0ac1c44 | 20613 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c906108c SS |
20614 | esac |
20615 | done | |
20616 | ||
81ecdfbb | 20617 | |
bec39cab AC |
20618 | # If the user did not use the arguments to specify the items to instantiate, |
20619 | # then the envvar interface is used. Set only those that are not. | |
20620 | # We use the long form for the default assignment because of an extremely | |
20621 | # bizarre bug on SunOS 4.1.3. | |
20622 | if $ac_need_defaults; then | |
20623 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
20624 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
20625 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
20626 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
20627 | fi | |
20628 | ||
b4e70030 | 20629 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 20630 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 20631 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
20632 | # Hook for its removal unless debugging. |
20633 | # Note that there is a small window in which the directory will not be cleaned: | |
20634 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
20635 | $debug || |
20636 | { | |
d0ac1c44 | 20637 | tmp= ac_tmp= |
81ecdfbb | 20638 | trap 'exit_status=$? |
d0ac1c44 SM |
20639 | : "${ac_tmp:=$tmp}" |
20640 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
20641 | ' 0 |
20642 | trap 'as_fn_exit 1' 1 2 13 15 | |
20643 | } | |
20644 | # Create a (secure) tmp directory for tmp files. | |
20645 | ||
20646 | { | |
20647 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 20648 | test -d "$tmp" |
81ecdfbb RW |
20649 | } || |
20650 | { | |
20651 | tmp=./conf$$-$RANDOM | |
20652 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
20653 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
20654 | ac_tmp=$tmp | |
81ecdfbb RW |
20655 | |
20656 | # Set up the scripts for CONFIG_FILES section. | |
20657 | # No need to generate them if there are no CONFIG_FILES. | |
20658 | # This happens for instance with `./config.status config.h'. | |
20659 | if test -n "$CONFIG_FILES"; then | |
20660 | ||
20661 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
20662 | ac_cs_awk_getline=: | |
20663 | ac_cs_awk_pipe_init= | |
20664 | ac_cs_awk_read_file=' | |
20665 | while ((getline aline < (F[key])) > 0) | |
20666 | print(aline) | |
20667 | close(F[key])' | |
20668 | ac_cs_awk_pipe_fini= | |
20669 | else | |
20670 | ac_cs_awk_getline=false | |
20671 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
20672 | ac_cs_awk_read_file=' | |
20673 | print "|#_!!_#|" | |
20674 | print "cat " F[key] " &&" | |
20675 | '$ac_cs_awk_pipe_init | |
20676 | # The final `:' finishes the AND list. | |
20677 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
20678 | fi | |
20679 | ac_cr=`echo X | tr X '\015'` | |
20680 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
20681 | # But we know of no other shell where ac_cr would be empty at this | |
20682 | # point, so we can use a bashism as a fallback. | |
20683 | if test "x$ac_cr" = x; then | |
20684 | eval ac_cr=\$\'\\r\' | |
20685 | fi | |
20686 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
20687 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 20688 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
20689 | else |
20690 | ac_cs_awk_cr=$ac_cr | |
20691 | fi | |
20692 | ||
d0ac1c44 | 20693 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
20694 | _ACEOF |
20695 | ||
20696 | # Create commands to substitute file output variables. | |
20697 | { | |
20698 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d0ac1c44 | 20699 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
81ecdfbb RW |
20700 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
20701 | echo "_ACAWK" && | |
20702 | echo "_ACEOF" | |
20703 | } >conf$$files.sh && | |
20704 | . ./conf$$files.sh || | |
d0ac1c44 | 20705 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20706 | rm -f conf$$files.sh |
20707 | ||
20708 | { | |
20709 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
20710 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
20711 | echo "_ACEOF" | |
20712 | } >conf$$subs.sh || | |
d0ac1c44 SM |
20713 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
20714 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
20715 | ac_delim='%!_!# ' |
20716 | for ac_last_try in false false false false false :; do | |
20717 | . ./conf$$subs.sh || | |
d0ac1c44 | 20718 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20719 | |
20720 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
20721 | if test $ac_delim_n = $ac_delim_num; then | |
20722 | break | |
20723 | elif $ac_last_try; then | |
d0ac1c44 | 20724 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20725 | else |
20726 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20727 | fi | |
20728 | done | |
20729 | rm -f conf$$subs.sh | |
20730 | ||
20731 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20732 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
20733 | _ACEOF |
20734 | sed -n ' | |
20735 | h | |
20736 | s/^/S["/; s/!.*/"]=/ | |
20737 | p | |
20738 | g | |
20739 | s/^[^!]*!// | |
20740 | :repl | |
20741 | t repl | |
20742 | s/'"$ac_delim"'$// | |
20743 | t delim | |
20744 | :nl | |
20745 | h | |
d0ac1c44 | 20746 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20747 | t more1 |
20748 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
20749 | p | |
20750 | n | |
20751 | b repl | |
20752 | :more1 | |
20753 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20754 | p | |
20755 | g | |
20756 | s/.\{148\}// | |
20757 | t nl | |
20758 | :delim | |
20759 | h | |
d0ac1c44 | 20760 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20761 | t more2 |
20762 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
20763 | p | |
20764 | b | |
20765 | :more2 | |
20766 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20767 | p | |
20768 | g | |
20769 | s/.\{148\}// | |
20770 | t delim | |
20771 | ' <conf$$subs.awk | sed ' | |
20772 | /^[^""]/{ | |
20773 | N | |
20774 | s/\n// | |
20775 | } | |
20776 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
20777 | rm -f conf$$subs.awk | |
20778 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20779 | _ACAWK | |
d0ac1c44 | 20780 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
20781 | for (key in S) S_is_set[key] = 1 |
20782 | FS = "\a" | |
20783 | \$ac_cs_awk_pipe_init | |
20784 | } | |
20785 | { | |
20786 | line = $ 0 | |
20787 | nfields = split(line, field, "@") | |
20788 | substed = 0 | |
20789 | len = length(field[1]) | |
20790 | for (i = 2; i < nfields; i++) { | |
20791 | key = field[i] | |
20792 | keylen = length(key) | |
20793 | if (S_is_set[key]) { | |
20794 | value = S[key] | |
20795 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
20796 | len += length(value) + length(field[++i]) | |
20797 | substed = 1 | |
20798 | } else | |
20799 | len += 1 + keylen | |
20800 | } | |
20801 | if (nfields == 3 && !substed) { | |
20802 | key = field[2] | |
20803 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
20804 | \$ac_cs_awk_read_file | |
20805 | next | |
20806 | } | |
20807 | } | |
20808 | print line | |
b4e70030 | 20809 | } |
81ecdfbb RW |
20810 | \$ac_cs_awk_pipe_fini |
20811 | _ACAWK | |
20812 | _ACEOF | |
20813 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20814 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
20815 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
20816 | else | |
20817 | cat | |
d0ac1c44 SM |
20818 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
20819 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
81ecdfbb RW |
20820 | _ACEOF |
20821 | ||
d0ac1c44 SM |
20822 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
20823 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
20824 | # trailing colons and then remove the whole line if VPATH becomes empty |
20825 | # (actually we leave an empty line to preserve line numbers). | |
20826 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
20827 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
20828 | h | |
20829 | s/// | |
20830 | s/^/:/ | |
20831 | s/[ ]*$/:/ | |
20832 | s/:\$(srcdir):/:/g | |
20833 | s/:\${srcdir}:/:/g | |
20834 | s/:@srcdir@:/:/g | |
20835 | s/^:*// | |
81ecdfbb | 20836 | s/:*$// |
d0ac1c44 SM |
20837 | x |
20838 | s/\(=[ ]*\).*/\1/ | |
20839 | G | |
20840 | s/\n// | |
81ecdfbb RW |
20841 | s/^[^=]*=[ ]*$// |
20842 | }' | |
20843 | fi | |
20844 | ||
20845 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20846 | fi # test -n "$CONFIG_FILES" | |
20847 | ||
20848 | # Set up the scripts for CONFIG_HEADERS section. | |
20849 | # No need to generate them if there are no CONFIG_HEADERS. | |
20850 | # This happens for instance with `./config.status Makefile'. | |
20851 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 20852 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb RW |
20853 | BEGIN { |
20854 | _ACEOF | |
20855 | ||
20856 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
20857 | # here-document in config.status, that substitutes the proper values into | |
20858 | # config.h.in to produce config.h. | |
4e8d927d | 20859 | |
81ecdfbb RW |
20860 | # Create a delimiter string that does not exist in confdefs.h, to ease |
20861 | # handling of long lines. | |
20862 | ac_delim='%!_!# ' | |
20863 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
20864 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
20865 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
20866 | break |
20867 | elif $ac_last_try; then | |
d0ac1c44 | 20868 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
20869 | else |
20870 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20871 | fi | |
20872 | done | |
4e8d927d | 20873 | |
81ecdfbb RW |
20874 | # For the awk script, D is an array of macro values keyed by name, |
20875 | # likewise P contains macro parameters if any. Preserve backslash | |
20876 | # newline sequences. | |
20877 | ||
20878 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
20879 | sed -n ' | |
20880 | s/.\{148\}/&'"$ac_delim"'/g | |
20881 | t rset | |
20882 | :rset | |
20883 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
20884 | t def | |
20885 | d | |
20886 | :def | |
20887 | s/\\$// | |
20888 | t bsnl | |
20889 | s/["\\]/\\&/g | |
20890 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
20891 | D["\1"]=" \3"/p | |
20892 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
20893 | d | |
20894 | :bsnl | |
20895 | s/["\\]/\\&/g | |
20896 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
20897 | D["\1"]=" \3\\\\\\n"\\/p | |
20898 | t cont | |
20899 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
20900 | t cont | |
20901 | d | |
20902 | :cont | |
20903 | n | |
20904 | s/.\{148\}/&'"$ac_delim"'/g | |
20905 | t clear | |
20906 | :clear | |
20907 | s/\\$// | |
20908 | t bsnlc | |
20909 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
20910 | d | |
20911 | :bsnlc | |
20912 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
20913 | b cont | |
20914 | ' <confdefs.h | sed ' | |
20915 | s/'"$ac_delim"'/"\\\ | |
20916 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
20917 | ||
20918 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20919 | for (key in D) D_is_set[key] = 1 | |
20920 | FS = "\a" | |
20921 | } | |
20922 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
20923 | line = \$ 0 | |
20924 | split(line, arg, " ") | |
20925 | if (arg[1] == "#") { | |
20926 | defundef = arg[2] | |
20927 | mac1 = arg[3] | |
20928 | } else { | |
20929 | defundef = substr(arg[1], 2) | |
20930 | mac1 = arg[2] | |
20931 | } | |
20932 | split(mac1, mac2, "(") #) | |
20933 | macro = mac2[1] | |
20934 | prefix = substr(line, 1, index(line, defundef) - 1) | |
20935 | if (D_is_set[macro]) { | |
20936 | # Preserve the white space surrounding the "#". | |
20937 | print prefix "define", macro P[macro] D[macro] | |
20938 | next | |
20939 | } else { | |
20940 | # Replace #undef with comments. This is necessary, for example, | |
20941 | # in the case of _POSIX_SOURCE, which is predefined and required | |
20942 | # on some systems where configure will not decide to define it. | |
20943 | if (defundef == "undef") { | |
20944 | print "/*", prefix defundef, macro, "*/" | |
20945 | next | |
20946 | } | |
20947 | } | |
b4e70030 | 20948 | } |
81ecdfbb RW |
20949 | { print } |
20950 | _ACAWK | |
b4e70030 | 20951 | _ACEOF |
81ecdfbb | 20952 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 20953 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb | 20954 | fi # test -n "$CONFIG_HEADERS" |
4e8d927d | 20955 | |
4e8d927d | 20956 | |
81ecdfbb RW |
20957 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
20958 | shift | |
20959 | for ac_tag | |
20960 | do | |
20961 | case $ac_tag in | |
20962 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
20963 | esac | |
20964 | case $ac_mode$ac_tag in | |
20965 | :[FHL]*:*);; | |
d0ac1c44 | 20966 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
20967 | :[FH]-) ac_tag=-:-;; |
20968 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
20969 | esac | |
20970 | ac_save_IFS=$IFS | |
20971 | IFS=: | |
20972 | set x $ac_tag | |
20973 | IFS=$ac_save_IFS | |
20974 | shift | |
20975 | ac_file=$1 | |
20976 | shift | |
4e8d927d | 20977 | |
81ecdfbb RW |
20978 | case $ac_mode in |
20979 | :L) ac_source=$1;; | |
20980 | :[FH]) | |
20981 | ac_file_inputs= | |
20982 | for ac_f | |
20983 | do | |
20984 | case $ac_f in | |
d0ac1c44 | 20985 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
20986 | *) # Look for the file first in the build tree, then in the source tree |
20987 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
20988 | # because $ac_f cannot contain `:'. | |
20989 | test -f "$ac_f" || | |
20990 | case $ac_f in | |
20991 | [\\/$]*) false;; | |
20992 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
20993 | esac || | |
d0ac1c44 | 20994 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
20995 | esac |
20996 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
20997 | as_fn_append ac_file_inputs " '$ac_f'" | |
20998 | done | |
20999 | ||
21000 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
21001 | # use $as_me), people would be surprised to read: | |
21002 | # /* config.h. Generated by config.status. */ | |
21003 | configure_input='Generated from '` | |
21004 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
21005 | `' by configure.' | |
21006 | if test x"$ac_file" != x-; then | |
21007 | configure_input="$ac_file. $configure_input" | |
21008 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
21009 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 21010 | fi |
81ecdfbb RW |
21011 | # Neutralize special characters interpreted by sed in replacement strings. |
21012 | case $configure_input in #( | |
21013 | *\&* | *\|* | *\\* ) | |
21014 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
21015 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
21016 | *) ac_sed_conf_input=$configure_input;; | |
21017 | esac | |
4e8d927d | 21018 | |
81ecdfbb | 21019 | case $ac_tag in |
d0ac1c44 SM |
21020 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
21021 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
21022 | esac |
21023 | ;; | |
c906108c SS |
21024 | esac |
21025 | ||
81ecdfbb | 21026 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
21027 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
21028 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
21029 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
21030 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
21031 | $as_echo X"$ac_file" | | |
21032 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
21033 | s//\1/ | |
21034 | q | |
21035 | } | |
21036 | /^X\(\/\/\)[^/].*/{ | |
21037 | s//\1/ | |
21038 | q | |
21039 | } | |
21040 | /^X\(\/\/\)$/{ | |
21041 | s//\1/ | |
21042 | q | |
21043 | } | |
21044 | /^X\(\/\).*/{ | |
21045 | s//\1/ | |
21046 | q | |
21047 | } | |
21048 | s/.*/./; q'` | |
21049 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
21050 | ac_builddir=. |
21051 | ||
81ecdfbb RW |
21052 | case "$ac_dir" in |
21053 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21054 | *) | |
21055 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
21056 | # A ".." for each directory in $ac_dir_suffix. | |
21057 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
21058 | case $ac_top_builddir_sub in | |
21059 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21060 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
21061 | esac ;; | |
21062 | esac | |
21063 | ac_abs_top_builddir=$ac_pwd | |
21064 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
21065 | # for backward compatibility: | |
21066 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
21067 | |
21068 | case $srcdir in | |
81ecdfbb | 21069 | .) # We are building in place. |
bec39cab | 21070 | ac_srcdir=. |
81ecdfbb RW |
21071 | ac_top_srcdir=$ac_top_builddir_sub |
21072 | ac_abs_top_srcdir=$ac_pwd ;; | |
21073 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 21074 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
21075 | ac_top_srcdir=$srcdir |
21076 | ac_abs_top_srcdir=$srcdir ;; | |
21077 | *) # Relative name. | |
21078 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
21079 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
21080 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 21081 | esac |
81ecdfbb | 21082 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 21083 | |
c906108c | 21084 | |
81ecdfbb RW |
21085 | case $ac_mode in |
21086 | :F) | |
21087 | # | |
21088 | # CONFIG_FILE | |
21089 | # | |
c906108c | 21090 | |
bec39cab AC |
21091 | case $INSTALL in |
21092 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 21093 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 21094 | esac |
81ecdfbb | 21095 | _ACEOF |
121ce6e5 | 21096 | |
81ecdfbb RW |
21097 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
21098 | # If the template does not know about datarootdir, expand it. | |
21099 | # FIXME: This hack should be removed a few years after 2.60. | |
21100 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
21101 | ac_sed_dataroot=' | |
21102 | /datarootdir/ { | |
21103 | p | |
21104 | q | |
21105 | } | |
21106 | /@datadir@/p | |
21107 | /@docdir@/p | |
21108 | /@infodir@/p | |
21109 | /@localedir@/p | |
21110 | /@mandir@/p' | |
21111 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
21112 | *datarootdir*) ac_datarootdir_seen=yes;; | |
21113 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
21114 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
21115 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
21116 | _ACEOF | |
21117 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21118 | ac_datarootdir_hack=' | |
21119 | s&@datadir@&$datadir&g | |
21120 | s&@docdir@&$docdir&g | |
21121 | s&@infodir@&$infodir&g | |
21122 | s&@localedir@&$localedir&g | |
21123 | s&@mandir@&$mandir&g | |
21124 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
21125 | esac | |
4e8d927d | 21126 | _ACEOF |
81ecdfbb RW |
21127 | |
21128 | # Neutralize VPATH when `$srcdir' = `.'. | |
21129 | # Shell code in configure.ac might set extrasub. | |
21130 | # FIXME: do we really want to maintain this feature? | |
21131 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21132 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
21133 | $extrasub |
21134 | _ACEOF | |
81ecdfbb | 21135 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
21136 | :t |
21137 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
21138 | s|@configure_input@|$ac_sed_conf_input|;t t |
21139 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
21140 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
21141 | s&@srcdir@&$ac_srcdir&;t t | |
21142 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
21143 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
21144 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
21145 | s&@builddir@&$ac_builddir&;t t | |
21146 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
21147 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
21148 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
21149 | $ac_datarootdir_hack |
21150 | " | |
21151 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
21152 | if $ac_cs_awk_getline; then | |
d0ac1c44 | 21153 | $AWK -f "$ac_tmp/subs.awk" |
81ecdfbb | 21154 | else |
d0ac1c44 SM |
21155 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
21156 | fi \ | |
21157 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
21158 | |
21159 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
21160 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
21161 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
21162 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 21163 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 21164 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 21165 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 21166 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 21167 | |
d0ac1c44 | 21168 | rm -f "$ac_tmp/stdin" |
bec39cab | 21169 | case $ac_file in |
d0ac1c44 SM |
21170 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
21171 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 21172 | esac \ |
d0ac1c44 | 21173 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
21174 | ;; |
21175 | :H) | |
21176 | # | |
21177 | # CONFIG_HEADER | |
21178 | # | |
bec39cab | 21179 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
21180 | { |
21181 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
21182 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
21183 | } >"$ac_tmp/config.h" \ | |
21184 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
21185 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
21186 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
21187 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 21188 | else |
81ecdfbb | 21189 | rm -f "$ac_file" |
d0ac1c44 SM |
21190 | mv "$ac_tmp/config.h" "$ac_file" \ |
21191 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
21192 | fi |
21193 | else | |
81ecdfbb | 21194 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
21195 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
21196 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
bec39cab | 21197 | fi |
81ecdfbb RW |
21198 | ;; |
21199 | :L) | |
21200 | # | |
21201 | # CONFIG_LINK | |
21202 | # | |
c906108c | 21203 | |
81ecdfbb RW |
21204 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
21205 | : | |
b4e70030 | 21206 | else |
81ecdfbb RW |
21207 | # Prefer the file from the source tree if names are identical. |
21208 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
21209 | ac_source=$srcdir/$ac_source | |
21210 | fi | |
b4e70030 | 21211 | |
81ecdfbb RW |
21212 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
21213 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 21214 | |
81ecdfbb | 21215 | if test ! -r "$ac_source"; then |
d0ac1c44 | 21216 | as_fn_error $? "$ac_source: file not found" "$LINENO" 5 |
81ecdfbb RW |
21217 | fi |
21218 | rm -f "$ac_file" | |
bec39cab | 21219 | |
81ecdfbb | 21220 | # Try a relative symlink, then a hard link, then a copy. |
d0ac1c44 | 21221 | case $ac_source in |
81ecdfbb RW |
21222 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; |
21223 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
21224 | esac | |
21225 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
21226 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
21227 | cp -p "$ac_source" "$ac_file" || | |
d0ac1c44 | 21228 | as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 |
81ecdfbb RW |
21229 | fi |
21230 | ;; | |
21231 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
21232 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
21233 | ;; | |
c906108c | 21234 | esac |
b4e70030 | 21235 | |
bec39cab | 21236 | |
81ecdfbb | 21237 | case $ac_file$ac_mode in |
c5adaa19 | 21238 | "config.h":H) echo > stamp-h ;; |
81ecdfbb | 21239 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
a0a461e5 | 21240 | "nm.h":L) echo > stamp-nmh ;; |
b292c783 | 21241 | "gcore":F) chmod +x gcore ;; |
f99d1d37 | 21242 | "testsuite/lib/pdtrace":F) chmod +x testsuite/lib/pdtrace ;; |
81ecdfbb | 21243 | |
bec39cab | 21244 | esac |
81ecdfbb | 21245 | done # for ac_tag |
c906108c | 21246 | |
bec39cab | 21247 | |
81ecdfbb | 21248 | as_fn_exit 0 |
bec39cab | 21249 | _ACEOF |
bec39cab AC |
21250 | ac_clean_files=$ac_clean_files_save |
21251 | ||
81ecdfbb | 21252 | test $ac_write_fail = 0 || |
d0ac1c44 | 21253 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 21254 | |
bec39cab AC |
21255 | |
21256 | # configure is writing to config.log, and then calls config.status. | |
21257 | # config.status does its own redirection, appending to config.log. | |
21258 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
21259 | # by configure, so config.status won't be able to write to it; its | |
21260 | # output is simply discarded. So we exec the FD to /dev/null, | |
21261 | # effectively closing config.log, so it can be properly (re)opened and | |
21262 | # appended to by config.status. When coming back to configure, we | |
21263 | # need to make the FD available again. | |
21264 | if test "$no_create" != yes; then | |
21265 | ac_cs_success=: | |
21266 | ac_config_status_args= | |
21267 | test "$silent" = yes && | |
21268 | ac_config_status_args="$ac_config_status_args --quiet" | |
21269 | exec 5>/dev/null | |
21270 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
21271 | exec 5>>config.log | |
21272 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
21273 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 21274 | $ac_cs_success || as_fn_exit 1 |
bec39cab | 21275 | fi |
c906108c | 21276 | |
bec39cab | 21277 | # |
81ecdfbb | 21278 | # CONFIG_SUBDIRS section. |
bec39cab | 21279 | # |
c906108c SS |
21280 | if test "$no_recursion" != yes; then |
21281 | ||
81ecdfbb RW |
21282 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
21283 | # so they do not pile up. | |
c906108c SS |
21284 | ac_sub_configure_args= |
21285 | ac_prev= | |
fdc59709 PB |
21286 | eval "set x $ac_configure_args" |
21287 | shift | |
21288 | for ac_arg | |
21289 | do | |
c906108c SS |
21290 | if test -n "$ac_prev"; then |
21291 | ac_prev= | |
21292 | continue | |
21293 | fi | |
bec39cab | 21294 | case $ac_arg in |
c906108c SS |
21295 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
21296 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
21297 | ac_prev=cache_file ;; | |
21298 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
21299 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
21300 | | --c=*) | |
21301 | ;; | |
21302 | --config-cache | -C) | |
c906108c SS |
21303 | ;; |
21304 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
21305 | ac_prev=srcdir ;; | |
21306 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
21307 | ;; | |
bec39cab AC |
21308 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
21309 | ac_prev=prefix ;; | |
21310 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
21311 | ;; | |
81ecdfbb RW |
21312 | --disable-option-checking) |
21313 | ;; | |
fdc59709 PB |
21314 | *) |
21315 | case $ac_arg in | |
81ecdfbb | 21316 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 21317 | esac |
81ecdfbb | 21318 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
21319 | esac |
21320 | done | |
21321 | ||
bec39cab AC |
21322 | # Always prepend --prefix to ensure using the same prefix |
21323 | # in subdir configurations. | |
fdc59709 PB |
21324 | ac_arg="--prefix=$prefix" |
21325 | case $ac_arg in | |
81ecdfbb | 21326 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 21327 | esac |
81ecdfbb RW |
21328 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
21329 | ||
21330 | # Pass --silent | |
21331 | if test "$silent" = yes; then | |
21332 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
21333 | fi | |
21334 | ||
21335 | # Always prepend --disable-option-checking to silence warnings, since | |
21336 | # different subdirs can have different --enable and --with options. | |
21337 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 21338 | |
b4e70030 | 21339 | ac_popdir=`pwd` |
bec39cab | 21340 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
21341 | |
21342 | # Do not complain, so a configure script can configure whichever | |
21343 | # parts of a large source tree are present. | |
fdc59709 | 21344 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 21345 | |
81ecdfbb RW |
21346 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
21347 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
21348 | $as_echo "$ac_msg" >&6 | |
21349 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
21350 | ac_builddir=. |
21351 | ||
81ecdfbb RW |
21352 | case "$ac_dir" in |
21353 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21354 | *) | |
21355 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
21356 | # A ".." for each directory in $ac_dir_suffix. | |
21357 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
21358 | case $ac_top_builddir_sub in | |
21359 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21360 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
21361 | esac ;; | |
21362 | esac | |
21363 | ac_abs_top_builddir=$ac_pwd | |
21364 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
21365 | # for backward compatibility: | |
21366 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
21367 | |
21368 | case $srcdir in | |
81ecdfbb | 21369 | .) # We are building in place. |
bec39cab | 21370 | ac_srcdir=. |
81ecdfbb RW |
21371 | ac_top_srcdir=$ac_top_builddir_sub |
21372 | ac_abs_top_srcdir=$ac_pwd ;; | |
21373 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 21374 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
21375 | ac_top_srcdir=$srcdir |
21376 | ac_abs_top_srcdir=$srcdir ;; | |
21377 | *) # Relative name. | |
21378 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
21379 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
21380 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 21381 | esac |
81ecdfbb | 21382 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 21383 | |
c906108c | 21384 | |
fdc59709 | 21385 | cd "$ac_dir" |
c906108c SS |
21386 | |
21387 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
21388 | if test -f "$ac_srcdir/configure.gnu"; then |
21389 | ac_sub_configure=$ac_srcdir/configure.gnu | |
21390 | elif test -f "$ac_srcdir/configure"; then | |
21391 | ac_sub_configure=$ac_srcdir/configure | |
21392 | elif test -f "$ac_srcdir/configure.in"; then | |
21393 | # This should be Cygnus configure. | |
21394 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 21395 | else |
81ecdfbb RW |
21396 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
21397 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
21398 | ac_sub_configure= |
21399 | fi | |
21400 | ||
21401 | # The recursion is here. | |
21402 | if test -n "$ac_sub_configure"; then | |
c906108c | 21403 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
21404 | case $cache_file in |
21405 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
21406 | *) # Relative name. |
21407 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 21408 | esac |
c906108c | 21409 | |
81ecdfbb RW |
21410 | { $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 |
21411 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 21412 | # The eval makes quoting arguments work. |
fdc59709 PB |
21413 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
21414 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 21415 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
21416 | fi |
21417 | ||
fdc59709 | 21418 | cd "$ac_popdir" |
c906108c SS |
21419 | done |
21420 | fi | |
81ecdfbb RW |
21421 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
21422 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
21423 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
21424 | fi | |
c906108c | 21425 |