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 | |
4869db5e RM |
803 | INSTALL_STRIP_PROGRAM |
804 | STRIP | |
805 | install_sh | |
c8693053 | 806 | LARGEFILE_CPPFLAGS |
81ecdfbb RW |
807 | target_os |
808 | target_vendor | |
809 | target_cpu | |
810 | target | |
811 | host_os | |
812 | host_vendor | |
813 | host_cpu | |
814 | host | |
815 | build_os | |
816 | build_vendor | |
817 | build_cpu | |
818 | build | |
c971b7fa PA |
819 | EGREP |
820 | GREP | |
821 | CPP | |
3bc3d82a PA |
822 | ac_ct_CXX |
823 | CXXFLAGS | |
824 | CXX | |
81ecdfbb RW |
825 | OBJEXT |
826 | EXEEXT | |
827 | ac_ct_CC | |
828 | CPPFLAGS | |
829 | LDFLAGS | |
830 | CFLAGS | |
831 | CC | |
832 | MAINT | |
833 | MAINTAINER_MODE_FALSE | |
834 | MAINTAINER_MODE_TRUE | |
835 | target_alias | |
836 | host_alias | |
837 | build_alias | |
838 | LIBS | |
839 | ECHO_T | |
840 | ECHO_N | |
841 | ECHO_C | |
842 | DEFS | |
843 | mandir | |
844 | localedir | |
845 | libdir | |
846 | psdir | |
847 | pdfdir | |
848 | dvidir | |
849 | htmldir | |
850 | infodir | |
851 | docdir | |
852 | oldincludedir | |
853 | includedir | |
854 | localstatedir | |
855 | sharedstatedir | |
856 | sysconfdir | |
857 | datadir | |
858 | datarootdir | |
859 | libexecdir | |
860 | sbindir | |
861 | bindir | |
862 | program_transform_name | |
863 | prefix | |
864 | exec_prefix | |
865 | PACKAGE_URL | |
866 | PACKAGE_BUGREPORT | |
867 | PACKAGE_STRING | |
868 | PACKAGE_VERSION | |
869 | PACKAGE_TARNAME | |
870 | PACKAGE_NAME | |
871 | PATH_SEPARATOR | |
872 | SHELL' | |
2b351b19 | 873 | ac_subst_files='nat_makefile_frag' |
81ecdfbb RW |
874 | ac_user_opts=' |
875 | enable_option_checking | |
876 | enable_maintainer_mode | |
da2f07f1 JK |
877 | enable_plugins |
878 | enable_largefile | |
81ecdfbb RW |
879 | with_separate_debug_dir |
880 | with_gdb_datadir | |
881 | with_relocated_sources | |
7349ff92 | 882 | with_auto_load_dir |
bccbefd2 | 883 | with_auto_load_safe_path |
f99d1d37 | 884 | enable_shared |
81ecdfbb RW |
885 | enable_targets |
886 | enable_64_bit_bfd | |
81ecdfbb RW |
887 | enable_gdbmi |
888 | enable_tui | |
889 | enable_gdbtk | |
0d79cdc4 | 890 | with_debuginfod |
05e7c244 | 891 | with_libunwind_ia64 |
81ecdfbb RW |
892 | with_curses |
893 | enable_profiling | |
44cee4fd | 894 | enable_codesign |
81ecdfbb RW |
895 | with_pkgversion |
896 | with_bugurl | |
711a72d3 | 897 | with_system_zlib |
016a3251 DD |
898 | with_gnu_ld |
899 | enable_rpath | |
81ecdfbb | 900 | with_libiconv_prefix |
9f1528a1 | 901 | with_libiconv_type |
478aac75 | 902 | with_iconv_bin |
81ecdfbb | 903 | with_system_readline |
b8e0a31c | 904 | with_jit_reader_dir |
81ecdfbb | 905 | with_expat |
81ecdfbb | 906 | with_libexpat_prefix |
9f1528a1 | 907 | with_libexpat_type |
2c947d9b JB |
908 | with_libgmp_prefix |
909 | with_libgmp_type | |
2400729e UW |
910 | with_mpfr |
911 | with_libmpfr_prefix | |
9f1528a1 | 912 | with_libmpfr_type |
81ecdfbb | 913 | with_python |
d13c7322 | 914 | with_python_libdir |
ed3ef339 | 915 | with_guile |
189b8c2e | 916 | enable_source_highlight |
58bfce93 MM |
917 | with_intel_pt |
918 | with_libipt_prefix | |
9f1528a1 | 919 | with_libipt_type |
81ecdfbb RW |
920 | with_sysroot |
921 | with_system_gdbinit | |
ed2a2229 | 922 | with_system_gdbinit_dir |
81ecdfbb RW |
923 | enable_werror |
924 | enable_build_warnings | |
925 | enable_gdb_build_warnings | |
f35d5ade | 926 | enable_ubsan |
608e2dbb TT |
927 | with_lzma |
928 | with_liblzma_prefix | |
9f1528a1 | 929 | with_liblzma_type |
81ecdfbb RW |
930 | with_tcl |
931 | with_tk | |
932 | with_x | |
933 | enable_sim | |
393fd4c3 YQ |
934 | with_babeltrace |
935 | with_libbabeltrace_prefix | |
9f1528a1 | 936 | with_libbabeltrace_type |
ccb1ba62 | 937 | with_xxhash |
1776e3e5 | 938 | enable_libctf |
ccb1ba62 | 939 | with_libxxhash_prefix |
9f1528a1 | 940 | with_libxxhash_type |
8ecfd7bd | 941 | enable_unit_tests |
81ecdfbb RW |
942 | ' |
943 | ac_precious_vars='build_alias | |
944 | host_alias | |
945 | target_alias | |
946 | CC | |
947 | CFLAGS | |
948 | LDFLAGS | |
949 | LIBS | |
950 | CPPFLAGS | |
3bc3d82a PA |
951 | CXX |
952 | CXXFLAGS | |
953 | CCC | |
81ecdfbb | 954 | CPP |
f06e05e0 JK |
955 | MAKEINFO |
956 | MAKEINFOFLAGS | |
f6720b1c AM |
957 | PKG_CONFIG |
958 | PKG_CONFIG_PATH | |
959 | PKG_CONFIG_LIBDIR | |
960 | DEBUGINFOD_CFLAGS | |
961 | DEBUGINFOD_LIBS | |
81ecdfbb RW |
962 | YACC |
963 | YFLAGS | |
964 | XMKMF' | |
f99d1d37 | 965 | ac_subdirs_all='gdbtk' |
c906108c SS |
966 | |
967 | # Initialize some variables set by options. | |
bec39cab AC |
968 | ac_init_help= |
969 | ac_init_version=false | |
81ecdfbb RW |
970 | ac_unrecognized_opts= |
971 | ac_unrecognized_sep= | |
c906108c SS |
972 | # The variables have the same names as the options, with |
973 | # dashes changed to underlines. | |
bec39cab | 974 | cache_file=/dev/null |
c906108c | 975 | exec_prefix=NONE |
c906108c | 976 | no_create= |
c906108c SS |
977 | no_recursion= |
978 | prefix=NONE | |
979 | program_prefix=NONE | |
980 | program_suffix=NONE | |
981 | program_transform_name=s,x,x, | |
982 | silent= | |
983 | site= | |
984 | srcdir= | |
c906108c SS |
985 | verbose= |
986 | x_includes=NONE | |
987 | x_libraries=NONE | |
bec39cab AC |
988 | |
989 | # Installation directory options. | |
990 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
991 | # and all the variables that are supposed to be based on exec_prefix | |
992 | # by default will actually change. | |
993 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 994 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
995 | bindir='${exec_prefix}/bin' |
996 | sbindir='${exec_prefix}/sbin' | |
997 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
998 | datarootdir='${prefix}/share' |
999 | datadir='${datarootdir}' | |
c906108c SS |
1000 | sysconfdir='${prefix}/etc' |
1001 | sharedstatedir='${prefix}/com' | |
1002 | localstatedir='${prefix}/var' | |
c906108c SS |
1003 | includedir='${prefix}/include' |
1004 | oldincludedir='/usr/include' | |
81ecdfbb RW |
1005 | docdir='${datarootdir}/doc/${PACKAGE}' |
1006 | infodir='${datarootdir}/info' | |
1007 | htmldir='${docdir}' | |
1008 | dvidir='${docdir}' | |
1009 | pdfdir='${docdir}' | |
1010 | psdir='${docdir}' | |
1011 | libdir='${exec_prefix}/lib' | |
1012 | localedir='${datarootdir}/locale' | |
1013 | mandir='${datarootdir}/man' | |
c906108c | 1014 | |
c906108c | 1015 | ac_prev= |
81ecdfbb | 1016 | ac_dashdash= |
c906108c SS |
1017 | for ac_option |
1018 | do | |
c906108c SS |
1019 | # If the previous option needs an argument, assign it. |
1020 | if test -n "$ac_prev"; then | |
81ecdfbb | 1021 | eval $ac_prev=\$ac_option |
c906108c SS |
1022 | ac_prev= |
1023 | continue | |
1024 | fi | |
1025 | ||
81ecdfbb | 1026 | case $ac_option in |
d0ac1c44 SM |
1027 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1028 | *=) ac_optarg= ;; | |
1029 | *) ac_optarg=yes ;; | |
81ecdfbb | 1030 | esac |
c906108c SS |
1031 | |
1032 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1033 | ||
81ecdfbb RW |
1034 | case $ac_dashdash$ac_option in |
1035 | --) | |
1036 | ac_dashdash=yes ;; | |
c906108c SS |
1037 | |
1038 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1039 | ac_prev=bindir ;; | |
1040 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1041 | bindir=$ac_optarg ;; |
c906108c SS |
1042 | |
1043 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1044 | ac_prev=build_alias ;; |
c906108c | 1045 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1046 | build_alias=$ac_optarg ;; |
c906108c SS |
1047 | |
1048 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1049 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1050 | ac_prev=cache_file ;; | |
1051 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1052 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1053 | cache_file=$ac_optarg ;; |
1054 | ||
1055 | --config-cache | -C) | |
1056 | cache_file=config.cache ;; | |
c906108c | 1057 | |
81ecdfbb | 1058 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1059 | ac_prev=datadir ;; |
81ecdfbb | 1060 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1061 | datadir=$ac_optarg ;; |
c906108c | 1062 | |
81ecdfbb RW |
1063 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1064 | | --dataroo | --dataro | --datar) | |
1065 | ac_prev=datarootdir ;; | |
1066 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1067 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1068 | datarootdir=$ac_optarg ;; | |
1069 | ||
c906108c | 1070 | -disable-* | --disable-*) |
81ecdfbb | 1071 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1072 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1073 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1074 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1075 | ac_useropt_orig=$ac_useropt |
1076 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1077 | case $ac_user_opts in | |
1078 | *" | |
1079 | "enable_$ac_useropt" | |
1080 | "*) ;; | |
1081 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1082 | ac_unrecognized_sep=', ';; | |
1083 | esac | |
1084 | eval enable_$ac_useropt=no ;; | |
1085 | ||
1086 | -docdir | --docdir | --docdi | --doc | --do) | |
1087 | ac_prev=docdir ;; | |
1088 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1089 | docdir=$ac_optarg ;; | |
1090 | ||
1091 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1092 | ac_prev=dvidir ;; | |
1093 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1094 | dvidir=$ac_optarg ;; | |
c906108c SS |
1095 | |
1096 | -enable-* | --enable-*) | |
81ecdfbb | 1097 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1098 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1099 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1100 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1101 | ac_useropt_orig=$ac_useropt |
1102 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1103 | case $ac_user_opts in | |
1104 | *" | |
1105 | "enable_$ac_useropt" | |
1106 | "*) ;; | |
1107 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1108 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1109 | esac |
81ecdfbb | 1110 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1111 | |
1112 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1113 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1114 | | --exec | --exe | --ex) | |
1115 | ac_prev=exec_prefix ;; | |
1116 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1117 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1118 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1119 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1120 | |
1121 | -gas | --gas | --ga | --g) | |
1122 | # Obsolete; use --with-gas. | |
1123 | with_gas=yes ;; | |
1124 | ||
bec39cab AC |
1125 | -help | --help | --hel | --he | -h) |
1126 | ac_init_help=long ;; | |
1127 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1128 | ac_init_help=recursive ;; | |
1129 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1130 | ac_init_help=short ;; | |
c906108c SS |
1131 | |
1132 | -host | --host | --hos | --ho) | |
bec39cab | 1133 | ac_prev=host_alias ;; |
c906108c | 1134 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1135 | host_alias=$ac_optarg ;; |
c906108c | 1136 | |
81ecdfbb RW |
1137 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1138 | ac_prev=htmldir ;; | |
1139 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1140 | | --ht=*) | |
1141 | htmldir=$ac_optarg ;; | |
1142 | ||
c906108c SS |
1143 | -includedir | --includedir | --includedi | --included | --include \ |
1144 | | --includ | --inclu | --incl | --inc) | |
1145 | ac_prev=includedir ;; | |
1146 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1147 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1148 | includedir=$ac_optarg ;; |
c906108c SS |
1149 | |
1150 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1151 | ac_prev=infodir ;; | |
1152 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1153 | infodir=$ac_optarg ;; |
c906108c SS |
1154 | |
1155 | -libdir | --libdir | --libdi | --libd) | |
1156 | ac_prev=libdir ;; | |
1157 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1158 | libdir=$ac_optarg ;; |
c906108c SS |
1159 | |
1160 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1161 | | --libexe | --libex | --libe) | |
1162 | ac_prev=libexecdir ;; | |
1163 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1164 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1165 | libexecdir=$ac_optarg ;; |
c906108c | 1166 | |
81ecdfbb RW |
1167 | -localedir | --localedir | --localedi | --localed | --locale) |
1168 | ac_prev=localedir ;; | |
1169 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1170 | localedir=$ac_optarg ;; | |
1171 | ||
c906108c | 1172 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1173 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1174 | ac_prev=localstatedir ;; |
1175 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1176 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1177 | localstatedir=$ac_optarg ;; |
c906108c SS |
1178 | |
1179 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1180 | ac_prev=mandir ;; | |
1181 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1182 | mandir=$ac_optarg ;; |
c906108c SS |
1183 | |
1184 | -nfp | --nfp | --nf) | |
1185 | # Obsolete; use --without-fp. | |
1186 | with_fp=no ;; | |
1187 | ||
1188 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1189 | | --no-cr | --no-c | -n) |
c906108c SS |
1190 | no_create=yes ;; |
1191 | ||
1192 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1193 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1194 | no_recursion=yes ;; | |
1195 | ||
1196 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1197 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1198 | | --oldin | --oldi | --old | --ol | --o) | |
1199 | ac_prev=oldincludedir ;; | |
1200 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1201 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1202 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1203 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1204 | |
1205 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1206 | ac_prev=prefix ;; | |
1207 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1208 | prefix=$ac_optarg ;; |
c906108c SS |
1209 | |
1210 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1211 | | --program-pre | --program-pr | --program-p) | |
1212 | ac_prev=program_prefix ;; | |
1213 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1214 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1215 | program_prefix=$ac_optarg ;; |
c906108c SS |
1216 | |
1217 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1218 | | --program-suf | --program-su | --program-s) | |
1219 | ac_prev=program_suffix ;; | |
1220 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1221 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1222 | program_suffix=$ac_optarg ;; |
c906108c SS |
1223 | |
1224 | -program-transform-name | --program-transform-name \ | |
1225 | | --program-transform-nam | --program-transform-na \ | |
1226 | | --program-transform-n | --program-transform- \ | |
1227 | | --program-transform | --program-transfor \ | |
1228 | | --program-transfo | --program-transf \ | |
1229 | | --program-trans | --program-tran \ | |
1230 | | --progr-tra | --program-tr | --program-t) | |
1231 | ac_prev=program_transform_name ;; | |
1232 | -program-transform-name=* | --program-transform-name=* \ | |
1233 | | --program-transform-nam=* | --program-transform-na=* \ | |
1234 | | --program-transform-n=* | --program-transform-=* \ | |
1235 | | --program-transform=* | --program-transfor=* \ | |
1236 | | --program-transfo=* | --program-transf=* \ | |
1237 | | --program-trans=* | --program-tran=* \ | |
1238 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1239 | program_transform_name=$ac_optarg ;; |
c906108c | 1240 | |
81ecdfbb RW |
1241 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1242 | ac_prev=pdfdir ;; | |
1243 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1244 | pdfdir=$ac_optarg ;; | |
1245 | ||
1246 | -psdir | --psdir | --psdi | --psd | --ps) | |
1247 | ac_prev=psdir ;; | |
1248 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1249 | psdir=$ac_optarg ;; | |
1250 | ||
c906108c SS |
1251 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1252 | | -silent | --silent | --silen | --sile | --sil) | |
1253 | silent=yes ;; | |
1254 | ||
1255 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1256 | ac_prev=sbindir ;; | |
1257 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1258 | | --sbi=* | --sb=*) | |
bec39cab | 1259 | sbindir=$ac_optarg ;; |
c906108c SS |
1260 | |
1261 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1262 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1263 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1264 | | --sha | --sh) | |
1265 | ac_prev=sharedstatedir ;; | |
1266 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1267 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1268 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1269 | | --sha=* | --sh=*) | |
bec39cab | 1270 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1271 | |
1272 | -site | --site | --sit) | |
1273 | ac_prev=site ;; | |
1274 | -site=* | --site=* | --sit=*) | |
bec39cab | 1275 | site=$ac_optarg ;; |
3ace7edb | 1276 | |
c906108c SS |
1277 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1278 | ac_prev=srcdir ;; | |
1279 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1280 | srcdir=$ac_optarg ;; |
c906108c SS |
1281 | |
1282 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1283 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1284 | ac_prev=sysconfdir ;; | |
1285 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1286 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1287 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1288 | |
1289 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1290 | ac_prev=target_alias ;; |
c906108c | 1291 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1292 | target_alias=$ac_optarg ;; |
c906108c SS |
1293 | |
1294 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1295 | verbose=yes ;; | |
1296 | ||
bec39cab AC |
1297 | -version | --version | --versio | --versi | --vers | -V) |
1298 | ac_init_version=: ;; | |
c906108c SS |
1299 | |
1300 | -with-* | --with-*) | |
81ecdfbb | 1301 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1302 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1303 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1304 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1305 | ac_useropt_orig=$ac_useropt |
1306 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1307 | case $ac_user_opts in | |
1308 | *" | |
1309 | "with_$ac_useropt" | |
1310 | "*) ;; | |
1311 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1312 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1313 | esac |
81ecdfbb | 1314 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1315 | |
1316 | -without-* | --without-*) | |
81ecdfbb | 1317 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1318 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1319 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1320 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1321 | ac_useropt_orig=$ac_useropt |
1322 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1323 | case $ac_user_opts in | |
1324 | *" | |
1325 | "with_$ac_useropt" | |
1326 | "*) ;; | |
1327 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1328 | ac_unrecognized_sep=', ';; | |
1329 | esac | |
1330 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1331 | |
1332 | --x) | |
1333 | # Obsolete; use --with-x. | |
1334 | with_x=yes ;; | |
1335 | ||
1336 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1337 | | --x-incl | --x-inc | --x-in | --x-i) | |
1338 | ac_prev=x_includes ;; | |
1339 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1340 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1341 | x_includes=$ac_optarg ;; |
c906108c SS |
1342 | |
1343 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1344 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1345 | ac_prev=x_libraries ;; | |
1346 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1347 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1348 | x_libraries=$ac_optarg ;; |
c906108c | 1349 | |
d0ac1c44 SM |
1350 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1351 | Try \`$0 --help' for more information" | |
c906108c SS |
1352 | ;; |
1353 | ||
bec39cab AC |
1354 | *=*) |
1355 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1356 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1357 | case $ac_envvar in #( |
1358 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1359 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1360 | esac |
1361 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1362 | export $ac_envvar ;; |
1363 | ||
c906108c | 1364 | *) |
bec39cab | 1365 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1366 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1367 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1368 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1369 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
c906108c SS |
1370 | ;; |
1371 | ||
1372 | esac | |
1373 | done | |
1374 | ||
1375 | if test -n "$ac_prev"; then | |
bec39cab | 1376 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1377 | as_fn_error $? "missing argument to $ac_option" |
c906108c | 1378 | fi |
c906108c | 1379 | |
81ecdfbb RW |
1380 | if test -n "$ac_unrecognized_opts"; then |
1381 | case $enable_option_checking in | |
1382 | no) ;; | |
d0ac1c44 | 1383 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1384 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
b4e70030 | 1385 | esac |
81ecdfbb | 1386 | fi |
b4e70030 | 1387 | |
81ecdfbb RW |
1388 | # Check all directory arguments for consistency. |
1389 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1390 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1391 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1392 | libdir localedir mandir | |
b4e70030 | 1393 | do |
81ecdfbb RW |
1394 | eval ac_val=\$$ac_var |
1395 | # Remove trailing slashes. | |
1396 | case $ac_val in | |
1397 | */ ) | |
1398 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1399 | eval $ac_var=\$ac_val;; | |
1400 | esac | |
1401 | # Be sure to have absolute directory names. | |
b4e70030 | 1402 | case $ac_val in |
81ecdfbb RW |
1403 | [\\/$]* | ?:[\\/]* ) continue;; |
1404 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1405 | esac |
d0ac1c44 | 1406 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1407 | done |
1408 | ||
bec39cab AC |
1409 | # There might be people who depend on the old broken behavior: `$host' |
1410 | # used to hold the argument of --host etc. | |
1411 | # FIXME: To remove some day. | |
1412 | build=$build_alias | |
1413 | host=$host_alias | |
1414 | target=$target_alias | |
1415 | ||
1416 | # FIXME: To remove some day. | |
1417 | if test "x$host_alias" != x; then | |
1418 | if test "x$build_alias" = x; then | |
1419 | cross_compiling=maybe | |
bec39cab AC |
1420 | elif test "x$build_alias" != "x$host_alias"; then |
1421 | cross_compiling=yes | |
1422 | fi | |
1423 | fi | |
c906108c | 1424 | |
bec39cab AC |
1425 | ac_tool_prefix= |
1426 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1427 | ||
1428 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1429 | |
c906108c | 1430 | |
81ecdfbb RW |
1431 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1432 | ac_ls_di=`ls -di .` && | |
1433 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1434 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1435 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1436 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1437 | |
1438 | ||
c906108c SS |
1439 | # Find the source files, if location was not specified. |
1440 | if test -z "$srcdir"; then | |
1441 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1442 | # Try the directory containing this script, then the parent directory. |
1443 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1444 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1445 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1446 | X"$as_myself" : 'X\(//\)$' \| \ | |
1447 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1448 | $as_echo X"$as_myself" | | |
1449 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1450 | s//\1/ | |
1451 | q | |
1452 | } | |
1453 | /^X\(\/\/\)[^/].*/{ | |
1454 | s//\1/ | |
1455 | q | |
1456 | } | |
1457 | /^X\(\/\/\)$/{ | |
1458 | s//\1/ | |
1459 | q | |
1460 | } | |
1461 | /^X\(\/\).*/{ | |
1462 | s//\1/ | |
1463 | q | |
1464 | } | |
1465 | s/.*/./; q'` | |
c906108c | 1466 | srcdir=$ac_confdir |
81ecdfbb | 1467 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1468 | srcdir=.. |
1469 | fi | |
1470 | else | |
1471 | ac_srcdir_defaulted=no | |
1472 | fi | |
81ecdfbb RW |
1473 | if test ! -r "$srcdir/$ac_unique_file"; then |
1474 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1475 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1476 | fi |
1477 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1478 | ac_abs_confdir=`( | |
d0ac1c44 | 1479 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1480 | pwd)` |
1481 | # When building in place, set srcdir=. | |
1482 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1483 | srcdir=. | |
1484 | fi | |
1485 | # Remove unnecessary trailing slashes from srcdir. | |
1486 | # Double slashes in file names in object file debugging info | |
1487 | # mess up M-x gdb in Emacs. | |
1488 | case $srcdir in | |
1489 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1490 | esac | |
1491 | for ac_var in $ac_precious_vars; do | |
1492 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1493 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1494 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1495 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1496 | done | |
c906108c | 1497 | |
bec39cab AC |
1498 | # |
1499 | # Report the --help message. | |
1500 | # | |
1501 | if test "$ac_init_help" = "long"; then | |
1502 | # Omit some internal or obsolete options to make the list less imposing. | |
1503 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1504 | cat <<_ACEOF | |
1505 | \`configure' configures this package to adapt to many kinds of systems. | |
1506 | ||
1507 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1508 | ||
1509 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1510 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1511 | ||
1512 | Defaults for the options are specified in brackets. | |
1513 | ||
1514 | Configuration: | |
1515 | -h, --help display this help and exit | |
1516 | --help=short display options specific to this package | |
1517 | --help=recursive display the short help of all the included packages | |
1518 | -V, --version display version information and exit | |
d0ac1c44 | 1519 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1520 | --cache-file=FILE cache test results in FILE [disabled] |
1521 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1522 | -n, --no-create do not create output files | |
1523 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1524 | ||
bec39cab AC |
1525 | Installation directories: |
1526 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1527 | [$ac_default_prefix] |
bec39cab | 1528 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1529 | [PREFIX] |
bec39cab AC |
1530 | |
1531 | By default, \`make install' will install all the files in | |
1532 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1533 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1534 | for instance \`--prefix=\$HOME'. | |
1535 | ||
1536 | For better control, use the options below. | |
1537 | ||
1538 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1539 | --bindir=DIR user executables [EPREFIX/bin] |
1540 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1541 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1542 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1543 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1544 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1545 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1546 | --includedir=DIR C header files [PREFIX/include] | |
1547 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1548 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1549 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1550 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1551 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1552 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1553 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1554 | --htmldir=DIR html documentation [DOCDIR] | |
1555 | --dvidir=DIR dvi documentation [DOCDIR] | |
1556 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1557 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1558 | _ACEOF |
1559 | ||
1560 | cat <<\_ACEOF | |
1561 | ||
9009e1ae MR |
1562 | Program names: |
1563 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1564 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1565 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1566 | ||
bec39cab AC |
1567 | X features: |
1568 | --x-includes=DIR X include files are in DIR | |
1569 | --x-libraries=DIR X library files are in DIR | |
1570 | ||
1571 | System types: | |
1572 | --build=BUILD configure for building on BUILD [guessed] | |
1573 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1574 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1575 | _ACEOF | |
1576 | fi | |
1577 | ||
1578 | if test -n "$ac_init_help"; then | |
1579 | ||
1580 | cat <<\_ACEOF | |
1581 | ||
1582 | Optional Features: | |
81ecdfbb | 1583 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1584 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1585 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1586 | --enable-maintainer-mode |
1587 | enable make rules and dependencies not useful (and | |
1588 | sometimes confusing) to the casual installer | |
2974be62 | 1589 | --enable-plugins Enable support for plugins |
da2f07f1 | 1590 | --disable-largefile omit support for large files |
f99d1d37 | 1591 | --enable-shared build shared libraries deault=yes |
a1220294 TT |
1592 | --enable-targets=TARGETS |
1593 | alternative target configurations | |
c0993dbe | 1594 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1595 | --disable-gdbmi disable machine-interface (MI) |
1596 | --enable-tui enable full-screen terminal user interface (TUI) | |
1597 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1598 | --enable-profiling enable profiling of GDB | |
44cee4fd | 1599 | --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
3841debe | 1600 | --disable-rpath do not hardcode runtime library paths |
189b8c2e ST |
1601 | --enable-source-highlight |
1602 | enable source-highlight for source listings | |
a1220294 | 1603 | --enable-werror treat compile warnings as errors |
32c1c914 | 1604 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1605 | --enable-gdb-build-warnings |
32c1c914 | 1606 | enable GDB specific build-time compiler warnings if |
a1220294 | 1607 | gcc is used |
f35d5ade | 1608 | --enable-ubsan enable undefined behavior sanitizer (auto/yes/no) |
32c1c914 | 1609 | --enable-sim link gdb with simulator |
1776e3e5 | 1610 | --enable-libctf Handle .ctf type-info sections [default=yes] |
8ecfd7bd SDJ |
1611 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1612 | GDB | |
bec39cab AC |
1613 | |
1614 | Optional Packages: | |
1615 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1616 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1617 | --with-separate-debug-dir=PATH |
32c1c914 | 1618 | look for global separate debug info in this path |
62e4f60c | 1619 | [LIBDIR/debug] |
b14b1491 TT |
1620 | --with-gdb-datadir=PATH look for global separate data files in this path |
1621 | [DATADIR/gdb] | |
29b0e8a2 | 1622 | --with-relocated-sources=PATH |
32c1c914 | 1623 | automatically relocate this path for source files |
7349ff92 | 1624 | --with-auto-load-dir=PATH |
aff139ff | 1625 | directories from which to load auto-loaded scripts |
1564a261 | 1626 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1627 | --with-auto-load-safe-path=PATH |
aff139ff | 1628 | directories safe to hold auto-loaded files |
7349ff92 | 1629 | [--with-auto-load-dir] |
bccbefd2 JK |
1630 | --without-auto-load-safe-path |
1631 | do not restrict auto-loaded files locations | |
0d79cdc4 AM |
1632 | --with-debuginfod Enable debuginfo lookups with debuginfod |
1633 | (auto/yes/no) | |
05e7c244 | 1634 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1635 | --with-curses use the curses library instead of the termcap |
1636 | library | |
c16158bc JM |
1637 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1638 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1639 | --with-system-zlib use installed libz |
016a3251 DD |
1640 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1641 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1642 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
9f1528a1 | 1643 | --with-libiconv-type=TYPE type of library to search for (auto/static/shared) |
478aac75 | 1644 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1645 | --with-system-readline use installed readline library |
b8e0a31c SD |
1646 | --with-jit-reader-dir=PATH |
1647 | directory to load the JIT readers from | |
5c39566f | 1648 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1649 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1650 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
9f1528a1 | 1651 | --with-libexpat-type=TYPE type of library to search for (auto/static/shared) |
2c947d9b JB |
1652 | --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib |
1653 | --without-libgmp-prefix don't search for libgmp in includedir and libdir | |
1654 | --with-libgmp-type=TYPE type of library to search for (auto/static/shared) | |
2400729e UW |
1655 | --with-mpfr include MPFR support (auto/yes/no) |
1656 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib | |
1657 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir | |
9f1528a1 | 1658 | --with-libmpfr-type=TYPE type of library to search for (auto/static/shared) |
0c4a4063 DE |
1659 | --with-python[=PYTHON] include python support |
1660 | (auto/yes/no/<python-program>) | |
d13c7322 AB |
1661 | --with-python-libdir[=DIR] |
1662 | search for python's libraries in DIR | |
ed3ef339 DE |
1663 | --with-guile[=GUILE] include guile support |
1664 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1665 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1666 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1667 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
9f1528a1 | 1668 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
81ecdfbb | 1669 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1670 | --with-system-gdbinit=PATH |
32c1c914 | 1671 | automatically load a system-wide gdbinit file |
ed2a2229 CB |
1672 | --with-system-gdbinit-dir=PATH |
1673 | automatically load system-wide gdbinit files from | |
1674 | this directory | |
608e2dbb TT |
1675 | --with-lzma support lzma compression (auto/yes/no) |
1676 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1677 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
9f1528a1 | 1678 | --with-liblzma-type=TYPE type of library to search for (auto/static/shared) |
5062cc19 KS |
1679 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1680 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1681 | --with-x use the X Window System |
393fd4c3 YQ |
1682 | --with-babeltrace include babeltrace support (auto/yes/no) |
1683 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1684 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
9f1528a1 | 1685 | --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared) |
ccb1ba62 CB |
1686 | --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) |
1687 | --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib | |
1688 | --without-libxxhash-prefix don't search for libxxhash in includedir and libdir | |
9f1528a1 | 1689 | --with-libxxhash-type=TYPE type of library to search for (auto/static/shared) |
bec39cab AC |
1690 | |
1691 | Some influential environment variables: | |
1692 | CC C compiler command | |
1693 | CFLAGS C compiler flags | |
1694 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1695 | nonstandard directory <lib dir> | |
81ecdfbb | 1696 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1697 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1698 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1699 | CXX C++ compiler command |
1700 | CXXFLAGS C++ compiler flags | |
bec39cab | 1701 | CPP C preprocessor |
f06e05e0 JK |
1702 | MAKEINFO Parent configure detects if it is of sufficient version. |
1703 | MAKEINFOFLAGS | |
1704 | Parameters for MAKEINFO. | |
f6720b1c AM |
1705 | PKG_CONFIG path to pkg-config utility |
1706 | PKG_CONFIG_PATH | |
1707 | directories to add to pkg-config's search path | |
1708 | PKG_CONFIG_LIBDIR | |
1709 | path overriding pkg-config's built-in search path | |
1710 | DEBUGINFOD_CFLAGS | |
1711 | C compiler flags for DEBUGINFOD, overriding pkg-config | |
1712 | DEBUGINFOD_LIBS | |
1713 | linker flags for DEBUGINFOD, overriding pkg-config | |
d0ac1c44 SM |
1714 | YACC The `Yet Another Compiler Compiler' implementation to use. |
1715 | Defaults to the first program found out of: `bison -y', `byacc', | |
1716 | `yacc'. | |
81ecdfbb RW |
1717 | YFLAGS The list of arguments that will be passed by default to $YACC. |
1718 | This script will default YFLAGS to the empty string to avoid a | |
1719 | default value of `-d' given by some make applications. | |
1720 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1721 | |
1722 | Use these variables to override the choices made by `configure' or to help | |
1723 | it to find libraries and programs with nonstandard names/locations. | |
1724 | ||
81ecdfbb | 1725 | Report bugs to the package provider. |
bec39cab | 1726 | _ACEOF |
81ecdfbb | 1727 | ac_status=$? |
bec39cab AC |
1728 | fi |
1729 | ||
1730 | if test "$ac_init_help" = "recursive"; then | |
1731 | # If there are subdirs, report their specific --help. | |
bec39cab | 1732 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1733 | test -d "$ac_dir" || |
1734 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1735 | continue | |
bec39cab AC |
1736 | ac_builddir=. |
1737 | ||
81ecdfbb RW |
1738 | case "$ac_dir" in |
1739 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1740 | *) | |
1741 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1742 | # A ".." for each directory in $ac_dir_suffix. | |
1743 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1744 | case $ac_top_builddir_sub in | |
1745 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1746 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1747 | esac ;; | |
1748 | esac | |
1749 | ac_abs_top_builddir=$ac_pwd | |
1750 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1751 | # for backward compatibility: | |
1752 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1753 | |
1754 | case $srcdir in | |
81ecdfbb | 1755 | .) # We are building in place. |
bec39cab | 1756 | ac_srcdir=. |
81ecdfbb RW |
1757 | ac_top_srcdir=$ac_top_builddir_sub |
1758 | ac_abs_top_srcdir=$ac_pwd ;; | |
1759 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1760 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1761 | ac_top_srcdir=$srcdir |
1762 | ac_abs_top_srcdir=$srcdir ;; | |
1763 | *) # Relative name. | |
1764 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1765 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1766 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1767 | esac |
81ecdfbb | 1768 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1769 | |
81ecdfbb RW |
1770 | cd "$ac_dir" || { ac_status=$?; continue; } |
1771 | # Check for guested configure. | |
1772 | if test -f "$ac_srcdir/configure.gnu"; then | |
1773 | echo && | |
1774 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1775 | elif test -f "$ac_srcdir/configure"; then | |
1776 | echo && | |
1777 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1778 | else |
81ecdfbb RW |
1779 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1780 | fi || ac_status=$? | |
1781 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1782 | done |
1783 | fi | |
1784 | ||
81ecdfbb | 1785 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1786 | if $ac_init_version; then |
1787 | cat <<\_ACEOF | |
81ecdfbb | 1788 | configure |
d0ac1c44 | 1789 | generated by GNU Autoconf 2.69 |
bec39cab | 1790 | |
d0ac1c44 | 1791 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1792 | This configure script is free software; the Free Software Foundation |
1793 | gives unlimited permission to copy, distribute and modify it. | |
1794 | _ACEOF | |
81ecdfbb | 1795 | exit |
bec39cab | 1796 | fi |
bec39cab | 1797 | |
81ecdfbb RW |
1798 | ## ------------------------ ## |
1799 | ## Autoconf initialization. ## | |
1800 | ## ------------------------ ## | |
bec39cab | 1801 | |
81ecdfbb RW |
1802 | # ac_fn_c_try_compile LINENO |
1803 | # -------------------------- | |
1804 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1805 | ac_fn_c_try_compile () | |
1806 | { | |
1807 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1808 | rm -f conftest.$ac_objext | |
1809 | if { { ac_try="$ac_compile" | |
1810 | case "(($ac_try" in | |
1811 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1812 | *) ac_try_echo=$ac_try;; | |
1813 | esac | |
1814 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1815 | $as_echo "$ac_try_echo"; } >&5 | |
1816 | (eval "$ac_compile") 2>conftest.err | |
1817 | ac_status=$? | |
1818 | if test -s conftest.err; then | |
1819 | grep -v '^ *+' conftest.err >conftest.er1 | |
1820 | cat conftest.er1 >&5 | |
1821 | mv -f conftest.er1 conftest.err | |
1822 | fi | |
1823 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1824 | test $ac_status = 0; } && { | |
1825 | test -z "$ac_c_werror_flag" || | |
1826 | test ! -s conftest.err | |
1827 | } && test -s conftest.$ac_objext; then : | |
1828 | ac_retval=0 | |
1829 | else | |
1830 | $as_echo "$as_me: failed program was:" >&5 | |
1831 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1832 | |
81ecdfbb RW |
1833 | ac_retval=1 |
1834 | fi | |
d0ac1c44 SM |
1835 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1836 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1837 | |
1838 | } # ac_fn_c_try_compile | |
1839 | ||
3bc3d82a PA |
1840 | # ac_fn_cxx_try_compile LINENO |
1841 | # ---------------------------- | |
1842 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1843 | ac_fn_cxx_try_compile () | |
1844 | { | |
1845 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1846 | rm -f conftest.$ac_objext | |
1847 | if { { ac_try="$ac_compile" | |
1848 | case "(($ac_try" in | |
1849 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1850 | *) ac_try_echo=$ac_try;; | |
1851 | esac | |
1852 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1853 | $as_echo "$ac_try_echo"; } >&5 | |
1854 | (eval "$ac_compile") 2>conftest.err | |
1855 | ac_status=$? | |
1856 | if test -s conftest.err; then | |
1857 | grep -v '^ *+' conftest.err >conftest.er1 | |
1858 | cat conftest.er1 >&5 | |
1859 | mv -f conftest.er1 conftest.err | |
1860 | fi | |
1861 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1862 | test $ac_status = 0; } && { | |
1863 | test -z "$ac_cxx_werror_flag" || | |
1864 | test ! -s conftest.err | |
1865 | } && test -s conftest.$ac_objext; then : | |
1866 | ac_retval=0 | |
1867 | else | |
1868 | $as_echo "$as_me: failed program was:" >&5 | |
1869 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1870 | ||
1871 | ac_retval=1 | |
1872 | fi | |
d0ac1c44 SM |
1873 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1874 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1875 | |
1876 | } # ac_fn_cxx_try_compile | |
1877 | ||
81ecdfbb RW |
1878 | # ac_fn_c_try_cpp LINENO |
1879 | # ---------------------- | |
1880 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1881 | ac_fn_c_try_cpp () | |
bec39cab | 1882 | { |
81ecdfbb RW |
1883 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1884 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1885 | case "(($ac_try" in | |
1886 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1887 | *) ac_try_echo=$ac_try;; | |
1888 | esac | |
1889 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1890 | $as_echo "$ac_try_echo"; } >&5 | |
1891 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1892 | ac_status=$? | |
1893 | if test -s conftest.err; then | |
1894 | grep -v '^ *+' conftest.err >conftest.er1 | |
1895 | cat conftest.er1 >&5 | |
1896 | mv -f conftest.er1 conftest.err | |
1897 | fi | |
1898 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1899 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1900 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1901 | test ! -s conftest.err | |
1902 | }; then : | |
1903 | ac_retval=0 | |
1904 | else | |
1905 | $as_echo "$as_me: failed program was:" >&5 | |
1906 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1907 | |
81ecdfbb RW |
1908 | ac_retval=1 |
1909 | fi | |
d0ac1c44 SM |
1910 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1911 | as_fn_set_status $ac_retval | |
bec39cab | 1912 | |
81ecdfbb | 1913 | } # ac_fn_c_try_cpp |
bec39cab | 1914 | |
81ecdfbb RW |
1915 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1916 | # ------------------------------------------------------- | |
1917 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1918 | # the include files in INCLUDES and setting the cache variable VAR | |
1919 | # accordingly. | |
1920 | ac_fn_c_check_header_mongrel () | |
1921 | { | |
1922 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1923 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1925 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1926 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1927 | $as_echo_n "(cached) " >&6 |
1928 | fi | |
1929 | eval ac_res=\$$3 | |
1930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1931 | $as_echo "$ac_res" >&6; } | |
1932 | else | |
1933 | # Is the header compilable? | |
1934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1935 | $as_echo_n "checking $2 usability... " >&6; } | |
1936 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1937 | /* end confdefs.h. */ | |
1938 | $4 | |
1939 | #include <$2> | |
1940 | _ACEOF | |
1941 | if ac_fn_c_try_compile "$LINENO"; then : | |
1942 | ac_header_compiler=yes | |
1943 | else | |
1944 | ac_header_compiler=no | |
1945 | fi | |
1946 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1948 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1949 | |
81ecdfbb RW |
1950 | # Is the header present? |
1951 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1952 | $as_echo_n "checking $2 presence... " >&6; } | |
1953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1954 | /* end confdefs.h. */ | |
1955 | #include <$2> | |
1956 | _ACEOF | |
1957 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1958 | ac_header_preproc=yes | |
1959 | else | |
1960 | ac_header_preproc=no | |
1961 | fi | |
d0ac1c44 | 1962 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1964 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1965 | |
81ecdfbb RW |
1966 | # So? What about this header? |
1967 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1968 | yes:no: ) | |
1969 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1970 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1971 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1972 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1973 | ;; | |
1974 | no:yes:* ) | |
1975 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1976 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1977 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1978 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1979 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1980 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1981 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1982 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1983 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1984 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1985 | ;; | |
1986 | esac | |
1987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1988 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1989 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1990 | $as_echo_n "(cached) " >&6 |
1991 | else | |
1992 | eval "$3=\$ac_header_compiler" | |
1993 | fi | |
1994 | eval ac_res=\$$3 | |
1995 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1996 | $as_echo "$ac_res" >&6; } | |
1997 | fi | |
d0ac1c44 | 1998 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 1999 | |
81ecdfbb | 2000 | } # ac_fn_c_check_header_mongrel |
bec39cab | 2001 | |
81ecdfbb RW |
2002 | # ac_fn_c_try_run LINENO |
2003 | # ---------------------- | |
2004 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
2005 | # that executables *can* be run. | |
2006 | ac_fn_c_try_run () | |
2007 | { | |
2008 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2009 | if { { ac_try="$ac_link" | |
2010 | case "(($ac_try" in | |
2011 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2012 | *) ac_try_echo=$ac_try;; | |
2013 | esac | |
2014 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2015 | $as_echo "$ac_try_echo"; } >&5 | |
2016 | (eval "$ac_link") 2>&5 | |
2017 | ac_status=$? | |
2018 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2019 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2020 | { { case "(($ac_try" in | |
2021 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2022 | *) ac_try_echo=$ac_try;; | |
2023 | esac | |
2024 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2025 | $as_echo "$ac_try_echo"; } >&5 | |
2026 | (eval "$ac_try") 2>&5 | |
2027 | ac_status=$? | |
2028 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2029 | test $ac_status = 0; }; }; then : | |
2030 | ac_retval=0 | |
2031 | else | |
2032 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2033 | $as_echo "$as_me: failed program was:" >&5 | |
2034 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2035 | |
81ecdfbb RW |
2036 | ac_retval=$ac_status |
2037 | fi | |
2038 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2039 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2040 | as_fn_set_status $ac_retval | |
bec39cab | 2041 | |
81ecdfbb | 2042 | } # ac_fn_c_try_run |
bec39cab | 2043 | |
81ecdfbb RW |
2044 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2045 | # ------------------------------------------------------- | |
2046 | # Tests whether HEADER exists and can be compiled using the include files in | |
2047 | # INCLUDES, setting the cache variable VAR accordingly. | |
2048 | ac_fn_c_check_header_compile () | |
2049 | { | |
2050 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2051 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2052 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2053 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2054 | $as_echo_n "(cached) " >&6 |
2055 | else | |
2056 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2057 | /* end confdefs.h. */ | |
2058 | $4 | |
2059 | #include <$2> | |
bec39cab | 2060 | _ACEOF |
81ecdfbb RW |
2061 | if ac_fn_c_try_compile "$LINENO"; then : |
2062 | eval "$3=yes" | |
2063 | else | |
2064 | eval "$3=no" | |
2065 | fi | |
2066 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2067 | fi | |
2068 | eval ac_res=\$$3 | |
2069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2070 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2071 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 2072 | |
81ecdfbb | 2073 | } # ac_fn_c_check_header_compile |
bec39cab | 2074 | |
2974be62 AM |
2075 | # ac_fn_c_try_link LINENO |
2076 | # ----------------------- | |
2077 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2078 | ac_fn_c_try_link () | |
2079 | { | |
2080 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2081 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2082 | if { { ac_try="$ac_link" | |
2083 | case "(($ac_try" in | |
2084 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2085 | *) ac_try_echo=$ac_try;; | |
2086 | esac | |
2087 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2088 | $as_echo "$ac_try_echo"; } >&5 | |
2089 | (eval "$ac_link") 2>conftest.err | |
2090 | ac_status=$? | |
2091 | if test -s conftest.err; then | |
2092 | grep -v '^ *+' conftest.err >conftest.er1 | |
2093 | cat conftest.er1 >&5 | |
2094 | mv -f conftest.er1 conftest.err | |
2095 | fi | |
2096 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2097 | test $ac_status = 0; } && { | |
2098 | test -z "$ac_c_werror_flag" || | |
2099 | test ! -s conftest.err | |
2100 | } && test -s conftest$ac_exeext && { | |
2101 | test "$cross_compiling" = yes || | |
d0ac1c44 | 2102 | test -x conftest$ac_exeext |
2974be62 AM |
2103 | }; then : |
2104 | ac_retval=0 | |
2105 | else | |
2106 | $as_echo "$as_me: failed program was:" >&5 | |
2107 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2108 | ||
2109 | ac_retval=1 | |
2110 | fi | |
2111 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2112 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2113 | # interfere with the next link command; also delete a directory that is | |
2114 | # left behind by Apple's compiler. We do this before executing the actions. | |
2115 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2116 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2117 | as_fn_set_status $ac_retval | |
2974be62 AM |
2118 | |
2119 | } # ac_fn_c_try_link | |
2120 | ||
81ecdfbb RW |
2121 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2122 | # -------------------------------------------- | |
2123 | # Tries to find the compile-time value of EXPR in a program that includes | |
2124 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2125 | # computed | |
2126 | ac_fn_c_compute_int () | |
2127 | { | |
2128 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2129 | if test "$cross_compiling" = yes; then | |
2130 | # Depending upon the size, compute the lo and hi bounds. | |
2131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2132 | /* end confdefs.h. */ | |
2133 | $4 | |
2134 | int | |
2135 | main () | |
2136 | { | |
2137 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2138 | test_array [0] = 0; |
2139 | return test_array [0]; | |
bec39cab | 2140 | |
81ecdfbb RW |
2141 | ; |
2142 | return 0; | |
2143 | } | |
2144 | _ACEOF | |
2145 | if ac_fn_c_try_compile "$LINENO"; then : | |
2146 | ac_lo=0 ac_mid=0 | |
2147 | while :; do | |
2148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2149 | /* end confdefs.h. */ | |
2150 | $4 | |
2151 | int | |
2152 | main () | |
2153 | { | |
2154 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2155 | test_array [0] = 0; |
2156 | return test_array [0]; | |
bec39cab | 2157 | |
81ecdfbb RW |
2158 | ; |
2159 | return 0; | |
2160 | } | |
2161 | _ACEOF | |
2162 | if ac_fn_c_try_compile "$LINENO"; then : | |
2163 | ac_hi=$ac_mid; break | |
2164 | else | |
2165 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2166 | if test $ac_lo -le $ac_mid; then | |
2167 | ac_lo= ac_hi= | |
2168 | break | |
2169 | fi | |
2170 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2171 | fi |
81ecdfbb RW |
2172 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2173 | done | |
c906108c | 2174 | else |
81ecdfbb RW |
2175 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2176 | /* end confdefs.h. */ | |
2177 | $4 | |
2178 | int | |
2179 | main () | |
2180 | { | |
2181 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2182 | test_array [0] = 0; |
2183 | return test_array [0]; | |
bec39cab | 2184 | |
81ecdfbb RW |
2185 | ; |
2186 | return 0; | |
2187 | } | |
2188 | _ACEOF | |
2189 | if ac_fn_c_try_compile "$LINENO"; then : | |
2190 | ac_hi=-1 ac_mid=-1 | |
2191 | while :; do | |
2192 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2193 | /* end confdefs.h. */ | |
2194 | $4 | |
2195 | int | |
2196 | main () | |
2197 | { | |
2198 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2199 | test_array [0] = 0; |
2200 | return test_array [0]; | |
bec39cab | 2201 | |
81ecdfbb RW |
2202 | ; |
2203 | return 0; | |
2204 | } | |
2205 | _ACEOF | |
2206 | if ac_fn_c_try_compile "$LINENO"; then : | |
2207 | ac_lo=$ac_mid; break | |
2208 | else | |
2209 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2210 | if test $ac_mid -le $ac_hi; then | |
2211 | ac_lo= ac_hi= | |
2212 | break | |
2213 | fi | |
2214 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2215 | fi | |
2216 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2217 | done | |
2218 | else | |
2219 | ac_lo= ac_hi= | |
2220 | fi | |
2221 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2222 | fi | |
2223 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2224 | # Binary search between lo and hi bounds. | |
2225 | while test "x$ac_lo" != "x$ac_hi"; do | |
2226 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2228 | /* end confdefs.h. */ | |
2229 | $4 | |
2230 | int | |
2231 | main () | |
2232 | { | |
2233 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2234 | test_array [0] = 0; |
2235 | return test_array [0]; | |
bec39cab | 2236 | |
81ecdfbb RW |
2237 | ; |
2238 | return 0; | |
2239 | } | |
2240 | _ACEOF | |
2241 | if ac_fn_c_try_compile "$LINENO"; then : | |
2242 | ac_hi=$ac_mid | |
2243 | else | |
2244 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2245 | fi | |
2246 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2247 | done | |
2248 | case $ac_lo in #(( | |
2249 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2250 | '') ac_retval=1 ;; | |
2251 | esac | |
2252 | else | |
2253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2254 | /* end confdefs.h. */ | |
2255 | $4 | |
2256 | static long int longval () { return $2; } | |
2257 | static unsigned long int ulongval () { return $2; } | |
2258 | #include <stdio.h> | |
2259 | #include <stdlib.h> | |
2260 | int | |
2261 | main () | |
2262 | { | |
bec39cab | 2263 | |
81ecdfbb RW |
2264 | FILE *f = fopen ("conftest.val", "w"); |
2265 | if (! f) | |
2266 | return 1; | |
2267 | if (($2) < 0) | |
2268 | { | |
2269 | long int i = longval (); | |
2270 | if (i != ($2)) | |
2271 | return 1; | |
2272 | fprintf (f, "%ld", i); | |
2273 | } | |
2274 | else | |
2275 | { | |
2276 | unsigned long int i = ulongval (); | |
2277 | if (i != ($2)) | |
2278 | return 1; | |
2279 | fprintf (f, "%lu", i); | |
2280 | } | |
2281 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2282 | on some platforms. */ | |
2283 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2284 | |
81ecdfbb RW |
2285 | ; |
2286 | return 0; | |
2287 | } | |
2288 | _ACEOF | |
2289 | if ac_fn_c_try_run "$LINENO"; then : | |
2290 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2291 | else | |
2292 | ac_retval=1 | |
2293 | fi | |
2294 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2295 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2296 | rm -f conftest.val | |
bec39cab | 2297 | |
81ecdfbb | 2298 | fi |
d0ac1c44 SM |
2299 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2300 | as_fn_set_status $ac_retval | |
bec39cab | 2301 | |
81ecdfbb | 2302 | } # ac_fn_c_compute_int |
bec39cab | 2303 | |
55a8c076 YQ |
2304 | # ac_fn_c_check_func LINENO FUNC VAR |
2305 | # ---------------------------------- | |
2306 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2307 | ac_fn_c_check_func () | |
81ecdfbb RW |
2308 | { |
2309 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2310 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2311 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2312 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2313 | $as_echo_n "(cached) " >&6 |
2314 | else | |
81ecdfbb RW |
2315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2316 | /* end confdefs.h. */ | |
55a8c076 YQ |
2317 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2318 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2319 | #define $2 innocuous_$2 | |
2320 | ||
2321 | /* System header to define __stub macros and hopefully few prototypes, | |
2322 | which can conflict with char $2 (); below. | |
2323 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2324 | <limits.h> exists even on freestanding compilers. */ | |
2325 | ||
2326 | #ifdef __STDC__ | |
2327 | # include <limits.h> | |
2328 | #else | |
2329 | # include <assert.h> | |
2330 | #endif | |
2331 | ||
2332 | #undef $2 | |
2333 | ||
2334 | /* Override any GCC internal prototype to avoid an error. | |
2335 | Use char because int might match the return type of a GCC | |
2336 | builtin and then its argument prototype would still apply. */ | |
2337 | #ifdef __cplusplus | |
2338 | extern "C" | |
2339 | #endif | |
2340 | char $2 (); | |
2341 | /* The GNU C library defines this for functions which it implements | |
2342 | to always fail with ENOSYS. Some functions are actually named | |
2343 | something starting with __ and the normal name is an alias. */ | |
2344 | #if defined __stub_$2 || defined __stub___$2 | |
2345 | choke me | |
2346 | #endif | |
2347 | ||
2348 | int | |
2349 | main () | |
2350 | { | |
2351 | return $2 (); | |
2352 | ; | |
2353 | return 0; | |
2354 | } | |
2355 | _ACEOF | |
2356 | if ac_fn_c_try_link "$LINENO"; then : | |
2357 | eval "$3=yes" | |
2358 | else | |
2359 | eval "$3=no" | |
2360 | fi | |
2361 | rm -f core conftest.err conftest.$ac_objext \ | |
2362 | conftest$ac_exeext conftest.$ac_ext | |
2363 | fi | |
2364 | eval ac_res=\$$3 | |
2365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2366 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2367 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
55a8c076 YQ |
2368 | |
2369 | } # ac_fn_c_check_func | |
2370 | ||
07697489 PA |
2371 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2372 | # ------------------------------------------- | |
2373 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2374 | # variable VAR accordingly. | |
2375 | ac_fn_c_check_type () | |
2376 | { | |
2377 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2379 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2380 | if eval \${$3+:} false; then : |
07697489 PA |
2381 | $as_echo_n "(cached) " >&6 |
2382 | else | |
2383 | eval "$3=no" | |
2384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2385 | /* end confdefs.h. */ | |
2386 | $4 | |
2387 | int | |
2388 | main () | |
2389 | { | |
2390 | if (sizeof ($2)) | |
2391 | return 0; | |
2392 | ; | |
2393 | return 0; | |
2394 | } | |
2395 | _ACEOF | |
2396 | if ac_fn_c_try_compile "$LINENO"; then : | |
2397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2398 | /* end confdefs.h. */ | |
2399 | $4 | |
2400 | int | |
2401 | main () | |
2402 | { | |
2403 | if (sizeof (($2))) | |
2404 | return 0; | |
2405 | ; | |
2406 | return 0; | |
2407 | } | |
2408 | _ACEOF | |
2409 | if ac_fn_c_try_compile "$LINENO"; then : | |
2410 | ||
2411 | else | |
2412 | eval "$3=yes" | |
2413 | fi | |
2414 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2415 | fi | |
2416 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2417 | fi | |
2418 | eval ac_res=\$$3 | |
2419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2420 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2421 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
07697489 PA |
2422 | |
2423 | } # ac_fn_c_check_type | |
2424 | ||
f6720b1c AM |
2425 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2426 | # --------------------------------------------- | |
2427 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2428 | # accordingly. | |
2429 | ac_fn_c_check_decl () | |
2430 | { | |
2431 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2432 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2433 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2435 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2436 | if eval \${$3+:} false; then : | |
2437 | $as_echo_n "(cached) " >&6 | |
2438 | else | |
2439 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2440 | /* end confdefs.h. */ | |
2441 | $4 | |
2442 | int | |
2443 | main () | |
2444 | { | |
2445 | #ifndef $as_decl_name | |
2446 | #ifdef __cplusplus | |
2447 | (void) $as_decl_use; | |
2448 | #else | |
2449 | (void) $as_decl_name; | |
2450 | #endif | |
2451 | #endif | |
2452 | ||
2453 | ; | |
2454 | return 0; | |
2455 | } | |
2456 | _ACEOF | |
2457 | if ac_fn_c_try_compile "$LINENO"; then : | |
2458 | eval "$3=yes" | |
2459 | else | |
2460 | eval "$3=no" | |
2461 | fi | |
2462 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2463 | fi | |
2464 | eval ac_res=\$$3 | |
2465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2466 | $as_echo "$ac_res" >&6; } | |
2467 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2468 | ||
2469 | } # ac_fn_c_check_decl | |
2470 | ||
05ea2a05 TT |
2471 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2472 | # ---------------------------------------------------- | |
2473 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2474 | # INCLUDES, setting cache variable VAR accordingly. | |
2475 | ac_fn_c_check_member () | |
2476 | { | |
2477 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2479 | $as_echo_n "checking for $2.$3... " >&6; } | |
2480 | if eval \${$4+:} false; then : | |
2481 | $as_echo_n "(cached) " >&6 | |
2482 | else | |
2483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2484 | /* end confdefs.h. */ | |
2485 | $5 | |
2486 | int | |
2487 | main () | |
2488 | { | |
2489 | static $2 ac_aggr; | |
2490 | if (ac_aggr.$3) | |
2491 | return 0; | |
2492 | ; | |
2493 | return 0; | |
2494 | } | |
2495 | _ACEOF | |
2496 | if ac_fn_c_try_compile "$LINENO"; then : | |
2497 | eval "$4=yes" | |
2498 | else | |
2499 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2500 | /* end confdefs.h. */ | |
2501 | $5 | |
2502 | int | |
2503 | main () | |
2504 | { | |
2505 | static $2 ac_aggr; | |
2506 | if (sizeof ac_aggr.$3) | |
2507 | return 0; | |
2508 | ; | |
2509 | return 0; | |
2510 | } | |
2511 | _ACEOF | |
2512 | if ac_fn_c_try_compile "$LINENO"; then : | |
2513 | eval "$4=yes" | |
2514 | else | |
2515 | eval "$4=no" | |
2516 | fi | |
2517 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2518 | fi | |
2519 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2520 | fi | |
2521 | eval ac_res=\$$4 | |
2522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2523 | $as_echo "$ac_res" >&6; } | |
2524 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2525 | ||
2526 | } # ac_fn_c_check_member | |
2527 | ||
f35d5ade TT |
2528 | # ac_fn_cxx_try_link LINENO |
2529 | # ------------------------- | |
2530 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2531 | ac_fn_cxx_try_link () | |
2532 | { | |
2533 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2534 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2535 | if { { ac_try="$ac_link" | |
2536 | case "(($ac_try" in | |
2537 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2538 | *) ac_try_echo=$ac_try;; | |
2539 | esac | |
2540 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2541 | $as_echo "$ac_try_echo"; } >&5 | |
2542 | (eval "$ac_link") 2>conftest.err | |
2543 | ac_status=$? | |
2544 | if test -s conftest.err; then | |
2545 | grep -v '^ *+' conftest.err >conftest.er1 | |
2546 | cat conftest.er1 >&5 | |
2547 | mv -f conftest.er1 conftest.err | |
2548 | fi | |
2549 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2550 | test $ac_status = 0; } && { | |
2551 | test -z "$ac_cxx_werror_flag" || | |
2552 | test ! -s conftest.err | |
2553 | } && test -s conftest$ac_exeext && { | |
2554 | test "$cross_compiling" = yes || | |
2555 | test -x conftest$ac_exeext | |
2556 | }; then : | |
2557 | ac_retval=0 | |
2558 | else | |
2559 | $as_echo "$as_me: failed program was:" >&5 | |
2560 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2561 | ||
2562 | ac_retval=1 | |
2563 | fi | |
2564 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2565 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2566 | # interfere with the next link command; also delete a directory that is | |
2567 | # left behind by Apple's compiler. We do this before executing the actions. | |
2568 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2569 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2570 | as_fn_set_status $ac_retval | |
2571 | ||
2572 | } # ac_fn_cxx_try_link | |
21987b9c TT |
2573 | |
2574 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2575 | # ------------------------------------ | |
2576 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2577 | ac_fn_cxx_check_func () | |
2578 | { | |
2579 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2581 | $as_echo_n "checking for $2... " >&6; } | |
2582 | if eval \${$3+:} false; then : | |
2583 | $as_echo_n "(cached) " >&6 | |
2584 | else | |
2585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2586 | /* end confdefs.h. */ | |
2587 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2588 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2589 | #define $2 innocuous_$2 | |
2590 | ||
2591 | /* System header to define __stub macros and hopefully few prototypes, | |
2592 | which can conflict with char $2 (); below. | |
2593 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2594 | <limits.h> exists even on freestanding compilers. */ | |
2595 | ||
2596 | #ifdef __STDC__ | |
2597 | # include <limits.h> | |
2598 | #else | |
2599 | # include <assert.h> | |
2600 | #endif | |
2601 | ||
2602 | #undef $2 | |
2603 | ||
2604 | /* Override any GCC internal prototype to avoid an error. | |
2605 | Use char because int might match the return type of a GCC | |
2606 | builtin and then its argument prototype would still apply. */ | |
2607 | #ifdef __cplusplus | |
2608 | extern "C" | |
2609 | #endif | |
2610 | char $2 (); | |
2611 | /* The GNU C library defines this for functions which it implements | |
2612 | to always fail with ENOSYS. Some functions are actually named | |
2613 | something starting with __ and the normal name is an alias. */ | |
2614 | #if defined __stub_$2 || defined __stub___$2 | |
2615 | choke me | |
2616 | #endif | |
2617 | ||
2618 | int | |
2619 | main () | |
2620 | { | |
2621 | return $2 (); | |
2622 | ; | |
2623 | return 0; | |
2624 | } | |
2625 | _ACEOF | |
2626 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2627 | eval "$3=yes" | |
2628 | else | |
2629 | eval "$3=no" | |
2630 | fi | |
2631 | rm -f core conftest.err conftest.$ac_objext \ | |
2632 | conftest$ac_exeext conftest.$ac_ext | |
2633 | fi | |
2634 | eval ac_res=\$$3 | |
2635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2636 | $as_echo "$ac_res" >&6; } | |
2637 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2638 | ||
2639 | } # ac_fn_cxx_check_func | |
81ecdfbb RW |
2640 | cat >config.log <<_ACEOF |
2641 | This file contains any messages produced by compilers while | |
2642 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2643 | |
81ecdfbb | 2644 | It was created by $as_me, which was |
d0ac1c44 | 2645 | generated by GNU Autoconf 2.69. Invocation command line was |
b4e70030 | 2646 | |
81ecdfbb | 2647 | $ $0 $@ |
413ccac7 | 2648 | |
81ecdfbb RW |
2649 | _ACEOF |
2650 | exec 5>>config.log | |
2651 | { | |
2652 | cat <<_ASUNAME | |
2653 | ## --------- ## | |
2654 | ## Platform. ## | |
2655 | ## --------- ## | |
413ccac7 | 2656 | |
81ecdfbb RW |
2657 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2658 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2659 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2660 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2661 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2662 | |
81ecdfbb RW |
2663 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2664 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2665 | |
81ecdfbb RW |
2666 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2667 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2668 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2669 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2670 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2671 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2672 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2673 | |
81ecdfbb | 2674 | _ASUNAME |
bec39cab | 2675 | |
bec39cab AC |
2676 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2677 | for as_dir in $PATH | |
2678 | do | |
2679 | IFS=$as_save_IFS | |
2680 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2681 | $as_echo "PATH: $as_dir" |
2682 | done | |
2683 | IFS=$as_save_IFS | |
bec39cab | 2684 | |
81ecdfbb | 2685 | } >&5 |
bec39cab | 2686 | |
81ecdfbb | 2687 | cat >&5 <<_ACEOF |
bec39cab | 2688 | |
bec39cab | 2689 | |
81ecdfbb RW |
2690 | ## ----------- ## |
2691 | ## Core tests. ## | |
2692 | ## ----------- ## | |
2693 | ||
2694 | _ACEOF | |
2695 | ||
2696 | ||
2697 | # Keep a trace of the command line. | |
2698 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2699 | # Strip out --silent because we don't want to record it for future runs. | |
2700 | # Also quote any args containing shell meta-characters. | |
2701 | # Make two passes to allow for proper duplicate-argument suppression. | |
2702 | ac_configure_args= | |
2703 | ac_configure_args0= | |
2704 | ac_configure_args1= | |
2705 | ac_must_keep_next=false | |
2706 | for ac_pass in 1 2 | |
2707 | do | |
2708 | for ac_arg | |
2709 | do | |
2710 | case $ac_arg in | |
2711 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2712 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2713 | | -silent | --silent | --silen | --sile | --sil) | |
2714 | continue ;; | |
2715 | *\'*) | |
2716 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2717 | esac | |
2718 | case $ac_pass in | |
2719 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2720 | 2) | |
2721 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2722 | if test $ac_must_keep_next = true; then | |
2723 | ac_must_keep_next=false # Got value, back to normal. | |
2724 | else | |
2725 | case $ac_arg in | |
2726 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2727 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2728 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2729 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2730 | case "$ac_configure_args0 " in | |
2731 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2732 | esac | |
2733 | ;; | |
2734 | -* ) ac_must_keep_next=true ;; | |
2735 | esac | |
2736 | fi | |
2737 | as_fn_append ac_configure_args " '$ac_arg'" | |
2738 | ;; | |
2739 | esac | |
2740 | done | |
2741 | done | |
2742 | { ac_configure_args0=; unset ac_configure_args0;} | |
2743 | { ac_configure_args1=; unset ac_configure_args1;} | |
2744 | ||
2745 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2746 | # config.log. We remove comments because anyway the quotes in there | |
2747 | # would cause problems or look ugly. | |
2748 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2749 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2750 | trap 'exit_status=$? | |
2751 | # Save into config.log some information that might help in debugging. | |
2752 | { | |
2753 | echo | |
2754 | ||
d0ac1c44 | 2755 | $as_echo "## ---------------- ## |
81ecdfbb | 2756 | ## Cache variables. ## |
d0ac1c44 | 2757 | ## ---------------- ##" |
81ecdfbb RW |
2758 | echo |
2759 | # The following way of writing the cache mishandles newlines in values, | |
2760 | ( | |
2761 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2762 | eval ac_val=\$$ac_var | |
2763 | case $ac_val in #( | |
2764 | *${as_nl}*) | |
2765 | case $ac_var in #( | |
2766 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2767 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2768 | esac | |
2769 | case $ac_var in #( | |
2770 | _ | IFS | as_nl) ;; #( | |
2771 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2772 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2773 | esac ;; | |
2774 | esac | |
2775 | done | |
2776 | (set) 2>&1 | | |
2777 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2778 | *${as_nl}ac_space=\ *) | |
2779 | sed -n \ | |
2780 | "s/'\''/'\''\\\\'\'''\''/g; | |
2781 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2782 | ;; #( | |
2783 | *) | |
2784 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2785 | ;; | |
2786 | esac | | |
2787 | sort | |
2788 | ) | |
2789 | echo | |
2790 | ||
d0ac1c44 | 2791 | $as_echo "## ----------------- ## |
81ecdfbb | 2792 | ## Output variables. ## |
d0ac1c44 | 2793 | ## ----------------- ##" |
81ecdfbb RW |
2794 | echo |
2795 | for ac_var in $ac_subst_vars | |
2796 | do | |
2797 | eval ac_val=\$$ac_var | |
2798 | case $ac_val in | |
2799 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2800 | esac | |
2801 | $as_echo "$ac_var='\''$ac_val'\''" | |
2802 | done | sort | |
2803 | echo | |
2804 | ||
2805 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2806 | $as_echo "## ------------------- ## |
81ecdfbb | 2807 | ## File substitutions. ## |
d0ac1c44 | 2808 | ## ------------------- ##" |
81ecdfbb RW |
2809 | echo |
2810 | for ac_var in $ac_subst_files | |
2811 | do | |
2812 | eval ac_val=\$$ac_var | |
2813 | case $ac_val in | |
2814 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2815 | esac | |
2816 | $as_echo "$ac_var='\''$ac_val'\''" | |
2817 | done | sort | |
2818 | echo | |
2819 | fi | |
2820 | ||
2821 | if test -s confdefs.h; then | |
d0ac1c44 | 2822 | $as_echo "## ----------- ## |
81ecdfbb | 2823 | ## confdefs.h. ## |
d0ac1c44 | 2824 | ## ----------- ##" |
81ecdfbb RW |
2825 | echo |
2826 | cat confdefs.h | |
2827 | echo | |
2828 | fi | |
2829 | test "$ac_signal" != 0 && | |
2830 | $as_echo "$as_me: caught signal $ac_signal" | |
2831 | $as_echo "$as_me: exit $exit_status" | |
2832 | } >&5 | |
2833 | rm -f core *.core core.conftest.* && | |
2834 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2835 | exit $exit_status | |
2836 | ' 0 | |
2837 | for ac_signal in 1 2 13 15; do | |
2838 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2839 | done | |
2840 | ac_signal=0 | |
2841 | ||
2842 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2843 | rm -f -r conftest* confdefs.h | |
2844 | ||
2845 | $as_echo "/* confdefs.h */" > confdefs.h | |
2846 | ||
2847 | # Predefined preprocessor variables. | |
2848 | ||
2849 | cat >>confdefs.h <<_ACEOF | |
2850 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2851 | _ACEOF | |
2852 | ||
2853 | cat >>confdefs.h <<_ACEOF | |
2854 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2855 | _ACEOF | |
2856 | ||
2857 | cat >>confdefs.h <<_ACEOF | |
2858 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2859 | _ACEOF | |
2860 | ||
2861 | cat >>confdefs.h <<_ACEOF | |
2862 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2863 | _ACEOF | |
2864 | ||
2865 | cat >>confdefs.h <<_ACEOF | |
2866 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2867 | _ACEOF | |
2868 | ||
2869 | cat >>confdefs.h <<_ACEOF | |
2870 | #define PACKAGE_URL "$PACKAGE_URL" | |
2871 | _ACEOF | |
2872 | ||
2873 | ||
2874 | # Let the site file select an alternate cache file if it wants to. | |
2875 | # Prefer an explicitly selected file to automatically selected ones. | |
2876 | ac_site_file1=NONE | |
2877 | ac_site_file2=NONE | |
2878 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2879 | # We do not want a PATH search for config.site. |
2880 | case $CONFIG_SITE in #(( | |
2881 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2882 | */*) ac_site_file1=$CONFIG_SITE;; | |
2883 | *) ac_site_file1=./$CONFIG_SITE;; | |
2884 | esac | |
81ecdfbb RW |
2885 | elif test "x$prefix" != xNONE; then |
2886 | ac_site_file1=$prefix/share/config.site | |
2887 | ac_site_file2=$prefix/etc/config.site | |
2888 | else | |
2889 | ac_site_file1=$ac_default_prefix/share/config.site | |
2890 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2891 | fi | |
2892 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2893 | do | |
2894 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2895 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2896 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2897 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2898 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
2899 | . "$ac_site_file" \ |
2900 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2901 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2902 | as_fn_error $? "failed to load site script $ac_site_file | |
2903 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
2904 | fi |
2905 | done | |
2906 | ||
2907 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2908 | # Some versions of bash will fail to source /dev/null (special files |
2909 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2910 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2911 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2912 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2913 | case $cache_file in | |
2914 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2915 | *) . "./$cache_file";; | |
2916 | esac | |
2917 | fi | |
2918 | else | |
2919 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2920 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2921 | >$cache_file | |
bec39cab AC |
2922 | fi |
2923 | ||
d0ac1c44 SM |
2924 | as_fn_append ac_header_list " stdlib.h" |
2925 | as_fn_append ac_header_list " unistd.h" | |
2926 | as_fn_append ac_header_list " sys/param.h" | |
81ecdfbb RW |
2927 | # Check that the precious variables saved in the cache have kept the same |
2928 | # value. | |
2929 | ac_cache_corrupted=false | |
2930 | for ac_var in $ac_precious_vars; do | |
2931 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2932 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2933 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2934 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2935 | case $ac_old_set,$ac_new_set in | |
2936 | set,) | |
2937 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2938 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2939 | ac_cache_corrupted=: ;; | |
2940 | ,set) | |
2941 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2942 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2943 | ac_cache_corrupted=: ;; | |
2944 | ,);; | |
2945 | *) | |
2946 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2947 | # differences in whitespace do not lead to failure. | |
2948 | ac_old_val_w=`echo x $ac_old_val` | |
2949 | ac_new_val_w=`echo x $ac_new_val` | |
2950 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2951 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2952 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2953 | ac_cache_corrupted=: | |
2954 | else | |
2955 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2956 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2957 | eval $ac_var=\$ac_old_val | |
2958 | fi | |
2959 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2960 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2961 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2962 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2963 | fi;; | |
2964 | esac | |
2965 | # Pass precious variables to config.status. | |
2966 | if test "$ac_new_set" = set; then | |
2967 | case $ac_new_val in | |
2968 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2969 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2970 | esac | |
2971 | case " $ac_configure_args " in | |
2972 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2973 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2974 | esac | |
2975 | fi | |
2976 | done | |
2977 | if $ac_cache_corrupted; then | |
2978 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2979 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2980 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2981 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2982 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
81ecdfbb RW |
2983 | fi |
2984 | ## -------------------- ## | |
2985 | ## Main body of script. ## | |
2986 | ## -------------------- ## | |
2987 | ||
2988 | ac_ext=c | |
2989 | ac_cpp='$CPP $CPPFLAGS' | |
2990 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2991 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2992 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2993 | ||
2994 | ||
2995 | ||
2996 | ||
2997 | ||
5593a99a | 2998 | |
81ecdfbb RW |
2999 | ac_config_headers="$ac_config_headers config.h:config.in" |
3000 | ||
3001 | ||
3002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
3003 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
3004 | # Check whether --enable-maintainer-mode was given. | |
3005 | if test "${enable_maintainer_mode+set}" = set; then : | |
3006 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3007 | else | |
3008 | USE_MAINTAINER_MODE=no | |
3009 | fi | |
3010 | ||
3011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
3012 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
3013 | if test $USE_MAINTAINER_MODE = yes; then | |
3014 | MAINTAINER_MODE_TRUE= | |
3015 | MAINTAINER_MODE_FALSE='#' | |
3016 | else | |
3017 | MAINTAINER_MODE_TRUE='#' | |
3018 | MAINTAINER_MODE_FALSE= | |
3019 | fi | |
3020 | ||
3021 | MAINT=$MAINTAINER_MODE_TRUE | |
3022 | ||
3023 | ||
3024 | ||
3025 | ac_ext=c | |
3026 | ac_cpp='$CPP $CPPFLAGS' | |
3027 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3028 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3029 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3030 | if test -n "$ac_tool_prefix"; then | |
3031 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3032 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3033 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3034 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3035 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3036 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3037 | else |
3038 | if test -n "$CC"; then | |
3039 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3040 | else | |
bec39cab AC |
3041 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3042 | for as_dir in $PATH | |
3043 | do | |
3044 | IFS=$as_save_IFS | |
3045 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3046 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3047 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3048 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
3049 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3050 | break 2 |
3051 | fi | |
3052 | done | |
81ecdfbb RW |
3053 | done |
3054 | IFS=$as_save_IFS | |
bec39cab | 3055 | |
c906108c SS |
3056 | fi |
3057 | fi | |
bec39cab | 3058 | CC=$ac_cv_prog_CC |
c906108c | 3059 | if test -n "$CC"; then |
81ecdfbb RW |
3060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3061 | $as_echo "$CC" >&6; } | |
c906108c | 3062 | else |
81ecdfbb RW |
3063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3064 | $as_echo "no" >&6; } | |
c906108c SS |
3065 | fi |
3066 | ||
81ecdfbb | 3067 | |
b4e70030 JB |
3068 | fi |
3069 | if test -z "$ac_cv_prog_CC"; then | |
3070 | ac_ct_CC=$CC | |
81ecdfbb RW |
3071 | # Extract the first word of "gcc", so it can be a program name with args. |
3072 | set dummy gcc; ac_word=$2 | |
3073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3074 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3075 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3076 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
3077 | else |
3078 | if test -n "$ac_ct_CC"; then | |
3079 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3080 | else | |
3081 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3082 | for as_dir in $PATH | |
3083 | do | |
3084 | IFS=$as_save_IFS | |
3085 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3086 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3087 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3088 | ac_cv_prog_ac_ct_CC="gcc" |
3089 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 3090 | break 2 |
4e8d927d | 3091 | fi |
b4e70030 | 3092 | done |
81ecdfbb RW |
3093 | done |
3094 | IFS=$as_save_IFS | |
b4e70030 JB |
3095 | |
3096 | fi | |
3097 | fi | |
3098 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3099 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3101 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 3102 | else |
81ecdfbb RW |
3103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3104 | $as_echo "no" >&6; } | |
b4e70030 JB |
3105 | fi |
3106 | ||
81ecdfbb RW |
3107 | if test "x$ac_ct_CC" = x; then |
3108 | CC="" | |
3109 | else | |
3110 | case $cross_compiling:$ac_tool_warned in | |
3111 | yes:) | |
3112 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3113 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3114 | ac_tool_warned=yes ;; | |
3115 | esac | |
3116 | CC=$ac_ct_CC | |
3117 | fi | |
b4e70030 JB |
3118 | else |
3119 | CC="$ac_cv_prog_CC" | |
3120 | fi | |
3121 | ||
c906108c | 3122 | if test -z "$CC"; then |
81ecdfbb RW |
3123 | if test -n "$ac_tool_prefix"; then |
3124 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3125 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3127 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3128 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3129 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3130 | else |
3131 | if test -n "$CC"; then | |
3132 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3133 | else | |
bec39cab AC |
3134 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3135 | for as_dir in $PATH | |
3136 | do | |
3137 | IFS=$as_save_IFS | |
3138 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3139 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3140 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3141 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
3142 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3143 | break 2 |
3144 | fi | |
3145 | done | |
81ecdfbb RW |
3146 | done |
3147 | IFS=$as_save_IFS | |
3148 | ||
3149 | fi | |
3150 | fi | |
3151 | CC=$ac_cv_prog_CC | |
3152 | if test -n "$CC"; then | |
3153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3154 | $as_echo "$CC" >&6; } | |
3155 | else | |
3156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3157 | $as_echo "no" >&6; } | |
3158 | fi | |
3159 | ||
3160 | ||
3161 | fi | |
3162 | fi | |
3163 | if test -z "$CC"; then | |
3164 | # Extract the first word of "cc", so it can be a program name with args. | |
3165 | set dummy cc; ac_word=$2 | |
3166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3167 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3168 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb RW |
3169 | $as_echo_n "(cached) " >&6 |
3170 | else | |
3171 | if test -n "$CC"; then | |
3172 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3173 | else | |
3174 | ac_prog_rejected=no | |
3175 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3176 | for as_dir in $PATH | |
3177 | do | |
3178 | IFS=$as_save_IFS | |
3179 | test -z "$as_dir" && as_dir=. | |
3180 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3181 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3182 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3183 | ac_prog_rejected=yes | |
3184 | continue | |
3185 | fi | |
3186 | ac_cv_prog_CC="cc" | |
3187 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3188 | break 2 | |
3189 | fi | |
3190 | done | |
3191 | done | |
3192 | IFS=$as_save_IFS | |
bec39cab | 3193 | |
c906108c SS |
3194 | if test $ac_prog_rejected = yes; then |
3195 | # We found a bogon in the path, so make sure we never use it. | |
3196 | set dummy $ac_cv_prog_CC | |
3197 | shift | |
bec39cab | 3198 | if test $# != 0; then |
c906108c SS |
3199 | # We chose a different compiler from the bogus one. |
3200 | # However, it has the same basename, so the bogon will be chosen | |
3201 | # first if we set CC to just the basename; use the full file name. | |
3202 | shift | |
bec39cab | 3203 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3204 | fi |
3205 | fi | |
3206 | fi | |
3207 | fi | |
bec39cab | 3208 | CC=$ac_cv_prog_CC |
c906108c | 3209 | if test -n "$CC"; then |
81ecdfbb RW |
3210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3211 | $as_echo "$CC" >&6; } | |
c906108c | 3212 | else |
81ecdfbb RW |
3213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3214 | $as_echo "no" >&6; } | |
c906108c SS |
3215 | fi |
3216 | ||
81ecdfbb | 3217 | |
bec39cab AC |
3218 | fi |
3219 | if test -z "$CC"; then | |
3220 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3221 | for ac_prog in cl.exe |
bec39cab AC |
3222 | do |
3223 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3224 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3226 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3227 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3228 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3229 | else |
3230 | if test -n "$CC"; then | |
3231 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3232 | else | |
bec39cab AC |
3233 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3234 | for as_dir in $PATH | |
3235 | do | |
3236 | IFS=$as_save_IFS | |
3237 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3238 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3239 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3240 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3241 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3242 | break 2 |
3243 | fi | |
3244 | done | |
81ecdfbb RW |
3245 | done |
3246 | IFS=$as_save_IFS | |
bec39cab | 3247 | |
c906108c SS |
3248 | fi |
3249 | fi | |
bec39cab | 3250 | CC=$ac_cv_prog_CC |
c906108c | 3251 | if test -n "$CC"; then |
81ecdfbb RW |
3252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3253 | $as_echo "$CC" >&6; } | |
c906108c | 3254 | else |
81ecdfbb RW |
3255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3256 | $as_echo "no" >&6; } | |
c906108c | 3257 | fi |
bec39cab | 3258 | |
81ecdfbb | 3259 | |
bec39cab AC |
3260 | test -n "$CC" && break |
3261 | done | |
3262 | fi | |
3263 | if test -z "$CC"; then | |
3264 | ac_ct_CC=$CC | |
81ecdfbb | 3265 | for ac_prog in cl.exe |
bec39cab AC |
3266 | do |
3267 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3268 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3270 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3271 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3272 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3273 | else |
3274 | if test -n "$ac_ct_CC"; then | |
3275 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3276 | else | |
3277 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3278 | for as_dir in $PATH | |
3279 | do | |
3280 | IFS=$as_save_IFS | |
3281 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3282 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3283 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3284 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3285 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3286 | break 2 |
c906108c | 3287 | fi |
bec39cab | 3288 | done |
81ecdfbb RW |
3289 | done |
3290 | IFS=$as_save_IFS | |
bec39cab AC |
3291 | |
3292 | fi | |
3293 | fi | |
3294 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3295 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3296 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3297 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3298 | else |
81ecdfbb RW |
3299 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3300 | $as_echo "no" >&6; } | |
c906108c SS |
3301 | fi |
3302 | ||
81ecdfbb | 3303 | |
bec39cab AC |
3304 | test -n "$ac_ct_CC" && break |
3305 | done | |
c906108c | 3306 | |
81ecdfbb RW |
3307 | if test "x$ac_ct_CC" = x; then |
3308 | CC="" | |
3309 | else | |
3310 | case $cross_compiling:$ac_tool_warned in | |
3311 | yes:) | |
3312 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3313 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3314 | ac_tool_warned=yes ;; | |
3315 | esac | |
3316 | CC=$ac_ct_CC | |
3317 | fi | |
bec39cab AC |
3318 | fi |
3319 | ||
3320 | fi | |
3321 | ||
3322 | ||
81ecdfbb RW |
3323 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3324 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3325 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3326 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3327 | |
3328 | # Provide some information about the compiler. | |
81ecdfbb RW |
3329 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3330 | set X $ac_compile | |
3331 | ac_compiler=$2 | |
3332 | for ac_option in --version -v -V -qversion; do | |
3333 | { { ac_try="$ac_compiler $ac_option >&5" | |
3334 | case "(($ac_try" in | |
3335 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3336 | *) ac_try_echo=$ac_try;; | |
3337 | esac | |
3338 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3339 | $as_echo "$ac_try_echo"; } >&5 | |
3340 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3341 | ac_status=$? |
81ecdfbb RW |
3342 | if test -s conftest.err; then |
3343 | sed '10a\ | |
3344 | ... rest of stderr output deleted ... | |
3345 | 10q' conftest.err >conftest.er1 | |
3346 | cat conftest.er1 >&5 | |
81ecdfbb | 3347 | fi |
d0ac1c44 | 3348 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3349 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3350 | test $ac_status = 0; } | |
3351 | done | |
bec39cab | 3352 | |
81ecdfbb | 3353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3354 | /* end confdefs.h. */ |
3355 | ||
3356 | int | |
3357 | main () | |
3358 | { | |
3359 | ||
3360 | ; | |
3361 | return 0; | |
3362 | } | |
3363 | _ACEOF | |
3364 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3365 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3366 | # Try to create an executable without -o first, disregard a.out. |
3367 | # It will help us diagnose broken compilers, and finding out an intuition | |
3368 | # of exeext. | |
d0ac1c44 SM |
3369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3370 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3371 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3372 | ||
3373 | # The possible output files: | |
3374 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3375 | ||
3376 | ac_rmfiles= | |
3377 | for ac_file in $ac_files | |
3378 | do | |
3379 | case $ac_file in | |
3380 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3381 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3382 | esac | |
3383 | done | |
3384 | rm -f $ac_rmfiles | |
3385 | ||
3386 | if { { ac_try="$ac_link_default" | |
3387 | case "(($ac_try" in | |
3388 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3389 | *) ac_try_echo=$ac_try;; | |
3390 | esac | |
3391 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3392 | $as_echo "$ac_try_echo"; } >&5 | |
3393 | (eval "$ac_link_default") 2>&5 | |
3394 | ac_status=$? | |
3395 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3396 | test $ac_status = 0; }; then : | |
3397 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3398 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3399 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3400 | # so that the user can short-circuit this test for compilers unknown to | |
3401 | # Autoconf. | |
3402 | for ac_file in $ac_files '' | |
bec39cab AC |
3403 | do |
3404 | test -f "$ac_file" || continue | |
3405 | case $ac_file in | |
81ecdfbb | 3406 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3407 | ;; |
3408 | [ab].out ) | |
3409 | # We found the default executable, but exeext='' is most | |
3410 | # certainly right. | |
3411 | break;; | |
3412 | *.* ) | |
81ecdfbb RW |
3413 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3414 | then :; else | |
3415 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3416 | fi | |
3417 | # We set ac_cv_exeext here because the later test for it is not | |
3418 | # safe: cross compilers may not add the suffix if given an `-o' | |
3419 | # argument, so we may need to know it at that point already. | |
3420 | # Even if this section looks crufty: it has the advantage of | |
3421 | # actually working. | |
b4e70030 JB |
3422 | break;; |
3423 | * ) | |
3424 | break;; | |
bec39cab AC |
3425 | esac |
3426 | done | |
81ecdfbb RW |
3427 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3428 | ||
bec39cab | 3429 | else |
81ecdfbb RW |
3430 | ac_file='' |
3431 | fi | |
81ecdfbb | 3432 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3434 | $as_echo "no" >&6; } | |
3435 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3436 | sed 's/^/| /' conftest.$ac_ext >&5 |
3437 | ||
81ecdfbb RW |
3438 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3439 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3440 | as_fn_error 77 "C compiler cannot create executables |
3441 | See \`config.log' for more details" "$LINENO" 5; } | |
3442 | else | |
3443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3444 | $as_echo "yes" >&6; } | |
bec39cab | 3445 | fi |
d0ac1c44 SM |
3446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3447 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3449 | $as_echo "$ac_file" >&6; } | |
b4e70030 | 3450 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3451 | |
d0ac1c44 | 3452 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
b4e70030 | 3453 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3455 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3456 | if { { ac_try="$ac_link" | |
3457 | case "(($ac_try" in | |
3458 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3459 | *) ac_try_echo=$ac_try;; | |
3460 | esac | |
3461 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3462 | $as_echo "$ac_try_echo"; } >&5 | |
3463 | (eval "$ac_link") 2>&5 | |
bec39cab | 3464 | ac_status=$? |
81ecdfbb RW |
3465 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3466 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3467 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3468 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3469 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3470 | # `rm'. | |
3471 | for ac_file in conftest.exe conftest conftest.*; do | |
3472 | test -f "$ac_file" || continue | |
3473 | case $ac_file in | |
81ecdfbb | 3474 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3475 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3476 | break;; |
3477 | * ) break;; | |
3478 | esac | |
3479 | done | |
c906108c | 3480 | else |
81ecdfbb RW |
3481 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3482 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3483 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3484 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3485 | fi |
d0ac1c44 | 3486 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3488 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3489 | |
b4e70030 | 3490 | rm -f conftest.$ac_ext |
bec39cab AC |
3491 | EXEEXT=$ac_cv_exeext |
3492 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3494 | /* end confdefs.h. */ | |
3495 | #include <stdio.h> | |
3496 | int | |
3497 | main () | |
3498 | { | |
3499 | FILE *f = fopen ("conftest.out", "w"); | |
3500 | return ferror (f) || fclose (f) != 0; | |
3501 | ||
3502 | ; | |
3503 | return 0; | |
3504 | } | |
3505 | _ACEOF | |
3506 | ac_clean_files="$ac_clean_files conftest.out" | |
3507 | # Check that the compiler produces executables we can run. If not, either | |
3508 | # the compiler is broken, or we cross compile. | |
3509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3510 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3511 | if test "$cross_compiling" != yes; then | |
3512 | { { ac_try="$ac_link" | |
3513 | case "(($ac_try" in | |
3514 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3515 | *) ac_try_echo=$ac_try;; | |
3516 | esac | |
3517 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3518 | $as_echo "$ac_try_echo"; } >&5 | |
3519 | (eval "$ac_link") 2>&5 | |
3520 | ac_status=$? | |
3521 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3522 | test $ac_status = 0; } | |
3523 | if { ac_try='./conftest$ac_cv_exeext' | |
3524 | { { case "(($ac_try" in | |
3525 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3526 | *) ac_try_echo=$ac_try;; | |
3527 | esac | |
3528 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3529 | $as_echo "$ac_try_echo"; } >&5 | |
3530 | (eval "$ac_try") 2>&5 | |
3531 | ac_status=$? | |
3532 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3533 | test $ac_status = 0; }; }; then | |
3534 | cross_compiling=no | |
3535 | else | |
3536 | if test "$cross_compiling" = maybe; then | |
3537 | cross_compiling=yes | |
3538 | else | |
3539 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3540 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3541 | as_fn_error $? "cannot run C compiled programs. | |
3542 | If you meant to cross compile, use \`--host'. | |
3543 | See \`config.log' for more details" "$LINENO" 5; } | |
3544 | fi | |
3545 | fi | |
3546 | fi | |
3547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3548 | $as_echo "$cross_compiling" >&6; } | |
3549 | ||
3550 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3551 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3553 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3554 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3555 | $as_echo_n "(cached) " >&6 |
bec39cab | 3556 | else |
81ecdfbb | 3557 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3558 | /* end confdefs.h. */ |
3559 | ||
3560 | int | |
3561 | main () | |
3562 | { | |
3563 | ||
3564 | ; | |
3565 | return 0; | |
3566 | } | |
3567 | _ACEOF | |
3568 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3569 | if { { ac_try="$ac_compile" |
3570 | case "(($ac_try" in | |
3571 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3572 | *) ac_try_echo=$ac_try;; | |
3573 | esac | |
3574 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3575 | $as_echo "$ac_try_echo"; } >&5 | |
3576 | (eval "$ac_compile") 2>&5 | |
3577 | ac_status=$? | |
3578 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3579 | test $ac_status = 0; }; then : | |
3580 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3581 | test -f "$ac_file" || continue; | |
bec39cab | 3582 | case $ac_file in |
81ecdfbb | 3583 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3584 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3585 | break;; | |
3586 | esac | |
3587 | done | |
c906108c | 3588 | else |
81ecdfbb | 3589 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3590 | sed 's/^/| /' conftest.$ac_ext >&5 |
3591 | ||
81ecdfbb RW |
3592 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3593 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3594 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3595 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3596 | fi |
b4e70030 | 3597 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3598 | fi |
81ecdfbb RW |
3599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3600 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3601 | OBJEXT=$ac_cv_objext |
3602 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3604 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3605 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3606 | $as_echo_n "(cached) " >&6 |
c906108c | 3607 | else |
81ecdfbb | 3608 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3609 | /* end confdefs.h. */ |
3610 | ||
3611 | int | |
3612 | main () | |
3613 | { | |
3614 | #ifndef __GNUC__ | |
3615 | choke me | |
3616 | #endif | |
3617 | ||
3618 | ; | |
3619 | return 0; | |
3620 | } | |
3621 | _ACEOF | |
81ecdfbb | 3622 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3623 | ac_compiler_gnu=yes |
3624 | else | |
81ecdfbb | 3625 | ac_compiler_gnu=no |
bec39cab | 3626 | fi |
81ecdfbb | 3627 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3628 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3629 | ||
3630 | fi | |
81ecdfbb RW |
3631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3632 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3633 | if test $ac_compiler_gnu = yes; then | |
3634 | GCC=yes | |
3635 | else | |
3636 | GCC= | |
3637 | fi | |
bec39cab AC |
3638 | ac_test_CFLAGS=${CFLAGS+set} |
3639 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3640 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3641 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3642 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb | 3643 | $as_echo_n "(cached) " >&6 |
bec39cab | 3644 | else |
81ecdfbb RW |
3645 | ac_save_c_werror_flag=$ac_c_werror_flag |
3646 | ac_c_werror_flag=yes | |
3647 | ac_cv_prog_cc_g=no | |
3648 | CFLAGS="-g" | |
3649 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3650 | /* end confdefs.h. */ |
3651 | ||
3652 | int | |
3653 | main () | |
3654 | { | |
3655 | ||
3656 | ; | |
3657 | return 0; | |
3658 | } | |
3659 | _ACEOF | |
81ecdfbb | 3660 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3661 | ac_cv_prog_cc_g=yes |
3662 | else | |
81ecdfbb RW |
3663 | CFLAGS="" |
3664 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3665 | /* end confdefs.h. */ | |
3666 | ||
3667 | int | |
3668 | main () | |
3669 | { | |
3670 | ||
3671 | ; | |
3672 | return 0; | |
3673 | } | |
3674 | _ACEOF | |
3675 | if ac_fn_c_try_compile "$LINENO"; then : | |
3676 | ||
3677 | else | |
3678 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3679 | CFLAGS="-g" | |
3680 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3681 | /* end confdefs.h. */ | |
3682 | ||
3683 | int | |
3684 | main () | |
3685 | { | |
c906108c | 3686 | |
81ecdfbb RW |
3687 | ; |
3688 | return 0; | |
3689 | } | |
3690 | _ACEOF | |
3691 | if ac_fn_c_try_compile "$LINENO"; then : | |
3692 | ac_cv_prog_cc_g=yes | |
3693 | fi | |
3694 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3695 | fi | |
3696 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3697 | fi |
81ecdfbb RW |
3698 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3699 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3700 | fi |
81ecdfbb RW |
3701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3702 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3703 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3704 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3705 | elif test $ac_cv_prog_cc_g = yes; then |
3706 | if test "$GCC" = yes; then | |
3707 | CFLAGS="-g -O2" | |
3708 | else | |
3709 | CFLAGS="-g" | |
3710 | fi | |
3711 | else | |
3712 | if test "$GCC" = yes; then | |
3713 | CFLAGS="-O2" | |
3714 | else | |
3715 | CFLAGS= | |
3716 | fi | |
3717 | fi | |
81ecdfbb RW |
3718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3719 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3720 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3721 | $as_echo_n "(cached) " >&6 |
bec39cab | 3722 | else |
81ecdfbb | 3723 | ac_cv_prog_cc_c89=no |
bec39cab | 3724 | ac_save_CC=$CC |
81ecdfbb | 3725 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3726 | /* end confdefs.h. */ |
c906108c SS |
3727 | #include <stdarg.h> |
3728 | #include <stdio.h> | |
d0ac1c44 | 3729 | struct stat; |
c906108c SS |
3730 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3731 | struct buf { int x; }; | |
3732 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3733 | static char *e (p, i) | |
3734 | char **p; | |
3735 | int i; | |
3736 | { | |
3737 | return p[i]; | |
3738 | } | |
3739 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3740 | { | |
3741 | char *s; | |
3742 | va_list v; | |
3743 | va_start (v,p); | |
3744 | s = g (p, va_arg (v,int)); | |
3745 | va_end (v); | |
3746 | return s; | |
3747 | } | |
bec39cab AC |
3748 | |
3749 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3750 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3751 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3752 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3753 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3754 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3755 | that's true only with -std. */ |
bec39cab AC |
3756 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3757 | ||
81ecdfbb RW |
3758 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3759 | inside strings and character constants. */ | |
3760 | #define FOO(x) 'x' | |
3761 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3762 | ||
c906108c SS |
3763 | int test (int i, double x); |
3764 | struct s1 {int (*f) (int a);}; | |
3765 | struct s2 {int (*f) (double a);}; | |
3766 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3767 | int argc; | |
3768 | char **argv; | |
bec39cab AC |
3769 | int |
3770 | main () | |
3771 | { | |
c906108c | 3772 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3773 | ; |
3774 | return 0; | |
3775 | } | |
3776 | _ACEOF | |
81ecdfbb RW |
3777 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3778 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3779 | do |
3780 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3781 | if ac_fn_c_try_compile "$LINENO"; then : |
3782 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3783 | fi |
81ecdfbb RW |
3784 | rm -f core conftest.err conftest.$ac_objext |
3785 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3786 | done |
81ecdfbb | 3787 | rm -f conftest.$ac_ext |
bec39cab | 3788 | CC=$ac_save_CC |
c906108c SS |
3789 | |
3790 | fi | |
81ecdfbb RW |
3791 | # AC_CACHE_VAL |
3792 | case "x$ac_cv_prog_cc_c89" in | |
3793 | x) | |
3794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3795 | $as_echo "none needed" >&6; } ;; | |
3796 | xno) | |
3797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3798 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3799 | *) |
81ecdfbb RW |
3800 | CC="$CC $ac_cv_prog_cc_c89" |
3801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3802 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3803 | esac |
81ecdfbb | 3804 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3805 | |
b4e70030 JB |
3806 | fi |
3807 | ||
bec39cab AC |
3808 | ac_ext=c |
3809 | ac_cpp='$CPP $CPPFLAGS' | |
3810 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3811 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3812 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3813 | |
3bc3d82a PA |
3814 | ac_ext=cpp |
3815 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3816 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3817 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3818 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3819 | if test -z "$CXX"; then | |
3820 | if test -n "$CCC"; then | |
3821 | CXX=$CCC | |
3822 | else | |
3823 | if test -n "$ac_tool_prefix"; then | |
3824 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3825 | do | |
3826 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3827 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3829 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3830 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3831 | $as_echo_n "(cached) " >&6 |
3832 | else | |
3833 | if test -n "$CXX"; then | |
3834 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3835 | else | |
3836 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3837 | for as_dir in $PATH | |
3838 | do | |
3839 | IFS=$as_save_IFS | |
3840 | test -z "$as_dir" && as_dir=. | |
3841 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3842 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3843 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3844 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3845 | break 2 | |
3846 | fi | |
3847 | done | |
3848 | done | |
3849 | IFS=$as_save_IFS | |
3850 | ||
3851 | fi | |
3852 | fi | |
3853 | CXX=$ac_cv_prog_CXX | |
3854 | if test -n "$CXX"; then | |
3855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3856 | $as_echo "$CXX" >&6; } | |
3857 | else | |
3858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3859 | $as_echo "no" >&6; } | |
3860 | fi | |
3861 | ||
3862 | ||
3863 | test -n "$CXX" && break | |
3864 | done | |
3865 | fi | |
3866 | if test -z "$CXX"; then | |
3867 | ac_ct_CXX=$CXX | |
3868 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3869 | do | |
3870 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3871 | set dummy $ac_prog; ac_word=$2 | |
3872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3873 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3874 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3875 | $as_echo_n "(cached) " >&6 |
3876 | else | |
3877 | if test -n "$ac_ct_CXX"; then | |
3878 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3879 | else | |
3880 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3881 | for as_dir in $PATH | |
3882 | do | |
3883 | IFS=$as_save_IFS | |
3884 | test -z "$as_dir" && as_dir=. | |
3885 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3886 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3887 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3888 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3889 | break 2 | |
3890 | fi | |
3891 | done | |
3892 | done | |
3893 | IFS=$as_save_IFS | |
3894 | ||
3895 | fi | |
3896 | fi | |
3897 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3898 | if test -n "$ac_ct_CXX"; then | |
3899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3900 | $as_echo "$ac_ct_CXX" >&6; } | |
3901 | else | |
3902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3903 | $as_echo "no" >&6; } | |
3904 | fi | |
3905 | ||
3906 | ||
3907 | test -n "$ac_ct_CXX" && break | |
3908 | done | |
3909 | ||
3910 | if test "x$ac_ct_CXX" = x; then | |
3911 | CXX="g++" | |
3912 | else | |
3913 | case $cross_compiling:$ac_tool_warned in | |
3914 | yes:) | |
3915 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3916 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3917 | ac_tool_warned=yes ;; | |
3918 | esac | |
3919 | CXX=$ac_ct_CXX | |
3920 | fi | |
3921 | fi | |
3922 | ||
3923 | fi | |
3924 | fi | |
3925 | # Provide some information about the compiler. | |
3926 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3927 | set X $ac_compile | |
3928 | ac_compiler=$2 | |
3929 | for ac_option in --version -v -V -qversion; do | |
3930 | { { ac_try="$ac_compiler $ac_option >&5" | |
3931 | case "(($ac_try" in | |
3932 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3933 | *) ac_try_echo=$ac_try;; | |
3934 | esac | |
3935 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3936 | $as_echo "$ac_try_echo"; } >&5 | |
3937 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3938 | ac_status=$? | |
3939 | if test -s conftest.err; then | |
3940 | sed '10a\ | |
3941 | ... rest of stderr output deleted ... | |
3942 | 10q' conftest.err >conftest.er1 | |
3943 | cat conftest.er1 >&5 | |
3bc3d82a | 3944 | fi |
d0ac1c44 | 3945 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3946 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3947 | test $ac_status = 0; } | |
3948 | done | |
3949 | ||
3950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3951 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3952 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3953 | $as_echo_n "(cached) " >&6 |
3954 | else | |
3955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3956 | /* end confdefs.h. */ | |
3957 | ||
3958 | int | |
3959 | main () | |
3960 | { | |
3961 | #ifndef __GNUC__ | |
3962 | choke me | |
3963 | #endif | |
3964 | ||
3965 | ; | |
3966 | return 0; | |
3967 | } | |
3968 | _ACEOF | |
3969 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3970 | ac_compiler_gnu=yes | |
3971 | else | |
3972 | ac_compiler_gnu=no | |
3973 | fi | |
3974 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3975 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3976 | ||
3977 | fi | |
3978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3979 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3980 | if test $ac_compiler_gnu = yes; then | |
3981 | GXX=yes | |
3982 | else | |
3983 | GXX= | |
3984 | fi | |
3985 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3986 | ac_save_CXXFLAGS=$CXXFLAGS | |
3987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3988 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3989 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3990 | $as_echo_n "(cached) " >&6 |
3991 | else | |
3992 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3993 | ac_cxx_werror_flag=yes | |
3994 | ac_cv_prog_cxx_g=no | |
3995 | CXXFLAGS="-g" | |
3996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3997 | /* end confdefs.h. */ | |
3998 | ||
3999 | int | |
4000 | main () | |
4001 | { | |
4002 | ||
4003 | ; | |
4004 | return 0; | |
4005 | } | |
4006 | _ACEOF | |
4007 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4008 | ac_cv_prog_cxx_g=yes | |
4009 | else | |
4010 | CXXFLAGS="" | |
4011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4012 | /* end confdefs.h. */ | |
4013 | ||
4014 | int | |
4015 | main () | |
4016 | { | |
4017 | ||
4018 | ; | |
4019 | return 0; | |
4020 | } | |
4021 | _ACEOF | |
4022 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4023 | ||
4024 | else | |
4025 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4026 | CXXFLAGS="-g" | |
4027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4028 | /* end confdefs.h. */ | |
4029 | ||
4030 | int | |
4031 | main () | |
4032 | { | |
4033 | ||
4034 | ; | |
4035 | return 0; | |
4036 | } | |
4037 | _ACEOF | |
4038 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4039 | ac_cv_prog_cxx_g=yes | |
4040 | fi | |
4041 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4042 | fi | |
4043 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4044 | fi | |
4045 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4046 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4047 | fi | |
4048 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
4049 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
4050 | if test "$ac_test_CXXFLAGS" = set; then | |
4051 | CXXFLAGS=$ac_save_CXXFLAGS | |
4052 | elif test $ac_cv_prog_cxx_g = yes; then | |
4053 | if test "$GXX" = yes; then | |
4054 | CXXFLAGS="-g -O2" | |
4055 | else | |
4056 | CXXFLAGS="-g" | |
4057 | fi | |
4058 | else | |
4059 | if test "$GXX" = yes; then | |
4060 | CXXFLAGS="-O2" | |
4061 | else | |
4062 | CXXFLAGS= | |
4063 | fi | |
4064 | fi | |
4065 | ac_ext=c | |
4066 | ac_cpp='$CPP $CPPFLAGS' | |
4067 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4068 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4069 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4070 | ||
4071 | ||
60ca704f | 4072 | |
bec39cab AC |
4073 | ac_ext=c |
4074 | ac_cpp='$CPP $CPPFLAGS' | |
4075 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4076 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4077 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
4078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
4079 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
4080 | # On Suns, sometimes $CPP names a directory. |
4081 | if test -n "$CPP" && test -d "$CPP"; then | |
4082 | CPP= | |
8bb2c122 | 4083 | fi |
bec39cab | 4084 | if test -z "$CPP"; then |
d0ac1c44 | 4085 | if ${ac_cv_prog_CPP+:} false; then : |
81ecdfbb | 4086 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
4087 | else |
4088 | # Double quotes because CPP needs to be expanded | |
4089 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4090 | do | |
4091 | ac_preproc_ok=false | |
4092 | for ac_c_preproc_warn_flag in '' yes | |
4093 | do | |
4094 | # Use a header file that comes with gcc, so configuring glibc | |
4095 | # with a fresh cross-compiler works. | |
4096 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4097 | # <limits.h> exists even on freestanding compilers. | |
4098 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4099 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4101 | /* end confdefs.h. */ |
4102 | #ifdef __STDC__ | |
4103 | # include <limits.h> | |
4104 | #else | |
4105 | # include <assert.h> | |
4106 | #endif | |
4107 | Syntax error | |
4108 | _ACEOF | |
81ecdfbb | 4109 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4110 | |
81ecdfbb | 4111 | else |
bec39cab AC |
4112 | # Broken: fails on valid input. |
4113 | continue | |
4114 | fi | |
d0ac1c44 | 4115 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4116 | |
81ecdfbb | 4117 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4118 | # can be detected and how. |
81ecdfbb | 4119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4120 | /* end confdefs.h. */ |
4121 | #include <ac_nonexistent.h> | |
4122 | _ACEOF | |
81ecdfbb | 4123 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4124 | # Broken: success on invalid input. |
4125 | continue | |
8bb2c122 | 4126 | else |
bec39cab AC |
4127 | # Passes both tests. |
4128 | ac_preproc_ok=: | |
4129 | break | |
8bb2c122 | 4130 | fi |
d0ac1c44 | 4131 | rm -f conftest.err conftest.i conftest.$ac_ext |
8bb2c122 | 4132 | |
bec39cab AC |
4133 | done |
4134 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4135 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb | 4136 | if $ac_preproc_ok; then : |
bec39cab AC |
4137 | break |
4138 | fi | |
8bb2c122 | 4139 | |
bec39cab AC |
4140 | done |
4141 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 4142 | |
c906108c | 4143 | fi |
bec39cab AC |
4144 | CPP=$ac_cv_prog_CPP |
4145 | else | |
4146 | ac_cv_prog_CPP=$CPP | |
c906108c | 4147 | fi |
81ecdfbb RW |
4148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
4149 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
4150 | ac_preproc_ok=false |
4151 | for ac_c_preproc_warn_flag in '' yes | |
4152 | do | |
4153 | # Use a header file that comes with gcc, so configuring glibc | |
4154 | # with a fresh cross-compiler works. | |
4155 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4156 | # <limits.h> exists even on freestanding compilers. | |
4157 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4158 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4160 | /* end confdefs.h. */ |
4161 | #ifdef __STDC__ | |
4162 | # include <limits.h> | |
4163 | #else | |
4164 | # include <assert.h> | |
4165 | #endif | |
4166 | Syntax error | |
4167 | _ACEOF | |
81ecdfbb | 4168 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4169 | |
81ecdfbb | 4170 | else |
bec39cab AC |
4171 | # Broken: fails on valid input. |
4172 | continue | |
4173 | fi | |
d0ac1c44 | 4174 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4175 | |
81ecdfbb | 4176 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4177 | # can be detected and how. |
81ecdfbb | 4178 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4179 | /* end confdefs.h. */ |
4180 | #include <ac_nonexistent.h> | |
4181 | _ACEOF | |
81ecdfbb | 4182 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4183 | # Broken: success on invalid input. |
4184 | continue | |
c906108c | 4185 | else |
bec39cab AC |
4186 | # Passes both tests. |
4187 | ac_preproc_ok=: | |
4188 | break | |
c906108c | 4189 | fi |
d0ac1c44 | 4190 | rm -f conftest.err conftest.i conftest.$ac_ext |
c906108c | 4191 | |
bec39cab AC |
4192 | done |
4193 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4194 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
4195 | if $ac_preproc_ok; then : |
4196 | ||
c906108c | 4197 | else |
81ecdfbb RW |
4198 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4199 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4200 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4201 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 4202 | fi |
c906108c | 4203 | |
bec39cab AC |
4204 | ac_ext=c |
4205 | ac_cpp='$CPP $CPPFLAGS' | |
4206 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4207 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4208 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4209 | ||
4210 | ||
81ecdfbb RW |
4211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4212 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 4213 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 4214 | $as_echo_n "(cached) " >&6 |
4e8d927d | 4215 | else |
81ecdfbb RW |
4216 | if test -z "$GREP"; then |
4217 | ac_path_GREP_found=false | |
4218 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4219 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4220 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4221 | do | |
4222 | IFS=$as_save_IFS | |
4223 | test -z "$as_dir" && as_dir=. | |
4224 | for ac_prog in grep ggrep; do | |
4225 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4226 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4227 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
4228 | # Check for GNU ac_path_GREP and select it if it is found. |
4229 | # Check for GNU $ac_path_GREP | |
4230 | case `"$ac_path_GREP" --version 2>&1` in | |
4231 | *GNU*) | |
4232 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4233 | *) | |
4234 | ac_count=0 | |
4235 | $as_echo_n 0123456789 >"conftest.in" | |
4236 | while : | |
4237 | do | |
4238 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4239 | mv "conftest.tmp" "conftest.in" | |
4240 | cp "conftest.in" "conftest.nl" | |
4241 | $as_echo 'GREP' >> "conftest.nl" | |
4242 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4243 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4244 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4245 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4246 | # Best one so far, save it but keep looking for a better one | |
4247 | ac_cv_path_GREP="$ac_path_GREP" | |
4248 | ac_path_GREP_max=$ac_count | |
bec39cab | 4249 | fi |
81ecdfbb RW |
4250 | # 10*(2^10) chars as input seems more than enough |
4251 | test $ac_count -gt 10 && break | |
4252 | done | |
4253 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4254 | esac | |
bec39cab | 4255 | |
81ecdfbb RW |
4256 | $ac_path_GREP_found && break 3 |
4257 | done | |
4258 | done | |
4259 | done | |
4260 | IFS=$as_save_IFS | |
4261 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 4262 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4263 | fi |
c906108c | 4264 | else |
81ecdfbb | 4265 | ac_cv_path_GREP=$GREP |
c906108c | 4266 | fi |
c906108c | 4267 | |
81ecdfbb RW |
4268 | fi |
4269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4270 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4271 | GREP="$ac_cv_path_GREP" | |
c906108c | 4272 | |
c906108c | 4273 | |
81ecdfbb RW |
4274 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4275 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 4276 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb | 4277 | $as_echo_n "(cached) " >&6 |
783e057b | 4278 | else |
81ecdfbb RW |
4279 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4280 | then ac_cv_path_EGREP="$GREP -E" | |
4281 | else | |
4282 | if test -z "$EGREP"; then | |
4283 | ac_path_EGREP_found=false | |
4284 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4285 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4286 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4287 | do |
4288 | IFS=$as_save_IFS | |
4289 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4290 | for ac_prog in egrep; do |
4291 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4292 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4293 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4294 | # Check for GNU ac_path_EGREP and select it if it is found. |
4295 | # Check for GNU $ac_path_EGREP | |
4296 | case `"$ac_path_EGREP" --version 2>&1` in | |
4297 | *GNU*) | |
4298 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4299 | *) | |
4300 | ac_count=0 | |
4301 | $as_echo_n 0123456789 >"conftest.in" | |
4302 | while : | |
4303 | do | |
4304 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4305 | mv "conftest.tmp" "conftest.in" | |
4306 | cp "conftest.in" "conftest.nl" | |
4307 | $as_echo 'EGREP' >> "conftest.nl" | |
4308 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4309 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4310 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4311 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4312 | # Best one so far, save it but keep looking for a better one | |
4313 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4314 | ac_path_EGREP_max=$ac_count | |
4315 | fi | |
4316 | # 10*(2^10) chars as input seems more than enough | |
4317 | test $ac_count -gt 10 && break | |
4318 | done | |
4319 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4320 | esac | |
bec39cab | 4321 | |
81ecdfbb RW |
4322 | $ac_path_EGREP_found && break 3 |
4323 | done | |
4324 | done | |
4325 | done | |
4326 | IFS=$as_save_IFS | |
4327 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4328 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
783e057b | 4329 | fi |
783e057b | 4330 | else |
81ecdfbb | 4331 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4332 | fi |
4333 | ||
81ecdfbb | 4334 | fi |
783e057b | 4335 | fi |
81ecdfbb RW |
4336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4337 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4338 | EGREP="$ac_cv_path_EGREP" | |
4339 | ||
783e057b | 4340 | |
81ecdfbb RW |
4341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4342 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4343 | if ${ac_cv_header_stdc+:} false; then : |
81ecdfbb | 4344 | $as_echo_n "(cached) " >&6 |
783e057b | 4345 | else |
81ecdfbb | 4346 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4347 | /* end confdefs.h. */ |
783e057b | 4348 | #include <stdlib.h> |
bec39cab | 4349 | #include <stdarg.h> |
783e057b DJ |
4350 | #include <string.h> |
4351 | #include <float.h> | |
c906108c | 4352 | |
bec39cab AC |
4353 | int |
4354 | main () | |
4355 | { | |
c906108c | 4356 | |
bec39cab AC |
4357 | ; |
4358 | return 0; | |
4359 | } | |
4360 | _ACEOF | |
81ecdfbb | 4361 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4362 | ac_cv_header_stdc=yes |
c906108c | 4363 | else |
81ecdfbb | 4364 | ac_cv_header_stdc=no |
c906108c | 4365 | fi |
81ecdfbb | 4366 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4367 | |
783e057b DJ |
4368 | if test $ac_cv_header_stdc = yes; then |
4369 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4371 | /* end confdefs.h. */ |
4372 | #include <string.h> | |
c906108c | 4373 | |
783e057b DJ |
4374 | _ACEOF |
4375 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4376 | $EGREP "memchr" >/dev/null 2>&1; then : |
4377 | ||
c906108c | 4378 | else |
783e057b | 4379 | ac_cv_header_stdc=no |
c906108c | 4380 | fi |
783e057b | 4381 | rm -f conftest* |
c906108c SS |
4382 | |
4383 | fi | |
4384 | ||
783e057b DJ |
4385 | if test $ac_cv_header_stdc = yes; then |
4386 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4388 | /* end confdefs.h. */ |
4389 | #include <stdlib.h> | |
bec39cab | 4390 | |
783e057b DJ |
4391 | _ACEOF |
4392 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4393 | $EGREP "free" >/dev/null 2>&1; then : |
4394 | ||
bec39cab | 4395 | else |
783e057b | 4396 | ac_cv_header_stdc=no |
bec39cab | 4397 | fi |
783e057b | 4398 | rm -f conftest* |
bec39cab AC |
4399 | |
4400 | fi | |
bec39cab | 4401 | |
783e057b DJ |
4402 | if test $ac_cv_header_stdc = yes; then |
4403 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4404 | if test "$cross_compiling" = yes; then : |
783e057b | 4405 | : |
bec39cab | 4406 | else |
81ecdfbb | 4407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4408 | /* end confdefs.h. */ |
4409 | #include <ctype.h> | |
81ecdfbb | 4410 | #include <stdlib.h> |
783e057b DJ |
4411 | #if ((' ' & 0x0FF) == 0x020) |
4412 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4413 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4414 | #else | |
4415 | # define ISLOWER(c) \ | |
4416 | (('a' <= (c) && (c) <= 'i') \ | |
4417 | || ('j' <= (c) && (c) <= 'r') \ | |
4418 | || ('s' <= (c) && (c) <= 'z')) | |
4419 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4420 | #endif | |
4421 | ||
4422 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4423 | int | |
4424 | main () | |
4425 | { | |
4426 | int i; | |
4427 | for (i = 0; i < 256; i++) | |
4428 | if (XOR (islower (i), ISLOWER (i)) | |
4429 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4430 | return 2; |
4431 | return 0; | |
783e057b DJ |
4432 | } |
4433 | _ACEOF | |
81ecdfbb | 4434 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4435 | |
81ecdfbb RW |
4436 | else |
4437 | ac_cv_header_stdc=no | |
783e057b | 4438 | fi |
81ecdfbb RW |
4439 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4440 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4441 | fi |
81ecdfbb | 4442 | |
783e057b DJ |
4443 | fi |
4444 | fi | |
81ecdfbb RW |
4445 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4446 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4447 | if test $ac_cv_header_stdc = yes; then |
4448 | ||
81ecdfbb | 4449 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4450 | |
4451 | fi | |
4452 | ||
4453 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4454 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4455 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4456 | do : |
4457 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4458 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4459 | " | |
d0ac1c44 | 4460 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
783e057b | 4461 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4462 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4463 | _ACEOF |
4464 | ||
4465 | fi | |
4466 | ||
4467 | done | |
4468 | ||
4469 | ||
4470 | ||
81ecdfbb | 4471 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4472 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
783e057b DJ |
4473 | MINIX=yes |
4474 | else | |
4475 | MINIX= | |
4476 | fi | |
4477 | ||
4478 | ||
4479 | if test "$MINIX" = yes; then | |
4480 | ||
81ecdfbb | 4481 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4482 | |
4483 | ||
81ecdfbb | 4484 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4485 | |
4486 | ||
81ecdfbb | 4487 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4488 | |
4489 | fi | |
4490 | ||
4491 | ||
81ecdfbb RW |
4492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4493 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4494 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
81ecdfbb | 4495 | $as_echo_n "(cached) " >&6 |
783e057b | 4496 | else |
81ecdfbb | 4497 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4498 | /* end confdefs.h. */ |
4499 | ||
d0ac1c44 SM |
4500 | # define __EXTENSIONS__ 1 |
4501 | $ac_includes_default | |
783e057b DJ |
4502 | int |
4503 | main () | |
4504 | { | |
4505 | ||
4506 | ; | |
4507 | return 0; | |
4508 | } | |
4509 | _ACEOF | |
81ecdfbb | 4510 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4511 | ac_cv_safe_to_define___extensions__=yes |
4512 | else | |
81ecdfbb | 4513 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4514 | fi |
81ecdfbb | 4515 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4516 | fi |
81ecdfbb RW |
4517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4518 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4519 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4520 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4521 | |
81ecdfbb | 4522 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4523 | |
81ecdfbb | 4524 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4525 | |
81ecdfbb | 4526 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4527 | |
81ecdfbb | 4528 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4529 | |
4530 | ||
c971b7fa PA |
4531 | ac_aux_dir= |
4532 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4533 | if test -f "$ac_dir/install-sh"; then |
4534 | ac_aux_dir=$ac_dir | |
4535 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4536 | break | |
4537 | elif test -f "$ac_dir/install.sh"; then | |
4538 | ac_aux_dir=$ac_dir | |
4539 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4540 | break | |
4541 | elif test -f "$ac_dir/shtool"; then | |
4542 | ac_aux_dir=$ac_dir | |
4543 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4544 | break | |
4545 | fi | |
c971b7fa PA |
4546 | done |
4547 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4548 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
c971b7fa | 4549 | fi |
770d76d7 | 4550 | |
c971b7fa PA |
4551 | # These three variables are undocumented and unsupported, |
4552 | # and are intended to be withdrawn in a future Autoconf release. | |
4553 | # They can cause serious problems if a builder's source tree is in a directory | |
4554 | # whose full name contains unusual characters. | |
4555 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4556 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4557 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4558 | |
770d76d7 | 4559 | |
c971b7fa PA |
4560 | # Make sure we can run config.sub. |
4561 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4562 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 | 4563 | |
c971b7fa PA |
4564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4565 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4566 | if ${ac_cv_build+:} false; then : |
c971b7fa | 4567 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4568 | else |
c971b7fa PA |
4569 | ac_build_alias=$build_alias |
4570 | test "x$ac_build_alias" = x && | |
4571 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4572 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4573 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
c971b7fa | 4574 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4575 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
c971b7fa | 4576 | |
770d76d7 | 4577 | fi |
c971b7fa PA |
4578 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4579 | $as_echo "$ac_cv_build" >&6; } | |
4580 | case $ac_cv_build in | |
4581 | *-*-*) ;; | |
d0ac1c44 | 4582 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 | 4583 | esac |
c971b7fa PA |
4584 | build=$ac_cv_build |
4585 | ac_save_IFS=$IFS; IFS='-' | |
4586 | set x $ac_cv_build | |
4587 | shift | |
4588 | build_cpu=$1 | |
4589 | build_vendor=$2 | |
4590 | shift; shift | |
4591 | # Remember, the first character of IFS is used to create $*, | |
4592 | # except with old shells: | |
4593 | build_os=$* | |
4594 | IFS=$ac_save_IFS | |
4595 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4596 | |
4597 | ||
c971b7fa PA |
4598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4599 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4600 | if ${ac_cv_host+:} false; then : |
81ecdfbb RW |
4601 | $as_echo_n "(cached) " >&6 |
4602 | else | |
c971b7fa PA |
4603 | if test "x$host_alias" = x; then |
4604 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4605 | else |
c971b7fa | 4606 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
d0ac1c44 | 4607 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
81ecdfbb | 4608 | fi |
81ecdfbb RW |
4609 | |
4610 | fi | |
c971b7fa PA |
4611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4612 | $as_echo "$ac_cv_host" >&6; } | |
4613 | case $ac_cv_host in | |
4614 | *-*-*) ;; | |
d0ac1c44 | 4615 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
81ecdfbb | 4616 | esac |
c971b7fa PA |
4617 | host=$ac_cv_host |
4618 | ac_save_IFS=$IFS; IFS='-' | |
4619 | set x $ac_cv_host | |
4620 | shift | |
4621 | host_cpu=$1 | |
4622 | host_vendor=$2 | |
4623 | shift; shift | |
4624 | # Remember, the first character of IFS is used to create $*, | |
4625 | # except with old shells: | |
4626 | host_os=$* | |
4627 | IFS=$ac_save_IFS | |
4628 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4629 | |
4630 | ||
4631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4632 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4633 | if ${ac_cv_target+:} false; then : |
3388710e JM |
4634 | $as_echo_n "(cached) " >&6 |
4635 | else | |
4636 | if test "x$target_alias" = x; then | |
4637 | ac_cv_target=$ac_cv_host | |
4638 | else | |
4639 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
d0ac1c44 | 4640 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
3388710e JM |
4641 | fi |
4642 | ||
4643 | fi | |
4644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4645 | $as_echo "$ac_cv_target" >&6; } | |
4646 | case $ac_cv_target in | |
4647 | *-*-*) ;; | |
d0ac1c44 | 4648 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
3388710e JM |
4649 | esac |
4650 | target=$ac_cv_target | |
4651 | ac_save_IFS=$IFS; IFS='-' | |
4652 | set x $ac_cv_target | |
4653 | shift | |
4654 | target_cpu=$1 | |
4655 | target_vendor=$2 | |
4656 | shift; shift | |
4657 | # Remember, the first character of IFS is used to create $*, | |
4658 | # except with old shells: | |
4659 | target_os=$* | |
4660 | IFS=$ac_save_IFS | |
4661 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4662 | ||
4663 | ||
4664 | # The aliases save the names the user supplied, while $host etc. | |
4665 | # will get canonicalized. | |
4666 | test -n "$target_alias" && | |
4667 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4668 | NONENONEs,x,x, && | |
4669 | program_prefix=${target_alias}- | |
4670 | ||
4671 | # The tests for host and target for $enable_largefile require | |
4672 | # canonical names. | |
4673 | ||
4674 | ||
81ecdfbb | 4675 | |
da2f07f1 JK |
4676 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4677 | # even in directories otherwise not depending on the $plugins option. | |
4678 | ||
4679 | ||
2974be62 AM |
4680 | maybe_plugins=no |
4681 | for ac_header in dlfcn.h | |
4682 | do : | |
4683 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4684 | " | |
d0ac1c44 | 4685 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : |
2974be62 AM |
4686 | cat >>confdefs.h <<_ACEOF |
4687 | #define HAVE_DLFCN_H 1 | |
4688 | _ACEOF | |
4689 | maybe_plugins=yes | |
4690 | fi | |
4691 | ||
4692 | done | |
4693 | ||
4694 | for ac_header in windows.h | |
4695 | do : | |
4696 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4697 | " | |
d0ac1c44 | 4698 | if test "x$ac_cv_header_windows_h" = xyes; then : |
2974be62 AM |
4699 | cat >>confdefs.h <<_ACEOF |
4700 | #define HAVE_WINDOWS_H 1 | |
4701 | _ACEOF | |
4702 | maybe_plugins=yes | |
4703 | fi | |
4704 | ||
4705 | done | |
4706 | ||
4707 | ||
4708 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4709 | if test "${enable_plugins+set}" = set; then : |
4710 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4711 | no) plugins=no ;; |
4712 | *) plugins=yes | |
4713 | if test "$maybe_plugins" != "yes" ; then | |
d0ac1c44 | 4714 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 |
2974be62 AM |
4715 | fi ;; |
4716 | esac | |
da2f07f1 | 4717 | else |
2974be62 AM |
4718 | plugins=$maybe_plugins |
4719 | ||
da2f07f1 JK |
4720 | fi |
4721 | ||
2974be62 | 4722 | if test "$plugins" = "yes"; then |
458412c3 TT |
4723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
4724 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
d0ac1c44 | 4725 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4726 | $as_echo_n "(cached) " >&6 |
4727 | else | |
4728 | ac_func_search_save_LIBS=$LIBS | |
4729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4730 | /* end confdefs.h. */ | |
4731 | ||
4732 | /* Override any GCC internal prototype to avoid an error. | |
4733 | Use char because int might match the return type of a GCC | |
4734 | builtin and then its argument prototype would still apply. */ | |
4735 | #ifdef __cplusplus | |
4736 | extern "C" | |
4737 | #endif | |
458412c3 | 4738 | char dlsym (); |
2974be62 AM |
4739 | int |
4740 | main () | |
4741 | { | |
458412c3 | 4742 | return dlsym (); |
2974be62 AM |
4743 | ; |
4744 | return 0; | |
4745 | } | |
4746 | _ACEOF | |
4747 | for ac_lib in '' dl; do | |
4748 | if test -z "$ac_lib"; then | |
4749 | ac_res="none required" | |
4750 | else | |
4751 | ac_res=-l$ac_lib | |
4752 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4753 | fi | |
4754 | if ac_fn_c_try_link "$LINENO"; then : | |
458412c3 | 4755 | ac_cv_search_dlsym=$ac_res |
2974be62 AM |
4756 | fi |
4757 | rm -f core conftest.err conftest.$ac_objext \ | |
4758 | conftest$ac_exeext | |
d0ac1c44 | 4759 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4760 | break |
4761 | fi | |
4762 | done | |
d0ac1c44 | 4763 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4764 | |
4765 | else | |
458412c3 | 4766 | ac_cv_search_dlsym=no |
2974be62 AM |
4767 | fi |
4768 | rm conftest.$ac_ext | |
4769 | LIBS=$ac_func_search_save_LIBS | |
4770 | fi | |
458412c3 TT |
4771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
4772 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
4773 | ac_res=$ac_cv_search_dlsym | |
2974be62 AM |
4774 | if test "$ac_res" != no; then : |
4775 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4776 | ||
4777 | fi | |
4778 | ||
4779 | fi | |
da2f07f1 JK |
4780 | |
4781 | ||
4782 | case "${host}" in | |
c8693053 RO |
4783 | sparc-*-solaris*|i?86-*-solaris*) |
4784 | # On native 32-bit Solaris/SPARC and x86, large-file and procfs support | |
4785 | # were mutually exclusive until Solaris 11.3. Without procfs support, | |
4786 | # the bfd/ elf module cannot provide certain routines such as | |
4787 | # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user | |
4788 | # explicitly requested large-file support through the | |
4789 | # --enable-largefile switch, disable large-file support in favor of | |
4790 | # procfs support. | |
4791 | # | |
4792 | # Check if <sys/procfs.h> is incompatible with large-file support. | |
4793 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4794 | /* end confdefs.h. */ | |
4795 | #define _FILE_OFFSET_BITS 64 | |
4796 | #define _STRUCTURED_PROC 1 | |
4797 | #include <sys/procfs.h> | |
4798 | int | |
4799 | main () | |
4800 | { | |
4801 | ||
4802 | ; | |
4803 | return 0; | |
4804 | } | |
4805 | _ACEOF | |
4806 | if ac_fn_c_try_compile "$LINENO"; then : | |
4807 | acx_cv_procfs_lfs=yes | |
4808 | else | |
4809 | acx_cv_procfs_lfs=no | |
4810 | fi | |
4811 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4812 | # | |
4813 | # Forcefully disable large-file support only if necessary, gdb is in | |
4814 | # tree and enabled. | |
4815 | if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \ | |
4816 | -a -d $srcdir/../gdb -a "$enable_gdb" != no; then | |
4817 | : ${enable_largefile="no"} | |
4818 | if test "$plugins" = yes; then | |
4819 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | |
4820 | plugin support disabled; require large-file support which is incompatible with GDB." >&5 | |
4821 | $as_echo "$as_me: WARNING: | |
4822 | plugin support disabled; require large-file support which is incompatible with GDB." >&2;} | |
4823 | plugins=no | |
4824 | fi | |
4825 | fi | |
4826 | # | |
4827 | # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the | |
4828 | # benefit of g++ 9+ which predefines it on Solaris. | |
4829 | if test "$enable_largefile" = no; then | |
4830 | LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS" | |
4831 | ||
4832 | fi | |
da2f07f1 JK |
4833 | ;; |
4834 | esac | |
4835 | ||
4836 | # Check whether --enable-largefile was given. | |
4837 | if test "${enable_largefile+set}" = set; then : | |
4838 | enableval=$enable_largefile; | |
4839 | fi | |
4840 | ||
4841 | if test "$enable_largefile" != no; then | |
4842 | ||
4843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4844 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4845 | if ${ac_cv_sys_largefile_CC+:} false; then : |
da2f07f1 JK |
4846 | $as_echo_n "(cached) " >&6 |
4847 | else | |
4848 | ac_cv_sys_largefile_CC=no | |
4849 | if test "$GCC" != yes; then | |
4850 | ac_save_CC=$CC | |
4851 | while :; do | |
4852 | # IRIX 6.2 and later do not support large files by default, | |
4853 | # so use the C compiler's -n32 option if that helps. | |
4854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4855 | /* end confdefs.h. */ | |
4856 | #include <sys/types.h> | |
4857 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4858 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4859 | since some C++ compilers masquerading as C compilers | |
4860 | incorrectly reject 9223372036854775807. */ | |
4861 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4862 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4863 | && LARGE_OFF_T % 2147483647 == 1) | |
4864 | ? 1 : -1]; | |
4865 | int | |
4866 | main () | |
4867 | { | |
4868 | ||
4869 | ; | |
4870 | return 0; | |
4871 | } | |
4872 | _ACEOF | |
4873 | if ac_fn_c_try_compile "$LINENO"; then : | |
4874 | break | |
4875 | fi | |
4876 | rm -f core conftest.err conftest.$ac_objext | |
4877 | CC="$CC -n32" | |
4878 | if ac_fn_c_try_compile "$LINENO"; then : | |
4879 | ac_cv_sys_largefile_CC=' -n32'; break | |
4880 | fi | |
4881 | rm -f core conftest.err conftest.$ac_objext | |
4882 | break | |
4883 | done | |
4884 | CC=$ac_save_CC | |
4885 | rm -f conftest.$ac_ext | |
4886 | fi | |
4887 | fi | |
4888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4889 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4890 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4891 | CC=$CC$ac_cv_sys_largefile_CC | |
4892 | fi | |
4893 | ||
4894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4895 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4896 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
da2f07f1 JK |
4897 | $as_echo_n "(cached) " >&6 |
4898 | else | |
4899 | while :; do | |
4900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4901 | /* end confdefs.h. */ | |
4902 | #include <sys/types.h> | |
4903 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4904 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4905 | since some C++ compilers masquerading as C compilers | |
4906 | incorrectly reject 9223372036854775807. */ | |
4907 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4908 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4909 | && LARGE_OFF_T % 2147483647 == 1) | |
4910 | ? 1 : -1]; | |
4911 | int | |
4912 | main () | |
4913 | { | |
4914 | ||
4915 | ; | |
4916 | return 0; | |
4917 | } | |
4918 | _ACEOF | |
4919 | if ac_fn_c_try_compile "$LINENO"; then : | |
4920 | ac_cv_sys_file_offset_bits=no; break | |
4921 | fi | |
4922 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4923 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4924 | /* end confdefs.h. */ | |
4925 | #define _FILE_OFFSET_BITS 64 | |
4926 | #include <sys/types.h> | |
4927 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4928 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4929 | since some C++ compilers masquerading as C compilers | |
4930 | incorrectly reject 9223372036854775807. */ | |
4931 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4932 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4933 | && LARGE_OFF_T % 2147483647 == 1) | |
4934 | ? 1 : -1]; | |
4935 | int | |
4936 | main () | |
4937 | { | |
4938 | ||
4939 | ; | |
4940 | return 0; | |
4941 | } | |
4942 | _ACEOF | |
4943 | if ac_fn_c_try_compile "$LINENO"; then : | |
4944 | ac_cv_sys_file_offset_bits=64; break | |
4945 | fi | |
4946 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4947 | ac_cv_sys_file_offset_bits=unknown | |
4948 | break | |
4949 | done | |
4950 | fi | |
4951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4952 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4953 | case $ac_cv_sys_file_offset_bits in #( | |
4954 | no | unknown) ;; | |
4955 | *) | |
4956 | cat >>confdefs.h <<_ACEOF | |
4957 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4958 | _ACEOF | |
4959 | ;; | |
4960 | esac | |
4961 | rm -rf conftest* | |
4962 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4964 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4965 | if ${ac_cv_sys_large_files+:} false; then : |
da2f07f1 JK |
4966 | $as_echo_n "(cached) " >&6 |
4967 | else | |
4968 | while :; do | |
4969 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4970 | /* end confdefs.h. */ | |
4971 | #include <sys/types.h> | |
4972 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4973 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4974 | since some C++ compilers masquerading as C compilers | |
4975 | incorrectly reject 9223372036854775807. */ | |
4976 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4977 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4978 | && LARGE_OFF_T % 2147483647 == 1) | |
4979 | ? 1 : -1]; | |
4980 | int | |
4981 | main () | |
4982 | { | |
4983 | ||
4984 | ; | |
4985 | return 0; | |
4986 | } | |
4987 | _ACEOF | |
4988 | if ac_fn_c_try_compile "$LINENO"; then : | |
4989 | ac_cv_sys_large_files=no; break | |
4990 | fi | |
4991 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4992 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4993 | /* end confdefs.h. */ | |
4994 | #define _LARGE_FILES 1 | |
4995 | #include <sys/types.h> | |
4996 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4997 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4998 | since some C++ compilers masquerading as C compilers | |
4999 | incorrectly reject 9223372036854775807. */ | |
5000 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
5001 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
5002 | && LARGE_OFF_T % 2147483647 == 1) | |
5003 | ? 1 : -1]; | |
5004 | int | |
5005 | main () | |
5006 | { | |
5007 | ||
5008 | ; | |
5009 | return 0; | |
5010 | } | |
5011 | _ACEOF | |
5012 | if ac_fn_c_try_compile "$LINENO"; then : | |
5013 | ac_cv_sys_large_files=1; break | |
5014 | fi | |
5015 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5016 | ac_cv_sys_large_files=unknown | |
5017 | break | |
5018 | done | |
5019 | fi | |
5020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
5021 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
5022 | case $ac_cv_sys_large_files in #( | |
5023 | no | unknown) ;; | |
5024 | *) | |
5025 | cat >>confdefs.h <<_ACEOF | |
5026 | #define _LARGE_FILES $ac_cv_sys_large_files | |
5027 | _ACEOF | |
5028 | ;; | |
5029 | esac | |
5030 | rm -rf conftest* | |
5031 | fi | |
d0ac1c44 SM |
5032 | |
5033 | ||
da2f07f1 JK |
5034 | fi |
5035 | ||
5036 | ||
d0ac1c44 SM |
5037 | # Expand $ac_aux_dir to an absolute path. |
5038 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4869db5e | 5039 | |
d0ac1c44 | 5040 | if test x"${install_sh+set}" != xset; then |
4869db5e RM |
5041 | case $am_aux_dir in |
5042 | *\ * | *\ *) | |
5043 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
5044 | *) | |
5045 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
5046 | esac | |
5047 | fi | |
5048 | ||
d0ac1c44 SM |
5049 | # Installed binaries are usually stripped using 'strip' when the user |
5050 | # run "make install-strip". However 'strip' might not be the right | |
4869db5e | 5051 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 5052 | # will honor the 'STRIP' environment variable to overrule this program. |
4869db5e RM |
5053 | if test "$cross_compiling" != no; then |
5054 | if test -n "$ac_tool_prefix"; then | |
5055 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
5056 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
5057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5058 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5059 | if ${ac_cv_prog_STRIP+:} false; then : |
4869db5e RM |
5060 | $as_echo_n "(cached) " >&6 |
5061 | else | |
5062 | if test -n "$STRIP"; then | |
5063 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
5064 | else | |
5065 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5066 | for as_dir in $PATH | |
5067 | do | |
5068 | IFS=$as_save_IFS | |
5069 | test -z "$as_dir" && as_dir=. | |
5070 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5071 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5072 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
5073 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5074 | break 2 | |
5075 | fi | |
5076 | done | |
5077 | done | |
5078 | IFS=$as_save_IFS | |
5079 | ||
5080 | fi | |
5081 | fi | |
5082 | STRIP=$ac_cv_prog_STRIP | |
5083 | if test -n "$STRIP"; then | |
5084 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
5085 | $as_echo "$STRIP" >&6; } | |
5086 | else | |
5087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5088 | $as_echo "no" >&6; } | |
5089 | fi | |
5090 | ||
5091 | ||
5092 | fi | |
5093 | if test -z "$ac_cv_prog_STRIP"; then | |
5094 | ac_ct_STRIP=$STRIP | |
5095 | # Extract the first word of "strip", so it can be a program name with args. | |
5096 | set dummy strip; ac_word=$2 | |
5097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5098 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5099 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
4869db5e RM |
5100 | $as_echo_n "(cached) " >&6 |
5101 | else | |
5102 | if test -n "$ac_ct_STRIP"; then | |
5103 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
5104 | else | |
5105 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5106 | for as_dir in $PATH | |
5107 | do | |
5108 | IFS=$as_save_IFS | |
5109 | test -z "$as_dir" && as_dir=. | |
5110 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5111 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5112 | ac_cv_prog_ac_ct_STRIP="strip" |
5113 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5114 | break 2 | |
5115 | fi | |
5116 | done | |
5117 | done | |
5118 | IFS=$as_save_IFS | |
5119 | ||
5120 | fi | |
5121 | fi | |
5122 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
5123 | if test -n "$ac_ct_STRIP"; then | |
5124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
5125 | $as_echo "$ac_ct_STRIP" >&6; } | |
5126 | else | |
5127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5128 | $as_echo "no" >&6; } | |
5129 | fi | |
5130 | ||
5131 | if test "x$ac_ct_STRIP" = x; then | |
5132 | STRIP=":" | |
5133 | else | |
5134 | case $cross_compiling:$ac_tool_warned in | |
5135 | yes:) | |
5136 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5137 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5138 | ac_tool_warned=yes ;; | |
5139 | esac | |
5140 | STRIP=$ac_ct_STRIP | |
5141 | fi | |
5142 | else | |
5143 | STRIP="$ac_cv_prog_STRIP" | |
5144 | fi | |
5145 | ||
5146 | fi | |
5147 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
5148 | ||
783e057b DJ |
5149 | |
5150 | ac_aux_dir= | |
81ecdfbb | 5151 | for ac_dir in .. "$srcdir"/..; do |
d0ac1c44 SM |
5152 | if test -f "$ac_dir/install-sh"; then |
5153 | ac_aux_dir=$ac_dir | |
5154 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5155 | break | |
5156 | elif test -f "$ac_dir/install.sh"; then | |
5157 | ac_aux_dir=$ac_dir | |
5158 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
5159 | break | |
5160 | elif test -f "$ac_dir/shtool"; then | |
5161 | ac_aux_dir=$ac_dir | |
5162 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5163 | break | |
5164 | fi | |
783e057b DJ |
5165 | done |
5166 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 5167 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 5168 | fi |
81ecdfbb RW |
5169 | |
5170 | # These three variables are undocumented and unsupported, | |
5171 | # and are intended to be withdrawn in a future Autoconf release. | |
5172 | # They can cause serious problems if a builder's source tree is in a directory | |
5173 | # whose full name contains unusual characters. | |
5174 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5175 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5176 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5177 | ||
783e057b | 5178 | |
783e057b | 5179 | |
91e1a0ed SM |
5180 | # Set build, build_cpu, build_vendor and build_os. |
5181 | ||
5182 | ||
5183 | # Set host, host_cpu, host_vendor, and host_os. | |
5184 | ||
5185 | ||
5186 | # Set target, target_cpu, target_vendor, and target_os. | |
5187 | ||
5188 | ||
9009e1ae MR |
5189 | test "$program_prefix" != NONE && |
5190 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
5191 | # Use a double $ so make ignores it. | |
5192 | test "$program_suffix" != NONE && | |
5193 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
5194 | # Double any \ or $. | |
5195 | # By default was `s,x,x', remove it if useless. | |
5196 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
5197 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
5198 | ||
81ecdfbb | 5199 | |
0bcda685 PA |
5200 | # We require a C++11 compiler. Check if one is available, and if |
5201 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5202 | ||
41260ac2 | 5203 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
5204 | ac_ext=cpp |
5205 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5206 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5207 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5208 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5209 | CXX_DIALECT="" | |
5210 | ac_success=no | |
5211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5212 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5213 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5214 | $as_echo_n "(cached) " >&6 |
5215 | else | |
5216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5217 | /* end confdefs.h. */ | |
5218 | ||
5219 | ||
5220 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5221 | // Hopefully, this will speed up the test. | |
5222 | ||
5223 | #ifndef __cplusplus | |
5224 | ||
5225 | #error "This is not a C++ compiler" | |
5226 | ||
5227 | #elif __cplusplus < 201103L | |
5228 | ||
5229 | #error "This is not a C++11 compiler" | |
5230 | ||
5231 | #else | |
5232 | ||
5233 | namespace cxx11 | |
5234 | { | |
5235 | ||
5236 | namespace test_static_assert | |
5237 | { | |
5238 | ||
5239 | template <typename T> | |
5240 | struct check | |
5241 | { | |
5242 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5243 | }; | |
5244 | ||
5245 | } | |
5246 | ||
5247 | namespace test_final_override | |
5248 | { | |
5249 | ||
5250 | struct Base | |
5251 | { | |
5252 | virtual void f() {} | |
5253 | }; | |
5254 | ||
5255 | struct Derived : public Base | |
5256 | { | |
5257 | virtual void f() override {} | |
5258 | }; | |
5259 | ||
5260 | } | |
5261 | ||
5262 | namespace test_double_right_angle_brackets | |
5263 | { | |
5264 | ||
5265 | template < typename T > | |
5266 | struct check {}; | |
5267 | ||
5268 | typedef check<void> single_type; | |
5269 | typedef check<check<void>> double_type; | |
5270 | typedef check<check<check<void>>> triple_type; | |
5271 | typedef check<check<check<check<void>>>> quadruple_type; | |
5272 | ||
5273 | } | |
5274 | ||
5275 | namespace test_decltype | |
5276 | { | |
5277 | ||
5278 | int | |
5279 | f() | |
5280 | { | |
5281 | int a = 1; | |
5282 | decltype(a) b = 2; | |
5283 | return a + b; | |
5284 | } | |
5285 | ||
5286 | } | |
5287 | ||
5288 | namespace test_type_deduction | |
5289 | { | |
5290 | ||
5291 | template < typename T1, typename T2 > | |
5292 | struct is_same | |
5293 | { | |
5294 | static const bool value = false; | |
5295 | }; | |
5296 | ||
5297 | template < typename T > | |
5298 | struct is_same<T, T> | |
5299 | { | |
5300 | static const bool value = true; | |
5301 | }; | |
5302 | ||
5303 | template < typename T1, typename T2 > | |
5304 | auto | |
5305 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5306 | { | |
5307 | return a1 + a2; | |
5308 | } | |
5309 | ||
5310 | int | |
5311 | test(const int c, volatile int v) | |
5312 | { | |
5313 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5314 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5315 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5316 | auto ac = c; | |
5317 | auto av = v; | |
5318 | auto sumi = ac + av + 'x'; | |
5319 | auto sumf = ac + av + 1.0; | |
5320 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5321 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5322 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5323 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5324 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5325 | return (sumf > 0.0) ? sumi : add(c, v); | |
5326 | } | |
5327 | ||
5328 | } | |
5329 | ||
5330 | namespace test_noexcept | |
5331 | { | |
5332 | ||
5333 | int f() { return 0; } | |
5334 | int g() noexcept { return 0; } | |
5335 | ||
5336 | static_assert(noexcept(f()) == false, ""); | |
5337 | static_assert(noexcept(g()) == true, ""); | |
5338 | ||
5339 | } | |
5340 | ||
5341 | namespace test_constexpr | |
5342 | { | |
5343 | ||
5344 | template < typename CharT > | |
5345 | unsigned long constexpr | |
5346 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5347 | { | |
5348 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5349 | } | |
5350 | ||
5351 | template < typename CharT > | |
5352 | unsigned long constexpr | |
5353 | strlen_c(const CharT *const s) noexcept | |
5354 | { | |
5355 | return strlen_c_r(s, 0UL); | |
5356 | } | |
5357 | ||
5358 | static_assert(strlen_c("") == 0UL, ""); | |
5359 | static_assert(strlen_c("1") == 1UL, ""); | |
5360 | static_assert(strlen_c("example") == 7UL, ""); | |
5361 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5362 | ||
5363 | } | |
5364 | ||
5365 | namespace test_rvalue_references | |
5366 | { | |
5367 | ||
5368 | template < int N > | |
5369 | struct answer | |
5370 | { | |
5371 | static constexpr int value = N; | |
5372 | }; | |
5373 | ||
5374 | answer<1> f(int&) { return answer<1>(); } | |
5375 | answer<2> f(const int&) { return answer<2>(); } | |
5376 | answer<3> f(int&&) { return answer<3>(); } | |
5377 | ||
5378 | void | |
5379 | test() | |
5380 | { | |
5381 | int i = 0; | |
5382 | const int c = 0; | |
5383 | static_assert(decltype(f(i))::value == 1, ""); | |
5384 | static_assert(decltype(f(c))::value == 2, ""); | |
5385 | static_assert(decltype(f(0))::value == 3, ""); | |
5386 | } | |
5387 | ||
5388 | } | |
5389 | ||
5390 | namespace test_uniform_initialization | |
5391 | { | |
5392 | ||
5393 | struct test | |
5394 | { | |
5395 | static const int zero {}; | |
5396 | static const int one {1}; | |
5397 | }; | |
5398 | ||
5399 | static_assert(test::zero == 0, ""); | |
5400 | static_assert(test::one == 1, ""); | |
5401 | ||
5402 | } | |
5403 | ||
5404 | namespace test_lambdas | |
5405 | { | |
5406 | ||
5407 | void | |
5408 | test1() | |
5409 | { | |
5410 | auto lambda1 = [](){}; | |
5411 | auto lambda2 = lambda1; | |
5412 | lambda1(); | |
5413 | lambda2(); | |
5414 | } | |
5415 | ||
5416 | int | |
5417 | test2() | |
5418 | { | |
5419 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5420 | auto b = []() -> int { return '0'; }(); | |
5421 | auto c = [=](){ return a + b; }(); | |
5422 | auto d = [&](){ return c; }(); | |
5423 | auto e = [a, &b](int x) mutable { | |
5424 | const auto identity = [](int y){ return y; }; | |
5425 | for (auto i = 0; i < a; ++i) | |
5426 | a += b--; | |
5427 | return x + identity(a + b); | |
5428 | }(0); | |
5429 | return a + b + c + d + e; | |
5430 | } | |
5431 | ||
5432 | int | |
5433 | test3() | |
5434 | { | |
5435 | const auto nullary = [](){ return 0; }; | |
5436 | const auto unary = [](int x){ return x; }; | |
5437 | using nullary_t = decltype(nullary); | |
5438 | using unary_t = decltype(unary); | |
5439 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5440 | const auto higher2nd = [unary](nullary_t f1){ | |
5441 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5442 | }; | |
5443 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5444 | } | |
5445 | ||
5446 | } | |
5447 | ||
5448 | namespace test_variadic_templates | |
5449 | { | |
5450 | ||
5451 | template <int...> | |
5452 | struct sum; | |
5453 | ||
5454 | template <int N0, int... N1toN> | |
5455 | struct sum<N0, N1toN...> | |
5456 | { | |
5457 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5458 | }; | |
5459 | ||
5460 | template <> | |
5461 | struct sum<> | |
5462 | { | |
5463 | static constexpr auto value = 0; | |
5464 | }; | |
5465 | ||
5466 | static_assert(sum<>::value == 0, ""); | |
5467 | static_assert(sum<1>::value == 1, ""); | |
5468 | static_assert(sum<23>::value == 23, ""); | |
5469 | static_assert(sum<1, 2>::value == 3, ""); | |
5470 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5471 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5472 | ||
5473 | } | |
5474 | ||
5475 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5476 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5477 | // because of this. | |
5478 | namespace test_template_alias_sfinae | |
5479 | { | |
5480 | ||
5481 | struct foo {}; | |
5482 | ||
5483 | template<typename T> | |
5484 | using member = typename T::member_type; | |
5485 | ||
5486 | template<typename T> | |
5487 | void func(...) {} | |
5488 | ||
5489 | template<typename T> | |
5490 | void func(member<T>*) {} | |
5491 | ||
5492 | void test(); | |
5493 | ||
5494 | void test() { func<foo>(0); } | |
5495 | ||
5496 | } | |
5497 | ||
5498 | } // namespace cxx11 | |
5499 | ||
5500 | #endif // __cplusplus >= 201103L | |
5501 | ||
5502 | ||
5503 | ||
5504 | _ACEOF | |
5505 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5506 | ax_cv_cxx_compile_cxx11=yes | |
5507 | else | |
5508 | ax_cv_cxx_compile_cxx11=no | |
5509 | fi | |
5510 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5511 | fi | |
5512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5513 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5514 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5515 | ac_success=yes | |
5516 | fi | |
5517 | ||
5518 | if test x$ac_success = xno; then | |
41260ac2 SM |
5519 | for alternative in ${ax_cxx_compile_alternatives}; do |
5520 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5521 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5522 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5523 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5524 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5525 | $as_echo_n "(cached) " >&6 |
5526 | else | |
5527 | ac_save_CXX="$CXX" | |
5528 | CXX="$CXX $switch" | |
5529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5530 | /* end confdefs.h. */ | |
5531 | ||
5532 | ||
5533 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5534 | // Hopefully, this will speed up the test. | |
5535 | ||
5536 | #ifndef __cplusplus | |
5537 | ||
5538 | #error "This is not a C++ compiler" | |
5539 | ||
5540 | #elif __cplusplus < 201103L | |
5541 | ||
5542 | #error "This is not a C++11 compiler" | |
5543 | ||
5544 | #else | |
5545 | ||
5546 | namespace cxx11 | |
5547 | { | |
5548 | ||
5549 | namespace test_static_assert | |
5550 | { | |
5551 | ||
5552 | template <typename T> | |
5553 | struct check | |
5554 | { | |
5555 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5556 | }; | |
5557 | ||
5558 | } | |
5559 | ||
5560 | namespace test_final_override | |
5561 | { | |
5562 | ||
5563 | struct Base | |
5564 | { | |
5565 | virtual void f() {} | |
5566 | }; | |
5567 | ||
5568 | struct Derived : public Base | |
5569 | { | |
5570 | virtual void f() override {} | |
5571 | }; | |
5572 | ||
5573 | } | |
5574 | ||
5575 | namespace test_double_right_angle_brackets | |
5576 | { | |
5577 | ||
5578 | template < typename T > | |
5579 | struct check {}; | |
5580 | ||
5581 | typedef check<void> single_type; | |
5582 | typedef check<check<void>> double_type; | |
5583 | typedef check<check<check<void>>> triple_type; | |
5584 | typedef check<check<check<check<void>>>> quadruple_type; | |
5585 | ||
5586 | } | |
5587 | ||
5588 | namespace test_decltype | |
5589 | { | |
5590 | ||
5591 | int | |
5592 | f() | |
5593 | { | |
5594 | int a = 1; | |
5595 | decltype(a) b = 2; | |
5596 | return a + b; | |
5597 | } | |
5598 | ||
5599 | } | |
5600 | ||
5601 | namespace test_type_deduction | |
5602 | { | |
5603 | ||
5604 | template < typename T1, typename T2 > | |
5605 | struct is_same | |
5606 | { | |
5607 | static const bool value = false; | |
5608 | }; | |
5609 | ||
5610 | template < typename T > | |
5611 | struct is_same<T, T> | |
5612 | { | |
5613 | static const bool value = true; | |
5614 | }; | |
5615 | ||
5616 | template < typename T1, typename T2 > | |
5617 | auto | |
5618 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5619 | { | |
5620 | return a1 + a2; | |
5621 | } | |
5622 | ||
5623 | int | |
5624 | test(const int c, volatile int v) | |
5625 | { | |
5626 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5627 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5628 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5629 | auto ac = c; | |
5630 | auto av = v; | |
5631 | auto sumi = ac + av + 'x'; | |
5632 | auto sumf = ac + av + 1.0; | |
5633 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5634 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5635 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5636 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5637 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5638 | return (sumf > 0.0) ? sumi : add(c, v); | |
5639 | } | |
5640 | ||
5641 | } | |
5642 | ||
5643 | namespace test_noexcept | |
5644 | { | |
5645 | ||
5646 | int f() { return 0; } | |
5647 | int g() noexcept { return 0; } | |
5648 | ||
5649 | static_assert(noexcept(f()) == false, ""); | |
5650 | static_assert(noexcept(g()) == true, ""); | |
5651 | ||
5652 | } | |
5653 | ||
5654 | namespace test_constexpr | |
5655 | { | |
5656 | ||
5657 | template < typename CharT > | |
5658 | unsigned long constexpr | |
5659 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5660 | { | |
5661 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5662 | } | |
5663 | ||
5664 | template < typename CharT > | |
5665 | unsigned long constexpr | |
5666 | strlen_c(const CharT *const s) noexcept | |
5667 | { | |
5668 | return strlen_c_r(s, 0UL); | |
5669 | } | |
5670 | ||
5671 | static_assert(strlen_c("") == 0UL, ""); | |
5672 | static_assert(strlen_c("1") == 1UL, ""); | |
5673 | static_assert(strlen_c("example") == 7UL, ""); | |
5674 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5675 | ||
5676 | } | |
5677 | ||
5678 | namespace test_rvalue_references | |
5679 | { | |
5680 | ||
5681 | template < int N > | |
5682 | struct answer | |
5683 | { | |
5684 | static constexpr int value = N; | |
5685 | }; | |
5686 | ||
5687 | answer<1> f(int&) { return answer<1>(); } | |
5688 | answer<2> f(const int&) { return answer<2>(); } | |
5689 | answer<3> f(int&&) { return answer<3>(); } | |
5690 | ||
5691 | void | |
5692 | test() | |
5693 | { | |
5694 | int i = 0; | |
5695 | const int c = 0; | |
5696 | static_assert(decltype(f(i))::value == 1, ""); | |
5697 | static_assert(decltype(f(c))::value == 2, ""); | |
5698 | static_assert(decltype(f(0))::value == 3, ""); | |
5699 | } | |
5700 | ||
5701 | } | |
5702 | ||
5703 | namespace test_uniform_initialization | |
5704 | { | |
5705 | ||
5706 | struct test | |
5707 | { | |
5708 | static const int zero {}; | |
5709 | static const int one {1}; | |
5710 | }; | |
5711 | ||
5712 | static_assert(test::zero == 0, ""); | |
5713 | static_assert(test::one == 1, ""); | |
5714 | ||
5715 | } | |
5716 | ||
5717 | namespace test_lambdas | |
5718 | { | |
5719 | ||
5720 | void | |
5721 | test1() | |
5722 | { | |
5723 | auto lambda1 = [](){}; | |
5724 | auto lambda2 = lambda1; | |
5725 | lambda1(); | |
5726 | lambda2(); | |
5727 | } | |
5728 | ||
5729 | int | |
5730 | test2() | |
5731 | { | |
5732 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5733 | auto b = []() -> int { return '0'; }(); | |
5734 | auto c = [=](){ return a + b; }(); | |
5735 | auto d = [&](){ return c; }(); | |
5736 | auto e = [a, &b](int x) mutable { | |
5737 | const auto identity = [](int y){ return y; }; | |
5738 | for (auto i = 0; i < a; ++i) | |
5739 | a += b--; | |
5740 | return x + identity(a + b); | |
5741 | }(0); | |
5742 | return a + b + c + d + e; | |
5743 | } | |
5744 | ||
5745 | int | |
5746 | test3() | |
5747 | { | |
5748 | const auto nullary = [](){ return 0; }; | |
5749 | const auto unary = [](int x){ return x; }; | |
5750 | using nullary_t = decltype(nullary); | |
5751 | using unary_t = decltype(unary); | |
5752 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5753 | const auto higher2nd = [unary](nullary_t f1){ | |
5754 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5755 | }; | |
5756 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5757 | } | |
5758 | ||
5759 | } | |
5760 | ||
5761 | namespace test_variadic_templates | |
5762 | { | |
5763 | ||
5764 | template <int...> | |
5765 | struct sum; | |
5766 | ||
5767 | template <int N0, int... N1toN> | |
5768 | struct sum<N0, N1toN...> | |
5769 | { | |
5770 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5771 | }; | |
5772 | ||
5773 | template <> | |
5774 | struct sum<> | |
5775 | { | |
5776 | static constexpr auto value = 0; | |
5777 | }; | |
5778 | ||
5779 | static_assert(sum<>::value == 0, ""); | |
5780 | static_assert(sum<1>::value == 1, ""); | |
5781 | static_assert(sum<23>::value == 23, ""); | |
5782 | static_assert(sum<1, 2>::value == 3, ""); | |
5783 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5784 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5785 | ||
5786 | } | |
5787 | ||
5788 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5789 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5790 | // because of this. | |
5791 | namespace test_template_alias_sfinae | |
5792 | { | |
5793 | ||
5794 | struct foo {}; | |
5795 | ||
5796 | template<typename T> | |
5797 | using member = typename T::member_type; | |
5798 | ||
5799 | template<typename T> | |
5800 | void func(...) {} | |
5801 | ||
5802 | template<typename T> | |
5803 | void func(member<T>*) {} | |
5804 | ||
5805 | void test(); | |
5806 | ||
5807 | void test() { func<foo>(0); } | |
5808 | ||
5809 | } | |
5810 | ||
5811 | } // namespace cxx11 | |
5812 | ||
5813 | #endif // __cplusplus >= 201103L | |
5814 | ||
5815 | ||
5816 | ||
5817 | _ACEOF | |
5818 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5819 | eval $cachevar=yes | |
5820 | else | |
5821 | eval $cachevar=no | |
5822 | fi | |
5823 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5824 | CXX="$ac_save_CXX" | |
5825 | fi | |
5826 | eval ac_res=\$$cachevar | |
5827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5828 | $as_echo "$ac_res" >&6; } | |
5829 | if eval test x\$$cachevar = xyes; then | |
5830 | CXX_DIALECT="$switch" | |
5831 | ac_success=yes | |
5832 | break | |
5833 | fi | |
5834 | done | |
5835 | fi | |
5836 | ||
5837 | if test x$ac_success = xno; then | |
41260ac2 SM |
5838 | for alternative in ${ax_cxx_compile_alternatives}; do |
5839 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5840 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5841 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5842 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5843 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5844 | $as_echo_n "(cached) " >&6 |
5845 | else | |
5846 | ac_save_CXX="$CXX" | |
41260ac2 SM |
5847 | CXX="$CXX $switch" |
5848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5849 | /* end confdefs.h. */ |
5850 | ||
5851 | ||
5852 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5853 | // Hopefully, this will speed up the test. | |
5854 | ||
5855 | #ifndef __cplusplus | |
5856 | ||
5857 | #error "This is not a C++ compiler" | |
5858 | ||
5859 | #elif __cplusplus < 201103L | |
5860 | ||
5861 | #error "This is not a C++11 compiler" | |
5862 | ||
5863 | #else | |
5864 | ||
5865 | namespace cxx11 | |
5866 | { | |
5867 | ||
5868 | namespace test_static_assert | |
5869 | { | |
5870 | ||
5871 | template <typename T> | |
5872 | struct check | |
5873 | { | |
5874 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5875 | }; | |
5876 | ||
5877 | } | |
5878 | ||
5879 | namespace test_final_override | |
5880 | { | |
5881 | ||
5882 | struct Base | |
5883 | { | |
5884 | virtual void f() {} | |
5885 | }; | |
5886 | ||
5887 | struct Derived : public Base | |
5888 | { | |
5889 | virtual void f() override {} | |
5890 | }; | |
5891 | ||
5892 | } | |
5893 | ||
5894 | namespace test_double_right_angle_brackets | |
5895 | { | |
5896 | ||
5897 | template < typename T > | |
5898 | struct check {}; | |
5899 | ||
5900 | typedef check<void> single_type; | |
5901 | typedef check<check<void>> double_type; | |
5902 | typedef check<check<check<void>>> triple_type; | |
5903 | typedef check<check<check<check<void>>>> quadruple_type; | |
5904 | ||
5905 | } | |
5906 | ||
5907 | namespace test_decltype | |
5908 | { | |
5909 | ||
5910 | int | |
5911 | f() | |
5912 | { | |
5913 | int a = 1; | |
5914 | decltype(a) b = 2; | |
5915 | return a + b; | |
5916 | } | |
5917 | ||
5918 | } | |
5919 | ||
5920 | namespace test_type_deduction | |
5921 | { | |
5922 | ||
5923 | template < typename T1, typename T2 > | |
5924 | struct is_same | |
5925 | { | |
5926 | static const bool value = false; | |
5927 | }; | |
5928 | ||
5929 | template < typename T > | |
5930 | struct is_same<T, T> | |
5931 | { | |
5932 | static const bool value = true; | |
5933 | }; | |
5934 | ||
5935 | template < typename T1, typename T2 > | |
5936 | auto | |
5937 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5938 | { | |
5939 | return a1 + a2; | |
5940 | } | |
5941 | ||
5942 | int | |
5943 | test(const int c, volatile int v) | |
5944 | { | |
5945 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5946 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5947 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5948 | auto ac = c; | |
5949 | auto av = v; | |
5950 | auto sumi = ac + av + 'x'; | |
5951 | auto sumf = ac + av + 1.0; | |
5952 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5953 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5954 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5955 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5956 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5957 | return (sumf > 0.0) ? sumi : add(c, v); | |
5958 | } | |
5959 | ||
5960 | } | |
5961 | ||
5962 | namespace test_noexcept | |
5963 | { | |
5964 | ||
5965 | int f() { return 0; } | |
5966 | int g() noexcept { return 0; } | |
5967 | ||
5968 | static_assert(noexcept(f()) == false, ""); | |
5969 | static_assert(noexcept(g()) == true, ""); | |
5970 | ||
5971 | } | |
5972 | ||
5973 | namespace test_constexpr | |
5974 | { | |
5975 | ||
5976 | template < typename CharT > | |
5977 | unsigned long constexpr | |
5978 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5979 | { | |
5980 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5981 | } | |
5982 | ||
5983 | template < typename CharT > | |
5984 | unsigned long constexpr | |
5985 | strlen_c(const CharT *const s) noexcept | |
5986 | { | |
5987 | return strlen_c_r(s, 0UL); | |
5988 | } | |
5989 | ||
5990 | static_assert(strlen_c("") == 0UL, ""); | |
5991 | static_assert(strlen_c("1") == 1UL, ""); | |
5992 | static_assert(strlen_c("example") == 7UL, ""); | |
5993 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5994 | ||
5995 | } | |
5996 | ||
5997 | namespace test_rvalue_references | |
5998 | { | |
5999 | ||
6000 | template < int N > | |
6001 | struct answer | |
6002 | { | |
6003 | static constexpr int value = N; | |
6004 | }; | |
6005 | ||
6006 | answer<1> f(int&) { return answer<1>(); } | |
6007 | answer<2> f(const int&) { return answer<2>(); } | |
6008 | answer<3> f(int&&) { return answer<3>(); } | |
6009 | ||
6010 | void | |
6011 | test() | |
6012 | { | |
6013 | int i = 0; | |
6014 | const int c = 0; | |
6015 | static_assert(decltype(f(i))::value == 1, ""); | |
6016 | static_assert(decltype(f(c))::value == 2, ""); | |
6017 | static_assert(decltype(f(0))::value == 3, ""); | |
6018 | } | |
6019 | ||
6020 | } | |
6021 | ||
6022 | namespace test_uniform_initialization | |
6023 | { | |
6024 | ||
6025 | struct test | |
6026 | { | |
6027 | static const int zero {}; | |
6028 | static const int one {1}; | |
6029 | }; | |
6030 | ||
6031 | static_assert(test::zero == 0, ""); | |
6032 | static_assert(test::one == 1, ""); | |
6033 | ||
6034 | } | |
6035 | ||
6036 | namespace test_lambdas | |
6037 | { | |
6038 | ||
6039 | void | |
6040 | test1() | |
6041 | { | |
6042 | auto lambda1 = [](){}; | |
6043 | auto lambda2 = lambda1; | |
6044 | lambda1(); | |
6045 | lambda2(); | |
6046 | } | |
6047 | ||
6048 | int | |
6049 | test2() | |
6050 | { | |
6051 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6052 | auto b = []() -> int { return '0'; }(); | |
6053 | auto c = [=](){ return a + b; }(); | |
6054 | auto d = [&](){ return c; }(); | |
6055 | auto e = [a, &b](int x) mutable { | |
6056 | const auto identity = [](int y){ return y; }; | |
6057 | for (auto i = 0; i < a; ++i) | |
6058 | a += b--; | |
6059 | return x + identity(a + b); | |
6060 | }(0); | |
6061 | return a + b + c + d + e; | |
6062 | } | |
6063 | ||
6064 | int | |
6065 | test3() | |
6066 | { | |
6067 | const auto nullary = [](){ return 0; }; | |
6068 | const auto unary = [](int x){ return x; }; | |
6069 | using nullary_t = decltype(nullary); | |
6070 | using unary_t = decltype(unary); | |
6071 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6072 | const auto higher2nd = [unary](nullary_t f1){ | |
6073 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6074 | }; | |
6075 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6076 | } | |
6077 | ||
6078 | } | |
6079 | ||
6080 | namespace test_variadic_templates | |
6081 | { | |
6082 | ||
6083 | template <int...> | |
6084 | struct sum; | |
6085 | ||
6086 | template <int N0, int... N1toN> | |
6087 | struct sum<N0, N1toN...> | |
6088 | { | |
6089 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6090 | }; | |
6091 | ||
6092 | template <> | |
6093 | struct sum<> | |
6094 | { | |
6095 | static constexpr auto value = 0; | |
6096 | }; | |
6097 | ||
6098 | static_assert(sum<>::value == 0, ""); | |
6099 | static_assert(sum<1>::value == 1, ""); | |
6100 | static_assert(sum<23>::value == 23, ""); | |
6101 | static_assert(sum<1, 2>::value == 3, ""); | |
6102 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6103 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6104 | ||
6105 | } | |
6106 | ||
6107 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6108 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6109 | // because of this. | |
6110 | namespace test_template_alias_sfinae | |
6111 | { | |
6112 | ||
6113 | struct foo {}; | |
6114 | ||
6115 | template<typename T> | |
6116 | using member = typename T::member_type; | |
6117 | ||
6118 | template<typename T> | |
6119 | void func(...) {} | |
6120 | ||
6121 | template<typename T> | |
6122 | void func(member<T>*) {} | |
6123 | ||
6124 | void test(); | |
6125 | ||
6126 | void test() { func<foo>(0); } | |
6127 | ||
6128 | } | |
6129 | ||
6130 | } // namespace cxx11 | |
6131 | ||
6132 | #endif // __cplusplus >= 201103L | |
6133 | ||
6134 | ||
6135 | ||
6136 | _ACEOF | |
6137 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6138 | eval $cachevar=yes | |
6139 | else | |
6140 | eval $cachevar=no | |
6141 | fi | |
6142 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
41260ac2 | 6143 | CXX="$ac_save_CXX" |
0bcda685 PA |
6144 | fi |
6145 | eval ac_res=\$$cachevar | |
6146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6147 | $as_echo "$ac_res" >&6; } | |
41260ac2 SM |
6148 | if eval test x\$$cachevar = xyes; then |
6149 | CXX_DIALECT="$switch" | |
6150 | ac_success=yes | |
6151 | break | |
6152 | fi | |
6153 | done | |
6154 | if test x$ac_success = xyes; then | |
0bcda685 PA |
6155 | break |
6156 | fi | |
6157 | done | |
6158 | fi | |
6159 | ac_ext=c | |
6160 | ac_cpp='$CPP $CPPFLAGS' | |
6161 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6162 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6163 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6164 | ||
6165 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
6166 | if test x$ac_success = xno; then | |
d0ac1c44 | 6167 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
6168 | fi |
6169 | fi | |
6170 | if test x$ac_success = xno; then | |
6171 | HAVE_CXX11=0 | |
6172 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
6173 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
6174 | else | |
6175 | HAVE_CXX11=1 | |
6176 | ||
6177 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
6178 | ||
6179 | fi | |
6180 | ||
6181 | ||
6182 | ||
6183 | ||
a417dc56 RW |
6184 | # Dependency checking. |
6185 | rm -rf .tst 2>/dev/null | |
6186 | mkdir .tst 2>/dev/null | |
6187 | if test -d .tst; then | |
6188 | am__leading_dot=. | |
6189 | else | |
6190 | am__leading_dot=_ | |
6191 | fi | |
6192 | rmdir .tst 2>/dev/null | |
6193 | ||
6194 | DEPDIR="${am__leading_dot}deps" | |
6195 | ||
81ecdfbb | 6196 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
6197 | |
6198 | ||
6199 | depcc="$CC" am_compiler_list= | |
6200 | ||
6201 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
6202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
6203 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 6204 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
81ecdfbb | 6205 | $as_echo_n "(cached) " >&6 |
a417dc56 RW |
6206 | else |
6207 | if test -f "$am_depcomp"; then | |
6208 | # We make a subdir and do the tests there. Otherwise we can end up | |
6209 | # making bogus files that we don't know about and never remove. For | |
6210 | # instance it was reported that on HP-UX the gcc test will end up | |
6211 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6212 | # in D'. | |
6213 | mkdir conftest.dir | |
6214 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6215 | # using a relative directory. | |
6216 | cp "$am_depcomp" conftest.dir | |
6217 | cd conftest.dir | |
6218 | # We will build objects and dependencies in a subdirectory because | |
6219 | # it helps to detect inapplicable dependency modes. For instance | |
6220 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6221 | # side effect of compilation, but ICC will put the dependencies in | |
6222 | # the current directory while Tru64 will put them in the object | |
6223 | # directory. | |
6224 | mkdir sub | |
6225 | ||
6226 | am_cv_CC_dependencies_compiler_type=none | |
6227 | if test "$am_compiler_list" = ""; then | |
6228 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6229 | fi | |
6230 | for depmode in $am_compiler_list; do | |
6231 | if test $depmode = none; then break; fi | |
6232 | ||
81ecdfbb | 6233 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
6234 | # Setup a source with many dependencies, because some compilers |
6235 | # like to wrap large dependency lists on column 80 (with \), and | |
6236 | # we should not choose a depcomp mode which is confused by this. | |
6237 | # | |
6238 | # We need to recreate these files for each test, as the compiler may | |
6239 | # overwrite some of them when testing with obscure command lines. | |
6240 | # This happens at least with the AIX C compiler. | |
6241 | : > sub/conftest.c | |
6242 | for i in 1 2 3 4 5 6; do | |
6243 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6244 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6245 | # Solaris 8's {/usr,}/bin/sh. | |
6246 | touch sub/conftst$i.h | |
6247 | done | |
6248 | echo "include sub/conftest.Po" > confmf | |
6249 | ||
6250 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6251 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6252 | # handle `-M -o', and we need to detect this. | |
6253 | depcmd="depmode=$depmode \ | |
6254 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6255 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6256 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6257 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6258 | if env $depcmd > conftest.err 2>&1 && | |
6259 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6260 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6261 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6262 | # icc doesn't choke on unknown options, it will just issue warnings | |
6263 | # or remarks (even with -Werror). So we grep stderr for any message | |
6264 | # that says an option was ignored or not supported. | |
6265 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6266 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6267 | # The diagnosis changed in icc 8.0: | |
6268 | # icc: Command line remark: option '-MP' not supported | |
6269 | if (grep 'ignoring option' conftest.err || | |
6270 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6271 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6272 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6273 | break |
6274 | fi | |
6275 | fi | |
81ecdfbb | 6276 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6277 | sed -e 's/^/| /' < conftest.err >&5 |
6278 | done | |
6279 | ||
6280 | cd .. | |
6281 | rm -rf conftest.dir | |
6282 | else | |
6283 | am_cv_CC_dependencies_compiler_type=none | |
6284 | fi | |
6285 | ||
6286 | fi | |
81ecdfbb RW |
6287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6288 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6289 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
d0ac1c44 | 6290 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6291 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6292 | ||
6293 | fi | |
6294 | ||
6295 | ||
c971b7fa PA |
6296 | |
6297 | CONFIG_OBS= | |
6298 | CONFIG_DEPS= | |
6299 | CONFIG_SRCS= | |
6300 | ENABLE_CFLAGS= | |
6301 | ||
6302 | CONFIG_ALL= | |
6303 | CONFIG_CLEAN= | |
6304 | CONFIG_INSTALL= | |
6305 | CONFIG_UNINSTALL= | |
6306 | ||
6307 | # If we haven't got the data from the intl directory, | |
6308 | # assume NLS is disabled. | |
6309 | USE_NLS=no | |
6310 | LIBINTL= | |
6311 | LIBINTL_DEP= | |
6312 | INCINTL= | |
6313 | XGETTEXT= | |
6314 | GMSGFMT= | |
6315 | POSUB= | |
783e057b DJ |
6316 | |
6317 | if test -f ../intl/config.intl; then | |
6318 | . ../intl/config.intl | |
6319 | fi | |
81ecdfbb RW |
6320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6321 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6322 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6324 | $as_echo "no" >&6; } | |
783e057b | 6325 | else |
81ecdfbb RW |
6326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6327 | $as_echo "yes" >&6; } | |
783e057b | 6328 | |
81ecdfbb | 6329 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6330 | |
6331 | ||
81ecdfbb RW |
6332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6333 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6334 | # Look for .po and .gmo files in the source directory. |
6335 | CATALOGS= | |
6336 | XLINGUAS= | |
6337 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6338 | # If there aren't any .gmo files the shell will give us the | |
6339 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6340 | # weeded out. | |
6341 | case "$cat" in *\**) | |
6342 | continue;; | |
6343 | esac | |
6344 | # The quadruple backslash is collapsed to a double backslash | |
6345 | # by the backticks, then collapsed again by the double quotes, | |
6346 | # leaving us with one backslash in the sed expression (right | |
6347 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6348 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6349 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6350 | # The user is allowed to set LINGUAS to a list of languages to | |
6351 | # install catalogs for. If it's empty that means "all of them." | |
6352 | if test "x$LINGUAS" = x; then | |
6353 | CATALOGS="$CATALOGS $cat" | |
6354 | XLINGUAS="$XLINGUAS $lang" | |
6355 | else | |
6356 | case "$LINGUAS" in *$lang*) | |
6357 | CATALOGS="$CATALOGS $cat" | |
6358 | XLINGUAS="$XLINGUAS $lang" | |
6359 | ;; | |
6360 | esac | |
e28b3332 DJ |
6361 | fi |
6362 | done | |
c971b7fa PA |
6363 | LINGUAS="$XLINGUAS" |
6364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6365 | $as_echo "$LINGUAS" >&6; } | |
6366 | ||
6367 | ||
6368 | DATADIRNAME=share | |
6369 | ||
6370 | INSTOBJEXT=.mo | |
6371 | ||
6372 | GENCAT=gencat | |
6373 | ||
6374 | CATOBJEXT=.gmo | |
e28b3332 | 6375 | |
e28b3332 DJ |
6376 | fi |
6377 | ||
c971b7fa PA |
6378 | localedir='${datadir}/locale' |
6379 | ||
6380 | ||
6381 | if test x"$USE_NLS" = xyes; then | |
6382 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6383 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6384 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6385 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6386 | fi |
e28b3332 | 6387 | |
c971b7fa PA |
6388 | PACKAGE=gdb |
6389 | ||
6390 | cat >>confdefs.h <<_ACEOF | |
6391 | #define PACKAGE "$PACKAGE" | |
6392 | _ACEOF | |
6393 | ||
6394 | ||
6395 | ||
6396 | # We never need to detect it in this sub-configure. | |
6397 | # But preserve it for config.status --recheck. | |
6398 | ||
6399 | ||
6400 | ||
6401 | MAKEINFO_EXTRA_FLAGS="" | |
6402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6403 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
d0ac1c44 | 6404 | if ${gdb_cv_have_makeinfo_click+:} false; then : |
c971b7fa PA |
6405 | $as_echo_n "(cached) " >&6 |
6406 | else | |
6407 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6408 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6409 | gdb_cv_have_makeinfo_click=yes | |
6410 | else | |
6411 | gdb_cv_have_makeinfo_click=no | |
6412 | fi | |
6413 | fi | |
6414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6415 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6416 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6417 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6418 | fi | |
e28b3332 DJ |
6419 | |
6420 | ||
bec39cab AC |
6421 | |
6422 | ||
81ecdfbb RW |
6423 | # Check whether --with-separate-debug-dir was given. |
6424 | if test "${with_separate_debug_dir+set}" = set; then : | |
6425 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6426 | DEBUGDIR=$withval |
6427 | else | |
6428 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6429 | fi |
6430 | ||
20e95c23 | 6431 | |
783e057b DJ |
6432 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6433 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6434 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6435 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6436 | |
783e057b DJ |
6437 | cat >>confdefs.h <<_ACEOF |
6438 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6439 | _ACEOF |
20e95c23 | 6440 | |
20e95c23 | 6441 | |
20e95c23 | 6442 | |
0c4a4063 | 6443 | |
b14b1491 TT |
6444 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6445 | if test "x$prefix" = xNONE; then | |
6446 | test_prefix=/usr/local | |
6447 | else | |
6448 | test_prefix=$prefix | |
6449 | fi | |
783e057b | 6450 | else |
b14b1491 | 6451 | test_prefix=$exec_prefix |
783e057b | 6452 | fi |
b14b1491 TT |
6453 | value=0 |
6454 | case ${ac_define_dir} in | |
6455 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6456 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6457 | value=1 | |
6458 | ;; | |
6459 | esac | |
6460 | ||
6461 | cat >>confdefs.h <<_ACEOF | |
6462 | #define DEBUGDIR_RELOCATABLE $value | |
6463 | _ACEOF | |
6464 | ||
6465 | ||
6466 | ||
0c4a4063 | 6467 | |
f83d8a90 DE |
6468 | # We can't pass paths as command line arguments. |
6469 | # Mingw32 tries to be clever and will convert the paths for us. | |
6470 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6471 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6472 | # This breaks GDB's relocatable path conversions since paths passed in | |
6473 | # config.h would not get so translated, the path prefixes no longer match. | |
6474 | ||
6475 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6476 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6477 | ac_define_dir=`eval echo $bindir` | |
6478 | ac_define_dir=`eval echo $ac_define_dir` | |
6479 | ||
6480 | cat >>confdefs.h <<_ACEOF | |
6481 | #define BINDIR "$ac_define_dir" | |
6482 | _ACEOF | |
6483 | ||
6484 | ||
6485 | ||
b14b1491 TT |
6486 | # GDB's datadir relocation |
6487 | ||
6488 | ||
6489 | ||
81ecdfbb RW |
6490 | # Check whether --with-gdb-datadir was given. |
6491 | if test "${with_gdb_datadir+set}" = set; then : | |
6492 | withval=$with_gdb_datadir; | |
b14b1491 | 6493 | GDB_DATADIR=$withval |
20e95c23 | 6494 | else |
b14b1491 | 6495 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6496 | fi |
6497 | ||
20e95c23 | 6498 | |
b14b1491 TT |
6499 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6500 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6501 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6502 | ac_define_dir=`eval echo $ac_define_dir` | |
6503 | ||
6504 | cat >>confdefs.h <<_ACEOF | |
6505 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6506 | _ACEOF |
6507 | ||
b14b1491 TT |
6508 | |
6509 | ||
0c4a4063 | 6510 | |
b14b1491 TT |
6511 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6512 | if test "x$prefix" = xNONE; then | |
6513 | test_prefix=/usr/local | |
6514 | else | |
6515 | test_prefix=$prefix | |
6516 | fi | |
6517 | else | |
6518 | test_prefix=$exec_prefix | |
6519 | fi | |
6520 | value=0 | |
6521 | case ${ac_define_dir} in | |
6522 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6523 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6524 | value=1 | |
6525 | ;; | |
6526 | esac | |
6527 | ||
6528 | cat >>confdefs.h <<_ACEOF | |
6529 | #define GDB_DATADIR_RELOCATABLE $value | |
6530 | _ACEOF | |
6531 | ||
6532 | ||
783e057b | 6533 | |
20e95c23 | 6534 | |
0c4a4063 | 6535 | |
81ecdfbb RW |
6536 | # Check whether --with-relocated-sources was given. |
6537 | if test "${with_relocated_sources+set}" = set; then : | |
6538 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6539 | |
6540 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6541 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6542 | ac_define_dir=`eval echo $reloc_srcdir` | |
6543 | ac_define_dir=`eval echo $ac_define_dir` | |
6544 | ||
6545 | cat >>confdefs.h <<_ACEOF | |
6546 | #define RELOC_SRCDIR "$ac_define_dir" | |
6547 | _ACEOF | |
6548 | ||
6549 | ||
6550 | ||
81ecdfbb RW |
6551 | fi |
6552 | ||
29b0e8a2 | 6553 | |
7349ff92 JK |
6554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6555 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6556 | ||
6557 | # Check whether --with-auto-load-dir was given. | |
6558 | if test "${with_auto_load_dir+set}" = set; then : | |
6559 | withval=$with_auto_load_dir; | |
6560 | else | |
1564a261 | 6561 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6562 | fi |
6563 | ||
2861ee4f | 6564 | escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6565 | |
6566 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6567 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6568 | ac_define_dir=`eval echo $escape_dir` | |
6569 | ac_define_dir=`eval echo $ac_define_dir` | |
6570 | ||
6571 | cat >>confdefs.h <<_ACEOF | |
6572 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6573 | _ACEOF | |
6574 | ||
6575 | ||
6576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6577 | $as_echo "$with_auto_load_dir" >&6; } | |
6578 | ||
bccbefd2 JK |
6579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6580 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6581 | ||
6582 | # Check whether --with-auto-load-safe-path was given. | |
6583 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6584 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6585 | with_auto_load_safe_path="/" |
6586 | fi | |
bccbefd2 | 6587 | else |
7349ff92 | 6588 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6589 | fi |
6590 | ||
2861ee4f | 6591 | escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6592 | |
6593 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6594 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6595 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6596 | ac_define_dir=`eval echo $ac_define_dir` |
6597 | ||
6598 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6599 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6600 | _ACEOF |
6601 | ||
6602 | ||
6603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6604 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6605 | ||
f99d1d37 TT |
6606 | # Enable shared libraries. |
6607 | # Check whether --enable-shared was given. | |
6608 | if test "${enable_shared+set}" = set; then : | |
6609 | enableval=$enable_shared; | |
6610 | else | |
6611 | enable_shared=yes | |
6612 | fi | |
29b0e8a2 | 6613 | |
20e95c23 | 6614 | |
f99d1d37 TT |
6615 | # If we have shared libraries, try to set RPATH_ENVVAR reasonably, |
6616 | # such that we can find the shared libraries in the build tree. | |
6617 | if test $enable_shared = no; then | |
6618 | # The variable `RPATH_ENVVAR' itself is not likely to be used on any | |
6619 | # platform. | |
6620 | RPATH_ENVVAR=RPATH_ENVVAR | |
6621 | else | |
6622 | # The variable `LD_LIBRARY_PATH' is used on most platforms. | |
6623 | RPATH_ENVVAR=LD_LIBRARY_PATH | |
6624 | # The following exceptions are taken from Libtool 1.4.3. | |
6625 | case $host_os in | |
6626 | aix*) | |
6627 | if test $host_cpu != ia64; then | |
6628 | RPATH_ENVVAR=LIBPATH | |
6629 | fi ;; | |
6630 | darwin* | rhapsody*) | |
6631 | RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; | |
6632 | esac | |
6633 | fi | |
20e95c23 DJ |
6634 | |
6635 | ||
783e057b | 6636 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6637 | # Check whether --enable-targets was given. |
6638 | if test "${enable_targets+set}" = set; then : | |
6639 | enableval=$enable_targets; case "${enableval}" in | |
d0ac1c44 | 6640 | yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 |
783e057b DJ |
6641 | ;; |
6642 | no) enable_targets= ;; | |
6643 | *) enable_targets=$enableval ;; | |
6644 | esac | |
81ecdfbb RW |
6645 | fi |
6646 | ||
20e95c23 | 6647 | |
783e057b | 6648 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6649 | # Check whether --enable-64-bit-bfd was given. |
6650 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6651 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6652 | yes) want64=true ;; |
6653 | no) want64=false ;; | |
d0ac1c44 | 6654 | *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6655 | esac |
6656 | else | |
6657 | want64=false | |
81ecdfbb RW |
6658 | fi |
6659 | ||
783e057b DJ |
6660 | # Provide defaults for some variables set by the per-host and per-target |
6661 | # configuration. | |
6662 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6663 | |
783e057b DJ |
6664 | if test "${target}" = "${host}"; then |
6665 | gdb_native=yes | |
6666 | else | |
6667 | gdb_native=no | |
6668 | fi | |
20e95c23 | 6669 | |
783e057b | 6670 | . $srcdir/configure.host |
20e95c23 | 6671 | |
783e057b | 6672 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6673 | |
783e057b DJ |
6674 | TARGET_OBS= |
6675 | all_targets= | |
b292c783 | 6676 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6677 | |
783e057b | 6678 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6679 | do |
783e057b DJ |
6680 | if test "$targ_alias" = "all"; then |
6681 | all_targets=true | |
6682 | else | |
6683 | # Canonicalize the secondary target names. | |
6684 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6685 | if test -n "$result"; then | |
6686 | targ=$result | |
6687 | else | |
6688 | targ=$targ_alias | |
6689 | fi | |
20e95c23 | 6690 | |
783e057b | 6691 | . ${srcdir}/configure.tgt |
20e95c23 | 6692 | |
bf307134 | 6693 | if test -z "${gdb_target_obs}"; then : |
d0ac1c44 | 6694 | as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 |
bf307134 JB |
6695 | fi |
6696 | ||
783e057b DJ |
6697 | # Target-specific object files |
6698 | for i in ${gdb_target_obs}; do | |
6699 | case " $TARGET_OBS " in | |
6700 | *" ${i} "*) ;; | |
6701 | *) | |
6702 | TARGET_OBS="$TARGET_OBS ${i}" | |
6703 | ;; | |
6704 | esac | |
6705 | done | |
20e95c23 | 6706 | |
783e057b DJ |
6707 | # Check whether this target needs 64-bit CORE_ADDR |
6708 | if test x${want64} = xfalse; then | |
6709 | . ${srcdir}/../bfd/config.bfd | |
6710 | fi | |
b292c783 JK |
6711 | |
6712 | # Check whether this target is native and supports gcore. | |
6713 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6714 | && $gdb_have_gcore; then | |
6715 | HAVE_NATIVE_GCORE_TARGET=1 | |
6716 | fi | |
783e057b | 6717 | fi |
20e95c23 DJ |
6718 | done |
6719 | ||
783e057b DJ |
6720 | if test x${all_targets} = xtrue; then |
6721 | ||
6722 | # We want all 64-bit targets if we either: | |
6723 | # - run on a 64-bit host or | |
6724 | # - already require 64-bit support for some other target or | |
6725 | # - the --enable-64-bit-bfd option was supplied | |
6726 | # Otherwise we only support all 32-bit targets. | |
6727 | # | |
6728 | # NOTE: This test must be in sync with the corresponding | |
6729 | # tests in BFD! | |
20e95c23 | 6730 | |
783e057b | 6731 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6732 | # The cast to long int works around a bug in the HP C Compiler |
6733 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6734 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6735 | # This bug is HP SR number 8606223364. | |
6736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6737 | $as_echo_n "checking size of long... " >&6; } | |
d0ac1c44 | 6738 | if ${ac_cv_sizeof_long+:} false; then : |
81ecdfbb | 6739 | $as_echo_n "(cached) " >&6 |
c0993dbe | 6740 | else |
81ecdfbb | 6741 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6742 | |
81ecdfbb RW |
6743 | else |
6744 | if test "$ac_cv_type_long" = yes; then | |
6745 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6746 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
6747 | as_fn_error 77 "cannot compute sizeof (long) |
6748 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
6749 | else |
6750 | ac_cv_sizeof_long=0 | |
6751 | fi | |
c0993dbe | 6752 | fi |
81ecdfbb | 6753 | |
c0993dbe | 6754 | fi |
81ecdfbb RW |
6755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6756 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6757 | |
c0993dbe | 6758 | |
c0993dbe | 6759 | |
c0993dbe UW |
6760 | cat >>confdefs.h <<_ACEOF |
6761 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6762 | _ACEOF | |
6763 | ||
6764 | ||
6765 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6766 | want64=true | |
6767 | fi | |
6768 | fi | |
6769 | if test x${want64} = xtrue; then | |
6770 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6771 | else | |
6772 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6773 | fi | |
6774 | fi | |
6775 | ||
6776 | ||
6777 | ||
b292c783 | 6778 | |
c0993dbe UW |
6779 | # For other settings, only the main target counts. |
6780 | gdb_sim= | |
6781 | gdb_osabi= | |
c0993dbe UW |
6782 | targ=$target; . ${srcdir}/configure.tgt |
6783 | ||
6784 | # Fetch the default architecture and default target vector from BFD. | |
6785 | targ=$target; . $srcdir/../bfd/config.bfd | |
6786 | ||
6787 | # We only want the first architecture, so strip off the others if | |
6788 | # there is more than one. | |
6789 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6790 | ||
6791 | if test "x$targ_archs" != x; then | |
6792 | ||
6793 | cat >>confdefs.h <<_ACEOF | |
6794 | #define DEFAULT_BFD_ARCH $targ_archs | |
6795 | _ACEOF | |
6796 | ||
6797 | fi | |
6798 | if test "x$targ_defvec" != x; then | |
6799 | ||
6800 | cat >>confdefs.h <<_ACEOF | |
6801 | #define DEFAULT_BFD_VEC $targ_defvec | |
6802 | _ACEOF | |
6803 | ||
6804 | fi | |
6805 | ||
c0993dbe | 6806 | # Enable MI. |
81ecdfbb RW |
6807 | # Check whether --enable-gdbmi was given. |
6808 | if test "${enable_gdbmi+set}" = set; then : | |
6809 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6810 | yes | no) |
6811 | ;; | |
6812 | *) | |
d0ac1c44 | 6813 | as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6814 | esac |
6815 | else | |
6816 | enable_gdbmi=yes | |
81ecdfbb RW |
6817 | fi |
6818 | ||
c0993dbe | 6819 | if test x"$enable_gdbmi" = xyes; then |
0ad6b8ee | 6820 | if test -d "$srcdir/mi"; then |
c0993dbe UW |
6821 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" |
6822 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6823 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6824 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6825 | fi | |
6826 | fi | |
6827 | ||
6828 | # Enable TUI. | |
81ecdfbb RW |
6829 | # Check whether --enable-tui was given. |
6830 | if test "${enable_tui+set}" = set; then : | |
6831 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6832 | yes | no | auto) |
c0993dbe UW |
6833 | ;; |
6834 | *) | |
d0ac1c44 | 6835 | as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6836 | esac |
6837 | else | |
3ca64bd3 | 6838 | enable_tui=auto |
81ecdfbb RW |
6839 | fi |
6840 | ||
c0993dbe UW |
6841 | |
6842 | # Enable gdbtk. | |
81ecdfbb RW |
6843 | # Check whether --enable-gdbtk was given. |
6844 | if test "${enable_gdbtk+set}" = set; then : | |
6845 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6846 | yes | no) |
6847 | ;; | |
6848 | *) | |
d0ac1c44 | 6849 | as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6850 | esac |
6851 | else | |
0ad6b8ee | 6852 | if test -d "$srcdir/gdbtk"; then |
c0993dbe UW |
6853 | enable_gdbtk=yes |
6854 | else | |
6855 | enable_gdbtk=no | |
6856 | fi | |
81ecdfbb RW |
6857 | fi |
6858 | ||
c0993dbe UW |
6859 | # We unconditionally disable gdbtk tests on selected platforms. |
6860 | case $host_os in | |
6861 | go32* | windows*) | |
81ecdfbb RW |
6862 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6863 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6864 | enable_gdbtk=no ;; |
6865 | esac | |
6866 | ||
0d79cdc4 AM |
6867 | # Handle optional debuginfod support |
6868 | ||
f6720b1c AM |
6869 | |
6870 | ||
6871 | ||
6872 | ||
6873 | ||
6874 | ||
6875 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
6876 | if test -n "$ac_tool_prefix"; then | |
6877 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
6878 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
6879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6880 | $as_echo_n "checking for $ac_word... " >&6; } | |
6881 | if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
6882 | $as_echo_n "(cached) " >&6 | |
6883 | else | |
6884 | case $PKG_CONFIG in | |
6885 | [\\/]* | ?:[\\/]*) | |
6886 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
6887 | ;; | |
6888 | *) | |
6889 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6890 | for as_dir in $PATH | |
6891 | do | |
6892 | IFS=$as_save_IFS | |
6893 | test -z "$as_dir" && as_dir=. | |
6894 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6895 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6896 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6897 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6898 | break 2 | |
6899 | fi | |
6900 | done | |
6901 | done | |
6902 | IFS=$as_save_IFS | |
6903 | ||
6904 | ;; | |
6905 | esac | |
6906 | fi | |
6907 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
6908 | if test -n "$PKG_CONFIG"; then | |
6909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
6910 | $as_echo "$PKG_CONFIG" >&6; } | |
6911 | else | |
6912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6913 | $as_echo "no" >&6; } | |
6914 | fi | |
6915 | ||
6916 | ||
6917 | fi | |
6918 | if test -z "$ac_cv_path_PKG_CONFIG"; then | |
6919 | ac_pt_PKG_CONFIG=$PKG_CONFIG | |
6920 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
6921 | set dummy pkg-config; ac_word=$2 | |
6922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6923 | $as_echo_n "checking for $ac_word... " >&6; } | |
6924 | if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
6925 | $as_echo_n "(cached) " >&6 | |
6926 | else | |
6927 | case $ac_pt_PKG_CONFIG in | |
6928 | [\\/]* | ?:[\\/]*) | |
6929 | ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
6930 | ;; | |
6931 | *) | |
6932 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6933 | for as_dir in $PATH | |
6934 | do | |
6935 | IFS=$as_save_IFS | |
6936 | test -z "$as_dir" && as_dir=. | |
6937 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6938 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6939 | ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6940 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6941 | break 2 | |
6942 | fi | |
6943 | done | |
6944 | done | |
6945 | IFS=$as_save_IFS | |
6946 | ||
6947 | ;; | |
6948 | esac | |
6949 | fi | |
6950 | ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
6951 | if test -n "$ac_pt_PKG_CONFIG"; then | |
6952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
6953 | $as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
6954 | else | |
6955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6956 | $as_echo "no" >&6; } | |
6957 | fi | |
6958 | ||
6959 | if test "x$ac_pt_PKG_CONFIG" = x; then | |
6960 | PKG_CONFIG="" | |
6961 | else | |
6962 | case $cross_compiling:$ac_tool_warned in | |
6963 | yes:) | |
6964 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6965 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6966 | ac_tool_warned=yes ;; | |
6967 | esac | |
6968 | PKG_CONFIG=$ac_pt_PKG_CONFIG | |
6969 | fi | |
6970 | else | |
6971 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
6972 | fi | |
6973 | ||
6974 | fi | |
6975 | if test -n "$PKG_CONFIG"; then | |
6976 | _pkg_min_version=0.9.0 | |
6977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
6978 | $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
6979 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
6980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6981 | $as_echo "yes" >&6; } | |
6982 | else | |
6983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6984 | $as_echo "no" >&6; } | |
6985 | PKG_CONFIG="" | |
6986 | fi | |
6987 | fi | |
6988 | ||
6989 | # Handle optional debuginfod support | |
0d79cdc4 AM |
6990 | |
6991 | # Check whether --with-debuginfod was given. | |
6992 | if test "${with_debuginfod+set}" = set; then : | |
6993 | withval=$with_debuginfod; | |
6994 | else | |
6995 | with_debuginfod=auto | |
6996 | fi | |
6997 | ||
6998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5 | |
6999 | $as_echo_n "checking whether to use debuginfod... " >&6; } | |
7000 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5 | |
7001 | $as_echo "$with_debuginfod" >&6; } | |
7002 | ||
f6720b1c | 7003 | if test "x$with_debuginfod" != xno; then |
0d79cdc4 | 7004 | |
f6720b1c AM |
7005 | pkg_failed=no |
7006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5 | |
7007 | $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; } | |
7008 | ||
7009 | if test -n "$DEBUGINFOD_CFLAGS"; then | |
7010 | pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS" | |
7011 | elif test -n "$PKG_CONFIG"; then | |
7012 | if test -n "$PKG_CONFIG" && \ | |
7013 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7014 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7015 | ac_status=$? | |
7016 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7017 | test $ac_status = 0; }; then | |
7018 | pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null` | |
7019 | test "x$?" != "x0" && pkg_failed=yes | |
0d79cdc4 | 7020 | else |
f6720b1c | 7021 | pkg_failed=yes |
0d79cdc4 | 7022 | fi |
f6720b1c AM |
7023 | else |
7024 | pkg_failed=untried | |
0d79cdc4 | 7025 | fi |
f6720b1c AM |
7026 | if test -n "$DEBUGINFOD_LIBS"; then |
7027 | pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS" | |
7028 | elif test -n "$PKG_CONFIG"; then | |
7029 | if test -n "$PKG_CONFIG" && \ | |
7030 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7031 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7032 | ac_status=$? | |
7033 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7034 | test $ac_status = 0; }; then | |
7035 | pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null` | |
7036 | test "x$?" != "x0" && pkg_failed=yes | |
7037 | else | |
7038 | pkg_failed=yes | |
0d79cdc4 | 7039 | fi |
f6720b1c AM |
7040 | else |
7041 | pkg_failed=untried | |
0d79cdc4 | 7042 | fi |
bec39cab | 7043 | |
377170fa L |
7044 | if test $pkg_failed = no; then |
7045 | pkg_save_LDFLAGS="$LDFLAGS" | |
7046 | LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS" | |
7047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d70f978b L |
7048 | /* end confdefs.h. */ |
7049 | ||
7050 | int | |
7051 | main () | |
7052 | { | |
377170fa | 7053 | |
d70f978b L |
7054 | ; |
7055 | return 0; | |
7056 | } | |
7057 | _ACEOF | |
7058 | if ac_fn_c_try_link "$LINENO"; then : | |
377170fa | 7059 | |
d70f978b L |
7060 | else |
7061 | pkg_failed=yes | |
7062 | fi | |
7063 | rm -f core conftest.err conftest.$ac_objext \ | |
7064 | conftest$ac_exeext conftest.$ac_ext | |
377170fa L |
7065 | LDFLAGS=$pkg_save_LDFLAGS |
7066 | fi | |
d70f978b | 7067 | |
0d79cdc4 | 7068 | |
0d79cdc4 | 7069 | |
f6720b1c AM |
7070 | if test $pkg_failed = yes; then |
7071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7072 | $as_echo "no" >&6; } | |
0d79cdc4 | 7073 | |
f6720b1c AM |
7074 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
7075 | _pkg_short_errors_supported=yes | |
7076 | else | |
7077 | _pkg_short_errors_supported=no | |
7078 | fi | |
7079 | if test $_pkg_short_errors_supported = yes; then | |
7080 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7081 | else | |
7082 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7083 | fi | |
7084 | # Put the nasty error message in config.log where it belongs | |
7085 | echo "$DEBUGINFOD_PKG_ERRORS" >&5 | |
0d79cdc4 | 7086 | |
f6720b1c AM |
7087 | if test "x$with_debuginfod" = xyes; then |
7088 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7089 | else | |
7090 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7091 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7092 | fi | |
7093 | elif test $pkg_failed = untried; then | |
7094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7095 | $as_echo "no" >&6; } | |
7096 | if test "x$with_debuginfod" = xyes; then | |
7097 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7098 | else | |
7099 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7100 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7101 | fi | |
7102 | else | |
7103 | DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS | |
7104 | DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS | |
7105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7106 | $as_echo "yes" >&6; } | |
7107 | ||
7108 | $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h | |
7109 | ||
7110 | fi | |
7111 | else | |
7112 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5 | |
7113 | $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;} | |
0d79cdc4 AM |
7114 | fi |
7115 | ||
7116 | ||
7117 | # Libunwind support for ia64. | |
05e7c244 JK |
7118 | |
7119 | # Check whether --with-libunwind-ia64 was given. | |
7120 | if test "${with_libunwind_ia64+set}" = set; then : | |
7121 | withval=$with_libunwind_ia64; | |
bec39cab | 7122 | else |
05e7c244 JK |
7123 | with_libunwind_ia64=auto |
7124 | fi | |
bec39cab | 7125 | |
05e7c244 JK |
7126 | |
7127 | # Backward compatibility option. | |
7128 | if test "${with_libunwind+set}" = set; then | |
7129 | if test x"$with_libunwind_ia64" != xauto; then | |
d0ac1c44 | 7130 | as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 |
05e7c244 JK |
7131 | fi |
7132 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
7133 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
7134 | with_libunwind_ia64="$with_libunwind" | |
7135 | fi | |
7136 | ||
7137 | case "$with_libunwind_ia64" in | |
7138 | yes | no) | |
7139 | ;; | |
7140 | auto) | |
7141 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 7142 | do : |
b54a8fd7 | 7143 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7144 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7145 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7146 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7147 | _ACEOF |
7148 | ||
7149 | fi | |
7150 | ||
7151 | done | |
7152 | ||
05e7c244 JK |
7153 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
7154 | ;; | |
7155 | *) | |
d0ac1c44 | 7156 | as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 |
05e7c244 JK |
7157 | ;; |
7158 | esac | |
bec39cab | 7159 | |
05e7c244 | 7160 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 7161 | for ac_header in libunwind-ia64.h |
81ecdfbb | 7162 | do : |
b54a8fd7 | 7163 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7164 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7165 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7166 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7167 | _ACEOF |
7168 | ||
7169 | fi | |
7170 | ||
7171 | done | |
7172 | ||
05e7c244 | 7173 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
d0ac1c44 | 7174 | as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 |
05e7c244 JK |
7175 | fi |
7176 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
7177 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
7178 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
7179 | fi |
7180 | ||
cb01cfba JB |
7181 | opt_curses=no |
7182 | ||
81ecdfbb RW |
7183 | # Check whether --with-curses was given. |
7184 | if test "${with_curses+set}" = set; then : | |
7185 | withval=$with_curses; opt_curses=$withval | |
7186 | fi | |
7187 | ||
cb01cfba | 7188 | |
76a39ba7 | 7189 | prefer_curses=no |
cb01cfba | 7190 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 7191 | prefer_curses=yes |
cb01cfba JB |
7192 | fi |
7193 | ||
a9322a30 | 7194 | # Profiling support. |
81ecdfbb RW |
7195 | # Check whether --enable-profiling was given. |
7196 | if test "${enable_profiling+set}" = set; then : | |
7197 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
7198 | yes | no) |
7199 | ;; | |
7200 | *) | |
d0ac1c44 | 7201 | as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
7202 | esac |
7203 | else | |
7204 | enable_profiling=no | |
81ecdfbb | 7205 | fi |
bec39cab | 7206 | |
a9322a30 TT |
7207 | |
7208 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
7209 | do : |
7210 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7211 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 7212 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
7213 | cat >>confdefs.h <<_ACEOF |
7214 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 7215 | _ACEOF |
a9322a30 | 7216 | |
81ecdfbb RW |
7217 | fi |
7218 | done | |
a9322a30 | 7219 | |
81ecdfbb RW |
7220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
7221 | $as_echo_n "checking for _etext... " >&6; } | |
d0ac1c44 | 7222 | if ${ac_cv_var__etext+:} false; then : |
81ecdfbb RW |
7223 | $as_echo_n "(cached) " >&6 |
7224 | else | |
7225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7226 | /* end confdefs.h. */ | |
7227 | #include <stdlib.h> | |
5593a99a | 7228 | extern char _etext; |
a9322a30 TT |
7229 | int |
7230 | main () | |
7231 | { | |
7232 | free (&_etext); | |
5593a99a | 7233 | |
a9322a30 TT |
7234 | ; |
7235 | return 0; | |
7236 | } | |
bec39cab | 7237 | _ACEOF |
81ecdfbb | 7238 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7239 | ac_cv_var__etext=yes |
bec39cab | 7240 | else |
81ecdfbb | 7241 | ac_cv_var__etext=no |
5593a99a | 7242 | |
bec39cab | 7243 | fi |
81ecdfbb RW |
7244 | rm -f core conftest.err conftest.$ac_objext \ |
7245 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 7246 | |
bec39cab | 7247 | fi |
81ecdfbb RW |
7248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
7249 | $as_echo "$ac_cv_var__etext" >&6; } | |
0ad6b8ee | 7250 | if test "$ac_cv_var__etext" = yes; then |
60ca704f | 7251 | |
81ecdfbb | 7252 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 7253 | |
bec39cab | 7254 | fi |
81ecdfbb RW |
7255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
7256 | $as_echo_n "checking for etext... " >&6; } | |
d0ac1c44 | 7257 | if ${ac_cv_var_etext+:} false; then : |
81ecdfbb | 7258 | $as_echo_n "(cached) " >&6 |
bec39cab | 7259 | else |
81ecdfbb | 7260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7261 | /* end confdefs.h. */ |
a9322a30 | 7262 | #include <stdlib.h> |
5593a99a | 7263 | extern char etext; |
bec39cab AC |
7264 | int |
7265 | main () | |
7266 | { | |
a9322a30 | 7267 | free (&etext); |
5593a99a | 7268 | |
bec39cab AC |
7269 | ; |
7270 | return 0; | |
7271 | } | |
7272 | _ACEOF | |
81ecdfbb | 7273 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7274 | ac_cv_var_etext=yes |
bec39cab | 7275 | else |
81ecdfbb | 7276 | ac_cv_var_etext=no |
5593a99a | 7277 | |
bec39cab | 7278 | fi |
81ecdfbb RW |
7279 | rm -f core conftest.err conftest.$ac_objext \ |
7280 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 7281 | |
bec39cab | 7282 | fi |
81ecdfbb RW |
7283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
7284 | $as_echo "$ac_cv_var_etext" >&6; } | |
0ad6b8ee | 7285 | if test "$ac_cv_var_etext" = yes; then |
a9322a30 | 7286 | |
81ecdfbb | 7287 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
7288 | |
7289 | fi | |
a9322a30 | 7290 | if test "$enable_profiling" = yes ; then |
0ad6b8ee | 7291 | if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then |
d0ac1c44 | 7292 | as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
7293 | fi |
7294 | PROFILE_CFLAGS=-pg | |
7295 | OLD_CFLAGS="$CFLAGS" | |
7296 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 7297 | |
81ecdfbb RW |
7298 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
7299 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
d0ac1c44 | 7300 | if ${ac_cv_cc_supports_pg+:} false; then : |
81ecdfbb | 7301 | $as_echo_n "(cached) " >&6 |
bec39cab | 7302 | else |
81ecdfbb | 7303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7304 | /* end confdefs.h. */ |
bec39cab AC |
7305 | |
7306 | int | |
7307 | main () | |
7308 | { | |
a9322a30 | 7309 | int x; |
bec39cab AC |
7310 | ; |
7311 | return 0; | |
7312 | } | |
7313 | _ACEOF | |
81ecdfbb | 7314 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7315 | ac_cv_cc_supports_pg=yes |
bec39cab | 7316 | else |
81ecdfbb | 7317 | ac_cv_cc_supports_pg=no |
5593a99a | 7318 | |
bec39cab | 7319 | fi |
81ecdfbb | 7320 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 7321 | |
bec39cab | 7322 | fi |
81ecdfbb RW |
7323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7324 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7325 | |
0ad6b8ee | 7326 | if test "$ac_cv_cc_supports_pg" = no; then |
d0ac1c44 | 7327 | as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7328 | fi |
bec39cab | 7329 | |
a9322a30 | 7330 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7331 | fi |
7332 | ||
44cee4fd TT |
7333 | CODESIGN_CERT= |
7334 | # Check whether --enable-codesign was given. | |
7335 | if test "${enable_codesign+set}" = set; then : | |
7336 | enableval=$enable_codesign; CODESIGN_CERT=$enableval | |
7337 | fi | |
7338 | ||
7339 | ||
7340 | ||
c16158bc JM |
7341 | |
7342 | ||
81ecdfbb RW |
7343 | # Check whether --with-pkgversion was given. |
7344 | if test "${with_pkgversion+set}" = set; then : | |
7345 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 7346 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
7347 | no) PKGVERSION= ;; |
7348 | *) PKGVERSION="($withval) " ;; | |
7349 | esac | |
7350 | else | |
7351 | PKGVERSION="(GDB) " | |
7352 | ||
81ecdfbb | 7353 | fi |
c16158bc JM |
7354 | |
7355 | ||
7356 | ||
7357 | ||
81ecdfbb RW |
7358 | |
7359 | # Check whether --with-bugurl was given. | |
7360 | if test "${with_bugurl+set}" = set; then : | |
7361 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 7362 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
7363 | no) BUGURL= |
7364 | ;; | |
7365 | *) BUGURL="$withval" | |
7366 | ;; | |
7367 | esac | |
7368 | else | |
112c22ed | 7369 | BUGURL="https://www.gnu.org/software/gdb/bugs/" |
c16158bc | 7370 | |
81ecdfbb RW |
7371 | fi |
7372 | ||
c16158bc JM |
7373 | case ${BUGURL} in |
7374 | "") | |
7375 | REPORT_BUGS_TO= | |
7376 | REPORT_BUGS_TEXI= | |
7377 | ;; | |
7378 | *) | |
7379 | REPORT_BUGS_TO="<$BUGURL>" | |
7380 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7381 | ;; | |
7382 | esac; | |
7383 | ||
7384 | ||
7385 | ||
7386 | ||
7387 | cat >>confdefs.h <<_ACEOF | |
7388 | #define PKGVERSION "$PKGVERSION" | |
7389 | _ACEOF | |
7390 | ||
7391 | ||
7392 | cat >>confdefs.h <<_ACEOF | |
7393 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7394 | _ACEOF | |
7395 | ||
7396 | ||
bec39cab AC |
7397 | # --------------------- # |
7398 | # Checks for programs. # | |
7399 | # --------------------- # | |
7400 | ||
7401 | for ac_prog in gawk mawk nawk awk | |
7402 | do | |
7403 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7404 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7406 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7407 | if ${ac_cv_prog_AWK+:} false; then : |
81ecdfbb | 7408 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7409 | else |
7410 | if test -n "$AWK"; then | |
7411 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7412 | else | |
7413 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7414 | for as_dir in $PATH | |
7415 | do | |
7416 | IFS=$as_save_IFS | |
7417 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7418 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7419 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7420 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7421 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7422 | break 2 |
7423 | fi | |
7424 | done | |
81ecdfbb RW |
7425 | done |
7426 | IFS=$as_save_IFS | |
bec39cab AC |
7427 | |
7428 | fi | |
7429 | fi | |
7430 | AWK=$ac_cv_prog_AWK | |
7431 | if test -n "$AWK"; then | |
81ecdfbb RW |
7432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7433 | $as_echo "$AWK" >&6; } | |
bec39cab | 7434 | else |
81ecdfbb RW |
7435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7436 | $as_echo "no" >&6; } | |
bec39cab AC |
7437 | fi |
7438 | ||
bec39cab | 7439 | |
81ecdfbb | 7440 | test -n "$AWK" && break |
bec39cab AC |
7441 | done |
7442 | ||
c971b7fa PA |
7443 | # Find a good install program. We prefer a C program (faster), |
7444 | # so one script is as good as another. But avoid the broken or | |
7445 | # incompatible versions: | |
7446 | # SysV /etc/install, /usr/sbin/install | |
7447 | # SunOS /usr/etc/install | |
7448 | # IRIX /sbin/install | |
7449 | # AIX /bin/install | |
7450 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7451 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7452 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7453 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7454 | # OS/2's system install, which has a completely different semantic | |
7455 | # ./install, which can be erroneously created by make from ./install.sh. | |
7456 | # Reject install programs that cannot install multiple files. | |
7457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7458 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7459 | if test -z "$INSTALL"; then | |
d0ac1c44 | 7460 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
7461 | $as_echo_n "(cached) " >&6 |
7462 | else | |
7463 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7464 | for as_dir in $PATH | |
7465 | do | |
7466 | IFS=$as_save_IFS | |
7467 | test -z "$as_dir" && as_dir=. | |
7468 | # Account for people who put trailing slashes in PATH elements. | |
7469 | case $as_dir/ in #(( | |
7470 | ./ | .// | /[cC]/* | \ | |
7471 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7472 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7473 | /usr/ucb/* ) ;; | |
7474 | *) | |
7475 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7476 | # Don't use installbsd from OSF since it installs stuff as root | |
7477 | # by default. | |
7478 | for ac_prog in ginstall scoinst install; do | |
7479 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 7480 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
7481 | if test $ac_prog = install && |
7482 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7483 | # AIX install. It has an incompatible calling convention. | |
7484 | : | |
7485 | elif test $ac_prog = install && | |
7486 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7487 | # program-specific install script used by HP pwplus--don't use. | |
7488 | : | |
7489 | else | |
7490 | rm -rf conftest.one conftest.two conftest.dir | |
7491 | echo one > conftest.one | |
7492 | echo two > conftest.two | |
7493 | mkdir conftest.dir | |
7494 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7495 | test -s conftest.one && test -s conftest.two && | |
7496 | test -s conftest.dir/conftest.one && | |
7497 | test -s conftest.dir/conftest.two | |
7498 | then | |
7499 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7500 | break 3 | |
7501 | fi | |
7502 | fi | |
7503 | fi | |
7504 | done | |
7505 | done | |
7506 | ;; | |
7507 | esac | |
7508 | ||
7509 | done | |
7510 | IFS=$as_save_IFS | |
7511 | ||
7512 | rm -rf conftest.one conftest.two conftest.dir | |
7513 | ||
7514 | fi | |
7515 | if test "${ac_cv_path_install+set}" = set; then | |
7516 | INSTALL=$ac_cv_path_install | |
7517 | else | |
7518 | # As a last resort, use the slow shell script. Don't cache a | |
7519 | # value for INSTALL within a source directory, because that will | |
7520 | # break other packages using the cache if that directory is | |
7521 | # removed, or if the value is a relative name. | |
7522 | INSTALL=$ac_install_sh | |
7523 | fi | |
7524 | fi | |
7525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7526 | $as_echo "$INSTALL" >&6; } | |
7527 | ||
7528 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7529 | # It thinks the first close brace ends the variable substitution. | |
7530 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7531 | ||
7532 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7533 | ||
7534 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7535 | |
81ecdfbb RW |
7536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7537 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7538 | LN_S=$as_ln_s |
7539 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7541 | $as_echo "yes" >&6; } | |
bec39cab | 7542 | else |
81ecdfbb RW |
7543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7544 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7545 | fi |
7546 | ||
7547 | if test -n "$ac_tool_prefix"; then | |
7548 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7549 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7551 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7552 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb | 7553 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7554 | else |
7555 | if test -n "$RANLIB"; then | |
7556 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7557 | else | |
7558 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7559 | for as_dir in $PATH | |
7560 | do | |
7561 | IFS=$as_save_IFS | |
7562 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7563 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7564 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7565 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7566 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7567 | break 2 |
7568 | fi | |
7569 | done | |
81ecdfbb RW |
7570 | done |
7571 | IFS=$as_save_IFS | |
bec39cab AC |
7572 | |
7573 | fi | |
7574 | fi | |
7575 | RANLIB=$ac_cv_prog_RANLIB | |
7576 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7578 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7579 | else |
81ecdfbb RW |
7580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7581 | $as_echo "no" >&6; } | |
bec39cab AC |
7582 | fi |
7583 | ||
81ecdfbb | 7584 | |
bec39cab AC |
7585 | fi |
7586 | if test -z "$ac_cv_prog_RANLIB"; then | |
7587 | ac_ct_RANLIB=$RANLIB | |
7588 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7589 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7591 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7592 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
81ecdfbb | 7593 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7594 | else |
7595 | if test -n "$ac_ct_RANLIB"; then | |
7596 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7597 | else | |
7598 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7599 | for as_dir in $PATH | |
7600 | do | |
7601 | IFS=$as_save_IFS | |
7602 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7603 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7604 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7605 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7606 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7607 | break 2 |
7608 | fi | |
7609 | done | |
81ecdfbb RW |
7610 | done |
7611 | IFS=$as_save_IFS | |
bec39cab | 7612 | |
bec39cab AC |
7613 | fi |
7614 | fi | |
7615 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7616 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7618 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7619 | else |
81ecdfbb RW |
7620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7621 | $as_echo "no" >&6; } | |
bec39cab AC |
7622 | fi |
7623 | ||
81ecdfbb RW |
7624 | if test "x$ac_ct_RANLIB" = x; then |
7625 | RANLIB=":" | |
7626 | else | |
7627 | case $cross_compiling:$ac_tool_warned in | |
7628 | yes:) | |
7629 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7630 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7631 | ac_tool_warned=yes ;; | |
7632 | esac | |
7633 | RANLIB=$ac_ct_RANLIB | |
7634 | fi | |
bec39cab AC |
7635 | else |
7636 | RANLIB="$ac_cv_prog_RANLIB" | |
7637 | fi | |
7638 | ||
7639 | for ac_prog in 'bison -y' byacc | |
7640 | do | |
7641 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7642 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7643 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7644 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7645 | if ${ac_cv_prog_YACC+:} false; then : |
81ecdfbb | 7646 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7647 | else |
7648 | if test -n "$YACC"; then | |
7649 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7650 | else | |
7651 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7652 | for as_dir in $PATH | |
7653 | do | |
7654 | IFS=$as_save_IFS | |
7655 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7656 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7657 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7658 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7659 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7660 | break 2 |
7661 | fi | |
7662 | done | |
81ecdfbb RW |
7663 | done |
7664 | IFS=$as_save_IFS | |
bec39cab AC |
7665 | |
7666 | fi | |
7667 | fi | |
7668 | YACC=$ac_cv_prog_YACC | |
7669 | if test -n "$YACC"; then | |
81ecdfbb RW |
7670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7671 | $as_echo "$YACC" >&6; } | |
bec39cab | 7672 | else |
81ecdfbb RW |
7673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7674 | $as_echo "no" >&6; } | |
bec39cab AC |
7675 | fi |
7676 | ||
81ecdfbb | 7677 | |
bec39cab AC |
7678 | test -n "$YACC" && break |
7679 | done | |
7680 | test -n "$YACC" || YACC="yacc" | |
7681 | ||
7682 | ||
7683 | if test -n "$ac_tool_prefix"; then | |
7684 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7685 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7687 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7688 | if ${ac_cv_prog_AR+:} false; then : |
81ecdfbb | 7689 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7690 | else |
7691 | if test -n "$AR"; then | |
7692 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7693 | else | |
7694 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7695 | for as_dir in $PATH | |
7696 | do | |
7697 | IFS=$as_save_IFS | |
7698 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7699 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7700 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7701 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7702 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7703 | break 2 |
7704 | fi | |
7705 | done | |
81ecdfbb RW |
7706 | done |
7707 | IFS=$as_save_IFS | |
bec39cab AC |
7708 | |
7709 | fi | |
7710 | fi | |
7711 | AR=$ac_cv_prog_AR | |
7712 | if test -n "$AR"; then | |
81ecdfbb RW |
7713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7714 | $as_echo "$AR" >&6; } | |
bec39cab | 7715 | else |
81ecdfbb RW |
7716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7717 | $as_echo "no" >&6; } | |
bec39cab AC |
7718 | fi |
7719 | ||
81ecdfbb | 7720 | |
bec39cab AC |
7721 | fi |
7722 | if test -z "$ac_cv_prog_AR"; then | |
7723 | ac_ct_AR=$AR | |
7724 | # Extract the first word of "ar", so it can be a program name with args. | |
7725 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7727 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7728 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
81ecdfbb | 7729 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7730 | else |
7731 | if test -n "$ac_ct_AR"; then | |
7732 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7733 | else | |
7734 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7735 | for as_dir in $PATH | |
7736 | do | |
7737 | IFS=$as_save_IFS | |
7738 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7739 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7740 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7741 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7742 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7743 | break 2 |
7744 | fi | |
7745 | done | |
81ecdfbb RW |
7746 | done |
7747 | IFS=$as_save_IFS | |
bec39cab AC |
7748 | |
7749 | fi | |
7750 | fi | |
7751 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7752 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7754 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7755 | else |
81ecdfbb RW |
7756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7757 | $as_echo "no" >&6; } | |
bec39cab AC |
7758 | fi |
7759 | ||
81ecdfbb RW |
7760 | if test "x$ac_ct_AR" = x; then |
7761 | AR="" | |
7762 | else | |
7763 | case $cross_compiling:$ac_tool_warned in | |
7764 | yes:) | |
7765 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7766 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7767 | ac_tool_warned=yes ;; | |
7768 | esac | |
7769 | AR=$ac_ct_AR | |
7770 | fi | |
bec39cab AC |
7771 | else |
7772 | AR="$ac_cv_prog_AR" | |
7773 | fi | |
7774 | ||
7775 | if test -n "$ac_tool_prefix"; then | |
7776 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7777 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7778 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7779 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7780 | if ${ac_cv_prog_DLLTOOL+:} false; then : |
81ecdfbb | 7781 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7782 | else |
7783 | if test -n "$DLLTOOL"; then | |
7784 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7785 | else | |
7786 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7787 | for as_dir in $PATH | |
7788 | do | |
7789 | IFS=$as_save_IFS | |
7790 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7791 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7792 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7793 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7794 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7795 | break 2 |
7796 | fi | |
7797 | done | |
81ecdfbb RW |
7798 | done |
7799 | IFS=$as_save_IFS | |
bec39cab AC |
7800 | |
7801 | fi | |
7802 | fi | |
7803 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7804 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7806 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7807 | else |
81ecdfbb RW |
7808 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7809 | $as_echo "no" >&6; } | |
bec39cab AC |
7810 | fi |
7811 | ||
81ecdfbb | 7812 | |
bec39cab AC |
7813 | fi |
7814 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7815 | ac_ct_DLLTOOL=$DLLTOOL | |
7816 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7817 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7819 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7820 | if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : |
81ecdfbb | 7821 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7822 | else |
7823 | if test -n "$ac_ct_DLLTOOL"; then | |
7824 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7825 | else | |
7826 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7827 | for as_dir in $PATH | |
7828 | do | |
7829 | IFS=$as_save_IFS | |
7830 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7831 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7832 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7833 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7834 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7835 | break 2 |
7836 | fi | |
7837 | done | |
81ecdfbb RW |
7838 | done |
7839 | IFS=$as_save_IFS | |
bec39cab AC |
7840 | |
7841 | fi | |
7842 | fi | |
7843 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7844 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7846 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7847 | else |
81ecdfbb RW |
7848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7849 | $as_echo "no" >&6; } | |
bec39cab AC |
7850 | fi |
7851 | ||
81ecdfbb RW |
7852 | if test "x$ac_ct_DLLTOOL" = x; then |
7853 | DLLTOOL="" | |
7854 | else | |
7855 | case $cross_compiling:$ac_tool_warned in | |
7856 | yes:) | |
7857 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7858 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7859 | ac_tool_warned=yes ;; | |
7860 | esac | |
7861 | DLLTOOL=$ac_ct_DLLTOOL | |
7862 | fi | |
bec39cab AC |
7863 | else |
7864 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7865 | fi | |
7866 | ||
7867 | if test -n "$ac_tool_prefix"; then | |
7868 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7869 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7871 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7872 | if ${ac_cv_prog_WINDRES+:} false; then : |
81ecdfbb | 7873 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7874 | else |
7875 | if test -n "$WINDRES"; then | |
7876 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7877 | else | |
7878 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7879 | for as_dir in $PATH | |
7880 | do | |
7881 | IFS=$as_save_IFS | |
7882 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7883 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7884 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7885 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7886 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7887 | break 2 |
7888 | fi | |
7889 | done | |
81ecdfbb RW |
7890 | done |
7891 | IFS=$as_save_IFS | |
bec39cab AC |
7892 | |
7893 | fi | |
7894 | fi | |
7895 | WINDRES=$ac_cv_prog_WINDRES | |
7896 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7898 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7899 | else |
81ecdfbb RW |
7900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7901 | $as_echo "no" >&6; } | |
bec39cab AC |
7902 | fi |
7903 | ||
81ecdfbb | 7904 | |
bec39cab AC |
7905 | fi |
7906 | if test -z "$ac_cv_prog_WINDRES"; then | |
7907 | ac_ct_WINDRES=$WINDRES | |
7908 | # Extract the first word of "windres", so it can be a program name with args. | |
7909 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7911 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7912 | if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : |
81ecdfbb | 7913 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7914 | else |
7915 | if test -n "$ac_ct_WINDRES"; then | |
7916 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7917 | else | |
7918 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7919 | for as_dir in $PATH | |
7920 | do | |
7921 | IFS=$as_save_IFS | |
7922 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7923 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7924 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7925 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7926 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7927 | break 2 |
7928 | fi | |
7929 | done | |
81ecdfbb RW |
7930 | done |
7931 | IFS=$as_save_IFS | |
bec39cab AC |
7932 | |
7933 | fi | |
7934 | fi | |
7935 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7936 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7938 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7939 | else |
81ecdfbb RW |
7940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7941 | $as_echo "no" >&6; } | |
c906108c | 7942 | fi |
bec39cab | 7943 | |
81ecdfbb RW |
7944 | if test "x$ac_ct_WINDRES" = x; then |
7945 | WINDRES="" | |
7946 | else | |
7947 | case $cross_compiling:$ac_tool_warned in | |
7948 | yes:) | |
7949 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7950 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7951 | ac_tool_warned=yes ;; | |
7952 | esac | |
7953 | WINDRES=$ac_ct_WINDRES | |
7954 | fi | |
c906108c | 7955 | else |
bec39cab | 7956 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7957 | fi |
7958 | ||
bec39cab | 7959 | |
036c3acb TS |
7960 | case $host_os in |
7961 | gnu*) | |
7962 | # Needed for GNU Hurd hosts. | |
7963 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7964 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7965 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7966 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7967 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7968 | if ${ac_cv_prog_MIG+:} false; then : |
81ecdfbb | 7969 | $as_echo_n "(cached) " >&6 |
c906108c | 7970 | else |
bec39cab AC |
7971 | if test -n "$MIG"; then |
7972 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7973 | else | |
7974 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7975 | for as_dir in $PATH | |
7976 | do | |
7977 | IFS=$as_save_IFS | |
7978 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7979 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7980 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7981 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7982 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7983 | break 2 |
7984 | fi | |
7985 | done | |
81ecdfbb RW |
7986 | done |
7987 | IFS=$as_save_IFS | |
bec39cab | 7988 | |
c906108c | 7989 | fi |
bec39cab AC |
7990 | fi |
7991 | MIG=$ac_cv_prog_MIG | |
7992 | if test -n "$MIG"; then | |
81ecdfbb RW |
7993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7994 | $as_echo "$MIG" >&6; } | |
c906108c | 7995 | else |
81ecdfbb RW |
7996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7997 | $as_echo "no" >&6; } | |
c906108c SS |
7998 | fi |
7999 | ||
81ecdfbb | 8000 | |
bec39cab AC |
8001 | fi |
8002 | if test -z "$ac_cv_prog_MIG"; then | |
8003 | ac_ct_MIG=$MIG | |
8004 | # Extract the first word of "mig", so it can be a program name with args. | |
8005 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
8006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8007 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 8008 | if ${ac_cv_prog_ac_ct_MIG+:} false; then : |
81ecdfbb | 8009 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8010 | else |
8011 | if test -n "$ac_ct_MIG"; then | |
8012 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
8013 | else | |
8014 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8015 | for as_dir in $PATH | |
8016 | do | |
8017 | IFS=$as_save_IFS | |
8018 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 8019 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 8020 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 8021 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 8022 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8023 | break 2 |
8024 | fi | |
8025 | done | |
81ecdfbb RW |
8026 | done |
8027 | IFS=$as_save_IFS | |
c906108c | 8028 | |
bec39cab AC |
8029 | fi |
8030 | fi | |
8031 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
8032 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
8033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
8034 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 8035 | else |
81ecdfbb RW |
8036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8037 | $as_echo "no" >&6; } | |
bec39cab | 8038 | fi |
c906108c | 8039 | |
81ecdfbb RW |
8040 | if test "x$ac_ct_MIG" = x; then |
8041 | MIG="" | |
8042 | else | |
8043 | case $cross_compiling:$ac_tool_warned in | |
8044 | yes:) | |
8045 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8046 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8047 | ac_tool_warned=yes ;; | |
8048 | esac | |
8049 | MIG=$ac_ct_MIG | |
8050 | fi | |
bec39cab AC |
8051 | else |
8052 | MIG="$ac_cv_prog_MIG" | |
8053 | fi | |
c906108c | 8054 | |
036c3acb | 8055 | if test x"$MIG" = x; then |
d0ac1c44 | 8056 | as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 |
036c3acb TS |
8057 | fi |
8058 | ;; | |
8059 | esac | |
c906108c | 8060 | |
bec39cab AC |
8061 | # ---------------------- # |
8062 | # Checks for libraries. # | |
8063 | # ---------------------- # | |
c906108c | 8064 | |
bec39cab | 8065 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
8066 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
8067 | $as_echo_n "checking for main in -lm... " >&6; } | |
d0ac1c44 | 8068 | if ${ac_cv_lib_m_main+:} false; then : |
81ecdfbb | 8069 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8070 | else |
8071 | ac_check_lib_save_LIBS=$LIBS | |
8072 | LIBS="-lm $LIBS" | |
81ecdfbb | 8073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8074 | /* end confdefs.h. */ |
c906108c | 8075 | |
c906108c | 8076 | |
bec39cab AC |
8077 | int |
8078 | main () | |
8079 | { | |
81ecdfbb | 8080 | return main (); |
bec39cab AC |
8081 | ; |
8082 | return 0; | |
8083 | } | |
8084 | _ACEOF | |
81ecdfbb | 8085 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
8086 | ac_cv_lib_m_main=yes |
8087 | else | |
81ecdfbb | 8088 | ac_cv_lib_m_main=no |
bec39cab | 8089 | fi |
81ecdfbb RW |
8090 | rm -f core conftest.err conftest.$ac_objext \ |
8091 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
8092 | LIBS=$ac_check_lib_save_LIBS |
8093 | fi | |
81ecdfbb RW |
8094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
8095 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
d0ac1c44 | 8096 | if test "x$ac_cv_lib_m_main" = xyes; then : |
bec39cab AC |
8097 | cat >>confdefs.h <<_ACEOF |
8098 | #define HAVE_LIBM 1 | |
8099 | _ACEOF | |
8100 | ||
8101 | LIBS="-lm $LIBS" | |
c906108c | 8102 | |
c906108c | 8103 | fi |
bec39cab AC |
8104 | |
8105 | ||
bec39cab | 8106 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
8107 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
8108 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
d0ac1c44 | 8109 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb | 8110 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8111 | else |
8112 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8113 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8114 | /* end confdefs.h. */ |
ddc9cd0f | 8115 | |
81ecdfbb RW |
8116 | /* Override any GCC internal prototype to avoid an error. |
8117 | Use char because int might match the return type of a GCC | |
8118 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
8119 | #ifdef __cplusplus |
8120 | extern "C" | |
8121 | #endif | |
bec39cab AC |
8122 | char gethostbyname (); |
8123 | int | |
8124 | main () | |
8125 | { | |
81ecdfbb | 8126 | return gethostbyname (); |
bec39cab AC |
8127 | ; |
8128 | return 0; | |
8129 | } | |
8130 | _ACEOF | |
81ecdfbb RW |
8131 | for ac_lib in '' nsl; do |
8132 | if test -z "$ac_lib"; then | |
8133 | ac_res="none required" | |
8134 | else | |
8135 | ac_res=-l$ac_lib | |
b4e70030 | 8136 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8137 | fi |
8138 | if ac_fn_c_try_link "$LINENO"; then : | |
8139 | ac_cv_search_gethostbyname=$ac_res | |
8140 | fi | |
8141 | rm -f core conftest.err conftest.$ac_objext \ | |
8142 | conftest$ac_exeext | |
d0ac1c44 | 8143 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb RW |
8144 | break |
8145 | fi | |
8146 | done | |
d0ac1c44 | 8147 | if ${ac_cv_search_gethostbyname+:} false; then : |
ddc9cd0f | 8148 | |
bec39cab | 8149 | else |
81ecdfbb | 8150 | ac_cv_search_gethostbyname=no |
bec39cab | 8151 | fi |
81ecdfbb | 8152 | rm conftest.$ac_ext |
bec39cab AC |
8153 | LIBS=$ac_func_search_save_LIBS |
8154 | fi | |
81ecdfbb RW |
8155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
8156 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
8157 | ac_res=$ac_cv_search_gethostbyname | |
8158 | if test "$ac_res" != no; then : | |
8159 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 8160 | |
bec39cab | 8161 | fi |
96baa820 | 8162 | |
c906108c | 8163 | |
b4e70030 | 8164 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
8165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
8166 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
d0ac1c44 | 8167 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb | 8168 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
8169 | else |
8170 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8171 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8172 | /* end confdefs.h. */ |
8173 | ||
81ecdfbb RW |
8174 | /* Override any GCC internal prototype to avoid an error. |
8175 | Use char because int might match the return type of a GCC | |
8176 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
8177 | #ifdef __cplusplus |
8178 | extern "C" | |
8179 | #endif | |
b4e70030 JB |
8180 | char socketpair (); |
8181 | int | |
8182 | main () | |
8183 | { | |
81ecdfbb | 8184 | return socketpair (); |
b4e70030 JB |
8185 | ; |
8186 | return 0; | |
8187 | } | |
8188 | _ACEOF | |
81ecdfbb RW |
8189 | for ac_lib in '' socket; do |
8190 | if test -z "$ac_lib"; then | |
8191 | ac_res="none required" | |
8192 | else | |
8193 | ac_res=-l$ac_lib | |
b4e70030 | 8194 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8195 | fi |
8196 | if ac_fn_c_try_link "$LINENO"; then : | |
8197 | ac_cv_search_socketpair=$ac_res | |
8198 | fi | |
8199 | rm -f core conftest.err conftest.$ac_objext \ | |
8200 | conftest$ac_exeext | |
d0ac1c44 | 8201 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb RW |
8202 | break |
8203 | fi | |
8204 | done | |
d0ac1c44 | 8205 | if ${ac_cv_search_socketpair+:} false; then : |
b4e70030 | 8206 | |
b4e70030 | 8207 | else |
81ecdfbb | 8208 | ac_cv_search_socketpair=no |
b4e70030 | 8209 | fi |
81ecdfbb | 8210 | rm conftest.$ac_ext |
b4e70030 JB |
8211 | LIBS=$ac_func_search_save_LIBS |
8212 | fi | |
81ecdfbb RW |
8213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
8214 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
8215 | ac_res=$ac_cv_search_socketpair | |
8216 | if test "$ac_res" != no; then : | |
8217 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
8218 | |
8219 | fi | |
8220 | ||
8221 | ||
233a11ab | 8222 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 8223 | |
711a72d3 | 8224 | # Use the system's zlib library. |
39f3de7c L |
8225 | zlibdir="-L\$(top_builddir)/../zlib" |
8226 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 8227 | |
711a72d3 L |
8228 | # Check whether --with-system-zlib was given. |
8229 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
8230 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
8231 | zlibdir= | |
8232 | zlibinc= | |
8233 | fi | |
b040ad30 | 8234 | |
233a11ab | 8235 | fi |
233a11ab | 8236 | |
233a11ab | 8237 | |
233a11ab | 8238 | |
b040ad30 | 8239 | |
233a11ab | 8240 | |
77f120bf | 8241 | |
016a3251 DD |
8242 | if test "X$prefix" = "XNONE"; then |
8243 | acl_final_prefix="$ac_default_prefix" | |
8244 | else | |
8245 | acl_final_prefix="$prefix" | |
8246 | fi | |
8247 | if test "X$exec_prefix" = "XNONE"; then | |
8248 | acl_final_exec_prefix='${prefix}' | |
8249 | else | |
8250 | acl_final_exec_prefix="$exec_prefix" | |
8251 | fi | |
8252 | acl_save_prefix="$prefix" | |
8253 | prefix="$acl_final_prefix" | |
8254 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8255 | prefix="$acl_save_prefix" | |
8256 | ||
8257 | ||
8258 | # Check whether --with-gnu-ld was given. | |
8259 | if test "${with_gnu_ld+set}" = set; then : | |
8260 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8261 | else | |
8262 | with_gnu_ld=no | |
8263 | fi | |
8264 | ||
8265 | # Prepare PATH_SEPARATOR. | |
8266 | # The user is always right. | |
8267 | if test "${PATH_SEPARATOR+set}" != set; then | |
8268 | echo "#! /bin/sh" >conf$$.sh | |
8269 | echo "exit 0" >>conf$$.sh | |
8270 | chmod +x conf$$.sh | |
8271 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8272 | PATH_SEPARATOR=';' | |
8273 | else | |
8274 | PATH_SEPARATOR=: | |
8275 | fi | |
8276 | rm -f conf$$.sh | |
8277 | fi | |
8278 | ac_prog=ld | |
8279 | if test "$GCC" = yes; then | |
8280 | # Check if gcc -print-prog-name=ld gives a path. | |
8281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8282 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8283 | case $host in | |
8284 | *-*-mingw*) | |
8285 | # gcc leaves a trailing carriage return which upsets mingw | |
8286 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8287 | *) | |
8288 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8289 | esac | |
8290 | case $ac_prog in | |
8291 | # Accept absolute paths. | |
8292 | [\\/]* | [A-Za-z]:[\\/]*) | |
8293 | re_direlt='/[^/][^/]*/\.\./' | |
8294 | # Canonicalize the path of ld | |
8295 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8296 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8297 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8298 | done | |
8299 | test -z "$LD" && LD="$ac_prog" | |
8300 | ;; | |
8301 | "") | |
8302 | # If it fails, then pretend we aren't using GCC. | |
8303 | ac_prog=ld | |
8304 | ;; | |
8305 | *) | |
8306 | # If it is relative, then search for the first ld in PATH. | |
8307 | with_gnu_ld=unknown | |
8308 | ;; | |
8309 | esac | |
8310 | elif test "$with_gnu_ld" = yes; then | |
8311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8312 | $as_echo_n "checking for GNU ld... " >&6; } | |
8313 | else | |
8314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8315 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8316 | fi | |
d0ac1c44 | 8317 | if ${acl_cv_path_LD+:} false; then : |
016a3251 DD |
8318 | $as_echo_n "(cached) " >&6 |
8319 | else | |
8320 | if test -z "$LD"; then | |
8321 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8322 | for ac_dir in $PATH; do | |
8323 | test -z "$ac_dir" && ac_dir=. | |
8324 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8325 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8326 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8327 | # but apparently some GNU ld's only accept -v. | |
8328 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8329 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8330 | test "$with_gnu_ld" != no && break | |
8331 | else | |
8332 | test "$with_gnu_ld" != yes && break | |
8333 | fi | |
8334 | fi | |
8335 | done | |
8336 | IFS="$ac_save_ifs" | |
8337 | else | |
8338 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8339 | fi | |
8340 | fi | |
8341 | ||
8342 | LD="$acl_cv_path_LD" | |
8343 | if test -n "$LD"; then | |
8344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8345 | $as_echo "$LD" >&6; } | |
8346 | else | |
8347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8348 | $as_echo "no" >&6; } | |
8349 | fi | |
d0ac1c44 | 8350 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
016a3251 DD |
8351 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
8352 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
d0ac1c44 | 8353 | if ${acl_cv_prog_gnu_ld+:} false; then : |
016a3251 DD |
8354 | $as_echo_n "(cached) " >&6 |
8355 | else | |
8356 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8357 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8358 | acl_cv_prog_gnu_ld=yes | |
8359 | else | |
8360 | acl_cv_prog_gnu_ld=no | |
8361 | fi | |
8362 | fi | |
8363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8364 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8365 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8366 | ||
8367 | ||
8368 | ||
8369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8370 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
d0ac1c44 | 8371 | if ${acl_cv_rpath+:} false; then : |
016a3251 DD |
8372 | $as_echo_n "(cached) " >&6 |
8373 | else | |
8374 | ||
8375 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8376 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8377 | . ./conftest.sh | |
8378 | rm -f ./conftest.sh | |
8379 | acl_cv_rpath=done | |
8380 | ||
8381 | fi | |
8382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8383 | $as_echo "$acl_cv_rpath" >&6; } | |
8384 | wl="$acl_cv_wl" | |
8385 | libext="$acl_cv_libext" | |
8386 | shlibext="$acl_cv_shlibext" | |
8387 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8388 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8389 | hardcode_direct="$acl_cv_hardcode_direct" | |
8390 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8391 | # Check whether --enable-rpath was given. | |
8392 | if test "${enable_rpath+set}" = set; then : | |
8393 | enableval=$enable_rpath; : | |
8394 | else | |
8395 | enable_rpath=yes | |
8396 | fi | |
8397 | ||
8398 | ||
8399 | ||
8400 | ||
8401 | ||
8402 | ||
8403 | ||
8404 | ||
8405 | use_additional=yes | |
8406 | ||
8407 | acl_save_prefix="$prefix" | |
8408 | prefix="$acl_final_prefix" | |
8409 | acl_save_exec_prefix="$exec_prefix" | |
8410 | exec_prefix="$acl_final_exec_prefix" | |
8411 | ||
8412 | eval additional_includedir=\"$includedir\" | |
8413 | eval additional_libdir=\"$libdir\" | |
8414 | ||
8415 | exec_prefix="$acl_save_exec_prefix" | |
8416 | prefix="$acl_save_prefix" | |
77f120bf | 8417 | |
6c7a06a3 | 8418 | |
81ecdfbb RW |
8419 | # Check whether --with-libiconv-prefix was given. |
8420 | if test "${with_libiconv_prefix+set}" = set; then : | |
8421 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8422 | if test "X$withval" = "Xno"; then |
8423 | use_additional=no | |
8424 | else | |
8425 | if test "X$withval" = "X"; then | |
8426 | ||
8427 | acl_save_prefix="$prefix" | |
8428 | prefix="$acl_final_prefix" | |
8429 | acl_save_exec_prefix="$exec_prefix" | |
8430 | exec_prefix="$acl_final_exec_prefix" | |
8431 | ||
8432 | eval additional_includedir=\"$includedir\" | |
8433 | eval additional_libdir=\"$libdir\" | |
8434 | ||
8435 | exec_prefix="$acl_save_exec_prefix" | |
8436 | prefix="$acl_save_prefix" | |
8437 | ||
8438 | else | |
8439 | additional_includedir="$withval/include" | |
8440 | additional_libdir="$withval/lib" | |
8441 | fi | |
8442 | fi | |
6c7a06a3 | 8443 | |
81ecdfbb RW |
8444 | fi |
8445 | ||
9f1528a1 AB |
8446 | |
8447 | # Check whether --with-libiconv-type was given. | |
8448 | if test "${with_libiconv_type+set}" = set; then : | |
8449 | withval=$with_libiconv_type; with_libiconv_type=$withval | |
8450 | else | |
8451 | with_libiconv_type=auto | |
8452 | fi | |
8453 | ||
8454 | lib_type=`eval echo \$with_libiconv_type` | |
8455 | ||
016a3251 DD |
8456 | LIBICONV= |
8457 | LTLIBICONV= | |
8458 | INCICONV= | |
8459 | rpathdirs= | |
8460 | ltrpathdirs= | |
8461 | names_already_handled= | |
8462 | names_next_round='iconv ' | |
8463 | while test -n "$names_next_round"; do | |
8464 | names_this_round="$names_next_round" | |
8465 | names_next_round= | |
8466 | for name in $names_this_round; do | |
8467 | already_handled= | |
8468 | for n in $names_already_handled; do | |
8469 | if test "$n" = "$name"; then | |
8470 | already_handled=yes | |
8471 | break | |
8472 | fi | |
8473 | done | |
8474 | if test -z "$already_handled"; then | |
8475 | names_already_handled="$names_already_handled $name" | |
8476 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8477 | eval value=\"\$HAVE_LIB$uppername\" | |
8478 | if test -n "$value"; then | |
8479 | if test "$value" = yes; then | |
8480 | eval value=\"\$LIB$uppername\" | |
8481 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8482 | eval value=\"\$LTLIB$uppername\" | |
8483 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8484 | else | |
8485 | : | |
8486 | fi | |
8487 | else | |
8488 | found_dir= | |
8489 | found_la= | |
8490 | found_so= | |
8491 | found_a= | |
8492 | if test $use_additional = yes; then | |
9f1528a1 | 8493 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8494 | found_dir="$additional_libdir" |
8495 | found_so="$additional_libdir/lib$name.$shlibext" | |
8496 | if test -f "$additional_libdir/lib$name.la"; then | |
8497 | found_la="$additional_libdir/lib$name.la" | |
8498 | fi | |
9f1528a1 | 8499 | elif test x$lib_type != xshared; then |
016a3251 DD |
8500 | if test -f "$additional_libdir/lib$name.$libext"; then |
8501 | found_dir="$additional_libdir" | |
8502 | found_a="$additional_libdir/lib$name.$libext" | |
8503 | if test -f "$additional_libdir/lib$name.la"; then | |
8504 | found_la="$additional_libdir/lib$name.la" | |
8505 | fi | |
8506 | fi | |
8507 | fi | |
8508 | fi | |
8509 | if test "X$found_dir" = "X"; then | |
8510 | for x in $LDFLAGS $LTLIBICONV; do | |
8511 | ||
8512 | acl_save_prefix="$prefix" | |
8513 | prefix="$acl_final_prefix" | |
8514 | acl_save_exec_prefix="$exec_prefix" | |
8515 | exec_prefix="$acl_final_exec_prefix" | |
8516 | eval x=\"$x\" | |
8517 | exec_prefix="$acl_save_exec_prefix" | |
8518 | prefix="$acl_save_prefix" | |
8519 | ||
8520 | case "$x" in | |
8521 | -L*) | |
8522 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 8523 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8524 | found_dir="$dir" |
8525 | found_so="$dir/lib$name.$shlibext" | |
8526 | if test -f "$dir/lib$name.la"; then | |
8527 | found_la="$dir/lib$name.la" | |
8528 | fi | |
9f1528a1 | 8529 | elif test x$lib_type != xshared; then |
016a3251 DD |
8530 | if test -f "$dir/lib$name.$libext"; then |
8531 | found_dir="$dir" | |
8532 | found_a="$dir/lib$name.$libext" | |
8533 | if test -f "$dir/lib$name.la"; then | |
8534 | found_la="$dir/lib$name.la" | |
8535 | fi | |
8536 | fi | |
8537 | fi | |
8538 | ;; | |
8539 | esac | |
8540 | if test "X$found_dir" != "X"; then | |
8541 | break | |
8542 | fi | |
8543 | done | |
8544 | fi | |
8545 | if test "X$found_dir" != "X"; then | |
8546 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8547 | if test "X$found_so" != "X"; then | |
8548 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8549 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8550 | else | |
8551 | haveit= | |
8552 | for x in $ltrpathdirs; do | |
8553 | if test "X$x" = "X$found_dir"; then | |
8554 | haveit=yes | |
8555 | break | |
8556 | fi | |
8557 | done | |
8558 | if test -z "$haveit"; then | |
8559 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8560 | fi | |
8561 | if test "$hardcode_direct" = yes; then | |
8562 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8563 | else | |
8564 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8565 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8566 | haveit= | |
8567 | for x in $rpathdirs; do | |
8568 | if test "X$x" = "X$found_dir"; then | |
8569 | haveit=yes | |
8570 | break | |
8571 | fi | |
8572 | done | |
8573 | if test -z "$haveit"; then | |
8574 | rpathdirs="$rpathdirs $found_dir" | |
8575 | fi | |
8576 | else | |
8577 | haveit= | |
8578 | for x in $LDFLAGS $LIBICONV; do | |
8579 | ||
8580 | acl_save_prefix="$prefix" | |
8581 | prefix="$acl_final_prefix" | |
8582 | acl_save_exec_prefix="$exec_prefix" | |
8583 | exec_prefix="$acl_final_exec_prefix" | |
8584 | eval x=\"$x\" | |
8585 | exec_prefix="$acl_save_exec_prefix" | |
8586 | prefix="$acl_save_prefix" | |
8587 | ||
8588 | if test "X$x" = "X-L$found_dir"; then | |
8589 | haveit=yes | |
8590 | break | |
8591 | fi | |
8592 | done | |
8593 | if test -z "$haveit"; then | |
8594 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8595 | fi | |
8596 | if test "$hardcode_minus_L" != no; then | |
8597 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8598 | else | |
8599 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8600 | fi | |
8601 | fi | |
8602 | fi | |
8603 | fi | |
8604 | else | |
8605 | if test "X$found_a" != "X"; then | |
8606 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8607 | else | |
8608 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8609 | fi | |
8610 | fi | |
8611 | additional_includedir= | |
8612 | case "$found_dir" in | |
8613 | */lib | */lib/) | |
8614 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8615 | additional_includedir="$basedir/include" | |
8616 | ;; | |
8617 | esac | |
8618 | if test "X$additional_includedir" != "X"; then | |
8619 | if test "X$additional_includedir" != "X/usr/include"; then | |
8620 | haveit= | |
8621 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8622 | if test -n "$GCC"; then | |
8623 | case $host_os in | |
8624 | linux*) haveit=yes;; | |
8625 | esac | |
8626 | fi | |
8627 | fi | |
8628 | if test -z "$haveit"; then | |
8629 | for x in $CPPFLAGS $INCICONV; do | |
8630 | ||
8631 | acl_save_prefix="$prefix" | |
8632 | prefix="$acl_final_prefix" | |
8633 | acl_save_exec_prefix="$exec_prefix" | |
8634 | exec_prefix="$acl_final_exec_prefix" | |
8635 | eval x=\"$x\" | |
8636 | exec_prefix="$acl_save_exec_prefix" | |
8637 | prefix="$acl_save_prefix" | |
8638 | ||
8639 | if test "X$x" = "X-I$additional_includedir"; then | |
8640 | haveit=yes | |
8641 | break | |
8642 | fi | |
8643 | done | |
8644 | if test -z "$haveit"; then | |
8645 | if test -d "$additional_includedir"; then | |
8646 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8647 | fi | |
8648 | fi | |
8649 | fi | |
8650 | fi | |
8651 | fi | |
8652 | if test -n "$found_la"; then | |
8653 | save_libdir="$libdir" | |
8654 | case "$found_la" in | |
8655 | */* | *\\*) . "$found_la" ;; | |
8656 | *) . "./$found_la" ;; | |
8657 | esac | |
8658 | libdir="$save_libdir" | |
8659 | for dep in $dependency_libs; do | |
8660 | case "$dep" in | |
8661 | -L*) | |
8662 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8663 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8664 | haveit= | |
8665 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8666 | if test -n "$GCC"; then | |
8667 | case $host_os in | |
8668 | linux*) haveit=yes;; | |
8669 | esac | |
8670 | fi | |
8671 | fi | |
8672 | if test -z "$haveit"; then | |
8673 | haveit= | |
8674 | for x in $LDFLAGS $LIBICONV; do | |
8675 | ||
8676 | acl_save_prefix="$prefix" | |
8677 | prefix="$acl_final_prefix" | |
8678 | acl_save_exec_prefix="$exec_prefix" | |
8679 | exec_prefix="$acl_final_exec_prefix" | |
8680 | eval x=\"$x\" | |
8681 | exec_prefix="$acl_save_exec_prefix" | |
8682 | prefix="$acl_save_prefix" | |
8683 | ||
8684 | if test "X$x" = "X-L$additional_libdir"; then | |
8685 | haveit=yes | |
8686 | break | |
8687 | fi | |
8688 | done | |
8689 | if test -z "$haveit"; then | |
8690 | if test -d "$additional_libdir"; then | |
8691 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8692 | fi | |
8693 | fi | |
8694 | haveit= | |
8695 | for x in $LDFLAGS $LTLIBICONV; do | |
8696 | ||
8697 | acl_save_prefix="$prefix" | |
8698 | prefix="$acl_final_prefix" | |
8699 | acl_save_exec_prefix="$exec_prefix" | |
8700 | exec_prefix="$acl_final_exec_prefix" | |
8701 | eval x=\"$x\" | |
8702 | exec_prefix="$acl_save_exec_prefix" | |
8703 | prefix="$acl_save_prefix" | |
8704 | ||
8705 | if test "X$x" = "X-L$additional_libdir"; then | |
8706 | haveit=yes | |
8707 | break | |
8708 | fi | |
8709 | done | |
8710 | if test -z "$haveit"; then | |
8711 | if test -d "$additional_libdir"; then | |
8712 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8713 | fi | |
8714 | fi | |
8715 | fi | |
8716 | fi | |
8717 | ;; | |
8718 | -R*) | |
8719 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8720 | if test "$enable_rpath" != no; then | |
8721 | haveit= | |
8722 | for x in $rpathdirs; do | |
8723 | if test "X$x" = "X$dir"; then | |
8724 | haveit=yes | |
8725 | break | |
8726 | fi | |
8727 | done | |
8728 | if test -z "$haveit"; then | |
8729 | rpathdirs="$rpathdirs $dir" | |
8730 | fi | |
8731 | haveit= | |
8732 | for x in $ltrpathdirs; do | |
8733 | if test "X$x" = "X$dir"; then | |
8734 | haveit=yes | |
8735 | break | |
8736 | fi | |
8737 | done | |
8738 | if test -z "$haveit"; then | |
8739 | ltrpathdirs="$ltrpathdirs $dir" | |
8740 | fi | |
8741 | fi | |
8742 | ;; | |
8743 | -l*) | |
8744 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8745 | ;; | |
8746 | *.la) | |
8747 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8748 | ;; | |
8749 | *) | |
8750 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8751 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8752 | ;; | |
8753 | esac | |
8754 | done | |
8755 | fi | |
8756 | else | |
9f1528a1 AB |
8757 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
8758 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8759 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8760 | else | |
8761 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext" | |
8762 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext" | |
8763 | fi | |
016a3251 DD |
8764 | fi |
8765 | fi | |
8766 | fi | |
8767 | done | |
8768 | done | |
8769 | if test "X$rpathdirs" != "X"; then | |
8770 | if test -n "$hardcode_libdir_separator"; then | |
8771 | alldirs= | |
8772 | for found_dir in $rpathdirs; do | |
8773 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8774 | done | |
8775 | acl_save_libdir="$libdir" | |
8776 | libdir="$alldirs" | |
8777 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8778 | libdir="$acl_save_libdir" | |
8779 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8780 | else | |
8781 | for found_dir in $rpathdirs; do | |
8782 | acl_save_libdir="$libdir" | |
8783 | libdir="$found_dir" | |
8784 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8785 | libdir="$acl_save_libdir" | |
8786 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8787 | done | |
8788 | fi | |
8789 | fi | |
8790 | if test "X$ltrpathdirs" != "X"; then | |
8791 | for found_dir in $ltrpathdirs; do | |
8792 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8793 | done | |
8794 | fi | |
8795 | ||
8796 | ||
8797 | ||
8798 | ||
8799 | ||
6c7a06a3 | 8800 | |
6c7a06a3 | 8801 | |
81ecdfbb RW |
8802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8803 | $as_echo_n "checking for iconv... " >&6; } | |
d0ac1c44 | 8804 | if ${am_cv_func_iconv+:} false; then : |
81ecdfbb | 8805 | $as_echo_n "(cached) " >&6 |
d542061a | 8806 | else |
6c7a06a3 TT |
8807 | |
8808 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8809 | am_cv_lib_iconv=no | |
016a3251 DD |
8810 | am_save_CPPFLAGS="$CPPFLAGS" |
8811 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8813 | /* end confdefs.h. */ |
6c7a06a3 TT |
8814 | #include <stdlib.h> |
8815 | #include <iconv.h> | |
d542061a UW |
8816 | int |
8817 | main () | |
8818 | { | |
6c7a06a3 | 8819 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8820 | iconv(cd,NULL,NULL,NULL,NULL); |
8821 | iconv_close(cd); | |
d542061a UW |
8822 | ; |
8823 | return 0; | |
8824 | } | |
8825 | _ACEOF | |
81ecdfbb | 8826 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8827 | am_cv_func_iconv=yes |
d542061a | 8828 | fi |
81ecdfbb RW |
8829 | rm -f core conftest.err conftest.$ac_objext \ |
8830 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8831 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8832 | |
016a3251 DD |
8833 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8834 | for _libs in .libs _libs; do | |
8835 | am_save_CPPFLAGS="$CPPFLAGS" | |
8836 | am_save_LIBS="$LIBS" | |
8837 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8838 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8839 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8840 | /* end confdefs.h. */ |
6c7a06a3 TT |
8841 | #include <stdlib.h> |
8842 | #include <iconv.h> | |
d542061a UW |
8843 | int |
8844 | main () | |
8845 | { | |
6c7a06a3 | 8846 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8847 | iconv(cd,NULL,NULL,NULL,NULL); |
8848 | iconv_close(cd); | |
d542061a UW |
8849 | ; |
8850 | return 0; | |
8851 | } | |
8852 | _ACEOF | |
81ecdfbb | 8853 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8854 | INCICONV="-I../libiconv/include" |
8855 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8856 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8857 | am_cv_lib_iconv=yes | |
8858 | am_cv_func_iconv=yes | |
d542061a | 8859 | fi |
81ecdfbb RW |
8860 | rm -f core conftest.err conftest.$ac_objext \ |
8861 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8862 | CPPFLAGS="$am_save_CPPFLAGS" |
8863 | LIBS="$am_save_LIBS" | |
8864 | if test "$am_cv_func_iconv" = "yes"; then | |
8865 | break | |
8866 | fi | |
8867 | done | |
77f120bf | 8868 | fi |
94ae1714 | 8869 | |
4edb1e84 | 8870 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8871 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8872 | am_save_LIBS="$LIBS" |
5d762de0 | 8873 | CPPFLAGS="$CPPFLAGS $INCICONV" |
016a3251 | 8874 | LIBS="$LIBS $LIBICONV" |
81ecdfbb | 8875 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8876 | /* end confdefs.h. */ |
6c7a06a3 TT |
8877 | #include <stdlib.h> |
8878 | #include <iconv.h> | |
bec39cab AC |
8879 | int |
8880 | main () | |
8881 | { | |
6c7a06a3 TT |
8882 | iconv_t cd = iconv_open("",""); |
8883 | iconv(cd,NULL,NULL,NULL,NULL); | |
8884 | iconv_close(cd); | |
bec39cab AC |
8885 | ; |
8886 | return 0; | |
8887 | } | |
8888 | _ACEOF | |
81ecdfbb | 8889 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8890 | am_cv_lib_iconv=yes |
6c7a06a3 | 8891 | am_cv_func_iconv=yes |
627af7ea | 8892 | fi |
81ecdfbb RW |
8893 | rm -f core conftest.err conftest.$ac_objext \ |
8894 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8895 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8896 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8897 | fi |
8898 | ||
8899 | fi | |
81ecdfbb RW |
8900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8901 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8902 | if test "$am_cv_func_iconv" = yes; then |
8903 | ||
8904 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8905 | |
016a3251 | 8906 | fi |
fc3b640d | 8907 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8908 | |
8909 | for element in $INCICONV; do | |
8910 | haveit= | |
8911 | for x in $CPPFLAGS; do | |
8912 | ||
8913 | acl_save_prefix="$prefix" | |
8914 | prefix="$acl_final_prefix" | |
8915 | acl_save_exec_prefix="$exec_prefix" | |
8916 | exec_prefix="$acl_final_exec_prefix" | |
8917 | eval x=\"$x\" | |
8918 | exec_prefix="$acl_save_exec_prefix" | |
8919 | prefix="$acl_save_prefix" | |
8920 | ||
8921 | if test "X$x" = "X$element"; then | |
8922 | haveit=yes | |
8923 | break | |
8924 | fi | |
8925 | done | |
8926 | if test -z "$haveit"; then | |
8927 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8928 | fi | |
8929 | done | |
8930 | ||
8931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8932 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8934 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8935 | else |
016a3251 DD |
8936 | LIBICONV= |
8937 | LTLIBICONV= | |
fc3b640d | 8938 | fi |
94ae1714 | 8939 | |
6c7a06a3 | 8940 | |
6c7a06a3 | 8941 | |
016a3251 | 8942 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8944 | $as_echo_n "checking for iconv declaration... " >&6; } | |
d0ac1c44 | 8945 | if ${am_cv_proto_iconv+:} false; then : |
81ecdfbb | 8946 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8947 | else |
8948 | ||
81ecdfbb | 8949 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8950 | /* end confdefs.h. */ |
8951 | ||
6c7a06a3 TT |
8952 | #include <stdlib.h> |
8953 | #include <iconv.h> | |
8954 | extern | |
b4e70030 | 8955 | #ifdef __cplusplus |
6c7a06a3 | 8956 | "C" |
b4e70030 | 8957 | #endif |
6c7a06a3 TT |
8958 | #if defined(__STDC__) || defined(__cplusplus) |
8959 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8960 | #else | |
8961 | size_t iconv(); | |
8962 | #endif | |
8963 | ||
b4e70030 JB |
8964 | int |
8965 | main () | |
8966 | { | |
6c7a06a3 | 8967 | |
b4e70030 JB |
8968 | ; |
8969 | return 0; | |
8970 | } | |
8971 | _ACEOF | |
81ecdfbb | 8972 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8973 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8974 | else |
81ecdfbb | 8975 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8976 | fi |
81ecdfbb | 8977 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8978 | 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);" |
8979 | fi | |
8980 | ||
8981 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8983 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8984 | $as_echo "${ac_t:- |
8985 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8986 | |
8987 | cat >>confdefs.h <<_ACEOF | |
8988 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
8989 | _ACEOF | |
8990 | ||
8991 | fi | |
6c7a06a3 TT |
8992 | |
8993 | ||
478aac75 DE |
8994 | # GDB may fork/exec the iconv program to get the list of supported character |
8995 | # sets. Allow the user to specify where to find it. | |
8996 | # There are several factors affecting the choice of option name: | |
8997 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
8998 | # the build-time location of libiconv files. | |
8999 | # - The program we need to find is iconv, which comes with glibc. The user | |
9000 | # doesn't necessarily have libiconv installed. Therefore naming this | |
9001 | # --with-libiconv-foo feels wrong. | |
9002 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
9003 | # defined to work on directories not files (though it really doesn't know | |
9004 | # the difference). | |
9005 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
9006 | # with --with-libiconv-prefix. | |
9007 | # Putting these together is why the option name is --with-iconv-bin. | |
9008 | ||
9009 | ||
9010 | # Check whether --with-iconv-bin was given. | |
9011 | if test "${with_iconv_bin+set}" = set; then : | |
9012 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
9013 | ||
9014 | cat >>confdefs.h <<_ACEOF | |
9015 | #define ICONV_BIN "${iconv_bin}" | |
9016 | _ACEOF | |
9017 | ||
9018 | ||
9019 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9020 | if test "x$prefix" = xNONE; then | |
9021 | test_prefix=/usr/local | |
9022 | else | |
9023 | test_prefix=$prefix | |
9024 | fi | |
9025 | else | |
9026 | test_prefix=$exec_prefix | |
9027 | fi | |
9028 | value=0 | |
9029 | case ${iconv_bin} in | |
9030 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9031 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9032 | value=1 | |
9033 | ;; | |
9034 | esac | |
9035 | ||
9036 | cat >>confdefs.h <<_ACEOF | |
9037 | #define ICONV_BIN_RELOCATABLE $value | |
9038 | _ACEOF | |
9039 | ||
9040 | ||
9041 | ||
9042 | fi | |
9043 | ||
9044 | ||
cb01cfba | 9045 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9046 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9047 | prefer_curses=yes |
9048 | fi | |
9049 | ||
9050 | curses_found=no | |
9051 | if test x"$prefer_curses" = xyes; then | |
9052 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9053 | # curses library because the latter might not provide all the | |
9054 | # functionality we need. However, this leads to problems on systems | |
9055 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9056 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9057 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9058 | # a situation. | |
81ecdfbb RW |
9059 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9060 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
d0ac1c44 | 9061 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9062 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9063 | else |
9064 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9065 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9066 | /* end confdefs.h. */ |
9067 | ||
81ecdfbb RW |
9068 | /* Override any GCC internal prototype to avoid an error. |
9069 | Use char because int might match the return type of a GCC | |
9070 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9071 | #ifdef __cplusplus |
9072 | extern "C" | |
9073 | #endif | |
6c7a06a3 TT |
9074 | char waddstr (); |
9075 | int | |
9076 | main () | |
9077 | { | |
81ecdfbb | 9078 | return waddstr (); |
6c7a06a3 TT |
9079 | ; |
9080 | return 0; | |
9081 | } | |
9082 | _ACEOF | |
5007d765 | 9083 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
9084 | if test -z "$ac_lib"; then |
9085 | ac_res="none required" | |
9086 | else | |
9087 | ac_res=-l$ac_lib | |
9088 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9089 | fi | |
9090 | if ac_fn_c_try_link "$LINENO"; then : | |
9091 | ac_cv_search_waddstr=$ac_res | |
9092 | fi | |
9093 | rm -f core conftest.err conftest.$ac_objext \ | |
9094 | conftest$ac_exeext | |
d0ac1c44 | 9095 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb RW |
9096 | break |
9097 | fi | |
9098 | done | |
d0ac1c44 | 9099 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9100 | |
6c7a06a3 | 9101 | else |
81ecdfbb RW |
9102 | ac_cv_search_waddstr=no |
9103 | fi | |
9104 | rm conftest.$ac_ext | |
9105 | LIBS=$ac_func_search_save_LIBS | |
9106 | fi | |
9107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9108 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9109 | ac_res=$ac_cv_search_waddstr | |
9110 | if test "$ac_res" != no; then : | |
9111 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9112 | |
9113 | fi | |
9114 | ||
9115 | ||
cb01cfba JB |
9116 | if test "$ac_cv_search_waddstr" != no; then |
9117 | curses_found=yes | |
9118 | fi | |
9119 | fi | |
9120 | ||
9121 | # Check whether we should enable the TUI, but only do so if we really | |
9122 | # can. | |
9123 | if test x"$enable_tui" != xno; then | |
0ad6b8ee | 9124 | if test -d "$srcdir/tui"; then |
cb01cfba | 9125 | if test "$curses_found" != no; then |
6c7a06a3 TT |
9126 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9127 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9128 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9129 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
9130 | else |
9131 | if test x"$enable_tui" = xyes; then | |
d0ac1c44 | 9132 | as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9133 | else |
81ecdfbb RW |
9134 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9135 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9136 | fi |
9137 | fi | |
9138 | fi | |
9139 | fi | |
9140 | ||
9141 | # Since GDB uses Readline, we need termcap functionality. In many | |
9142 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 9143 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
9144 | |
9145 | case $host_os in | |
9146 | cygwin*) | |
0ad6b8ee | 9147 | if test -d "$srcdir/libtermcap"; then |
6c7a06a3 TT |
9148 | LIBS="../libtermcap/libtermcap.a $LIBS" |
9149 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9150 | fi ;; | |
9151 | go32* | *djgpp*) | |
9152 | ac_cv_search_tgetent="none required" | |
9153 | ;; | |
6c7a06a3 TT |
9154 | esac |
9155 | ||
9156 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9158 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
d0ac1c44 | 9159 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb | 9160 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9161 | else |
9162 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9163 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9164 | /* end confdefs.h. */ |
9165 | ||
81ecdfbb RW |
9166 | /* Override any GCC internal prototype to avoid an error. |
9167 | Use char because int might match the return type of a GCC | |
9168 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9169 | #ifdef __cplusplus |
9170 | extern "C" | |
9171 | #endif | |
6c7a06a3 TT |
9172 | char tgetent (); |
9173 | int | |
9174 | main () | |
9175 | { | |
81ecdfbb | 9176 | return tgetent (); |
6c7a06a3 TT |
9177 | ; |
9178 | return 0; | |
9179 | } | |
9180 | _ACEOF | |
2578ecb1 | 9181 | for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
9182 | if test -z "$ac_lib"; then |
9183 | ac_res="none required" | |
9184 | else | |
9185 | ac_res=-l$ac_lib | |
6c7a06a3 | 9186 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9187 | fi |
9188 | if ac_fn_c_try_link "$LINENO"; then : | |
9189 | ac_cv_search_tgetent=$ac_res | |
9190 | fi | |
9191 | rm -f core conftest.err conftest.$ac_objext \ | |
9192 | conftest$ac_exeext | |
d0ac1c44 | 9193 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb RW |
9194 | break |
9195 | fi | |
9196 | done | |
d0ac1c44 | 9197 | if ${ac_cv_search_tgetent+:} false; then : |
6c7a06a3 | 9198 | |
6c7a06a3 | 9199 | else |
81ecdfbb | 9200 | ac_cv_search_tgetent=no |
6c7a06a3 | 9201 | fi |
81ecdfbb | 9202 | rm conftest.$ac_ext |
6c7a06a3 TT |
9203 | LIBS=$ac_func_search_save_LIBS |
9204 | fi | |
81ecdfbb RW |
9205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9206 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9207 | ac_res=$ac_cv_search_tgetent | |
9208 | if test "$ac_res" != no; then : | |
9209 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9210 | |
06825bd1 MK |
9211 | fi |
9212 | ||
06825bd1 | 9213 | |
bec39cab | 9214 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 9215 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
9216 | fi |
9217 | ||
3841debe | 9218 | |
81ecdfbb RW |
9219 | # Check whether --with-system-readline was given. |
9220 | if test "${with_system_readline+set}" = set; then : | |
9221 | withval=$with_system_readline; | |
9222 | fi | |
6a30b0a5 | 9223 | |
6a30b0a5 AS |
9224 | |
9225 | if test "$with_system_readline" = yes; then | |
5593a99a | 9226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 |
86c6b807 TT |
9227 | $as_echo_n "checking whether system readline is new enough... " >&6; } |
9228 | if ${gdb_cv_readline_ok+:} false; then : | |
9229 | $as_echo_n "(cached) " >&6 | |
9230 | else | |
9231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9232 | /* end confdefs.h. */ | |
9233 | #include <stdio.h> | |
5593a99a | 9234 | #include <readline/readline.h> |
86c6b807 TT |
9235 | int |
9236 | main () | |
9237 | { | |
9238 | #if RL_VERSION_MAJOR < 7 | |
5593a99a SM |
9239 | # error "readline version 7 required" |
9240 | #endif | |
9241 | ||
86c6b807 TT |
9242 | ; |
9243 | return 0; | |
9244 | } | |
9245 | _ACEOF | |
9246 | if ac_fn_c_try_compile "$LINENO"; then : | |
9247 | gdb_cv_readline_ok=yes | |
9248 | else | |
9249 | gdb_cv_readline_ok=no | |
5593a99a | 9250 | |
86c6b807 TT |
9251 | fi |
9252 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5593a99a | 9253 | |
86c6b807 TT |
9254 | fi |
9255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 | |
9256 | $as_echo "$gdb_cv_readline_ok" >&6; } | |
9257 | if test "$gdb_cv_readline_ok" != yes; then | |
9258 | as_fn_error $? "system readline is not new enough" "$LINENO" 5 | |
9259 | fi | |
9260 | ||
6a30b0a5 AS |
9261 | READLINE=-lreadline |
9262 | READLINE_DEPS= | |
9263 | READLINE_CFLAGS= | |
39037522 | 9264 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9265 | else |
9266 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9267 | READLINE_DEPS='$(READLINE)' | |
9268 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9269 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9270 | fi |
9271 | ||
9272 | ||
9273 | ||
9274 | ||
9275 | ||
f997c383 SD |
9276 | # Generate jit-reader.h |
9277 | ||
9278 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9279 | TARGET_PTR= | |
9280 | ||
9281 | # The cast to long int works around a bug in the HP C Compiler | |
9282 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9283 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9284 | # This bug is HP SR number 8606223364. | |
9285 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
9286 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
d0ac1c44 | 9287 | if ${ac_cv_sizeof_unsigned_long_long+:} false; then : |
f997c383 SD |
9288 | $as_echo_n "(cached) " >&6 |
9289 | else | |
9290 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9291 | ||
9292 | else | |
9293 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
9294 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9295 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9296 | as_fn_error 77 "cannot compute sizeof (unsigned long long) |
9297 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9298 | else |
9299 | ac_cv_sizeof_unsigned_long_long=0 | |
9300 | fi | |
9301 | fi | |
9302 | ||
9303 | fi | |
9304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9305 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9306 | ||
9307 | ||
9308 | ||
9309 | cat >>confdefs.h <<_ACEOF | |
9310 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9311 | _ACEOF | |
9312 | ||
9313 | ||
9314 | # The cast to long int works around a bug in the HP C Compiler | |
9315 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9316 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9317 | # This bug is HP SR number 8606223364. | |
9318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9319 | $as_echo_n "checking size of unsigned long... " >&6; } | |
d0ac1c44 | 9320 | if ${ac_cv_sizeof_unsigned_long+:} false; then : |
f997c383 SD |
9321 | $as_echo_n "(cached) " >&6 |
9322 | else | |
9323 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9324 | ||
9325 | else | |
9326 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9327 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9328 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9329 | as_fn_error 77 "cannot compute sizeof (unsigned long) |
9330 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9331 | else |
9332 | ac_cv_sizeof_unsigned_long=0 | |
9333 | fi | |
9334 | fi | |
9335 | ||
9336 | fi | |
9337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9338 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9339 | ||
9340 | ||
9341 | ||
9342 | cat >>confdefs.h <<_ACEOF | |
9343 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9344 | _ACEOF | |
9345 | ||
9346 | ||
9347 | # The cast to long int works around a bug in the HP C Compiler | |
9348 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9349 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9350 | # This bug is HP SR number 8606223364. | |
9351 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9352 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
d0ac1c44 | 9353 | if ${ac_cv_sizeof_unsigned___int128+:} false; then : |
f997c383 SD |
9354 | $as_echo_n "(cached) " >&6 |
9355 | else | |
9356 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9357 | ||
9358 | else | |
9359 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9360 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9361 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9362 | as_fn_error 77 "cannot compute sizeof (unsigned __int128) |
9363 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9364 | else |
9365 | ac_cv_sizeof_unsigned___int128=0 | |
9366 | fi | |
9367 | fi | |
9368 | ||
9369 | fi | |
9370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9371 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9372 | ||
9373 | ||
9374 | ||
9375 | cat >>confdefs.h <<_ACEOF | |
9376 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9377 | _ACEOF | |
9378 | ||
9379 | ||
9380 | ||
9381 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9382 | TARGET_PTR="unsigned long" | |
9383 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9384 | TARGET_PTR="unsigned long long" | |
9385 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9386 | TARGET_PTR="unsigned __int128" | |
9387 | else | |
9388 | TARGET_PTR="unsigned long" | |
9389 | fi | |
9390 | ||
9391 | ||
9392 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9393 | ||
9394 | ||
a2d08b9e SD |
9395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9396 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 9397 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9398 | $as_echo_n "(cached) " >&6 |
9399 | else | |
9400 | ac_func_search_save_LIBS=$LIBS | |
9401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9402 | /* end confdefs.h. */ | |
9403 | ||
9404 | /* Override any GCC internal prototype to avoid an error. | |
9405 | Use char because int might match the return type of a GCC | |
9406 | builtin and then its argument prototype would still apply. */ | |
9407 | #ifdef __cplusplus | |
9408 | extern "C" | |
9409 | #endif | |
9410 | char dlopen (); | |
9411 | int | |
9412 | main () | |
9413 | { | |
9414 | return dlopen (); | |
9415 | ; | |
9416 | return 0; | |
9417 | } | |
9418 | _ACEOF | |
9419 | for ac_lib in '' dl; do | |
9420 | if test -z "$ac_lib"; then | |
9421 | ac_res="none required" | |
9422 | else | |
9423 | ac_res=-l$ac_lib | |
9424 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9425 | fi | |
9426 | if ac_fn_c_try_link "$LINENO"; then : | |
9427 | ac_cv_search_dlopen=$ac_res | |
9428 | fi | |
9429 | rm -f core conftest.err conftest.$ac_objext \ | |
9430 | conftest$ac_exeext | |
d0ac1c44 | 9431 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9432 | break |
9433 | fi | |
9434 | done | |
d0ac1c44 | 9435 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9436 | |
9437 | else | |
9438 | ac_cv_search_dlopen=no | |
9439 | fi | |
9440 | rm conftest.$ac_ext | |
9441 | LIBS=$ac_func_search_save_LIBS | |
9442 | fi | |
9443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9444 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9445 | ac_res=$ac_cv_search_dlopen | |
9446 | if test "$ac_res" != no; then : | |
9447 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9448 | ||
9449 | fi | |
9450 | ||
9451 | ||
39037522 | 9452 | |
b8e0a31c SD |
9453 | |
9454 | # Check whether --with-jit-reader-dir was given. | |
9455 | if test "${with_jit_reader_dir+set}" = set; then : | |
9456 | withval=$with_jit_reader_dir; | |
9457 | JIT_READER_DIR=$withval | |
9458 | else | |
9459 | JIT_READER_DIR=${libdir}/gdb | |
9460 | fi | |
9461 | ||
9462 | ||
9463 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9464 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9465 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9466 | ac_define_dir=`eval echo $ac_define_dir` | |
9467 | ||
9468 | cat >>confdefs.h <<_ACEOF | |
9469 | #define JIT_READER_DIR "$ac_define_dir" | |
9470 | _ACEOF | |
9471 | ||
9472 | ||
9473 | ||
9474 | ||
9475 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9476 | if test "x$prefix" = xNONE; then | |
9477 | test_prefix=/usr/local | |
9478 | else | |
9479 | test_prefix=$prefix | |
9480 | fi | |
9481 | else | |
9482 | test_prefix=$exec_prefix | |
9483 | fi | |
9484 | value=0 | |
9485 | case ${ac_define_dir} in | |
9486 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9487 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9488 | value=1 | |
9489 | ;; | |
9490 | esac | |
9491 | ||
9492 | cat >>confdefs.h <<_ACEOF | |
9493 | #define JIT_READER_DIR_RELOCATABLE $value | |
9494 | _ACEOF | |
9495 | ||
9496 | ||
9497 | ||
9498 | ||
9499 | ||
81ecdfbb RW |
9500 | # Check whether --with-expat was given. |
9501 | if test "${with_expat+set}" = set; then : | |
9502 | withval=$with_expat; | |
5c39566f DJ |
9503 | else |
9504 | with_expat=auto | |
81ecdfbb RW |
9505 | fi |
9506 | ||
9507 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9508 | $as_echo_n "checking whether to use expat... " >&6; } | |
9509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9510 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9511 | |
9512 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9513 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9514 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9515 | HAVE_LIBEXPAT=no |
9516 | else | |
9517 | ||
3841debe DJ |
9518 | |
9519 | ||
9520 | ||
9521 | ||
9522 | ||
9523 | ||
9524 | ||
9525 | use_additional=yes | |
9526 | ||
9527 | acl_save_prefix="$prefix" | |
9528 | prefix="$acl_final_prefix" | |
9529 | acl_save_exec_prefix="$exec_prefix" | |
9530 | exec_prefix="$acl_final_exec_prefix" | |
9531 | ||
9532 | eval additional_includedir=\"$includedir\" | |
9533 | eval additional_libdir=\"$libdir\" | |
9534 | ||
9535 | exec_prefix="$acl_save_exec_prefix" | |
9536 | prefix="$acl_save_prefix" | |
9537 | ||
9538 | ||
81ecdfbb RW |
9539 | # Check whether --with-libexpat-prefix was given. |
9540 | if test "${with_libexpat_prefix+set}" = set; then : | |
9541 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9542 | if test "X$withval" = "Xno"; then |
9543 | use_additional=no | |
9544 | else | |
9545 | if test "X$withval" = "X"; then | |
9546 | ||
9547 | acl_save_prefix="$prefix" | |
9548 | prefix="$acl_final_prefix" | |
9549 | acl_save_exec_prefix="$exec_prefix" | |
9550 | exec_prefix="$acl_final_exec_prefix" | |
9551 | ||
9552 | eval additional_includedir=\"$includedir\" | |
9553 | eval additional_libdir=\"$libdir\" | |
9554 | ||
9555 | exec_prefix="$acl_save_exec_prefix" | |
9556 | prefix="$acl_save_prefix" | |
9557 | ||
9558 | else | |
9559 | additional_includedir="$withval/include" | |
9560 | additional_libdir="$withval/lib" | |
9561 | fi | |
9562 | fi | |
9563 | ||
81ecdfbb RW |
9564 | fi |
9565 | ||
9f1528a1 AB |
9566 | |
9567 | # Check whether --with-libexpat-type was given. | |
9568 | if test "${with_libexpat_type+set}" = set; then : | |
9569 | withval=$with_libexpat_type; with_libexpat_type=$withval | |
9570 | else | |
9571 | with_libexpat_type=auto | |
9572 | fi | |
9573 | ||
9574 | lib_type=`eval echo \$with_libexpat_type` | |
9575 | ||
3841debe DJ |
9576 | LIBEXPAT= |
9577 | LTLIBEXPAT= | |
9578 | INCEXPAT= | |
9579 | rpathdirs= | |
9580 | ltrpathdirs= | |
9581 | names_already_handled= | |
9582 | names_next_round='expat ' | |
9583 | while test -n "$names_next_round"; do | |
9584 | names_this_round="$names_next_round" | |
9585 | names_next_round= | |
9586 | for name in $names_this_round; do | |
9587 | already_handled= | |
9588 | for n in $names_already_handled; do | |
9589 | if test "$n" = "$name"; then | |
9590 | already_handled=yes | |
9591 | break | |
9592 | fi | |
9593 | done | |
9594 | if test -z "$already_handled"; then | |
9595 | names_already_handled="$names_already_handled $name" | |
9596 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9597 | eval value=\"\$HAVE_LIB$uppername\" | |
9598 | if test -n "$value"; then | |
9599 | if test "$value" = yes; then | |
9600 | eval value=\"\$LIB$uppername\" | |
9601 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9602 | eval value=\"\$LTLIB$uppername\" | |
9603 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9604 | else | |
9605 | : | |
9606 | fi | |
9607 | else | |
9608 | found_dir= | |
9609 | found_la= | |
9610 | found_so= | |
9611 | found_a= | |
9612 | if test $use_additional = yes; then | |
9f1528a1 | 9613 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9614 | found_dir="$additional_libdir" |
9615 | found_so="$additional_libdir/lib$name.$shlibext" | |
9616 | if test -f "$additional_libdir/lib$name.la"; then | |
9617 | found_la="$additional_libdir/lib$name.la" | |
9618 | fi | |
9f1528a1 | 9619 | elif test x$lib_type != xshared; then |
3841debe DJ |
9620 | if test -f "$additional_libdir/lib$name.$libext"; then |
9621 | found_dir="$additional_libdir" | |
9622 | found_a="$additional_libdir/lib$name.$libext" | |
9623 | if test -f "$additional_libdir/lib$name.la"; then | |
9624 | found_la="$additional_libdir/lib$name.la" | |
9625 | fi | |
9626 | fi | |
9627 | fi | |
9628 | fi | |
9629 | if test "X$found_dir" = "X"; then | |
9630 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9631 | ||
9632 | acl_save_prefix="$prefix" | |
9633 | prefix="$acl_final_prefix" | |
9634 | acl_save_exec_prefix="$exec_prefix" | |
9635 | exec_prefix="$acl_final_exec_prefix" | |
9636 | eval x=\"$x\" | |
9637 | exec_prefix="$acl_save_exec_prefix" | |
9638 | prefix="$acl_save_prefix" | |
9639 | ||
9640 | case "$x" in | |
9641 | -L*) | |
9642 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 9643 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9644 | found_dir="$dir" |
9645 | found_so="$dir/lib$name.$shlibext" | |
9646 | if test -f "$dir/lib$name.la"; then | |
9647 | found_la="$dir/lib$name.la" | |
9648 | fi | |
9f1528a1 | 9649 | elif test x$lib_type != xshared; then |
3841debe DJ |
9650 | if test -f "$dir/lib$name.$libext"; then |
9651 | found_dir="$dir" | |
9652 | found_a="$dir/lib$name.$libext" | |
9653 | if test -f "$dir/lib$name.la"; then | |
9654 | found_la="$dir/lib$name.la" | |
9655 | fi | |
9656 | fi | |
9657 | fi | |
9658 | ;; | |
9659 | esac | |
9660 | if test "X$found_dir" != "X"; then | |
9661 | break | |
9662 | fi | |
9663 | done | |
9664 | fi | |
9665 | if test "X$found_dir" != "X"; then | |
9666 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9667 | if test "X$found_so" != "X"; then | |
9668 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9669 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9670 | else | |
9671 | haveit= | |
9672 | for x in $ltrpathdirs; do | |
9673 | if test "X$x" = "X$found_dir"; then | |
9674 | haveit=yes | |
9675 | break | |
9676 | fi | |
9677 | done | |
9678 | if test -z "$haveit"; then | |
9679 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9680 | fi | |
9681 | if test "$hardcode_direct" = yes; then | |
9682 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9683 | else | |
9684 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9685 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9686 | haveit= | |
9687 | for x in $rpathdirs; do | |
9688 | if test "X$x" = "X$found_dir"; then | |
9689 | haveit=yes | |
9690 | break | |
9691 | fi | |
9692 | done | |
9693 | if test -z "$haveit"; then | |
9694 | rpathdirs="$rpathdirs $found_dir" | |
9695 | fi | |
9696 | else | |
9697 | haveit= | |
9698 | for x in $LDFLAGS $LIBEXPAT; do | |
9699 | ||
9700 | acl_save_prefix="$prefix" | |
9701 | prefix="$acl_final_prefix" | |
9702 | acl_save_exec_prefix="$exec_prefix" | |
9703 | exec_prefix="$acl_final_exec_prefix" | |
9704 | eval x=\"$x\" | |
9705 | exec_prefix="$acl_save_exec_prefix" | |
9706 | prefix="$acl_save_prefix" | |
9707 | ||
9708 | if test "X$x" = "X-L$found_dir"; then | |
9709 | haveit=yes | |
9710 | break | |
9711 | fi | |
9712 | done | |
9713 | if test -z "$haveit"; then | |
9714 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9715 | fi | |
9716 | if test "$hardcode_minus_L" != no; then | |
9717 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9718 | else | |
9719 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9720 | fi | |
9721 | fi | |
9722 | fi | |
9723 | fi | |
9724 | else | |
9725 | if test "X$found_a" != "X"; then | |
9726 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9727 | else | |
9728 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9729 | fi | |
9730 | fi | |
9731 | additional_includedir= | |
9732 | case "$found_dir" in | |
9733 | */lib | */lib/) | |
9734 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9735 | additional_includedir="$basedir/include" | |
9736 | ;; | |
9737 | esac | |
9738 | if test "X$additional_includedir" != "X"; then | |
9739 | if test "X$additional_includedir" != "X/usr/include"; then | |
9740 | haveit= | |
9741 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9742 | if test -n "$GCC"; then | |
9743 | case $host_os in | |
9744 | linux*) haveit=yes;; | |
9745 | esac | |
9746 | fi | |
9747 | fi | |
9748 | if test -z "$haveit"; then | |
9749 | for x in $CPPFLAGS $INCEXPAT; do | |
9750 | ||
9751 | acl_save_prefix="$prefix" | |
9752 | prefix="$acl_final_prefix" | |
9753 | acl_save_exec_prefix="$exec_prefix" | |
9754 | exec_prefix="$acl_final_exec_prefix" | |
9755 | eval x=\"$x\" | |
9756 | exec_prefix="$acl_save_exec_prefix" | |
9757 | prefix="$acl_save_prefix" | |
9758 | ||
9759 | if test "X$x" = "X-I$additional_includedir"; then | |
9760 | haveit=yes | |
9761 | break | |
9762 | fi | |
9763 | done | |
9764 | if test -z "$haveit"; then | |
9765 | if test -d "$additional_includedir"; then | |
9766 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9767 | fi | |
9768 | fi | |
9769 | fi | |
9770 | fi | |
9771 | fi | |
9772 | if test -n "$found_la"; then | |
9773 | save_libdir="$libdir" | |
9774 | case "$found_la" in | |
9775 | */* | *\\*) . "$found_la" ;; | |
9776 | *) . "./$found_la" ;; | |
9777 | esac | |
9778 | libdir="$save_libdir" | |
9779 | for dep in $dependency_libs; do | |
9780 | case "$dep" in | |
9781 | -L*) | |
9782 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9783 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9784 | haveit= | |
9785 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9786 | if test -n "$GCC"; then | |
9787 | case $host_os in | |
9788 | linux*) haveit=yes;; | |
9789 | esac | |
9790 | fi | |
9791 | fi | |
9792 | if test -z "$haveit"; then | |
9793 | haveit= | |
9794 | for x in $LDFLAGS $LIBEXPAT; do | |
9795 | ||
9796 | acl_save_prefix="$prefix" | |
9797 | prefix="$acl_final_prefix" | |
9798 | acl_save_exec_prefix="$exec_prefix" | |
9799 | exec_prefix="$acl_final_exec_prefix" | |
9800 | eval x=\"$x\" | |
9801 | exec_prefix="$acl_save_exec_prefix" | |
9802 | prefix="$acl_save_prefix" | |
9803 | ||
9804 | if test "X$x" = "X-L$additional_libdir"; then | |
9805 | haveit=yes | |
9806 | break | |
9807 | fi | |
9808 | done | |
9809 | if test -z "$haveit"; then | |
9810 | if test -d "$additional_libdir"; then | |
9811 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9812 | fi | |
9813 | fi | |
9814 | haveit= | |
9815 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9816 | ||
9817 | acl_save_prefix="$prefix" | |
9818 | prefix="$acl_final_prefix" | |
9819 | acl_save_exec_prefix="$exec_prefix" | |
9820 | exec_prefix="$acl_final_exec_prefix" | |
9821 | eval x=\"$x\" | |
9822 | exec_prefix="$acl_save_exec_prefix" | |
9823 | prefix="$acl_save_prefix" | |
9824 | ||
9825 | if test "X$x" = "X-L$additional_libdir"; then | |
9826 | haveit=yes | |
9827 | break | |
9828 | fi | |
9829 | done | |
9830 | if test -z "$haveit"; then | |
9831 | if test -d "$additional_libdir"; then | |
9832 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9833 | fi | |
9834 | fi | |
9835 | fi | |
9836 | fi | |
9837 | ;; | |
9838 | -R*) | |
9839 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9840 | if test "$enable_rpath" != no; then | |
9841 | haveit= | |
9842 | for x in $rpathdirs; do | |
9843 | if test "X$x" = "X$dir"; then | |
9844 | haveit=yes | |
9845 | break | |
9846 | fi | |
9847 | done | |
9848 | if test -z "$haveit"; then | |
9849 | rpathdirs="$rpathdirs $dir" | |
9850 | fi | |
9851 | haveit= | |
9852 | for x in $ltrpathdirs; do | |
9853 | if test "X$x" = "X$dir"; then | |
9854 | haveit=yes | |
9855 | break | |
9856 | fi | |
9857 | done | |
9858 | if test -z "$haveit"; then | |
9859 | ltrpathdirs="$ltrpathdirs $dir" | |
9860 | fi | |
9861 | fi | |
9862 | ;; | |
9863 | -l*) | |
9864 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9865 | ;; | |
9866 | *.la) | |
9867 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9868 | ;; | |
9869 | *) | |
9870 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9871 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9872 | ;; | |
81ecdfbb RW |
9873 | esac |
9874 | done | |
9875 | fi | |
9876 | else | |
9f1528a1 AB |
9877 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
9878 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9879 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9880 | else | |
9881 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext" | |
9882 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext" | |
9883 | fi | |
81ecdfbb RW |
9884 | fi |
9885 | fi | |
9886 | fi | |
9887 | done | |
9888 | done | |
9889 | if test "X$rpathdirs" != "X"; then | |
9890 | if test -n "$hardcode_libdir_separator"; then | |
9891 | alldirs= | |
9892 | for found_dir in $rpathdirs; do | |
9893 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9894 | done | |
9895 | acl_save_libdir="$libdir" | |
9896 | libdir="$alldirs" | |
9897 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9898 | libdir="$acl_save_libdir" | |
9899 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9900 | else | |
9901 | for found_dir in $rpathdirs; do | |
9902 | acl_save_libdir="$libdir" | |
9903 | libdir="$found_dir" | |
9904 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9905 | libdir="$acl_save_libdir" | |
9906 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9907 | done | |
9908 | fi | |
9909 | fi | |
9910 | if test "X$ltrpathdirs" != "X"; then | |
9911 | for found_dir in $ltrpathdirs; do | |
9912 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9913 | done | |
9914 | fi | |
a9322a30 TT |
9915 | |
9916 | ||
81ecdfbb | 9917 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9918 | |
81ecdfbb RW |
9919 | for element in $INCEXPAT; do |
9920 | haveit= | |
9921 | for x in $CPPFLAGS; do | |
a9322a30 | 9922 | |
81ecdfbb RW |
9923 | acl_save_prefix="$prefix" |
9924 | prefix="$acl_final_prefix" | |
9925 | acl_save_exec_prefix="$exec_prefix" | |
9926 | exec_prefix="$acl_final_exec_prefix" | |
9927 | eval x=\"$x\" | |
9928 | exec_prefix="$acl_save_exec_prefix" | |
9929 | prefix="$acl_save_prefix" | |
a8111142 | 9930 | |
81ecdfbb RW |
9931 | if test "X$x" = "X$element"; then |
9932 | haveit=yes | |
9933 | break | |
9934 | fi | |
9935 | done | |
9936 | if test -z "$haveit"; then | |
9937 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9938 | fi | |
9939 | done | |
a9322a30 TT |
9940 | |
9941 | ||
81ecdfbb RW |
9942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9943 | $as_echo_n "checking for libexpat... " >&6; } | |
d0ac1c44 | 9944 | if ${ac_cv_libexpat+:} false; then : |
81ecdfbb | 9945 | $as_echo_n "(cached) " >&6 |
bec39cab | 9946 | else |
bec39cab | 9947 | |
81ecdfbb RW |
9948 | ac_save_LIBS="$LIBS" |
9949 | LIBS="$LIBS $LIBEXPAT" | |
9950 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9951 | /* end confdefs.h. */ |
81ecdfbb RW |
9952 | #include "expat.h" |
9953 | int | |
9954 | main () | |
9955 | { | |
9956 | XML_Parser p = XML_ParserCreate (0); | |
9957 | ; | |
9958 | return 0; | |
9959 | } | |
bec39cab | 9960 | _ACEOF |
81ecdfbb RW |
9961 | if ac_fn_c_try_link "$LINENO"; then : |
9962 | ac_cv_libexpat=yes | |
c906108c | 9963 | else |
81ecdfbb | 9964 | ac_cv_libexpat=no |
bec39cab | 9965 | fi |
81ecdfbb RW |
9966 | rm -f core conftest.err conftest.$ac_objext \ |
9967 | conftest$ac_exeext conftest.$ac_ext | |
9968 | LIBS="$ac_save_LIBS" | |
c906108c | 9969 | |
95ca63c4 | 9970 | fi |
81ecdfbb RW |
9971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9972 | $as_echo "$ac_cv_libexpat" >&6; } | |
9973 | if test "$ac_cv_libexpat" = yes; then | |
9974 | HAVE_LIBEXPAT=yes | |
bec39cab | 9975 | |
81ecdfbb | 9976 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9977 | |
81ecdfbb RW |
9978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9979 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
9981 | $as_echo "$LIBEXPAT" >&6; } | |
9982 | else | |
9983 | HAVE_LIBEXPAT=no | |
9984 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9985 | LIBEXPAT= | |
9986 | LTLIBEXPAT= | |
9987 | fi | |
95ca63c4 CF |
9988 | |
9989 | ||
9990 | ||
7cb9022a MK |
9991 | |
9992 | ||
bec39cab | 9993 | |
81ecdfbb RW |
9994 | if test "$HAVE_LIBEXPAT" != yes; then |
9995 | if test "$with_expat" = yes; then | |
d0ac1c44 | 9996 | as_fn_error $? "expat is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
9997 | else |
9998 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
9999 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
10000 | fi | |
10001 | else | |
10002 | save_LIBS=$LIBS | |
10003 | LIBS="$LIBS $LIBEXPAT" | |
10004 | for ac_func in XML_StopParser | |
10005 | do : | |
10006 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
d0ac1c44 | 10007 | if test "x$ac_cv_func_XML_StopParser" = xyes; then : |
bec39cab | 10008 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10009 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10010 | _ACEOF |
95ca63c4 | 10011 | |
bec39cab | 10012 | fi |
bec39cab | 10013 | done |
95ca63c4 | 10014 | |
81ecdfbb RW |
10015 | LIBS=$save_LIBS |
10016 | fi | |
a9322a30 TT |
10017 | fi |
10018 | ||
2c947d9b JB |
10019 | # Verify that we have a usable GMP library. |
10020 | ||
10021 | ||
10022 | ||
10023 | ||
10024 | ||
10025 | ||
10026 | ||
10027 | ||
10028 | use_additional=yes | |
10029 | ||
10030 | acl_save_prefix="$prefix" | |
10031 | prefix="$acl_final_prefix" | |
10032 | acl_save_exec_prefix="$exec_prefix" | |
10033 | exec_prefix="$acl_final_exec_prefix" | |
10034 | ||
10035 | eval additional_includedir=\"$includedir\" | |
10036 | eval additional_libdir=\"$libdir\" | |
10037 | ||
10038 | exec_prefix="$acl_save_exec_prefix" | |
10039 | prefix="$acl_save_prefix" | |
10040 | ||
10041 | ||
10042 | # Check whether --with-libgmp-prefix was given. | |
10043 | if test "${with_libgmp_prefix+set}" = set; then : | |
10044 | withval=$with_libgmp_prefix; | |
10045 | if test "X$withval" = "Xno"; then | |
10046 | use_additional=no | |
10047 | else | |
10048 | if test "X$withval" = "X"; then | |
10049 | ||
10050 | acl_save_prefix="$prefix" | |
10051 | prefix="$acl_final_prefix" | |
10052 | acl_save_exec_prefix="$exec_prefix" | |
10053 | exec_prefix="$acl_final_exec_prefix" | |
10054 | ||
10055 | eval additional_includedir=\"$includedir\" | |
10056 | eval additional_libdir=\"$libdir\" | |
10057 | ||
10058 | exec_prefix="$acl_save_exec_prefix" | |
10059 | prefix="$acl_save_prefix" | |
10060 | ||
10061 | else | |
10062 | additional_includedir="$withval/include" | |
10063 | additional_libdir="$withval/lib" | |
10064 | fi | |
10065 | fi | |
10066 | ||
10067 | fi | |
10068 | ||
10069 | ||
10070 | # Check whether --with-libgmp-type was given. | |
10071 | if test "${with_libgmp_type+set}" = set; then : | |
10072 | withval=$with_libgmp_type; with_libgmp_type=$withval | |
10073 | else | |
10074 | with_libgmp_type=auto | |
10075 | fi | |
10076 | ||
10077 | lib_type=`eval echo \$with_libgmp_type` | |
10078 | ||
10079 | LIBGMP= | |
10080 | LTLIBGMP= | |
10081 | INCGMP= | |
10082 | rpathdirs= | |
10083 | ltrpathdirs= | |
10084 | names_already_handled= | |
10085 | names_next_round='gmp ' | |
10086 | while test -n "$names_next_round"; do | |
10087 | names_this_round="$names_next_round" | |
10088 | names_next_round= | |
10089 | for name in $names_this_round; do | |
10090 | already_handled= | |
10091 | for n in $names_already_handled; do | |
10092 | if test "$n" = "$name"; then | |
10093 | already_handled=yes | |
10094 | break | |
10095 | fi | |
10096 | done | |
10097 | if test -z "$already_handled"; then | |
10098 | names_already_handled="$names_already_handled $name" | |
10099 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10100 | eval value=\"\$HAVE_LIB$uppername\" | |
10101 | if test -n "$value"; then | |
10102 | if test "$value" = yes; then | |
10103 | eval value=\"\$LIB$uppername\" | |
10104 | test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value" | |
10105 | eval value=\"\$LTLIB$uppername\" | |
10106 | test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value" | |
10107 | else | |
10108 | : | |
10109 | fi | |
10110 | else | |
10111 | found_dir= | |
10112 | found_la= | |
10113 | found_so= | |
10114 | found_a= | |
10115 | if test $use_additional = yes; then | |
10116 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
10117 | found_dir="$additional_libdir" | |
10118 | found_so="$additional_libdir/lib$name.$shlibext" | |
10119 | if test -f "$additional_libdir/lib$name.la"; then | |
10120 | found_la="$additional_libdir/lib$name.la" | |
10121 | fi | |
10122 | elif test x$lib_type != xshared; then | |
10123 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10124 | found_dir="$additional_libdir" | |
10125 | found_a="$additional_libdir/lib$name.$libext" | |
10126 | if test -f "$additional_libdir/lib$name.la"; then | |
10127 | found_la="$additional_libdir/lib$name.la" | |
10128 | fi | |
10129 | fi | |
10130 | fi | |
10131 | fi | |
10132 | if test "X$found_dir" = "X"; then | |
10133 | for x in $LDFLAGS $LTLIBGMP; do | |
10134 | ||
10135 | acl_save_prefix="$prefix" | |
10136 | prefix="$acl_final_prefix" | |
10137 | acl_save_exec_prefix="$exec_prefix" | |
10138 | exec_prefix="$acl_final_exec_prefix" | |
10139 | eval x=\"$x\" | |
10140 | exec_prefix="$acl_save_exec_prefix" | |
10141 | prefix="$acl_save_prefix" | |
10142 | ||
10143 | case "$x" in | |
10144 | -L*) | |
10145 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10146 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
10147 | found_dir="$dir" | |
10148 | found_so="$dir/lib$name.$shlibext" | |
10149 | if test -f "$dir/lib$name.la"; then | |
10150 | found_la="$dir/lib$name.la" | |
10151 | fi | |
10152 | elif test x$lib_type != xshared; then | |
10153 | if test -f "$dir/lib$name.$libext"; then | |
10154 | found_dir="$dir" | |
10155 | found_a="$dir/lib$name.$libext" | |
10156 | if test -f "$dir/lib$name.la"; then | |
10157 | found_la="$dir/lib$name.la" | |
10158 | fi | |
10159 | fi | |
10160 | fi | |
10161 | ;; | |
10162 | esac | |
10163 | if test "X$found_dir" != "X"; then | |
10164 | break | |
10165 | fi | |
10166 | done | |
10167 | fi | |
10168 | if test "X$found_dir" != "X"; then | |
10169 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name" | |
10170 | if test "X$found_so" != "X"; then | |
10171 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10172 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10173 | else | |
10174 | haveit= | |
10175 | for x in $ltrpathdirs; do | |
10176 | if test "X$x" = "X$found_dir"; then | |
10177 | haveit=yes | |
10178 | break | |
10179 | fi | |
10180 | done | |
10181 | if test -z "$haveit"; then | |
10182 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10183 | fi | |
10184 | if test "$hardcode_direct" = yes; then | |
10185 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10186 | else | |
10187 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10188 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10189 | haveit= | |
10190 | for x in $rpathdirs; do | |
10191 | if test "X$x" = "X$found_dir"; then | |
10192 | haveit=yes | |
10193 | break | |
10194 | fi | |
10195 | done | |
10196 | if test -z "$haveit"; then | |
10197 | rpathdirs="$rpathdirs $found_dir" | |
10198 | fi | |
10199 | else | |
10200 | haveit= | |
10201 | for x in $LDFLAGS $LIBGMP; do | |
10202 | ||
10203 | acl_save_prefix="$prefix" | |
10204 | prefix="$acl_final_prefix" | |
10205 | acl_save_exec_prefix="$exec_prefix" | |
10206 | exec_prefix="$acl_final_exec_prefix" | |
10207 | eval x=\"$x\" | |
10208 | exec_prefix="$acl_save_exec_prefix" | |
10209 | prefix="$acl_save_prefix" | |
10210 | ||
10211 | if test "X$x" = "X-L$found_dir"; then | |
10212 | haveit=yes | |
10213 | break | |
10214 | fi | |
10215 | done | |
10216 | if test -z "$haveit"; then | |
10217 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir" | |
10218 | fi | |
10219 | if test "$hardcode_minus_L" != no; then | |
10220 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10221 | else | |
10222 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name" | |
10223 | fi | |
10224 | fi | |
10225 | fi | |
10226 | fi | |
10227 | else | |
10228 | if test "X$found_a" != "X"; then | |
10229 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a" | |
10230 | else | |
10231 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name" | |
10232 | fi | |
10233 | fi | |
10234 | additional_includedir= | |
10235 | case "$found_dir" in | |
10236 | */lib | */lib/) | |
10237 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10238 | additional_includedir="$basedir/include" | |
10239 | ;; | |
10240 | esac | |
10241 | if test "X$additional_includedir" != "X"; then | |
10242 | if test "X$additional_includedir" != "X/usr/include"; then | |
10243 | haveit= | |
10244 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10245 | if test -n "$GCC"; then | |
10246 | case $host_os in | |
10247 | linux*) haveit=yes;; | |
10248 | esac | |
10249 | fi | |
10250 | fi | |
10251 | if test -z "$haveit"; then | |
10252 | for x in $CPPFLAGS $INCGMP; do | |
10253 | ||
10254 | acl_save_prefix="$prefix" | |
10255 | prefix="$acl_final_prefix" | |
10256 | acl_save_exec_prefix="$exec_prefix" | |
10257 | exec_prefix="$acl_final_exec_prefix" | |
10258 | eval x=\"$x\" | |
10259 | exec_prefix="$acl_save_exec_prefix" | |
10260 | prefix="$acl_save_prefix" | |
10261 | ||
10262 | if test "X$x" = "X-I$additional_includedir"; then | |
10263 | haveit=yes | |
10264 | break | |
10265 | fi | |
10266 | done | |
10267 | if test -z "$haveit"; then | |
10268 | if test -d "$additional_includedir"; then | |
10269 | INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir" | |
10270 | fi | |
10271 | fi | |
10272 | fi | |
10273 | fi | |
10274 | fi | |
10275 | if test -n "$found_la"; then | |
10276 | save_libdir="$libdir" | |
10277 | case "$found_la" in | |
10278 | */* | *\\*) . "$found_la" ;; | |
10279 | *) . "./$found_la" ;; | |
10280 | esac | |
10281 | libdir="$save_libdir" | |
10282 | for dep in $dependency_libs; do | |
10283 | case "$dep" in | |
10284 | -L*) | |
10285 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10286 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10287 | haveit= | |
10288 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10289 | if test -n "$GCC"; then | |
10290 | case $host_os in | |
10291 | linux*) haveit=yes;; | |
10292 | esac | |
10293 | fi | |
10294 | fi | |
10295 | if test -z "$haveit"; then | |
10296 | haveit= | |
10297 | for x in $LDFLAGS $LIBGMP; do | |
10298 | ||
10299 | acl_save_prefix="$prefix" | |
10300 | prefix="$acl_final_prefix" | |
10301 | acl_save_exec_prefix="$exec_prefix" | |
10302 | exec_prefix="$acl_final_exec_prefix" | |
10303 | eval x=\"$x\" | |
10304 | exec_prefix="$acl_save_exec_prefix" | |
10305 | prefix="$acl_save_prefix" | |
10306 | ||
10307 | if test "X$x" = "X-L$additional_libdir"; then | |
10308 | haveit=yes | |
10309 | break | |
10310 | fi | |
10311 | done | |
10312 | if test -z "$haveit"; then | |
10313 | if test -d "$additional_libdir"; then | |
10314 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir" | |
10315 | fi | |
10316 | fi | |
10317 | haveit= | |
10318 | for x in $LDFLAGS $LTLIBGMP; do | |
10319 | ||
10320 | acl_save_prefix="$prefix" | |
10321 | prefix="$acl_final_prefix" | |
10322 | acl_save_exec_prefix="$exec_prefix" | |
10323 | exec_prefix="$acl_final_exec_prefix" | |
10324 | eval x=\"$x\" | |
10325 | exec_prefix="$acl_save_exec_prefix" | |
10326 | prefix="$acl_save_prefix" | |
10327 | ||
10328 | if test "X$x" = "X-L$additional_libdir"; then | |
10329 | haveit=yes | |
10330 | break | |
10331 | fi | |
10332 | done | |
10333 | if test -z "$haveit"; then | |
10334 | if test -d "$additional_libdir"; then | |
10335 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir" | |
10336 | fi | |
10337 | fi | |
10338 | fi | |
10339 | fi | |
10340 | ;; | |
10341 | -R*) | |
10342 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10343 | if test "$enable_rpath" != no; then | |
10344 | haveit= | |
10345 | for x in $rpathdirs; do | |
10346 | if test "X$x" = "X$dir"; then | |
10347 | haveit=yes | |
10348 | break | |
10349 | fi | |
10350 | done | |
10351 | if test -z "$haveit"; then | |
10352 | rpathdirs="$rpathdirs $dir" | |
10353 | fi | |
10354 | haveit= | |
10355 | for x in $ltrpathdirs; do | |
10356 | if test "X$x" = "X$dir"; then | |
10357 | haveit=yes | |
10358 | break | |
10359 | fi | |
10360 | done | |
10361 | if test -z "$haveit"; then | |
10362 | ltrpathdirs="$ltrpathdirs $dir" | |
10363 | fi | |
10364 | fi | |
10365 | ;; | |
10366 | -l*) | |
10367 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10368 | ;; | |
10369 | *.la) | |
10370 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10371 | ;; | |
10372 | *) | |
10373 | LIBGMP="${LIBGMP}${LIBGMP:+ }$dep" | |
10374 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep" | |
10375 | ;; | |
10376 | esac | |
10377 | done | |
10378 | fi | |
10379 | else | |
10380 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then | |
10381 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name" | |
10382 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name" | |
10383 | else | |
10384 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext" | |
10385 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext" | |
10386 | fi | |
10387 | fi | |
10388 | fi | |
10389 | fi | |
10390 | done | |
10391 | done | |
10392 | if test "X$rpathdirs" != "X"; then | |
10393 | if test -n "$hardcode_libdir_separator"; then | |
10394 | alldirs= | |
10395 | for found_dir in $rpathdirs; do | |
10396 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10397 | done | |
10398 | acl_save_libdir="$libdir" | |
10399 | libdir="$alldirs" | |
10400 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10401 | libdir="$acl_save_libdir" | |
10402 | LIBGMP="${LIBGMP}${LIBGMP:+ }$flag" | |
10403 | else | |
10404 | for found_dir in $rpathdirs; do | |
10405 | acl_save_libdir="$libdir" | |
10406 | libdir="$found_dir" | |
10407 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10408 | libdir="$acl_save_libdir" | |
10409 | LIBGMP="${LIBGMP}${LIBGMP:+ }$flag" | |
10410 | done | |
10411 | fi | |
10412 | fi | |
10413 | if test "X$ltrpathdirs" != "X"; then | |
10414 | for found_dir in $ltrpathdirs; do | |
10415 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir" | |
10416 | done | |
10417 | fi | |
10418 | ||
10419 | ||
10420 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10421 | ||
10422 | for element in $INCGMP; do | |
10423 | haveit= | |
10424 | for x in $CPPFLAGS; do | |
10425 | ||
10426 | acl_save_prefix="$prefix" | |
10427 | prefix="$acl_final_prefix" | |
10428 | acl_save_exec_prefix="$exec_prefix" | |
10429 | exec_prefix="$acl_final_exec_prefix" | |
10430 | eval x=\"$x\" | |
10431 | exec_prefix="$acl_save_exec_prefix" | |
10432 | prefix="$acl_save_prefix" | |
10433 | ||
10434 | if test "X$x" = "X$element"; then | |
10435 | haveit=yes | |
10436 | break | |
10437 | fi | |
10438 | done | |
10439 | if test -z "$haveit"; then | |
10440 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10441 | fi | |
10442 | done | |
10443 | ||
10444 | ||
10445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5 | |
10446 | $as_echo_n "checking for libgmp... " >&6; } | |
10447 | if ${ac_cv_libgmp+:} false; then : | |
10448 | $as_echo_n "(cached) " >&6 | |
10449 | else | |
10450 | ||
10451 | ac_save_LIBS="$LIBS" | |
10452 | LIBS="$LIBS $LIBGMP" | |
10453 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10454 | /* end confdefs.h. */ | |
10455 | #include <gmp.h> | |
10456 | int | |
10457 | main () | |
10458 | { | |
10459 | mpz_t n; | |
10460 | mpz_init (n); | |
10461 | ; | |
10462 | return 0; | |
10463 | } | |
10464 | _ACEOF | |
10465 | if ac_fn_c_try_link "$LINENO"; then : | |
10466 | ac_cv_libgmp=yes | |
10467 | else | |
10468 | ac_cv_libgmp=no | |
10469 | fi | |
10470 | rm -f core conftest.err conftest.$ac_objext \ | |
10471 | conftest$ac_exeext conftest.$ac_ext | |
10472 | LIBS="$ac_save_LIBS" | |
10473 | ||
10474 | fi | |
10475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5 | |
10476 | $as_echo "$ac_cv_libgmp" >&6; } | |
10477 | if test "$ac_cv_libgmp" = yes; then | |
10478 | HAVE_LIBGMP=yes | |
10479 | ||
10480 | $as_echo "#define HAVE_LIBGMP 1" >>confdefs.h | |
10481 | ||
10482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5 | |
10483 | $as_echo_n "checking how to link with libgmp... " >&6; } | |
10484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5 | |
10485 | $as_echo "$LIBGMP" >&6; } | |
10486 | else | |
10487 | HAVE_LIBGMP=no | |
10488 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10489 | LIBGMP= | |
10490 | LTLIBGMP= | |
10491 | fi | |
10492 | ||
10493 | ||
10494 | ||
10495 | ||
10496 | ||
10497 | ||
1b4ac058 JB |
10498 | if test "$HAVE_LIBGMP" != yes; then |
10499 | as_fn_error $? "GMP is missing or unusable" "$LINENO" 5 | |
10500 | fi | |
2c947d9b | 10501 | |
2400729e UW |
10502 | |
10503 | # Check whether --with-mpfr was given. | |
10504 | if test "${with_mpfr+set}" = set; then : | |
10505 | withval=$with_mpfr; | |
10506 | else | |
10507 | with_mpfr=auto | |
10508 | fi | |
10509 | ||
10510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
10511 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
10512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
10513 | $as_echo "$with_mpfr" >&6; } | |
10514 | ||
10515 | if test "${with_mpfr}" = no; then | |
10516 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
10517 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
10518 | HAVE_LIBMPFR=no | |
10519 | else | |
10520 | ||
10521 | ||
10522 | ||
10523 | ||
10524 | ||
10525 | ||
10526 | ||
10527 | ||
10528 | use_additional=yes | |
10529 | ||
10530 | acl_save_prefix="$prefix" | |
10531 | prefix="$acl_final_prefix" | |
10532 | acl_save_exec_prefix="$exec_prefix" | |
10533 | exec_prefix="$acl_final_exec_prefix" | |
10534 | ||
10535 | eval additional_includedir=\"$includedir\" | |
10536 | eval additional_libdir=\"$libdir\" | |
10537 | ||
10538 | exec_prefix="$acl_save_exec_prefix" | |
10539 | prefix="$acl_save_prefix" | |
10540 | ||
10541 | ||
10542 | # Check whether --with-libmpfr-prefix was given. | |
10543 | if test "${with_libmpfr_prefix+set}" = set; then : | |
10544 | withval=$with_libmpfr_prefix; | |
10545 | if test "X$withval" = "Xno"; then | |
10546 | use_additional=no | |
10547 | else | |
10548 | if test "X$withval" = "X"; then | |
10549 | ||
10550 | acl_save_prefix="$prefix" | |
10551 | prefix="$acl_final_prefix" | |
10552 | acl_save_exec_prefix="$exec_prefix" | |
10553 | exec_prefix="$acl_final_exec_prefix" | |
10554 | ||
10555 | eval additional_includedir=\"$includedir\" | |
10556 | eval additional_libdir=\"$libdir\" | |
10557 | ||
10558 | exec_prefix="$acl_save_exec_prefix" | |
10559 | prefix="$acl_save_prefix" | |
10560 | ||
10561 | else | |
10562 | additional_includedir="$withval/include" | |
10563 | additional_libdir="$withval/lib" | |
10564 | fi | |
10565 | fi | |
10566 | ||
10567 | fi | |
10568 | ||
9f1528a1 AB |
10569 | |
10570 | # Check whether --with-libmpfr-type was given. | |
10571 | if test "${with_libmpfr_type+set}" = set; then : | |
10572 | withval=$with_libmpfr_type; with_libmpfr_type=$withval | |
10573 | else | |
10574 | with_libmpfr_type=auto | |
10575 | fi | |
10576 | ||
10577 | lib_type=`eval echo \$with_libmpfr_type` | |
10578 | ||
2400729e UW |
10579 | LIBMPFR= |
10580 | LTLIBMPFR= | |
10581 | INCMPFR= | |
10582 | rpathdirs= | |
10583 | ltrpathdirs= | |
10584 | names_already_handled= | |
da658607 | 10585 | names_next_round='mpfr gmp' |
2400729e UW |
10586 | while test -n "$names_next_round"; do |
10587 | names_this_round="$names_next_round" | |
10588 | names_next_round= | |
10589 | for name in $names_this_round; do | |
10590 | already_handled= | |
10591 | for n in $names_already_handled; do | |
10592 | if test "$n" = "$name"; then | |
10593 | already_handled=yes | |
10594 | break | |
10595 | fi | |
10596 | done | |
10597 | if test -z "$already_handled"; then | |
10598 | names_already_handled="$names_already_handled $name" | |
10599 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10600 | eval value=\"\$HAVE_LIB$uppername\" | |
10601 | if test -n "$value"; then | |
10602 | if test "$value" = yes; then | |
10603 | eval value=\"\$LIB$uppername\" | |
10604 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
10605 | eval value=\"\$LTLIB$uppername\" | |
10606 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
10607 | else | |
10608 | : | |
10609 | fi | |
10610 | else | |
10611 | found_dir= | |
10612 | found_la= | |
10613 | found_so= | |
10614 | found_a= | |
10615 | if test $use_additional = yes; then | |
9f1528a1 | 10616 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10617 | found_dir="$additional_libdir" |
10618 | found_so="$additional_libdir/lib$name.$shlibext" | |
10619 | if test -f "$additional_libdir/lib$name.la"; then | |
10620 | found_la="$additional_libdir/lib$name.la" | |
10621 | fi | |
9f1528a1 | 10622 | elif test x$lib_type != xshared; then |
2400729e UW |
10623 | if test -f "$additional_libdir/lib$name.$libext"; then |
10624 | found_dir="$additional_libdir" | |
10625 | found_a="$additional_libdir/lib$name.$libext" | |
10626 | if test -f "$additional_libdir/lib$name.la"; then | |
10627 | found_la="$additional_libdir/lib$name.la" | |
10628 | fi | |
10629 | fi | |
10630 | fi | |
10631 | fi | |
10632 | if test "X$found_dir" = "X"; then | |
10633 | for x in $LDFLAGS $LTLIBMPFR; do | |
10634 | ||
10635 | acl_save_prefix="$prefix" | |
10636 | prefix="$acl_final_prefix" | |
10637 | acl_save_exec_prefix="$exec_prefix" | |
10638 | exec_prefix="$acl_final_exec_prefix" | |
10639 | eval x=\"$x\" | |
10640 | exec_prefix="$acl_save_exec_prefix" | |
10641 | prefix="$acl_save_prefix" | |
10642 | ||
10643 | case "$x" in | |
10644 | -L*) | |
10645 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 10646 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10647 | found_dir="$dir" |
10648 | found_so="$dir/lib$name.$shlibext" | |
10649 | if test -f "$dir/lib$name.la"; then | |
10650 | found_la="$dir/lib$name.la" | |
10651 | fi | |
9f1528a1 | 10652 | elif test x$lib_type != xshared; then |
2400729e UW |
10653 | if test -f "$dir/lib$name.$libext"; then |
10654 | found_dir="$dir" | |
10655 | found_a="$dir/lib$name.$libext" | |
10656 | if test -f "$dir/lib$name.la"; then | |
10657 | found_la="$dir/lib$name.la" | |
10658 | fi | |
10659 | fi | |
10660 | fi | |
10661 | ;; | |
10662 | esac | |
10663 | if test "X$found_dir" != "X"; then | |
10664 | break | |
10665 | fi | |
10666 | done | |
10667 | fi | |
10668 | if test "X$found_dir" != "X"; then | |
10669 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
10670 | if test "X$found_so" != "X"; then | |
10671 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10672 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10673 | else | |
10674 | haveit= | |
10675 | for x in $ltrpathdirs; do | |
10676 | if test "X$x" = "X$found_dir"; then | |
10677 | haveit=yes | |
10678 | break | |
10679 | fi | |
10680 | done | |
10681 | if test -z "$haveit"; then | |
10682 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10683 | fi | |
10684 | if test "$hardcode_direct" = yes; then | |
10685 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10686 | else | |
10687 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10688 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10689 | haveit= | |
10690 | for x in $rpathdirs; do | |
10691 | if test "X$x" = "X$found_dir"; then | |
10692 | haveit=yes | |
10693 | break | |
10694 | fi | |
10695 | done | |
10696 | if test -z "$haveit"; then | |
10697 | rpathdirs="$rpathdirs $found_dir" | |
10698 | fi | |
10699 | else | |
10700 | haveit= | |
10701 | for x in $LDFLAGS $LIBMPFR; do | |
10702 | ||
10703 | acl_save_prefix="$prefix" | |
10704 | prefix="$acl_final_prefix" | |
10705 | acl_save_exec_prefix="$exec_prefix" | |
10706 | exec_prefix="$acl_final_exec_prefix" | |
10707 | eval x=\"$x\" | |
10708 | exec_prefix="$acl_save_exec_prefix" | |
10709 | prefix="$acl_save_prefix" | |
10710 | ||
10711 | if test "X$x" = "X-L$found_dir"; then | |
10712 | haveit=yes | |
10713 | break | |
10714 | fi | |
10715 | done | |
10716 | if test -z "$haveit"; then | |
10717 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
10718 | fi | |
10719 | if test "$hardcode_minus_L" != no; then | |
10720 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10721 | else | |
10722 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10723 | fi | |
10724 | fi | |
10725 | fi | |
10726 | fi | |
10727 | else | |
10728 | if test "X$found_a" != "X"; then | |
10729 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
10730 | else | |
10731 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
10732 | fi | |
10733 | fi | |
10734 | additional_includedir= | |
10735 | case "$found_dir" in | |
10736 | */lib | */lib/) | |
10737 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10738 | additional_includedir="$basedir/include" | |
10739 | ;; | |
10740 | esac | |
10741 | if test "X$additional_includedir" != "X"; then | |
10742 | if test "X$additional_includedir" != "X/usr/include"; then | |
10743 | haveit= | |
10744 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10745 | if test -n "$GCC"; then | |
10746 | case $host_os in | |
10747 | linux*) haveit=yes;; | |
10748 | esac | |
10749 | fi | |
10750 | fi | |
10751 | if test -z "$haveit"; then | |
10752 | for x in $CPPFLAGS $INCMPFR; do | |
10753 | ||
10754 | acl_save_prefix="$prefix" | |
10755 | prefix="$acl_final_prefix" | |
10756 | acl_save_exec_prefix="$exec_prefix" | |
10757 | exec_prefix="$acl_final_exec_prefix" | |
10758 | eval x=\"$x\" | |
10759 | exec_prefix="$acl_save_exec_prefix" | |
10760 | prefix="$acl_save_prefix" | |
10761 | ||
10762 | if test "X$x" = "X-I$additional_includedir"; then | |
10763 | haveit=yes | |
10764 | break | |
10765 | fi | |
10766 | done | |
10767 | if test -z "$haveit"; then | |
10768 | if test -d "$additional_includedir"; then | |
10769 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
10770 | fi | |
10771 | fi | |
10772 | fi | |
10773 | fi | |
10774 | fi | |
10775 | if test -n "$found_la"; then | |
10776 | save_libdir="$libdir" | |
10777 | case "$found_la" in | |
10778 | */* | *\\*) . "$found_la" ;; | |
10779 | *) . "./$found_la" ;; | |
10780 | esac | |
10781 | libdir="$save_libdir" | |
10782 | for dep in $dependency_libs; do | |
10783 | case "$dep" in | |
10784 | -L*) | |
10785 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10786 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10787 | haveit= | |
10788 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10789 | if test -n "$GCC"; then | |
10790 | case $host_os in | |
10791 | linux*) haveit=yes;; | |
10792 | esac | |
10793 | fi | |
10794 | fi | |
10795 | if test -z "$haveit"; then | |
10796 | haveit= | |
10797 | for x in $LDFLAGS $LIBMPFR; do | |
10798 | ||
10799 | acl_save_prefix="$prefix" | |
10800 | prefix="$acl_final_prefix" | |
10801 | acl_save_exec_prefix="$exec_prefix" | |
10802 | exec_prefix="$acl_final_exec_prefix" | |
10803 | eval x=\"$x\" | |
10804 | exec_prefix="$acl_save_exec_prefix" | |
10805 | prefix="$acl_save_prefix" | |
10806 | ||
10807 | if test "X$x" = "X-L$additional_libdir"; then | |
10808 | haveit=yes | |
10809 | break | |
10810 | fi | |
10811 | done | |
10812 | if test -z "$haveit"; then | |
10813 | if test -d "$additional_libdir"; then | |
10814 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
10815 | fi | |
10816 | fi | |
10817 | haveit= | |
10818 | for x in $LDFLAGS $LTLIBMPFR; do | |
10819 | ||
10820 | acl_save_prefix="$prefix" | |
10821 | prefix="$acl_final_prefix" | |
10822 | acl_save_exec_prefix="$exec_prefix" | |
10823 | exec_prefix="$acl_final_exec_prefix" | |
10824 | eval x=\"$x\" | |
10825 | exec_prefix="$acl_save_exec_prefix" | |
10826 | prefix="$acl_save_prefix" | |
10827 | ||
10828 | if test "X$x" = "X-L$additional_libdir"; then | |
10829 | haveit=yes | |
10830 | break | |
10831 | fi | |
10832 | done | |
10833 | if test -z "$haveit"; then | |
10834 | if test -d "$additional_libdir"; then | |
10835 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
10836 | fi | |
10837 | fi | |
10838 | fi | |
10839 | fi | |
10840 | ;; | |
10841 | -R*) | |
10842 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10843 | if test "$enable_rpath" != no; then | |
10844 | haveit= | |
10845 | for x in $rpathdirs; do | |
10846 | if test "X$x" = "X$dir"; then | |
10847 | haveit=yes | |
10848 | break | |
10849 | fi | |
10850 | done | |
10851 | if test -z "$haveit"; then | |
10852 | rpathdirs="$rpathdirs $dir" | |
10853 | fi | |
10854 | haveit= | |
10855 | for x in $ltrpathdirs; do | |
10856 | if test "X$x" = "X$dir"; then | |
10857 | haveit=yes | |
10858 | break | |
10859 | fi | |
10860 | done | |
10861 | if test -z "$haveit"; then | |
10862 | ltrpathdirs="$ltrpathdirs $dir" | |
10863 | fi | |
10864 | fi | |
10865 | ;; | |
10866 | -l*) | |
10867 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10868 | ;; | |
10869 | *.la) | |
10870 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10871 | ;; | |
10872 | *) | |
10873 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10874 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10875 | ;; | |
10876 | esac | |
10877 | done | |
10878 | fi | |
10879 | else | |
9f1528a1 AB |
10880 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
10881 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10882 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10883 | else | |
10884 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext" | |
10885 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext" | |
10886 | fi | |
2400729e UW |
10887 | fi |
10888 | fi | |
10889 | fi | |
10890 | done | |
10891 | done | |
10892 | if test "X$rpathdirs" != "X"; then | |
10893 | if test -n "$hardcode_libdir_separator"; then | |
10894 | alldirs= | |
10895 | for found_dir in $rpathdirs; do | |
10896 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10897 | done | |
10898 | acl_save_libdir="$libdir" | |
10899 | libdir="$alldirs" | |
10900 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10901 | libdir="$acl_save_libdir" | |
10902 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10903 | else | |
10904 | for found_dir in $rpathdirs; do | |
10905 | acl_save_libdir="$libdir" | |
10906 | libdir="$found_dir" | |
10907 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10908 | libdir="$acl_save_libdir" | |
10909 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10910 | done | |
10911 | fi | |
10912 | fi | |
10913 | if test "X$ltrpathdirs" != "X"; then | |
10914 | for found_dir in $ltrpathdirs; do | |
10915 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10916 | done | |
10917 | fi | |
10918 | ||
10919 | ||
10920 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10921 | ||
10922 | for element in $INCMPFR; do | |
10923 | haveit= | |
10924 | for x in $CPPFLAGS; do | |
10925 | ||
10926 | acl_save_prefix="$prefix" | |
10927 | prefix="$acl_final_prefix" | |
10928 | acl_save_exec_prefix="$exec_prefix" | |
10929 | exec_prefix="$acl_final_exec_prefix" | |
10930 | eval x=\"$x\" | |
10931 | exec_prefix="$acl_save_exec_prefix" | |
10932 | prefix="$acl_save_prefix" | |
10933 | ||
10934 | if test "X$x" = "X$element"; then | |
10935 | haveit=yes | |
10936 | break | |
10937 | fi | |
10938 | done | |
10939 | if test -z "$haveit"; then | |
10940 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10941 | fi | |
10942 | done | |
10943 | ||
10944 | ||
10945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10946 | $as_echo_n "checking for libmpfr... " >&6; } | |
d0ac1c44 | 10947 | if ${ac_cv_libmpfr+:} false; then : |
2400729e UW |
10948 | $as_echo_n "(cached) " >&6 |
10949 | else | |
10950 | ||
10951 | ac_save_LIBS="$LIBS" | |
10952 | LIBS="$LIBS $LIBMPFR" | |
10953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10954 | /* end confdefs.h. */ | |
10955 | #include <mpfr.h> | |
10956 | int | |
10957 | main () | |
10958 | { | |
10959 | mpfr_exp_t exp; mpfr_t x; | |
10960 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10961 | ; | |
10962 | return 0; | |
10963 | } | |
10964 | _ACEOF | |
10965 | if ac_fn_c_try_link "$LINENO"; then : | |
10966 | ac_cv_libmpfr=yes | |
10967 | else | |
10968 | ac_cv_libmpfr=no | |
10969 | fi | |
10970 | rm -f core conftest.err conftest.$ac_objext \ | |
10971 | conftest$ac_exeext conftest.$ac_ext | |
10972 | LIBS="$ac_save_LIBS" | |
10973 | ||
10974 | fi | |
10975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
10976 | $as_echo "$ac_cv_libmpfr" >&6; } | |
10977 | if test "$ac_cv_libmpfr" = yes; then | |
10978 | HAVE_LIBMPFR=yes | |
10979 | ||
10980 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
10981 | ||
10982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
10983 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
10984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
10985 | $as_echo "$LIBMPFR" >&6; } | |
10986 | else | |
10987 | HAVE_LIBMPFR=no | |
10988 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10989 | LIBMPFR= | |
10990 | LTLIBMPFR= | |
10991 | fi | |
10992 | ||
10993 | ||
10994 | ||
10995 | ||
10996 | ||
10997 | ||
10998 | if test "$HAVE_LIBMPFR" != yes; then | |
10999 | if test "$with_mpfr" = yes; then | |
d0ac1c44 | 11000 | as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 |
2400729e UW |
11001 | else |
11002 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
11003 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
11004 | fi | |
11005 | fi | |
11006 | fi | |
11007 | ||
d344e670 DE |
11008 | # --------------------- # |
11009 | # Check for libpython. # | |
11010 | # --------------------- # | |
11011 | ||
a9322a30 | 11012 | |
a9322a30 TT |
11013 | |
11014 | ||
ec685c5e | 11015 | |
0c4a4063 | 11016 | |
81ecdfbb RW |
11017 | # Check whether --with-python was given. |
11018 | if test "${with_python+set}" = set; then : | |
11019 | withval=$with_python; | |
bec39cab | 11020 | else |
81ecdfbb | 11021 | with_python=auto |
bec39cab | 11022 | fi |
bec39cab | 11023 | |
81ecdfbb RW |
11024 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
11025 | $as_echo_n "checking whether to use python... " >&6; } | |
11026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
11027 | $as_echo "$with_python" >&6; } | |
9a156167 | 11028 | |
81ecdfbb RW |
11029 | if test "${with_python}" = no; then |
11030 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
11031 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
11032 | have_libpython=no | |
bec39cab | 11033 | else |
81ecdfbb | 11034 | case "${with_python}" in |
8c85a4e2 | 11035 | [\\/]* | ?:[\\/]*) |
0ad6b8ee | 11036 | if test -d "${with_python}"; then |
ec685c5e | 11037 | # Assume the python binary is ${with_python}/bin/python. |
ec685c5e | 11038 | python_prog="${with_python}/bin/python" |
0c4a4063 | 11039 | python_prefix= |
9c4ea6c5 JB |
11040 | # If python does not exit ${with_python}/bin, then try in |
11041 | # ${with_python}. On Windows/MinGW, this is where the Python | |
11042 | # executable is. | |
11043 | if test ! -x "${python_prog}"; then | |
11044 | python_prog="${with_python}/python" | |
11045 | python_prefix= | |
11046 | fi | |
e7a30f46 | 11047 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
11048 | # Fall back to gdb 7.0/7.1 behaviour. |
11049 | python_prog=missing | |
0c4a4063 | 11050 | python_prefix=${with_python} |
ec685c5e | 11051 | fi |
e7a30f46 | 11052 | elif test -x "${with_python}"; then |
ec685c5e DE |
11053 | # While we can't run python compiled for $host (unless host == build), |
11054 | # the user could write a script that provides the needed information, | |
11055 | # so we support that. | |
ec685c5e | 11056 | python_prog=${with_python} |
0c4a4063 | 11057 | python_prefix= |
ec685c5e | 11058 | else |
d0ac1c44 | 11059 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
ec685c5e | 11060 | fi |
81ecdfbb | 11061 | ;; |
ec685c5e DE |
11062 | */*) |
11063 | # Disallow --with-python=foo/bar. | |
d0ac1c44 | 11064 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
81ecdfbb | 11065 | ;; |
ec685c5e DE |
11066 | *) |
11067 | # The user has either specified auto, yes, or the name of the python | |
11068 | # program assumed to be in $PATH. | |
11069 | python_prefix= | |
11070 | case "${with_python}" in | |
11071 | yes | auto) | |
0ad6b8ee | 11072 | if test "${build}" = "${host}"; then |
ec685c5e DE |
11073 | # Extract the first word of "python", so it can be a program name with args. |
11074 | set dummy python; ac_word=$2 | |
11075 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11076 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11077 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
11078 | $as_echo_n "(cached) " >&6 |
11079 | else | |
11080 | case $python_prog_path in | |
11081 | [\\/]* | ?:[\\/]*) | |
11082 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
11083 | ;; | |
11084 | *) | |
11085 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11086 | for as_dir in $PATH | |
11087 | do | |
11088 | IFS=$as_save_IFS | |
11089 | test -z "$as_dir" && as_dir=. | |
11090 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11091 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
11092 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11093 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11094 | break 2 | |
11095 | fi | |
11096 | done | |
11097 | done | |
11098 | IFS=$as_save_IFS | |
11099 | ||
11100 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
11101 | ;; | |
11102 | esac | |
11103 | fi | |
11104 | python_prog_path=$ac_cv_path_python_prog_path | |
11105 | if test -n "$python_prog_path"; then | |
11106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
11107 | $as_echo "$python_prog_path" >&6; } | |
11108 | else | |
11109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11110 | $as_echo "no" >&6; } | |
11111 | fi | |
11112 | ||
11113 | ||
11114 | if test "${python_prog_path}" = missing; then | |
11115 | python_prog=missing | |
11116 | else | |
11117 | python_prog=${python_prog_path} | |
11118 | fi | |
11119 | else | |
11120 | # Not much we can do except assume the cross-compiler will find the | |
11121 | # right files. | |
11122 | python_prog=missing | |
11123 | fi | |
11124 | ;; | |
11125 | *) | |
11126 | # While we can't run python compiled for $host (unless host == build), | |
11127 | # the user could write a script that provides the needed information, | |
11128 | # so we support that. | |
11129 | python_prog="${with_python}" | |
11130 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
11131 | set dummy ${python_prog}; ac_word=$2 | |
11132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11133 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11134 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
11135 | $as_echo_n "(cached) " >&6 |
11136 | else | |
11137 | case $python_prog_path in | |
11138 | [\\/]* | ?:[\\/]*) | |
11139 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
11140 | ;; | |
11141 | *) | |
11142 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11143 | for as_dir in $PATH | |
11144 | do | |
11145 | IFS=$as_save_IFS | |
11146 | test -z "$as_dir" && as_dir=. | |
11147 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11148 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
11149 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11150 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11151 | break 2 | |
11152 | fi | |
11153 | done | |
11154 | done | |
11155 | IFS=$as_save_IFS | |
11156 | ||
11157 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
11158 | ;; | |
11159 | esac | |
11160 | fi | |
11161 | python_prog_path=$ac_cv_path_python_prog_path | |
11162 | if test -n "$python_prog_path"; then | |
11163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
11164 | $as_echo "$python_prog_path" >&6; } | |
11165 | else | |
11166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11167 | $as_echo "no" >&6; } | |
11168 | fi | |
11169 | ||
11170 | ||
11171 | if test "${python_prog_path}" = missing; then | |
5593a99a | 11172 | as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 |
ec685c5e DE |
11173 | fi |
11174 | ;; | |
11175 | esac | |
81ecdfbb RW |
11176 | esac |
11177 | ||
ec685c5e | 11178 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
11179 | # We have a python program to use, but it may be too old. |
11180 | # Don't flag an error for --with-python=auto (the default). | |
11181 | have_python_config=yes | |
ec685c5e DE |
11182 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
11183 | if test $? != 0; then | |
e7a30f46 DE |
11184 | have_python_config=failed |
11185 | if test "${with_python}" != auto; then | |
5593a99a | 11186 | as_fn_error $? "failure running python-config --includes" "$LINENO" 5 |
e7a30f46 | 11187 | fi |
ec685c5e DE |
11188 | fi |
11189 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
11190 | if test $? != 0; then | |
e7a30f46 DE |
11191 | have_python_config=failed |
11192 | if test "${with_python}" != auto; then | |
5593a99a | 11193 | as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 |
e7a30f46 | 11194 | fi |
ec685c5e | 11195 | fi |
0c4a4063 DE |
11196 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
11197 | if test $? != 0; then | |
e7a30f46 DE |
11198 | have_python_config=failed |
11199 | if test "${with_python}" != auto; then | |
5593a99a | 11200 | as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 |
e7a30f46 | 11201 | fi |
0c4a4063 | 11202 | fi |
ec685c5e | 11203 | else |
ac534cba JB |
11204 | # We do not have a python executable we can use to determine where |
11205 | # to find the Python headers and libs. We cannot guess the include | |
11206 | # path from the python_prefix either, because that include path | |
11207 | # depends on the Python version. So, there is nothing much we can | |
11208 | # do except assume that the compiler will be able to find those files. | |
11209 | python_includes= | |
11210 | python_libs= | |
0c4a4063 | 11211 | have_python_config=no |
ec685c5e | 11212 | fi |
bec39cab | 11213 | |
ec685c5e DE |
11214 | # If we have python-config, only try the configuration it provides. |
11215 | # Otherwise fallback on the old way of trying different versions of | |
11216 | # python in turn. | |
81ecdfbb | 11217 | |
ec685c5e DE |
11218 | have_libpython=no |
11219 | if test "${have_python_config}" = yes; then | |
71737c43 | 11220 | |
ec685c5e DE |
11221 | |
11222 | new_CPPFLAGS=${python_includes} | |
11223 | new_LIBS=${python_libs} | |
71737c43 CB |
11224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11225 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e | 11226 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 11227 | save_LIBS=$LIBS |
ec685c5e | 11228 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 11229 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 11230 | found_usable_python=no |
81ecdfbb | 11231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11232 | /* end confdefs.h. */ |
ac534cba | 11233 | #include "Python.h" |
81ecdfbb RW |
11234 | int |
11235 | main () | |
11236 | { | |
11237 | Py_Initialize (); | |
11238 | ; | |
11239 | return 0; | |
11240 | } | |
bec39cab | 11241 | _ACEOF |
81ecdfbb | 11242 | if ac_fn_c_try_link "$LINENO"; then : |
71737c43 | 11243 | have_libpython=yes |
ec685c5e | 11244 | found_usable_python=yes |
ac534cba JB |
11245 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11246 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 11247 | fi |
81ecdfbb RW |
11248 | rm -f core conftest.err conftest.$ac_objext \ |
11249 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11250 | CPPFLAGS=$save_CPPFLAGS |
11251 | LIBS=$save_LIBS | |
ec685c5e DE |
11252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11253 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 11254 | |
e7a30f46 | 11255 | elif test "${have_python_config}" != failed; then |
ec685c5e | 11256 | if test "${have_libpython}" = no; then |
9a156167 | 11257 | |
420697bb TT |
11258 | |
11259 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 11260 | new_LIBS="-lpython2.7 ${python_libs}" |
71737c43 CB |
11261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11262 | $as_echo_n "checking for python... " >&6; } | |
420697bb TT |
11263 | save_CPPFLAGS=$CPPFLAGS |
11264 | save_LIBS=$LIBS | |
11265 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 11266 | LIBS="$new_LIBS $LIBS" |
420697bb TT |
11267 | found_usable_python=no |
11268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11269 | /* end confdefs.h. */ | |
ac534cba | 11270 | #include "Python.h" |
420697bb TT |
11271 | int |
11272 | main () | |
11273 | { | |
11274 | Py_Initialize (); | |
11275 | ; | |
11276 | return 0; | |
11277 | } | |
11278 | _ACEOF | |
11279 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 11280 | have_libpython=yes |
420697bb | 11281 | found_usable_python=yes |
ac534cba JB |
11282 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11283 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
11284 | fi |
11285 | rm -f core conftest.err conftest.$ac_objext \ | |
11286 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11287 | CPPFLAGS=$save_CPPFLAGS |
11288 | LIBS=$save_LIBS | |
420697bb TT |
11289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11290 | $as_echo "${found_usable_python}" >&6; } | |
11291 | ||
11292 | fi | |
11293 | if test "${have_libpython}" = no; then | |
11294 | ||
ec685c5e DE |
11295 | |
11296 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 11297 | new_LIBS="-lpython2.6 ${python_libs}" |
71737c43 CB |
11298 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11299 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e DE |
11300 | save_CPPFLAGS=$CPPFLAGS |
11301 | save_LIBS=$LIBS | |
11302 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 11303 | LIBS="$new_LIBS $LIBS" |
ec685c5e DE |
11304 | found_usable_python=no |
11305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11306 | /* end confdefs.h. */ | |
ac534cba | 11307 | #include "Python.h" |
ec685c5e DE |
11308 | int |
11309 | main () | |
11310 | { | |
11311 | Py_Initialize (); | |
11312 | ; | |
11313 | return 0; | |
11314 | } | |
11315 | _ACEOF | |
11316 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 11317 | have_libpython=yes |
ec685c5e | 11318 | found_usable_python=yes |
ac534cba JB |
11319 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11320 | PYTHON_LIBS=$new_LIBS | |
ec685c5e | 11321 | fi |
81ecdfbb RW |
11322 | rm -f core conftest.err conftest.$ac_objext \ |
11323 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11324 | CPPFLAGS=$save_CPPFLAGS |
11325 | LIBS=$save_LIBS | |
ec685c5e DE |
11326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11327 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 11328 | |
ec685c5e DE |
11329 | fi |
11330 | fi | |
ec685c5e DE |
11331 | |
11332 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
11333 | case "${with_python}" in |
11334 | yes) | |
d0ac1c44 | 11335 | as_fn_error $? "python is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
11336 | ;; |
11337 | auto) | |
11338 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
11339 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
11340 | ;; | |
11341 | *) | |
d0ac1c44 | 11342 | as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 |
81ecdfbb RW |
11343 | ;; |
11344 | esac | |
0c4a4063 DE |
11345 | else |
11346 | if test -n "${python_prefix}"; then | |
11347 | ||
11348 | cat >>confdefs.h <<_ACEOF | |
11349 | #define WITH_PYTHON_PATH "${python_prefix}" | |
11350 | _ACEOF | |
11351 | ||
11352 | ||
11353 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11354 | if test "x$prefix" = xNONE; then | |
11355 | test_prefix=/usr/local | |
11356 | else | |
11357 | test_prefix=$prefix | |
11358 | fi | |
11359 | else | |
11360 | test_prefix=$exec_prefix | |
11361 | fi | |
11362 | value=0 | |
11363 | case ${python_prefix} in | |
11364 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11365 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11366 | value=1 | |
11367 | ;; | |
11368 | esac | |
11369 | ||
11370 | cat >>confdefs.h <<_ACEOF | |
11371 | #define PYTHON_PATH_RELOCATABLE $value | |
11372 | _ACEOF | |
11373 | ||
11374 | ||
11375 | fi | |
81ecdfbb | 11376 | fi |
436868fb | 11377 | fi |
436868fb | 11378 | |
d13c7322 AB |
11379 | |
11380 | # Check whether --with-python-libdir was given. | |
11381 | if test "${with_python_libdir+set}" = set; then : | |
11382 | withval=$with_python_libdir; | |
11383 | else | |
11384 | ||
11385 | # If no python libdir is specified then select one based on | |
11386 | # python's prefix path. | |
11387 | if test -n "${python_prefix}"; then | |
11388 | with_python_libdir=${python_prefix}/lib | |
11389 | fi | |
11390 | ||
11391 | fi | |
11392 | ||
11393 | ||
ec685c5e | 11394 | if test "${have_libpython}" != no; then |
436868fb | 11395 | |
81ecdfbb | 11396 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 11397 | |
81ecdfbb RW |
11398 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
11399 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
11400 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 11401 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 11402 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 11403 | |
d13c7322 AB |
11404 | if test -n "${with_python_libdir}"; then |
11405 | ||
11406 | cat >>confdefs.h <<_ACEOF | |
11407 | #define WITH_PYTHON_LIBDIR "${with_python_libdir}" | |
11408 | _ACEOF | |
11409 | ||
11410 | ||
11411 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11412 | if test "x$prefix" = xNONE; then | |
11413 | test_prefix=/usr/local | |
11414 | else | |
11415 | test_prefix=$prefix | |
11416 | fi | |
11417 | else | |
11418 | test_prefix=$exec_prefix | |
11419 | fi | |
11420 | value=0 | |
11421 | case ${with_python_libdir} in | |
11422 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11423 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11424 | value=1 | |
11425 | ;; | |
11426 | esac | |
11427 | ||
11428 | cat >>confdefs.h <<_ACEOF | |
11429 | #define PYTHON_LIBDIR_RELOCATABLE $value | |
11430 | _ACEOF | |
11431 | ||
11432 | ||
11433 | fi | |
11434 | ||
81ecdfbb RW |
11435 | # Flags needed to compile Python code (taken from python-config --cflags). |
11436 | # We cannot call python-config directly because it will output whatever was | |
11437 | # used when compiling the Python interpreter itself, including flags which | |
11438 | # would make the python-related objects be compiled differently from the | |
11439 | # rest of GDB (e.g., -O2 and -fPIC). | |
11440 | if test "${GCC}" = yes; then | |
ae292b3a TT |
11441 | tentative_python_cflags="-fno-strict-aliasing -fwrapv" |
11442 | # Python headers recommend -DNDEBUG, but it's unclear if that just | |
11443 | # refers to building Python itself. In release mode, though, it | |
11444 | # doesn't hurt for the Python code in gdb to follow. | |
11445 | $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG" | |
81ecdfbb | 11446 | fi |
436868fb | 11447 | |
81ecdfbb RW |
11448 | if test "x${tentative_python_cflags}" != x; then |
11449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
11450 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
11451 | for flag in ${tentative_python_cflags}; do | |
11452 | # Check that the compiler accepts it | |
11453 | saved_CFLAGS="$CFLAGS" | |
11454 | CFLAGS="$CFLAGS $flag" | |
11455 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11456 | /* end confdefs.h. */ |
81ecdfbb | 11457 | |
a9322a30 TT |
11458 | int |
11459 | main () | |
11460 | { | |
a9322a30 TT |
11461 | |
11462 | ; | |
11463 | return 0; | |
11464 | } | |
bec39cab | 11465 | _ACEOF |
81ecdfbb RW |
11466 | if ac_fn_c_try_compile "$LINENO"; then : |
11467 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 11468 | fi |
81ecdfbb RW |
11469 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11470 | CFLAGS="$saved_CFLAGS" | |
11471 | done | |
11472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
11473 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
11474 | fi | |
043b6510 | 11475 | |
c83393b9 JB |
11476 | # On x64 Windows, Python's include headers, and pyconfig.h in |
11477 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
11478 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
11479 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
11480 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
11481 | # The issue was reported to the Python community, but still isn't | |
11482 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
11483 | ||
043b6510 | 11484 | case "$gdb_host" in |
c83393b9 JB |
11485 | mingw64) |
11486 | if test "${GCC}" = yes; then | |
11487 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
11488 | fi | |
11489 | ;; | |
043b6510 | 11490 | esac |
81ecdfbb | 11491 | else |
6dddc817 DE |
11492 | # Even if Python support is not compiled in, we need to have this file |
11493 | # included so that the "python" command, et.al., still exists. | |
8fd8d003 | 11494 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
6dddc817 | 11495 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
a9322a30 | 11496 | fi |
9a156167 | 11497 | |
a4a1c157 PA |
11498 | # Work around Python http://bugs.python.org/issue10112. See also |
11499 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
11500 | # no effect. Note that the only test after this that uses Python is | |
11501 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
11502 | # run without -export-dynamic too. | |
11503 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
11504 | ||
11505 | ||
ed3ef339 DE |
11506 | |
11507 | ||
4df42755 DE |
11508 | if test "${have_libpython}" != no; then |
11509 | HAVE_PYTHON_TRUE= | |
11510 | HAVE_PYTHON_FALSE='#' | |
11511 | else | |
11512 | HAVE_PYTHON_TRUE='#' | |
11513 | HAVE_PYTHON_FALSE= | |
11514 | fi | |
11515 | ||
ed3ef339 DE |
11516 | |
11517 | # -------------------- # | |
11518 | # Check for libguile. # | |
11519 | # -------------------- # | |
11520 | ||
11521 | ||
e1402065 DE |
11522 | |
11523 | ||
11524 | ||
11525 | ||
11526 | # Check whether --with-guile was given. | |
11527 | if test "${with_guile+set}" = set; then : | |
11528 | withval=$with_guile; | |
11529 | else | |
11530 | with_guile=auto | |
11531 | fi | |
11532 | ||
11533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
11534 | $as_echo_n "checking whether to use guile... " >&6; } | |
11535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
11536 | $as_echo "$with_guile" >&6; } | |
11537 | ||
ed3ef339 DE |
11538 | # Extract the first word of "pkg-config", so it can be a program name with args. |
11539 | set dummy pkg-config; ac_word=$2 | |
11540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11541 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11542 | if ${ac_cv_path_pkg_config_prog_path+:} false; then : |
ed3ef339 DE |
11543 | $as_echo_n "(cached) " >&6 |
11544 | else | |
11545 | case $pkg_config_prog_path in | |
11546 | [\\/]* | ?:[\\/]*) | |
11547 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
11548 | ;; | |
11549 | *) | |
11550 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11551 | for as_dir in $PATH | |
11552 | do | |
11553 | IFS=$as_save_IFS | |
11554 | test -z "$as_dir" && as_dir=. | |
11555 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11556 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ed3ef339 DE |
11557 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11558 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11559 | break 2 | |
11560 | fi | |
11561 | done | |
11562 | done | |
11563 | IFS=$as_save_IFS | |
11564 | ||
11565 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
11566 | ;; | |
11567 | esac | |
11568 | fi | |
11569 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
11570 | if test -n "$pkg_config_prog_path"; then | |
11571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
11572 | $as_echo "$pkg_config_prog_path" >&6; } | |
11573 | else | |
11574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11575 | $as_echo "no" >&6; } | |
11576 | fi | |
11577 | ||
11578 | ||
11579 | ||
ae5369e7 | 11580 | try_guile_versions="guile-3.0 guile-2.2 guile-2.0" |
ed3ef339 DE |
11581 | have_libguile=no |
11582 | case "${with_guile}" in | |
11583 | no) | |
11584 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
11585 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
11586 | ;; | |
11587 | auto) | |
e1402065 DE |
11588 | if test "${pkg_config_prog_path}" = "missing"; then |
11589 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
11590 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
11591 | else | |
ed3ef339 DE |
11592 | |
11593 | pkg_config=${pkg_config_prog_path} | |
11594 | guile_version_list=${try_guile_versions} | |
11595 | flag_errors=no | |
11596 | ||
ed3ef339 DE |
11597 | found_usable_guile=checking |
11598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11599 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11600 | for guile_version in ${guile_version_list}; do | |
11601 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11602 | if test $? != 0; then | |
11603 | continue | |
11604 | fi | |
11605 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11606 | if test $? != 0; then | |
d0ac1c44 | 11607 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11608 | fi |
11609 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11610 | if test $? != 0; then | |
d0ac1c44 | 11611 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11612 | fi |
11613 | found_usable_guile=${guile_version} | |
11614 | break | |
11615 | done | |
11616 | if test "${found_usable_guile}" = "checking"; then | |
11617 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11618 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11619 | else |
11620 | found_usable_guile=no | |
11621 | fi | |
11622 | fi | |
11623 | if test "${found_usable_guile}" != no; then | |
11624 | save_CPPFLAGS=$CPPFLAGS | |
11625 | save_LIBS=$LIBS | |
11626 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11627 | LIBS="$LIBS $new_LIBS" | |
11628 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11629 | /* end confdefs.h. */ | |
11630 | #include "libguile.h" | |
11631 | int | |
11632 | main () | |
11633 | { | |
11634 | scm_init_guile (); | |
11635 | ; | |
11636 | return 0; | |
11637 | } | |
11638 | _ACEOF | |
11639 | if ac_fn_c_try_link "$LINENO"; then : | |
11640 | have_libguile=yes | |
11641 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11642 | GUILE_LIBS=$new_LIBS | |
11643 | else | |
11644 | found_usable_guile=no | |
11645 | fi | |
11646 | rm -f core conftest.err conftest.$ac_objext \ | |
11647 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11648 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11649 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11650 | |
11651 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11652 | ||
11653 | ||
11654 | fi | |
11655 | ||
ed3ef339 DE |
11656 | CPPFLAGS=$save_CPPFLAGS |
11657 | LIBS=$save_LIBS | |
11658 | if test "${found_usable_guile}" = no; then | |
11659 | if test "${flag_errors}" = yes; then | |
11660 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11661 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11662 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11663 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11664 | fi |
11665 | fi | |
11666 | fi | |
11667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11668 | $as_echo "${found_usable_guile}" >&6; } | |
11669 | ||
e1402065 | 11670 | fi |
ed3ef339 DE |
11671 | ;; |
11672 | yes) | |
e1402065 | 11673 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11674 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11675 | fi |
ed3ef339 DE |
11676 | |
11677 | pkg_config=${pkg_config_prog_path} | |
11678 | guile_version_list=${try_guile_versions} | |
11679 | flag_errors=yes | |
11680 | ||
ed3ef339 DE |
11681 | found_usable_guile=checking |
11682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11683 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11684 | for guile_version in ${guile_version_list}; do | |
11685 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11686 | if test $? != 0; then | |
11687 | continue | |
11688 | fi | |
11689 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11690 | if test $? != 0; then | |
d0ac1c44 | 11691 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11692 | fi |
11693 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11694 | if test $? != 0; then | |
d0ac1c44 | 11695 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11696 | fi |
11697 | found_usable_guile=${guile_version} | |
11698 | break | |
11699 | done | |
11700 | if test "${found_usable_guile}" = "checking"; then | |
11701 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11702 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11703 | else |
11704 | found_usable_guile=no | |
11705 | fi | |
11706 | fi | |
11707 | if test "${found_usable_guile}" != no; then | |
11708 | save_CPPFLAGS=$CPPFLAGS | |
11709 | save_LIBS=$LIBS | |
11710 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11711 | LIBS="$LIBS $new_LIBS" | |
11712 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11713 | /* end confdefs.h. */ | |
11714 | #include "libguile.h" | |
11715 | int | |
11716 | main () | |
11717 | { | |
11718 | scm_init_guile (); | |
11719 | ; | |
11720 | return 0; | |
11721 | } | |
11722 | _ACEOF | |
11723 | if ac_fn_c_try_link "$LINENO"; then : | |
11724 | have_libguile=yes | |
11725 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11726 | GUILE_LIBS=$new_LIBS | |
11727 | else | |
11728 | found_usable_guile=no | |
11729 | fi | |
11730 | rm -f core conftest.err conftest.$ac_objext \ | |
11731 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11732 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11733 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11734 | |
11735 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11736 | ||
11737 | ||
11738 | fi | |
11739 | ||
ed3ef339 DE |
11740 | CPPFLAGS=$save_CPPFLAGS |
11741 | LIBS=$save_LIBS | |
11742 | if test "${found_usable_guile}" = no; then | |
11743 | if test "${flag_errors}" = yes; then | |
11744 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11745 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11746 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11747 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11748 | fi |
11749 | fi | |
11750 | fi | |
11751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11752 | $as_echo "${found_usable_guile}" >&6; } | |
11753 | ||
11754 | ;; | |
11755 | [\\/]* | ?:[\\/]*) | |
e1402065 | 11756 | if test -x "${with_guile}"; then |
ed3ef339 DE |
11757 | |
11758 | pkg_config=${with_guile} | |
11759 | guile_version_list=${try_guile_versions} | |
11760 | flag_errors=yes | |
11761 | ||
ed3ef339 DE |
11762 | found_usable_guile=checking |
11763 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11764 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11765 | for guile_version in ${guile_version_list}; do | |
11766 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11767 | if test $? != 0; then | |
11768 | continue | |
11769 | fi | |
11770 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11771 | if test $? != 0; then | |
d0ac1c44 | 11772 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11773 | fi |
11774 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11775 | if test $? != 0; then | |
d0ac1c44 | 11776 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11777 | fi |
11778 | found_usable_guile=${guile_version} | |
11779 | break | |
11780 | done | |
11781 | if test "${found_usable_guile}" = "checking"; then | |
11782 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11783 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11784 | else |
11785 | found_usable_guile=no | |
11786 | fi | |
11787 | fi | |
11788 | if test "${found_usable_guile}" != no; then | |
11789 | save_CPPFLAGS=$CPPFLAGS | |
11790 | save_LIBS=$LIBS | |
11791 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11792 | LIBS="$LIBS $new_LIBS" | |
11793 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11794 | /* end confdefs.h. */ | |
11795 | #include "libguile.h" | |
11796 | int | |
11797 | main () | |
11798 | { | |
11799 | scm_init_guile (); | |
11800 | ; | |
11801 | return 0; | |
11802 | } | |
11803 | _ACEOF | |
11804 | if ac_fn_c_try_link "$LINENO"; then : | |
11805 | have_libguile=yes | |
11806 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11807 | GUILE_LIBS=$new_LIBS | |
11808 | else | |
11809 | found_usable_guile=no | |
11810 | fi | |
11811 | rm -f core conftest.err conftest.$ac_objext \ | |
11812 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11813 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11814 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11815 | |
11816 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11817 | ||
11818 | ||
11819 | fi | |
11820 | ||
ed3ef339 DE |
11821 | CPPFLAGS=$save_CPPFLAGS |
11822 | LIBS=$save_LIBS | |
11823 | if test "${found_usable_guile}" = no; then | |
11824 | if test "${flag_errors}" = yes; then | |
11825 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11826 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11827 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11828 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11829 | fi |
11830 | fi | |
11831 | fi | |
11832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11833 | $as_echo "${found_usable_guile}" >&6; } | |
11834 | ||
e1402065 | 11835 | else |
d0ac1c44 | 11836 | as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 |
e1402065 | 11837 | fi |
ed3ef339 DE |
11838 | ;; |
11839 | "" | */*) | |
11840 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
d0ac1c44 | 11841 | as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 |
ed3ef339 DE |
11842 | ;; |
11843 | *) | |
11844 | # A space separate list of guile versions to try, in order. | |
e1402065 | 11845 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11846 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11847 | fi |
ed3ef339 DE |
11848 | |
11849 | pkg_config=${pkg_config_prog_path} | |
11850 | guile_version_list=${with_guile} | |
11851 | flag_errors=yes | |
11852 | ||
ed3ef339 DE |
11853 | found_usable_guile=checking |
11854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11855 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11856 | for guile_version in ${guile_version_list}; do | |
11857 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11858 | if test $? != 0; then | |
11859 | continue | |
11860 | fi | |
11861 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11862 | if test $? != 0; then | |
d0ac1c44 | 11863 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11864 | fi |
11865 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11866 | if test $? != 0; then | |
d0ac1c44 | 11867 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11868 | fi |
11869 | found_usable_guile=${guile_version} | |
11870 | break | |
11871 | done | |
11872 | if test "${found_usable_guile}" = "checking"; then | |
11873 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11874 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11875 | else |
11876 | found_usable_guile=no | |
11877 | fi | |
11878 | fi | |
11879 | if test "${found_usable_guile}" != no; then | |
11880 | save_CPPFLAGS=$CPPFLAGS | |
11881 | save_LIBS=$LIBS | |
11882 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11883 | LIBS="$LIBS $new_LIBS" | |
11884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11885 | /* end confdefs.h. */ | |
11886 | #include "libguile.h" | |
11887 | int | |
11888 | main () | |
11889 | { | |
11890 | scm_init_guile (); | |
11891 | ; | |
11892 | return 0; | |
11893 | } | |
11894 | _ACEOF | |
11895 | if ac_fn_c_try_link "$LINENO"; then : | |
11896 | have_libguile=yes | |
11897 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11898 | GUILE_LIBS=$new_LIBS | |
11899 | else | |
11900 | found_usable_guile=no | |
11901 | fi | |
11902 | rm -f core conftest.err conftest.$ac_objext \ | |
11903 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11904 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11905 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11906 | |
11907 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11908 | ||
11909 | ||
11910 | fi | |
11911 | ||
ed3ef339 DE |
11912 | CPPFLAGS=$save_CPPFLAGS |
11913 | LIBS=$save_LIBS | |
11914 | if test "${found_usable_guile}" = no; then | |
11915 | if test "${flag_errors}" = yes; then | |
11916 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11917 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11918 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11919 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11920 | fi |
11921 | fi | |
11922 | fi | |
11923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11924 | $as_echo "${found_usable_guile}" >&6; } | |
11925 | ||
11926 | ;; | |
11927 | esac | |
11928 | ||
e76c5d17 | 11929 | if test "${have_libguile}" != no; then |
d342a0da DE |
11930 | case "${with_guile}" in |
11931 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11932 | |
11933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11934 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11935 | if ${ac_cv_guild_program_name+:} false; then : |
e76c5d17 DE |
11936 | $as_echo_n "(cached) " >&6 |
11937 | else | |
d342a0da | 11938 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11939 | |
11940 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11941 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11942 | # what the program name is, at the risk of getting it wrong if | |
11943 | # Guile was configured with '--program-suffix' or similar. | |
11944 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11945 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11946 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11947 | fi | |
11948 | ||
11949 | fi | |
11950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11951 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11952 | ||
11953 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11954 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
e76c5d17 DE |
11955 | fi |
11956 | ||
11957 | GUILD="$ac_cv_guild_program_name" | |
11958 | ||
11959 | ||
d342a0da DE |
11960 | ;; |
11961 | *) | |
11962 | ||
11963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11964 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11965 | if ${ac_cv_guild_program_name+:} false; then : |
d342a0da DE |
11966 | $as_echo_n "(cached) " >&6 |
11967 | else | |
11968 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11969 | ||
11970 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11971 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11972 | # what the program name is, at the risk of getting it wrong if | |
11973 | # Guile was configured with '--program-suffix' or similar. | |
11974 | if test "x$ac_cv_guild_program_name" = "x"; then | |
11975 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
11976 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
11977 | fi | |
11978 | ||
11979 | fi | |
11980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11981 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11982 | ||
11983 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11984 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
d342a0da DE |
11985 | fi |
11986 | ||
11987 | GUILD="$ac_cv_guild_program_name" | |
11988 | ||
11989 | ||
11990 | ;; | |
11991 | esac | |
e76c5d17 DE |
11992 | |
11993 | ||
11994 | if test "$cross_compiling" = no; then | |
11995 | GUILD_TARGET_FLAG= | |
11996 | else | |
11997 | GUILD_TARGET_FLAG="--target=$host" | |
11998 | fi | |
11999 | ||
12000 | ||
12001 | ||
12002 | ||
12003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
12004 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
d0ac1c44 | 12005 | if ${ac_cv_guild_ok+:} false; then : |
e76c5d17 DE |
12006 | $as_echo_n "(cached) " >&6 |
12007 | else | |
12008 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
12009 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
12010 | ac_cv_guild_ok=yes | |
12011 | else | |
12012 | ac_cv_guild_ok=no | |
12013 | fi | |
12014 | fi | |
12015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
12016 | $as_echo "$ac_cv_guild_ok" >&6; } | |
12017 | ||
12018 | if test "$ac_cv_guild_ok" = no; then | |
12019 | have_libguile=no | |
12020 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
12021 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
12022 | fi | |
12023 | fi | |
12024 | ||
ed3ef339 DE |
12025 | if test "${have_libguile}" != no; then |
12026 | ||
12027 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
12028 | ||
12029 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
12030 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
12031 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
12032 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
12033 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
12034 | |
12035 | save_LIBS="$LIBS" | |
12036 | save_CPPFLAGS="$CPPFLAGS" | |
12037 | LIBS="$GUILE_LIBS" | |
12038 | CPPFLAGS="$GUILE_CPPFLAGS" | |
12039 | for ac_func in scm_new_smob | |
12040 | do : | |
12041 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
d0ac1c44 | 12042 | if test "x$ac_cv_func_scm_new_smob" = xyes; then : |
16954d5d LC |
12043 | cat >>confdefs.h <<_ACEOF |
12044 | #define HAVE_SCM_NEW_SMOB 1 | |
12045 | _ACEOF | |
12046 | ||
12047 | fi | |
12048 | done | |
12049 | ||
12050 | LIBS="$save_LIBS" | |
12051 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
12052 | else |
12053 | # Even if Guile support is not compiled in, we need to have these files | |
12054 | # included. | |
bd810fff | 12055 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
ed3ef339 DE |
12056 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
12057 | fi | |
9a156167 | 12058 | |
ac534cba | 12059 | |
4df42755 DE |
12060 | if test "${have_libguile}" != no; then |
12061 | HAVE_GUILE_TRUE= | |
12062 | HAVE_GUILE_FALSE='#' | |
12063 | else | |
12064 | HAVE_GUILE_TRUE='#' | |
12065 | HAVE_GUILE_FALSE= | |
12066 | fi | |
12067 | ||
ac534cba | 12068 | |
62f29fda TT |
12069 | # ---------------------------- # |
12070 | # Check for source highlight. # | |
12071 | # ---------------------------- # | |
12072 | ||
12073 | SRCHIGH_LIBS= | |
12074 | SRCHIGH_CFLAGS= | |
189b8c2e ST |
12075 | |
12076 | # Check whether --enable-source-highlight was given. | |
12077 | if test "${enable_source_highlight+set}" = set; then : | |
12078 | enableval=$enable_source_highlight; case "${enableval}" in | |
12079 | yes) enable_source_highlight=yes ;; | |
12080 | no) enable_source_highlight=no ;; | |
12081 | *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; | |
12082 | esac | |
12083 | else | |
12084 | enable_source_highlight=auto | |
12085 | fi | |
12086 | ||
12087 | ||
12088 | if test "${enable_source_highlight}" != "no"; then | |
12089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 | |
6c28e44a | 12090 | $as_echo_n "checking for the source-highlight library... " >&6; } |
189b8c2e ST |
12091 | if test "${pkg_config_prog_path}" = "missing"; then |
12092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 | |
62f29fda | 12093 | $as_echo "no - pkg-config not found" >&6; } |
189b8c2e ST |
12094 | if test "${enable_source_highlight}" = "yes"; then |
12095 | as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 | |
12096 | fi | |
12097 | else | |
12098 | if ${pkg_config_prog_path} --exists source-highlight; then | |
0455b7d3 BE |
12099 | case "$LDFLAGS" in |
12100 | *static-libstdc*) | |
12101 | as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 | |
12102 | ;; | |
12103 | esac | |
12104 | ||
62f29fda TT |
12105 | SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` |
12106 | SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` | |
12107 | ||
12108 | $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h | |
12109 | ||
12110 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12111 | $as_echo "yes" >&6; } | |
189b8c2e | 12112 | else |
62f29fda TT |
12113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12114 | $as_echo "no" >&6; } | |
189b8c2e ST |
12115 | if test "${enable_source_highlight}" = "yes"; then |
12116 | as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 | |
12117 | fi | |
12118 | fi | |
12119 | fi | |
62f29fda TT |
12120 | fi |
12121 | ||
12122 | ||
12123 | ||
05ea2a05 TT |
12124 | # ------------------------- # |
12125 | # Checks for header files. # | |
12126 | # ------------------------- # | |
58bfce93 | 12127 | |
05ea2a05 TT |
12128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
12129 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
12130 | if ${ac_cv_header_stdc+:} false; then : | |
12131 | $as_echo_n "(cached) " >&6 | |
58bfce93 | 12132 | else |
5599c404 MM |
12133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12134 | /* end confdefs.h. */ | |
05ea2a05 TT |
12135 | #include <stdlib.h> |
12136 | #include <stdarg.h> | |
12137 | #include <string.h> | |
12138 | #include <float.h> | |
5599c404 | 12139 | |
05ea2a05 TT |
12140 | int |
12141 | main () | |
12142 | { | |
5599c404 | 12143 | |
05ea2a05 TT |
12144 | ; |
12145 | return 0; | |
12146 | } | |
5599c404 | 12147 | _ACEOF |
05ea2a05 TT |
12148 | if ac_fn_c_try_compile "$LINENO"; then : |
12149 | ac_cv_header_stdc=yes | |
5599c404 | 12150 | else |
05ea2a05 | 12151 | ac_cv_header_stdc=no |
5599c404 | 12152 | fi |
05ea2a05 | 12153 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58bfce93 | 12154 | |
05ea2a05 TT |
12155 | if test $ac_cv_header_stdc = yes; then |
12156 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12157 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12158 | /* end confdefs.h. */ | |
12159 | #include <string.h> | |
58bfce93 | 12160 | |
05ea2a05 TT |
12161 | _ACEOF |
12162 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12163 | $EGREP "memchr" >/dev/null 2>&1; then : | |
58bfce93 | 12164 | |
05ea2a05 TT |
12165 | else |
12166 | ac_cv_header_stdc=no | |
12167 | fi | |
12168 | rm -f conftest* | |
58bfce93 | 12169 | |
05ea2a05 | 12170 | fi |
58bfce93 | 12171 | |
05ea2a05 TT |
12172 | if test $ac_cv_header_stdc = yes; then |
12173 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12175 | /* end confdefs.h. */ | |
12176 | #include <stdlib.h> | |
58bfce93 | 12177 | |
05ea2a05 TT |
12178 | _ACEOF |
12179 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12180 | $EGREP "free" >/dev/null 2>&1; then : | |
58bfce93 | 12181 | |
05ea2a05 TT |
12182 | else |
12183 | ac_cv_header_stdc=no | |
12184 | fi | |
12185 | rm -f conftest* | |
58bfce93 | 12186 | |
05ea2a05 | 12187 | fi |
58bfce93 | 12188 | |
05ea2a05 TT |
12189 | if test $ac_cv_header_stdc = yes; then |
12190 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12191 | if test "$cross_compiling" = yes; then : | |
12192 | : | |
12193 | else | |
12194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12195 | /* end confdefs.h. */ | |
12196 | #include <ctype.h> | |
12197 | #include <stdlib.h> | |
12198 | #if ((' ' & 0x0FF) == 0x020) | |
12199 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12200 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12201 | #else | |
12202 | # define ISLOWER(c) \ | |
12203 | (('a' <= (c) && (c) <= 'i') \ | |
12204 | || ('j' <= (c) && (c) <= 'r') \ | |
12205 | || ('s' <= (c) && (c) <= 'z')) | |
12206 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12207 | #endif | |
58bfce93 | 12208 | |
05ea2a05 TT |
12209 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
12210 | int | |
12211 | main () | |
12212 | { | |
12213 | int i; | |
12214 | for (i = 0; i < 256; i++) | |
12215 | if (XOR (islower (i), ISLOWER (i)) | |
12216 | || toupper (i) != TOUPPER (i)) | |
12217 | return 2; | |
12218 | return 0; | |
12219 | } | |
12220 | _ACEOF | |
12221 | if ac_fn_c_try_run "$LINENO"; then : | |
58bfce93 | 12222 | |
05ea2a05 TT |
12223 | else |
12224 | ac_cv_header_stdc=no | |
12225 | fi | |
12226 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12227 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12228 | fi | |
58bfce93 | 12229 | |
05ea2a05 TT |
12230 | fi |
12231 | fi | |
12232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
12233 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12234 | if test $ac_cv_header_stdc = yes; then | |
58bfce93 | 12235 | |
05ea2a05 | 12236 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
58bfce93 | 12237 | |
05ea2a05 | 12238 | fi |
58bfce93 | 12239 | |
05ea2a05 | 12240 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8ae8e197 | 12241 | for ac_header in nlist.h machine/reg.h \ |
05ea2a05 TT |
12242 | thread_db.h \ |
12243 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
12244 | sys/resource.h sys/ptrace.h ptrace.h \ | |
8ae8e197 | 12245 | sys/reg.h sys/debugreg.h \ |
05ea2a05 TT |
12246 | termios.h elf_hp.h |
12247 | do : | |
12248 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12249 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12250 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12251 | cat >>confdefs.h <<_ACEOF | |
12252 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12253 | _ACEOF | |
58bfce93 MM |
12254 | |
12255 | fi | |
12256 | ||
05ea2a05 | 12257 | done |
58bfce93 | 12258 | |
05ea2a05 TT |
12259 | for ac_header in sys/user.h |
12260 | do : | |
12261 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
12262 | # include <sys/param.h> | |
12263 | #endif | |
58bfce93 | 12264 | |
05ea2a05 TT |
12265 | " |
12266 | if test "x$ac_cv_header_sys_user_h" = xyes; then : | |
12267 | cat >>confdefs.h <<_ACEOF | |
12268 | #define HAVE_SYS_USER_H 1 | |
12269 | _ACEOF | |
58bfce93 | 12270 | |
05ea2a05 | 12271 | fi |
58bfce93 | 12272 | |
05ea2a05 | 12273 | done |
58bfce93 | 12274 | |
58bfce93 | 12275 | |
05ea2a05 TT |
12276 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
12277 | do : | |
12278 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12279 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12280 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12281 | cat >>confdefs.h <<_ACEOF | |
12282 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12283 | _ACEOF | |
58bfce93 | 12284 | |
05ea2a05 | 12285 | fi |
58bfce93 | 12286 | |
05ea2a05 | 12287 | done |
58bfce93 | 12288 | |
05ea2a05 TT |
12289 | for ac_header in term.h |
12290 | do : | |
12291 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
12292 | # include <curses.h> | |
12293 | #endif | |
58bfce93 | 12294 | |
05ea2a05 TT |
12295 | " |
12296 | if test "x$ac_cv_header_term_h" = xyes; then : | |
12297 | cat >>confdefs.h <<_ACEOF | |
12298 | #define HAVE_TERM_H 1 | |
12299 | _ACEOF | |
58bfce93 | 12300 | |
05ea2a05 | 12301 | fi |
58bfce93 | 12302 | |
05ea2a05 | 12303 | done |
58bfce93 | 12304 | |
58bfce93 | 12305 | |
95420d30 | 12306 | for ac_header in sys/socket.h |
05a6b8c2 | 12307 | do : |
95420d30 TV |
12308 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" |
12309 | if test "x$ac_cv_header_sys_socket_h" = xyes; then : | |
05a6b8c2 | 12310 | cat >>confdefs.h <<_ACEOF |
95420d30 | 12311 | #define HAVE_SYS_SOCKET_H 1 |
05a6b8c2 EZ |
12312 | _ACEOF |
12313 | ||
12314 | fi | |
12315 | ||
12316 | done | |
12317 | ||
12318 | for ac_header in ws2tcpip.h | |
12319 | do : | |
12320 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
12321 | if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : | |
12322 | cat >>confdefs.h <<_ACEOF | |
12323 | #define HAVE_WS2TCPIP_H 1 | |
12324 | _ACEOF | |
12325 | ||
12326 | fi | |
12327 | ||
12328 | done | |
12329 | ||
12330 | ||
05ea2a05 TT |
12331 | # ------------------------- # |
12332 | # Checks for declarations. # | |
12333 | # ------------------------- # | |
58bfce93 | 12334 | |
58bfce93 | 12335 | |
05ea2a05 TT |
12336 | # Check for presence and size of long long. |
12337 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
12338 | if test "x$ac_cv_type_long_long" = xyes; then : | |
58bfce93 | 12339 | |
05ea2a05 TT |
12340 | cat >>confdefs.h <<_ACEOF |
12341 | #define HAVE_LONG_LONG 1 | |
12342 | _ACEOF | |
12343 | ||
12344 | # The cast to long int works around a bug in the HP C Compiler | |
12345 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12346 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12347 | # This bug is HP SR number 8606223364. | |
12348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
12349 | $as_echo_n "checking size of long long... " >&6; } | |
12350 | if ${ac_cv_sizeof_long_long+:} false; then : | |
58bfce93 MM |
12351 | $as_echo_n "(cached) " >&6 |
12352 | else | |
05ea2a05 | 12353 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
58bfce93 | 12354 | |
58bfce93 | 12355 | else |
05ea2a05 TT |
12356 | if test "$ac_cv_type_long_long" = yes; then |
12357 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12358 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12359 | as_fn_error 77 "cannot compute sizeof (long long) | |
12360 | See \`config.log' for more details" "$LINENO" 5; } | |
12361 | else | |
12362 | ac_cv_sizeof_long_long=0 | |
12363 | fi | |
58bfce93 | 12364 | fi |
58bfce93 MM |
12365 | |
12366 | fi | |
05ea2a05 TT |
12367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
12368 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
58bfce93 | 12369 | |
58bfce93 | 12370 | |
58bfce93 | 12371 | |
05ea2a05 TT |
12372 | cat >>confdefs.h <<_ACEOF |
12373 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
12374 | _ACEOF | |
58bfce93 MM |
12375 | |
12376 | ||
05ea2a05 | 12377 | fi |
58bfce93 MM |
12378 | |
12379 | ||
05ea2a05 TT |
12380 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
12381 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
12382 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
12383 | ac_have_decl=1 | |
12384 | else | |
12385 | ac_have_decl=0 | |
12386 | fi | |
58bfce93 | 12387 | |
05ea2a05 TT |
12388 | cat >>confdefs.h <<_ACEOF |
12389 | #define HAVE_DECL_BASENAME $ac_have_decl | |
c56ccc05 | 12390 | _ACEOF |
05ea2a05 TT |
12391 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
12392 | if test "x$ac_cv_have_decl_ffs" = xyes; then : | |
12393 | ac_have_decl=1 | |
12394 | else | |
12395 | ac_have_decl=0 | |
c56ccc05 | 12396 | fi |
c56ccc05 MM |
12397 | |
12398 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12399 | #define HAVE_DECL_FFS $ac_have_decl |
c56ccc05 | 12400 | _ACEOF |
05ea2a05 TT |
12401 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" |
12402 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : | |
12403 | ac_have_decl=1 | |
12404 | else | |
12405 | ac_have_decl=0 | |
c56ccc05 | 12406 | fi |
c56ccc05 MM |
12407 | |
12408 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12409 | #define HAVE_DECL_ASPRINTF $ac_have_decl |
c56ccc05 | 12410 | _ACEOF |
05ea2a05 TT |
12411 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
12412 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : | |
12413 | ac_have_decl=1 | |
12414 | else | |
12415 | ac_have_decl=0 | |
12416 | fi | |
c56ccc05 | 12417 | |
05ea2a05 TT |
12418 | cat >>confdefs.h <<_ACEOF |
12419 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
12420 | _ACEOF | |
12421 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
12422 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12423 | ac_have_decl=1 | |
12424 | else | |
12425 | ac_have_decl=0 | |
c56ccc05 MM |
12426 | fi |
12427 | ||
05ea2a05 TT |
12428 | cat >>confdefs.h <<_ACEOF |
12429 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12430 | _ACEOF | |
12431 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
12432 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : | |
12433 | ac_have_decl=1 | |
12434 | else | |
12435 | ac_have_decl=0 | |
58bfce93 MM |
12436 | fi |
12437 | ||
05ea2a05 TT |
12438 | cat >>confdefs.h <<_ACEOF |
12439 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
12440 | _ACEOF | |
c890192f | 12441 | |
05ea2a05 TT |
12442 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
12443 | if test "x$ac_cv_have_decl_strtol" = xyes; then : | |
12444 | ac_have_decl=1 | |
bec39cab | 12445 | else |
05ea2a05 TT |
12446 | ac_have_decl=0 |
12447 | fi | |
81ecdfbb | 12448 | |
05ea2a05 TT |
12449 | cat >>confdefs.h <<_ACEOF |
12450 | #define HAVE_DECL_STRTOL $ac_have_decl | |
12451 | _ACEOF | |
12452 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
12453 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : | |
12454 | ac_have_decl=1 | |
12455 | else | |
12456 | ac_have_decl=0 | |
12457 | fi | |
a9322a30 | 12458 | |
05ea2a05 TT |
12459 | cat >>confdefs.h <<_ACEOF |
12460 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
bec39cab | 12461 | _ACEOF |
05ea2a05 TT |
12462 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
12463 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : | |
12464 | ac_have_decl=1 | |
bec39cab | 12465 | else |
05ea2a05 | 12466 | ac_have_decl=0 |
a9322a30 | 12467 | fi |
bec39cab | 12468 | |
05ea2a05 TT |
12469 | cat >>confdefs.h <<_ACEOF |
12470 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
12471 | _ACEOF | |
12472 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
12473 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : | |
12474 | ac_have_decl=1 | |
12475 | else | |
12476 | ac_have_decl=0 | |
12477 | fi | |
bec39cab | 12478 | |
05ea2a05 TT |
12479 | cat >>confdefs.h <<_ACEOF |
12480 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
81ecdfbb | 12481 | _ACEOF |
bec39cab | 12482 | |
05ea2a05 TT |
12483 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" |
12484 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : | |
12485 | ac_have_decl=1 | |
bec39cab | 12486 | else |
05ea2a05 | 12487 | ac_have_decl=0 |
81ecdfbb | 12488 | fi |
81ecdfbb | 12489 | |
05ea2a05 TT |
12490 | cat >>confdefs.h <<_ACEOF |
12491 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
12492 | _ACEOF | |
81ecdfbb | 12493 | |
81ecdfbb | 12494 | |
06825bd1 | 12495 | |
05ea2a05 TT |
12496 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
12497 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12498 | ac_have_decl=1 | |
81ecdfbb | 12499 | else |
05ea2a05 | 12500 | ac_have_decl=0 |
81ecdfbb | 12501 | fi |
bec39cab | 12502 | |
05ea2a05 TT |
12503 | cat >>confdefs.h <<_ACEOF |
12504 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12505 | _ACEOF | |
81ecdfbb | 12506 | |
05ea2a05 TT |
12507 | |
12508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 | |
12509 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
12510 | if ${am_cv_val_LC_MESSAGES+:} false; then : | |
12511 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12512 | else |
81ecdfbb | 12513 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12514 | /* end confdefs.h. */ |
05ea2a05 | 12515 | #include <locale.h> |
a9322a30 TT |
12516 | int |
12517 | main () | |
12518 | { | |
05ea2a05 TT |
12519 | return LC_MESSAGES |
12520 | ; | |
a9322a30 TT |
12521 | return 0; |
12522 | } | |
bec39cab | 12523 | _ACEOF |
05ea2a05 TT |
12524 | if ac_fn_c_try_link "$LINENO"; then : |
12525 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 12526 | else |
05ea2a05 | 12527 | am_cv_val_LC_MESSAGES=no |
81ecdfbb | 12528 | fi |
05ea2a05 TT |
12529 | rm -f core conftest.err conftest.$ac_objext \ |
12530 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 12531 | fi |
05ea2a05 TT |
12532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
12533 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
12534 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 12535 | |
05ea2a05 | 12536 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
bec39cab | 12537 | |
05ea2a05 | 12538 | fi |
5ee754fc | 12539 | |
bec39cab | 12540 | |
05ea2a05 TT |
12541 | # ------------------ # |
12542 | # Checks for types. # | |
12543 | # ------------------ # | |
12544 | ||
12545 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | |
05a6b8c2 EZ |
12546 | #if HAVE_SYS_SOCKET_H |
12547 | # include <sys/socket.h> | |
12548 | #elif HAVE_WS2TCPIP_H | |
12549 | # include <ws2tcpip.h> | |
12550 | #endif | |
05ea2a05 TT |
12551 | |
12552 | " | |
12553 | if test "x$ac_cv_type_socklen_t" = xyes; then : | |
12554 | ||
12555 | cat >>confdefs.h <<_ACEOF | |
12556 | #define HAVE_SOCKLEN_T 1 | |
bec39cab | 12557 | _ACEOF |
c906108c | 12558 | |
05ea2a05 | 12559 | |
bec39cab | 12560 | fi |
81ecdfbb | 12561 | |
81ecdfbb | 12562 | |
05ea2a05 TT |
12563 | # ------------------------------------- # |
12564 | # Checks for compiler characteristics. # | |
12565 | # ------------------------------------- # | |
a9322a30 | 12566 | |
05ea2a05 TT |
12567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12568 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
12569 | if ${ac_cv_c_const+:} false; then : | |
12570 | $as_echo_n "(cached) " >&6 | |
12571 | else | |
12572 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12573 | /* end confdefs.h. */ | |
bec39cab | 12574 | |
05ea2a05 TT |
12575 | int |
12576 | main () | |
12577 | { | |
bec39cab | 12578 | |
05ea2a05 TT |
12579 | #ifndef __cplusplus |
12580 | /* Ultrix mips cc rejects this sort of thing. */ | |
12581 | typedef int charset[2]; | |
12582 | const charset cs = { 0, 0 }; | |
12583 | /* SunOS 4.1.1 cc rejects this. */ | |
12584 | char const *const *pcpcc; | |
12585 | char **ppc; | |
12586 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
12587 | struct point {int x, y;}; | |
12588 | static struct point const zero = {0,0}; | |
12589 | /* AIX XL C 1.02.0.0 rejects this. | |
12590 | It does not let you subtract one const X* pointer from another in | |
12591 | an arm of an if-expression whose if-part is not a constant | |
12592 | expression */ | |
12593 | const char *g = "string"; | |
12594 | pcpcc = &g + (g ? g-g : 0); | |
12595 | /* HPUX 7.0 cc rejects these. */ | |
12596 | ++pcpcc; | |
12597 | ppc = (char**) pcpcc; | |
12598 | pcpcc = (char const *const *) ppc; | |
12599 | { /* SCO 3.2v4 cc rejects this sort of thing. */ | |
12600 | char tx; | |
12601 | char *t = &tx; | |
12602 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5ee754fc | 12603 | |
05ea2a05 TT |
12604 | *t++ = 0; |
12605 | if (s) return 0; | |
12606 | } | |
12607 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12608 | int x[] = {25, 17}; | |
12609 | const int *foo = &x[0]; | |
12610 | ++foo; | |
12611 | } | |
12612 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12613 | typedef const int *iptr; | |
12614 | iptr p = 0; | |
12615 | ++p; | |
12616 | } | |
12617 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying | |
12618 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12619 | struct s { int j; const int *ap[3]; } bx; | |
12620 | struct s *b = &bx; b->j = 5; | |
12621 | } | |
12622 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12623 | const int foo = 10; | |
12624 | if (!foo) return 0; | |
12625 | } | |
12626 | return !cs[0] && !zero.x; | |
12627 | #endif | |
5ee754fc | 12628 | |
05ea2a05 TT |
12629 | ; |
12630 | return 0; | |
12631 | } | |
bec39cab | 12632 | _ACEOF |
05ea2a05 TT |
12633 | if ac_fn_c_try_compile "$LINENO"; then : |
12634 | ac_cv_c_const=yes | |
12635 | else | |
12636 | ac_cv_c_const=no | |
12637 | fi | |
12638 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ee754fc | 12639 | fi |
05ea2a05 TT |
12640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12641 | $as_echo "$ac_cv_c_const" >&6; } | |
12642 | if test $ac_cv_c_const = no; then | |
5ee754fc | 12643 | |
05ea2a05 | 12644 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12645 | |
05ea2a05 TT |
12646 | fi |
12647 | ||
12648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
12649 | $as_echo_n "checking for inline... " >&6; } | |
12650 | if ${ac_cv_c_inline+:} false; then : | |
12651 | $as_echo_n "(cached) " >&6 | |
12652 | else | |
12653 | ac_cv_c_inline=no | |
12654 | for ac_kw in inline __inline__ __inline; do | |
12655 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12656 | /* end confdefs.h. */ | |
12657 | #ifndef __cplusplus | |
12658 | typedef int foo_t; | |
12659 | static $ac_kw foo_t static_foo () {return 0; } | |
12660 | $ac_kw foo_t foo () {return 0; } | |
81ecdfbb | 12661 | #endif |
bec39cab | 12662 | |
a8111142 | 12663 | _ACEOF |
05ea2a05 TT |
12664 | if ac_fn_c_try_compile "$LINENO"; then : |
12665 | ac_cv_c_inline=$ac_kw | |
a8111142 | 12666 | fi |
05ea2a05 TT |
12667 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12668 | test "$ac_cv_c_inline" != no && break | |
81ecdfbb | 12669 | done |
a8111142 | 12670 | |
05ea2a05 TT |
12671 | fi |
12672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
12673 | $as_echo "$ac_cv_c_inline" >&6; } | |
a8111142 | 12674 | |
05ea2a05 TT |
12675 | case $ac_cv_c_inline in |
12676 | inline | yes) ;; | |
12677 | *) | |
12678 | case $ac_cv_c_inline in | |
12679 | no) ac_val=;; | |
12680 | *) ac_val=$ac_cv_c_inline;; | |
12681 | esac | |
12682 | cat >>confdefs.h <<_ACEOF | |
12683 | #ifndef __cplusplus | |
12684 | #define inline $ac_val | |
12685 | #endif | |
07697489 | 12686 | _ACEOF |
05ea2a05 TT |
12687 | ;; |
12688 | esac | |
07697489 | 12689 | |
05ea2a05 TT |
12690 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12691 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12692 | if ${ac_cv_c_bigendian+:} false; then : | |
07697489 PA |
12693 | $as_echo_n "(cached) " >&6 |
12694 | else | |
05ea2a05 TT |
12695 | ac_cv_c_bigendian=unknown |
12696 | # See if we're dealing with a universal compiler. | |
12697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12698 | /* end confdefs.h. */ | |
12699 | #ifndef __APPLE_CC__ | |
12700 | not a universal capable compiler | |
12701 | #endif | |
12702 | typedef int dummy; | |
07697489 | 12703 | |
05ea2a05 TT |
12704 | _ACEOF |
12705 | if ac_fn_c_try_compile "$LINENO"; then : | |
07697489 | 12706 | |
05ea2a05 TT |
12707 | # Check for potential -arch flags. It is not universal unless |
12708 | # there are at least two -arch flags with different values. | |
12709 | ac_arch= | |
12710 | ac_prev= | |
12711 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12712 | if test -n "$ac_prev"; then | |
12713 | case $ac_word in | |
12714 | i?86 | x86_64 | ppc | ppc64) | |
12715 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12716 | ac_arch=$ac_word | |
12717 | else | |
12718 | ac_cv_c_bigendian=universal | |
12719 | break | |
12720 | fi | |
12721 | ;; | |
12722 | esac | |
12723 | ac_prev= | |
12724 | elif test "x$ac_word" = "x-arch"; then | |
12725 | ac_prev=arch | |
12726 | fi | |
12727 | done | |
07697489 | 12728 | fi |
05ea2a05 TT |
12729 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12730 | if test $ac_cv_c_bigendian = unknown; then | |
12731 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12733 | /* end confdefs.h. */ | |
12734 | #include <sys/types.h> | |
12735 | #include <sys/param.h> | |
07697489 | 12736 | |
05ea2a05 TT |
12737 | int |
12738 | main () | |
12739 | { | |
12740 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
12741 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12742 | && LITTLE_ENDIAN) | |
12743 | bogus endian macros | |
12744 | #endif | |
07697489 | 12745 | |
05ea2a05 TT |
12746 | ; |
12747 | return 0; | |
12748 | } | |
07697489 | 12749 | _ACEOF |
05ea2a05 TT |
12750 | if ac_fn_c_try_compile "$LINENO"; then : |
12751 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
12752 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12753 | /* end confdefs.h. */ | |
12754 | #include <sys/types.h> | |
12755 | #include <sys/param.h> | |
07697489 | 12756 | |
05ea2a05 TT |
12757 | int |
12758 | main () | |
12759 | { | |
12760 | #if BYTE_ORDER != BIG_ENDIAN | |
12761 | not big endian | |
12762 | #endif | |
07697489 | 12763 | |
05ea2a05 TT |
12764 | ; |
12765 | return 0; | |
12766 | } | |
07697489 | 12767 | _ACEOF |
05ea2a05 TT |
12768 | if ac_fn_c_try_compile "$LINENO"; then : |
12769 | ac_cv_c_bigendian=yes | |
07697489 | 12770 | else |
05ea2a05 | 12771 | ac_cv_c_bigendian=no |
07697489 | 12772 | fi |
05ea2a05 | 12773 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12774 | fi |
05ea2a05 TT |
12775 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12776 | fi | |
12777 | if test $ac_cv_c_bigendian = unknown; then | |
12778 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12779 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12780 | /* end confdefs.h. */ | |
12781 | #include <limits.h> | |
07697489 | 12782 | |
05ea2a05 TT |
12783 | int |
12784 | main () | |
12785 | { | |
12786 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12787 | bogus endian macros | |
12788 | #endif | |
07697489 | 12789 | |
05ea2a05 TT |
12790 | ; |
12791 | return 0; | |
12792 | } | |
07697489 | 12793 | _ACEOF |
05ea2a05 TT |
12794 | if ac_fn_c_try_compile "$LINENO"; then : |
12795 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12797 | /* end confdefs.h. */ | |
12798 | #include <limits.h> | |
07697489 | 12799 | |
05ea2a05 TT |
12800 | int |
12801 | main () | |
12802 | { | |
12803 | #ifndef _BIG_ENDIAN | |
12804 | not big endian | |
12805 | #endif | |
07697489 | 12806 | |
05ea2a05 TT |
12807 | ; |
12808 | return 0; | |
12809 | } | |
07697489 | 12810 | _ACEOF |
05ea2a05 TT |
12811 | if ac_fn_c_try_compile "$LINENO"; then : |
12812 | ac_cv_c_bigendian=yes | |
07697489 | 12813 | else |
05ea2a05 | 12814 | ac_cv_c_bigendian=no |
07697489 | 12815 | fi |
05ea2a05 | 12816 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12817 | fi |
05ea2a05 TT |
12818 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12819 | fi | |
12820 | if test $ac_cv_c_bigendian = unknown; then | |
12821 | # Compile a test program. | |
12822 | if test "$cross_compiling" = yes; then : | |
12823 | # Try to guess by grepping values from an object file. | |
12824 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12825 | /* end confdefs.h. */ | |
12826 | short int ascii_mm[] = | |
12827 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12828 | short int ascii_ii[] = | |
12829 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12830 | int use_ascii (int i) { | |
12831 | return ascii_mm[i] + ascii_ii[i]; | |
12832 | } | |
12833 | short int ebcdic_ii[] = | |
12834 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12835 | short int ebcdic_mm[] = | |
12836 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12837 | int use_ebcdic (int i) { | |
12838 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12839 | } | |
12840 | extern int foo; | |
07697489 | 12841 | |
05ea2a05 TT |
12842 | int |
12843 | main () | |
12844 | { | |
12845 | return use_ascii (foo) == use_ebcdic (foo); | |
12846 | ; | |
12847 | return 0; | |
12848 | } | |
07697489 | 12849 | _ACEOF |
05ea2a05 TT |
12850 | if ac_fn_c_try_compile "$LINENO"; then : |
12851 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12852 | ac_cv_c_bigendian=yes | |
12853 | fi | |
12854 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12855 | if test "$ac_cv_c_bigendian" = unknown; then | |
12856 | ac_cv_c_bigendian=no | |
12857 | else | |
12858 | # finding both strings is unlikely to happen, but who knows? | |
12859 | ac_cv_c_bigendian=unknown | |
12860 | fi | |
12861 | fi | |
07697489 | 12862 | fi |
05ea2a05 TT |
12863 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12864 | else | |
12865 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12866 | /* end confdefs.h. */ | |
12867 | $ac_includes_default | |
12868 | int | |
12869 | main () | |
12870 | { | |
07697489 | 12871 | |
05ea2a05 TT |
12872 | /* Are we little or big endian? From Harbison&Steele. */ |
12873 | union | |
12874 | { | |
12875 | long int l; | |
12876 | char c[sizeof (long int)]; | |
12877 | } u; | |
12878 | u.l = 1; | |
12879 | return u.c[sizeof (long int) - 1] == 1; | |
12880 | ||
12881 | ; | |
12882 | return 0; | |
12883 | } | |
07697489 | 12884 | _ACEOF |
05ea2a05 TT |
12885 | if ac_fn_c_try_run "$LINENO"; then : |
12886 | ac_cv_c_bigendian=no | |
07697489 | 12887 | else |
05ea2a05 TT |
12888 | ac_cv_c_bigendian=yes |
12889 | fi | |
12890 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12891 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
07697489 PA |
12892 | fi |
12893 | ||
05ea2a05 | 12894 | fi |
07697489 | 12895 | fi |
05ea2a05 TT |
12896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
12897 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12898 | case $ac_cv_c_bigendian in #( | |
12899 | yes) | |
12900 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12901 | ;; #( | |
12902 | no) | |
12903 | ;; #( | |
12904 | universal) | |
07697489 | 12905 | |
05ea2a05 | 12906 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
07697489 | 12907 | |
05ea2a05 TT |
12908 | ;; #( |
12909 | *) | |
12910 | as_fn_error $? "unknown endianness | |
12911 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12912 | esac | |
07697489 PA |
12913 | |
12914 | ||
05ea2a05 TT |
12915 | # ------------------------------ # |
12916 | # Checks for library functions. # | |
12917 | # ------------------------------ # | |
81ecdfbb | 12918 | |
05ea2a05 | 12919 | for ac_func in getuid getgid \ |
8ae8e197 | 12920 | pipe pread pread64 pwrite resize_term \ |
05ea2a05 TT |
12921 | getpgid setsid \ |
12922 | sigaction sigsetmask socketpair \ | |
12923 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ | |
12924 | setrlimit getrlimit posix_madvise waitpid \ | |
12925 | use_default_colors | |
12926 | do : | |
12927 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12928 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12929 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
12930 | cat >>confdefs.h <<_ACEOF | |
12931 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
a9322a30 | 12932 | _ACEOF |
5ee754fc | 12933 | |
05ea2a05 TT |
12934 | fi |
12935 | done | |
5ee754fc | 12936 | |
05ea2a05 TT |
12937 | |
12938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
12939 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12940 | if ${am_cv_langinfo_codeset+:} false; then : | |
81ecdfbb | 12941 | $as_echo_n "(cached) " >&6 |
bec39cab | 12942 | else |
81ecdfbb | 12943 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12944 | /* end confdefs.h. */ |
05ea2a05 | 12945 | #include <langinfo.h> |
a9322a30 TT |
12946 | int |
12947 | main () | |
12948 | { | |
05ea2a05 | 12949 | char* cs = nl_langinfo(CODESET); |
a9322a30 TT |
12950 | ; |
12951 | return 0; | |
12952 | } | |
bec39cab | 12953 | _ACEOF |
81ecdfbb | 12954 | if ac_fn_c_try_link "$LINENO"; then : |
05ea2a05 | 12955 | am_cv_langinfo_codeset=yes |
bec39cab | 12956 | else |
05ea2a05 | 12957 | am_cv_langinfo_codeset=no |
81ecdfbb RW |
12958 | fi |
12959 | rm -f core conftest.err conftest.$ac_objext \ | |
12960 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 12961 | |
81ecdfbb | 12962 | fi |
05ea2a05 TT |
12963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12964 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
12965 | if test $am_cv_langinfo_codeset = yes; then | |
bec39cab | 12966 | |
05ea2a05 | 12967 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
81ecdfbb RW |
12968 | |
12969 | fi | |
12970 | ||
05ea2a05 TT |
12971 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
12972 | if test "x$ac_cv_type_size_t" = xyes; then : | |
81ecdfbb | 12973 | |
05ea2a05 | 12974 | else |
81ecdfbb RW |
12975 | |
12976 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12977 | #define size_t unsigned int |
7eb368b3 | 12978 | _ACEOF |
7eb368b3 | 12979 | |
7eb368b3 | 12980 | fi |
7eb368b3 | 12981 | |
7eb368b3 | 12982 | |
a9322a30 | 12983 | |
7eb368b3 | 12984 | |
05ea2a05 TT |
12985 | for ac_header in $ac_header_list |
12986 | do : | |
12987 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12988 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
12989 | " | |
12990 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12991 | cat >>confdefs.h <<_ACEOF | |
12992 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12993 | _ACEOF | |
7eb368b3 | 12994 | |
05ea2a05 | 12995 | fi |
7eb368b3 | 12996 | |
05ea2a05 | 12997 | done |
a9322a30 | 12998 | |
05ea2a05 TT |
12999 | |
13000 | ||
13001 | ||
13002 | ||
13003 | ||
13004 | ||
13005 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
13006 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
13007 | ||
13008 | else | |
bec39cab | 13009 | |
a9322a30 | 13010 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 13011 | #define pid_t int |
a9322a30 TT |
13012 | _ACEOF |
13013 | ||
05ea2a05 TT |
13014 | fi |
13015 | ||
13016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
13017 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
13018 | if ${ac_cv_path_SED+:} false; then : | |
13019 | $as_echo_n "(cached) " >&6 | |
13020 | else | |
13021 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
13022 | for ac_i in 1 2 3 4 5 6 7; do | |
13023 | ac_script="$ac_script$as_nl$ac_script" | |
13024 | done | |
13025 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
13026 | { ac_script=; unset ac_script;} | |
13027 | if test -z "$SED"; then | |
13028 | ac_path_SED_found=false | |
13029 | # Loop through the user's path and test for each of PROGNAME-LIST | |
13030 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13031 | for as_dir in $PATH | |
13032 | do | |
13033 | IFS=$as_save_IFS | |
13034 | test -z "$as_dir" && as_dir=. | |
13035 | for ac_prog in sed gsed; do | |
13036 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13037 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
13038 | as_fn_executable_p "$ac_path_SED" || continue | |
13039 | # Check for GNU ac_path_SED and select it if it is found. | |
13040 | # Check for GNU $ac_path_SED | |
13041 | case `"$ac_path_SED" --version 2>&1` in | |
13042 | *GNU*) | |
13043 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
13044 | *) | |
13045 | ac_count=0 | |
13046 | $as_echo_n 0123456789 >"conftest.in" | |
13047 | while : | |
13048 | do | |
13049 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
13050 | mv "conftest.tmp" "conftest.in" | |
13051 | cp "conftest.in" "conftest.nl" | |
13052 | $as_echo '' >> "conftest.nl" | |
13053 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
13054 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
13055 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
13056 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
13057 | # Best one so far, save it but keep looking for a better one | |
13058 | ac_cv_path_SED="$ac_path_SED" | |
13059 | ac_path_SED_max=$ac_count | |
13060 | fi | |
13061 | # 10*(2^10) chars as input seems more than enough | |
13062 | test $ac_count -gt 10 && break | |
13063 | done | |
13064 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
13065 | esac | |
a9322a30 | 13066 | |
05ea2a05 TT |
13067 | $ac_path_SED_found && break 3 |
13068 | done | |
13069 | done | |
13070 | done | |
13071 | IFS=$as_save_IFS | |
13072 | if test -z "$ac_cv_path_SED"; then | |
13073 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
13074 | fi | |
13075 | else | |
13076 | ac_cv_path_SED=$SED | |
a9322a30 TT |
13077 | fi |
13078 | ||
05ea2a05 TT |
13079 | fi |
13080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
13081 | $as_echo "$ac_cv_path_SED" >&6; } | |
13082 | SED="$ac_cv_path_SED" | |
13083 | rm -f conftest.sed | |
a9322a30 | 13084 | |
a9322a30 | 13085 | |
db6878ac SM |
13086 | # Set the 'development' global. |
13087 | . $srcdir/../bfd/development.sh | |
13088 | ||
05ea2a05 TT |
13089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
13090 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
13091 | if ${ac_cv_header_stdc+:} false; then : | |
81ecdfbb | 13092 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13093 | else |
81ecdfbb | 13094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13095 | /* end confdefs.h. */ |
05ea2a05 TT |
13096 | #include <stdlib.h> |
13097 | #include <stdarg.h> | |
13098 | #include <string.h> | |
13099 | #include <float.h> | |
a9322a30 TT |
13100 | |
13101 | int | |
13102 | main () | |
13103 | { | |
d0ac1c44 | 13104 | |
a9322a30 TT |
13105 | ; |
13106 | return 0; | |
13107 | } | |
bec39cab | 13108 | _ACEOF |
81ecdfbb | 13109 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 13110 | ac_cv_header_stdc=yes |
5ee754fc | 13111 | else |
05ea2a05 | 13112 | ac_cv_header_stdc=no |
5ee754fc | 13113 | fi |
81ecdfbb | 13114 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 13115 | |
05ea2a05 TT |
13116 | if test $ac_cv_header_stdc = yes; then |
13117 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
13118 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13119 | /* end confdefs.h. */ | |
13120 | #include <string.h> | |
bec39cab | 13121 | |
05ea2a05 TT |
13122 | _ACEOF |
13123 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13124 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 13125 | |
bec39cab | 13126 | else |
05ea2a05 TT |
13127 | ac_cv_header_stdc=no |
13128 | fi | |
13129 | rm -f conftest* | |
13130 | ||
13131 | fi | |
13132 | ||
13133 | if test $ac_cv_header_stdc = yes; then | |
13134 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 13135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13136 | /* end confdefs.h. */ |
05ea2a05 | 13137 | #include <stdlib.h> |
a9322a30 | 13138 | |
bec39cab | 13139 | _ACEOF |
05ea2a05 TT |
13140 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13141 | $EGREP "free" >/dev/null 2>&1; then : | |
bec39cab | 13142 | |
05ea2a05 TT |
13143 | else |
13144 | ac_cv_header_stdc=no | |
5ee754fc | 13145 | fi |
05ea2a05 | 13146 | rm -f conftest* |
5ee754fc | 13147 | |
05ea2a05 | 13148 | fi |
bec39cab | 13149 | |
05ea2a05 TT |
13150 | if test $ac_cv_header_stdc = yes; then |
13151 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
13152 | if test "$cross_compiling" = yes; then : | |
13153 | : | |
bec39cab | 13154 | else |
05ea2a05 | 13155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
81ecdfbb | 13156 | /* end confdefs.h. */ |
05ea2a05 TT |
13157 | #include <ctype.h> |
13158 | #include <stdlib.h> | |
13159 | #if ((' ' & 0x0FF) == 0x020) | |
13160 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
13161 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
13162 | #else | |
13163 | # define ISLOWER(c) \ | |
13164 | (('a' <= (c) && (c) <= 'i') \ | |
13165 | || ('j' <= (c) && (c) <= 'r') \ | |
13166 | || ('s' <= (c) && (c) <= 'z')) | |
13167 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
13168 | #endif | |
a9322a30 | 13169 | |
05ea2a05 | 13170 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
a9322a30 TT |
13171 | int |
13172 | main () | |
13173 | { | |
05ea2a05 TT |
13174 | int i; |
13175 | for (i = 0; i < 256; i++) | |
13176 | if (XOR (islower (i), ISLOWER (i)) | |
13177 | || toupper (i) != TOUPPER (i)) | |
13178 | return 2; | |
a9322a30 TT |
13179 | return 0; |
13180 | } | |
bec39cab | 13181 | _ACEOF |
05ea2a05 | 13182 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13183 | |
5ee754fc | 13184 | else |
05ea2a05 | 13185 | ac_cv_header_stdc=no |
5ee754fc | 13186 | fi |
05ea2a05 TT |
13187 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13188 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
81ecdfbb | 13189 | fi |
bec39cab | 13190 | |
05ea2a05 TT |
13191 | fi |
13192 | fi | |
13193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
13194 | $as_echo "$ac_cv_header_stdc" >&6; } | |
13195 | if test $ac_cv_header_stdc = yes; then | |
81ecdfbb | 13196 | |
05ea2a05 TT |
13197 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
13198 | ||
13199 | fi | |
81ecdfbb | 13200 | |
05ea2a05 TT |
13201 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
13202 | # for constant arguments. Useless! | |
13203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
13204 | $as_echo_n "checking for working alloca.h... " >&6; } | |
13205 | if ${ac_cv_working_alloca_h+:} false; then : | |
13206 | $as_echo_n "(cached) " >&6 | |
13207 | else | |
13208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13209 | /* end confdefs.h. */ | |
13210 | #include <alloca.h> | |
7eb368b3 NR |
13211 | int |
13212 | main () | |
13213 | { | |
05ea2a05 TT |
13214 | char *p = (char *) alloca (2 * sizeof (int)); |
13215 | if (p) return 0; | |
7eb368b3 NR |
13216 | ; |
13217 | return 0; | |
13218 | } | |
13219 | _ACEOF | |
05ea2a05 TT |
13220 | if ac_fn_c_try_link "$LINENO"; then : |
13221 | ac_cv_working_alloca_h=yes | |
81ecdfbb | 13222 | else |
05ea2a05 | 13223 | ac_cv_working_alloca_h=no |
a9322a30 | 13224 | fi |
05ea2a05 TT |
13225 | rm -f core conftest.err conftest.$ac_objext \ |
13226 | conftest$ac_exeext conftest.$ac_ext | |
a9322a30 | 13227 | fi |
05ea2a05 TT |
13228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
13229 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
13230 | if test $ac_cv_working_alloca_h = yes; then | |
13231 | ||
13232 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
7eb368b3 | 13233 | |
7eb368b3 | 13234 | fi |
05ea2a05 TT |
13235 | |
13236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
13237 | $as_echo_n "checking for alloca... " >&6; } | |
13238 | if ${ac_cv_func_alloca_works+:} false; then : | |
13239 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13240 | else |
81ecdfbb | 13241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13242 | /* end confdefs.h. */ |
05ea2a05 TT |
13243 | #ifdef __GNUC__ |
13244 | # define alloca __builtin_alloca | |
13245 | #else | |
13246 | # ifdef _MSC_VER | |
13247 | # include <malloc.h> | |
13248 | # define alloca _alloca | |
13249 | # else | |
13250 | # ifdef HAVE_ALLOCA_H | |
13251 | # include <alloca.h> | |
13252 | # else | |
13253 | # ifdef _AIX | |
13254 | #pragma alloca | |
13255 | # else | |
13256 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
13257 | void *alloca (size_t); | |
13258 | # endif | |
13259 | # endif | |
13260 | # endif | |
13261 | # endif | |
13262 | #endif | |
13263 | ||
d3ea6809 MM |
13264 | int |
13265 | main () | |
13266 | { | |
05ea2a05 TT |
13267 | char *p = (char *) alloca (1); |
13268 | if (p) return 0; | |
81ecdfbb RW |
13269 | ; |
13270 | return 0; | |
d3ea6809 MM |
13271 | } |
13272 | _ACEOF | |
05ea2a05 TT |
13273 | if ac_fn_c_try_link "$LINENO"; then : |
13274 | ac_cv_func_alloca_works=yes | |
d3ea6809 | 13275 | else |
05ea2a05 | 13276 | ac_cv_func_alloca_works=no |
a9322a30 | 13277 | fi |
05ea2a05 TT |
13278 | rm -f core conftest.err conftest.$ac_objext \ |
13279 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 13280 | fi |
05ea2a05 TT |
13281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
13282 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
81ecdfbb | 13283 | |
05ea2a05 | 13284 | if test $ac_cv_func_alloca_works = yes; then |
d3ea6809 | 13285 | |
05ea2a05 | 13286 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
d3ea6809 | 13287 | |
05ea2a05 TT |
13288 | else |
13289 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13290 | # that cause trouble. Some versions do not even contain alloca or | |
13291 | # contain a buggy version. If you still want to use their alloca, | |
13292 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
d3ea6809 | 13293 | |
05ea2a05 | 13294 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
d0ac1c44 | 13295 | |
05ea2a05 | 13296 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
d0ac1c44 SM |
13297 | |
13298 | ||
05ea2a05 TT |
13299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
13300 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
13301 | if ${ac_cv_os_cray+:} false; then : | |
13302 | $as_echo_n "(cached) " >&6 | |
13303 | else | |
13304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13305 | /* end confdefs.h. */ | |
13306 | #if defined CRAY && ! defined CRAY2 | |
13307 | webecray | |
13308 | #else | |
13309 | wenotbecray | |
13310 | #endif | |
13311 | ||
13312 | _ACEOF | |
13313 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13314 | $EGREP "webecray" >/dev/null 2>&1; then : | |
13315 | ac_cv_os_cray=yes | |
13316 | else | |
13317 | ac_cv_os_cray=no | |
13318 | fi | |
13319 | rm -f conftest* | |
13320 | ||
13321 | fi | |
13322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
13323 | $as_echo "$ac_cv_os_cray" >&6; } | |
13324 | if test $ac_cv_os_cray = yes; then | |
13325 | for ac_func in _getb67 GETB67 getb67; do | |
13326 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13327 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13328 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
13329 | ||
13330 | cat >>confdefs.h <<_ACEOF | |
13331 | #define CRAY_STACKSEG_END $ac_func | |
13332 | _ACEOF | |
13333 | ||
13334 | break | |
13335 | fi | |
13336 | ||
13337 | done | |
13338 | fi | |
13339 | ||
13340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
13341 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
13342 | if ${ac_cv_c_stack_direction+:} false; then : | |
13343 | $as_echo_n "(cached) " >&6 | |
13344 | else | |
13345 | if test "$cross_compiling" = yes; then : | |
13346 | ac_cv_c_stack_direction=0 | |
13347 | else | |
13348 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13349 | /* end confdefs.h. */ | |
13350 | $ac_includes_default | |
13351 | int | |
13352 | find_stack_direction (int *addr, int depth) | |
13353 | { | |
13354 | int dir, dummy = 0; | |
13355 | if (! addr) | |
13356 | addr = &dummy; | |
13357 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
13358 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
13359 | return dir + dummy; | |
13360 | } | |
13361 | ||
13362 | int | |
13363 | main (int argc, char **argv) | |
13364 | { | |
13365 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
13366 | } | |
13367 | _ACEOF | |
13368 | if ac_fn_c_try_run "$LINENO"; then : | |
13369 | ac_cv_c_stack_direction=1 | |
13370 | else | |
13371 | ac_cv_c_stack_direction=-1 | |
13372 | fi | |
13373 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13374 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13375 | fi | |
13376 | ||
13377 | fi | |
13378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13379 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
13380 | cat >>confdefs.h <<_ACEOF | |
13381 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13382 | _ACEOF | |
13383 | ||
13384 | ||
13385 | fi | |
13386 | ||
13387 | ||
13388 | WIN32APILIBS= | |
13389 | case ${host} in | |
13390 | *mingw32*) | |
13391 | ||
13392 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
13393 | ||
13394 | WIN32APILIBS="-lws2_32" | |
13395 | ;; | |
13396 | esac | |
13397 | ||
13398 | ||
13399 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13400 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13401 | if ${am_cv_langinfo_codeset+:} false; then : | |
13402 | $as_echo_n "(cached) " >&6 | |
13403 | else | |
13404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13405 | /* end confdefs.h. */ | |
13406 | #include <langinfo.h> | |
13407 | int | |
13408 | main () | |
13409 | { | |
13410 | char* cs = nl_langinfo(CODESET); | |
13411 | ; | |
13412 | return 0; | |
13413 | } | |
13414 | _ACEOF | |
13415 | if ac_fn_c_try_link "$LINENO"; then : | |
13416 | am_cv_langinfo_codeset=yes | |
13417 | else | |
13418 | am_cv_langinfo_codeset=no | |
13419 | fi | |
13420 | rm -f core conftest.err conftest.$ac_objext \ | |
13421 | conftest$ac_exeext conftest.$ac_ext | |
13422 | ||
13423 | fi | |
13424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
13425 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13426 | if test $am_cv_langinfo_codeset = yes; then | |
13427 | ||
13428 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
13429 | ||
13430 | fi | |
13431 | ||
13432 | ||
c8693053 | 13433 | 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 |
13434 | do : |
13435 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
05ea2a05 | 13436 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
d0ac1c44 | 13437 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
bec39cab | 13438 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13439 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 13440 | _ACEOF |
b757528f | 13441 | |
b757528f | 13442 | fi |
bec39cab | 13443 | |
a9322a30 | 13444 | done |
a3828db0 | 13445 | |
d0ac1c44 SM |
13446 | |
13447 | ||
a9322a30 | 13448 | for ac_func in getpagesize |
81ecdfbb RW |
13449 | do : |
13450 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d0ac1c44 | 13451 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
bec39cab | 13452 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13453 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 13454 | _ACEOF |
bcb3dc3d | 13455 | |
bcb3dc3d MK |
13456 | fi |
13457 | done | |
13458 | ||
81ecdfbb RW |
13459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
13460 | $as_echo_n "checking for working mmap... " >&6; } | |
d0ac1c44 | 13461 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
81ecdfbb | 13462 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13463 | else |
81ecdfbb | 13464 | if test "$cross_compiling" = yes; then : |
a9322a30 | 13465 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 13466 | else |
81ecdfbb | 13467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13468 | /* end confdefs.h. */ |
a9322a30 TT |
13469 | $ac_includes_default |
13470 | /* malloc might have been renamed as rpl_malloc. */ | |
13471 | #undef malloc | |
bec39cab | 13472 | |
a9322a30 TT |
13473 | /* Thanks to Mike Haertel and Jim Avera for this test. |
13474 | Here is a matrix of mmap possibilities: | |
13475 | mmap private not fixed | |
13476 | mmap private fixed at somewhere currently unmapped | |
13477 | mmap private fixed at somewhere already mapped | |
13478 | mmap shared not fixed | |
13479 | mmap shared fixed at somewhere currently unmapped | |
13480 | mmap shared fixed at somewhere already mapped | |
13481 | For private mappings, we should verify that changes cannot be read() | |
13482 | back from the file, nor mmap's back from the file at a different | |
13483 | address. (There have been systems where private was not correctly | |
13484 | implemented like the infamous i386 svr4.0, and systems where the | |
13485 | VM page cache was not coherent with the file system buffer cache | |
13486 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
13487 | For shared mappings, we should conversely verify that changes get | |
13488 | propagated back to all the places they're supposed to be. | |
bec39cab | 13489 | |
a9322a30 TT |
13490 | Grep wants private fixed already mapped. |
13491 | The main things grep needs to know about mmap are: | |
13492 | * does it exist and is it safe to write into the mmap'd area | |
13493 | * how to use it (BSD variants) */ | |
8b9cf735 | 13494 | |
a9322a30 TT |
13495 | #include <fcntl.h> |
13496 | #include <sys/mman.h> | |
8b9cf735 | 13497 | |
81ecdfbb | 13498 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 13499 | char *malloc (); |
a3828db0 MK |
13500 | #endif |
13501 | ||
a9322a30 | 13502 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 13503 | #ifndef HAVE_GETPAGESIZE |
a9322a30 TT |
13504 | # ifdef _SC_PAGESIZE |
13505 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
13506 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 13507 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
13508 | # include <sys/param.h> |
13509 | # ifdef EXEC_PAGESIZE | |
13510 | # define getpagesize() EXEC_PAGESIZE | |
13511 | # else /* no EXEC_PAGESIZE */ | |
13512 | # ifdef NBPG | |
13513 | # define getpagesize() NBPG * CLSIZE | |
13514 | # ifndef CLSIZE | |
13515 | # define CLSIZE 1 | |
13516 | # endif /* no CLSIZE */ | |
13517 | # else /* no NBPG */ | |
13518 | # ifdef NBPC | |
13519 | # define getpagesize() NBPC | |
13520 | # else /* no NBPC */ | |
13521 | # ifdef PAGESIZE | |
13522 | # define getpagesize() PAGESIZE | |
13523 | # endif /* PAGESIZE */ | |
13524 | # endif /* no NBPC */ | |
13525 | # endif /* no NBPG */ | |
13526 | # endif /* no EXEC_PAGESIZE */ | |
13527 | # else /* no HAVE_SYS_PARAM_H */ | |
13528 | # define getpagesize() 8192 /* punt totally */ | |
13529 | # endif /* no HAVE_SYS_PARAM_H */ | |
13530 | # endif /* no _SC_PAGESIZE */ | |
13531 | ||
13532 | #endif /* no HAVE_GETPAGESIZE */ | |
13533 | ||
bec39cab AC |
13534 | int |
13535 | main () | |
13536 | { | |
a9322a30 | 13537 | char *data, *data2, *data3; |
d0ac1c44 | 13538 | const char *cdata2; |
a9322a30 | 13539 | int i, pagesize; |
d0ac1c44 | 13540 | int fd, fd2; |
a9322a30 TT |
13541 | |
13542 | pagesize = getpagesize (); | |
13543 | ||
13544 | /* First, make a file with some known garbage in it. */ | |
13545 | data = (char *) malloc (pagesize); | |
13546 | if (!data) | |
81ecdfbb | 13547 | return 1; |
a9322a30 TT |
13548 | for (i = 0; i < pagesize; ++i) |
13549 | *(data + i) = rand (); | |
13550 | umask (0); | |
13551 | fd = creat ("conftest.mmap", 0600); | |
13552 | if (fd < 0) | |
d0ac1c44 | 13553 | return 2; |
a9322a30 | 13554 | if (write (fd, data, pagesize) != pagesize) |
d0ac1c44 | 13555 | return 3; |
a9322a30 TT |
13556 | close (fd); |
13557 | ||
d0ac1c44 SM |
13558 | /* Next, check that the tail of a page is zero-filled. File must have |
13559 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
13560 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
13561 | if (fd2 < 0) | |
13562 | return 4; | |
13563 | cdata2 = ""; | |
13564 | if (write (fd2, cdata2, 1) != 1) | |
13565 | return 5; | |
13566 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
13567 | if (data2 == MAP_FAILED) | |
13568 | return 6; | |
13569 | for (i = 0; i < pagesize; ++i) | |
13570 | if (*(data2 + i)) | |
13571 | return 7; | |
13572 | close (fd2); | |
13573 | if (munmap (data2, pagesize)) | |
13574 | return 8; | |
13575 | ||
a9322a30 TT |
13576 | /* Next, try to mmap the file at a fixed address which already has |
13577 | something else allocated at it. If we can, also make sure that | |
13578 | we see the same garbage. */ | |
13579 | fd = open ("conftest.mmap", O_RDWR); | |
13580 | if (fd < 0) | |
d0ac1c44 | 13581 | return 9; |
a9322a30 TT |
13582 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
13583 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
d0ac1c44 | 13584 | return 10; |
a9322a30 TT |
13585 | for (i = 0; i < pagesize; ++i) |
13586 | if (*(data + i) != *(data2 + i)) | |
d0ac1c44 | 13587 | return 11; |
a9322a30 TT |
13588 | |
13589 | /* Finally, make sure that changes to the mapped area do not | |
13590 | percolate back to the file as seen by read(). (This is a bug on | |
13591 | some variants of i386 svr4.0.) */ | |
13592 | for (i = 0; i < pagesize; ++i) | |
13593 | *(data2 + i) = *(data2 + i) + 1; | |
13594 | data3 = (char *) malloc (pagesize); | |
13595 | if (!data3) | |
d0ac1c44 | 13596 | return 12; |
a9322a30 | 13597 | if (read (fd, data3, pagesize) != pagesize) |
d0ac1c44 | 13598 | return 13; |
a9322a30 TT |
13599 | for (i = 0; i < pagesize; ++i) |
13600 | if (*(data + i) != *(data3 + i)) | |
d0ac1c44 | 13601 | return 14; |
a9322a30 | 13602 | close (fd); |
81ecdfbb | 13603 | return 0; |
bec39cab AC |
13604 | } |
13605 | _ACEOF | |
81ecdfbb | 13606 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13607 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 13608 | else |
81ecdfbb | 13609 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 13610 | fi |
81ecdfbb RW |
13611 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13612 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 13613 | fi |
81ecdfbb | 13614 | |
a9322a30 | 13615 | fi |
81ecdfbb RW |
13616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
13617 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
13618 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
13619 | ||
81ecdfbb | 13620 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 13621 | |
086ec9eb | 13622 | fi |
d0ac1c44 | 13623 | rm -f conftest.mmap conftest.txt |
a3828db0 | 13624 | |
05ea2a05 | 13625 | for ac_header in vfork.h |
81ecdfbb RW |
13626 | do : |
13627 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 13628 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
a3828db0 | 13629 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13630 | #define HAVE_VFORK_H 1 |
bec39cab | 13631 | _ACEOF |
c906108c SS |
13632 | |
13633 | fi | |
a9322a30 | 13634 | |
a3828db0 | 13635 | done |
c906108c | 13636 | |
a9322a30 | 13637 | for ac_func in fork vfork |
81ecdfbb RW |
13638 | do : |
13639 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13640 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13641 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
a3828db0 | 13642 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13643 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 13644 | _ACEOF |
b83266a0 | 13645 | |
97bf5e38 | 13646 | fi |
a3828db0 | 13647 | done |
b83266a0 | 13648 | |
a9322a30 | 13649 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
13650 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
13651 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 13652 | if ${ac_cv_func_fork_works+:} false; then : |
81ecdfbb | 13653 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13654 | else |
81ecdfbb | 13655 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13656 | ac_cv_func_fork_works=cross |
13657 | else | |
81ecdfbb RW |
13658 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13659 | /* end confdefs.h. */ | |
13660 | $ac_includes_default | |
13661 | int | |
13662 | main () | |
13663 | { | |
13664 | ||
13665 | /* By Ruediger Kuhlmann. */ | |
13666 | return fork () < 0; | |
13667 | ||
13668 | ; | |
13669 | return 0; | |
13670 | } | |
a9322a30 | 13671 | _ACEOF |
81ecdfbb | 13672 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13673 | ac_cv_func_fork_works=yes |
13674 | else | |
81ecdfbb | 13675 | ac_cv_func_fork_works=no |
a9322a30 | 13676 | fi |
81ecdfbb RW |
13677 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13678 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13679 | fi |
81ecdfbb | 13680 | |
a9322a30 | 13681 | fi |
81ecdfbb RW |
13682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
13683 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
13684 | |
13685 | else | |
13686 | ac_cv_func_fork_works=$ac_cv_func_fork | |
13687 | fi | |
13688 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13689 | case $host in | |
13690 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13691 | # Override, as these systems have only a dummy fork() stub | |
13692 | ac_cv_func_fork_works=no | |
13693 | ;; | |
13694 | *) | |
13695 | ac_cv_func_fork_works=yes | |
13696 | ;; | |
13697 | esac | |
81ecdfbb RW |
13698 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
13699 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13700 | fi |
13701 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
13702 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
13703 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
13704 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 13705 | if ${ac_cv_func_vfork_works+:} false; then : |
81ecdfbb | 13706 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13707 | else |
81ecdfbb | 13708 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13709 | ac_cv_func_vfork_works=cross |
13710 | else | |
81ecdfbb | 13711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
13712 | /* end confdefs.h. */ |
13713 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 13714 | $ac_includes_default |
a9322a30 | 13715 | #include <sys/wait.h> |
81ecdfbb | 13716 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
13717 | # include <vfork.h> |
13718 | #endif | |
13719 | /* On some sparc systems, changes by the child to local and incoming | |
13720 | argument registers are propagated back to the parent. The compiler | |
13721 | is told about this with #include <vfork.h>, but some compilers | |
13722 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13723 | static variable whose address is put into a register that is | |
13724 | clobbered by the vfork. */ | |
13725 | static void | |
13726 | #ifdef __cplusplus | |
13727 | sparc_address_test (int arg) | |
13728 | # else | |
13729 | sparc_address_test (arg) int arg; | |
13730 | #endif | |
13731 | { | |
13732 | static pid_t child; | |
13733 | if (!child) { | |
13734 | child = vfork (); | |
13735 | if (child < 0) { | |
13736 | perror ("vfork"); | |
13737 | _exit(2); | |
13738 | } | |
13739 | if (!child) { | |
13740 | arg = getpid(); | |
13741 | write(-1, "", 0); | |
13742 | _exit (arg); | |
13743 | } | |
13744 | } | |
13745 | } | |
13746 | ||
13747 | int | |
13748 | main () | |
13749 | { | |
13750 | pid_t parent = getpid (); | |
13751 | pid_t child; | |
13752 | ||
13753 | sparc_address_test (0); | |
13754 | ||
13755 | child = vfork (); | |
13756 | ||
13757 | if (child == 0) { | |
13758 | /* Here is another test for sparc vfork register problems. This | |
13759 | test uses lots of local variables, at least as many local | |
13760 | variables as main has allocated so far including compiler | |
13761 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13762 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13763 | reuse the register of parent for one of the local variables, | |
13764 | since it will think that parent can't possibly be used any more | |
13765 | in this routine. Assigning to the local variable will thus | |
13766 | munge parent in the parent process. */ | |
13767 | pid_t | |
13768 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13769 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13770 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13771 | use the same hardware register for all 8 local variables. */ | |
13772 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13773 | || p != p5 || p != p6 || p != p7) | |
13774 | _exit(1); | |
13775 | ||
13776 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
13777 | from child file descriptors. If the child closes a descriptor | |
13778 | before it execs or exits, this munges the parent's descriptor | |
13779 | as well. Test for this by closing stdout in the child. */ | |
13780 | _exit(close(fileno(stdout)) != 0); | |
13781 | } else { | |
13782 | int status; | |
13783 | struct stat st; | |
13784 | ||
13785 | while (wait(&status) != child) | |
13786 | ; | |
81ecdfbb | 13787 | return ( |
a9322a30 TT |
13788 | /* Was there some problem with vforking? */ |
13789 | child < 0 | |
13790 | ||
13791 | /* Did the child fail? (This shouldn't happen.) */ | |
13792 | || status | |
13793 | ||
13794 | /* Did the vfork/compiler bug occur? */ | |
13795 | || parent != getpid() | |
13796 | ||
13797 | /* Did the file descriptor bug occur? */ | |
13798 | || fstat(fileno(stdout), &st) != 0 | |
13799 | ); | |
13800 | } | |
13801 | } | |
13802 | _ACEOF | |
81ecdfbb | 13803 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13804 | ac_cv_func_vfork_works=yes |
13805 | else | |
81ecdfbb | 13806 | ac_cv_func_vfork_works=no |
a9322a30 | 13807 | fi |
81ecdfbb RW |
13808 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13809 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13810 | fi |
81ecdfbb | 13811 | |
a9322a30 | 13812 | fi |
81ecdfbb RW |
13813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
13814 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
13815 | |
13816 | fi; | |
13817 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13818 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
13819 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
13820 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13821 | fi |
13822 | ||
13823 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
13824 | ||
81ecdfbb | 13825 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
13826 | |
13827 | else | |
13828 | ||
81ecdfbb | 13829 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
13830 | |
13831 | fi | |
13832 | if test "x$ac_cv_func_fork_works" = xyes; then | |
13833 | ||
81ecdfbb | 13834 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
13835 | |
13836 | fi | |
13837 | ||
8ae8e197 | 13838 | for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \ |
05ea2a05 TT |
13839 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
13840 | setpgid setpgrp getrusage getauxval | |
81ecdfbb RW |
13841 | do : |
13842 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13843 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13844 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
6c7a06a3 | 13845 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13846 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
13847 | _ACEOF |
13848 | ||
13849 | fi | |
13850 | done | |
13851 | ||
13852 | ||
05ea2a05 TT |
13853 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
13854 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
13855 | ac_have_decl=1 | |
d0ac1c44 | 13856 | else |
05ea2a05 TT |
13857 | ac_have_decl=0 |
13858 | fi | |
d0ac1c44 SM |
13859 | |
13860 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 TT |
13861 | #define HAVE_DECL_STRSTR $ac_have_decl |
13862 | _ACEOF | |
13863 | ||
13864 | ||
13865 | # ----------------------- # | |
13866 | # Checks for structures. # | |
13867 | # ----------------------- # | |
13868 | ||
13869 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
13870 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
13871 | ||
13872 | cat >>confdefs.h <<_ACEOF | |
13873 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
d0ac1c44 SM |
13874 | _ACEOF |
13875 | ||
05ea2a05 | 13876 | |
d0ac1c44 | 13877 | fi |
05ea2a05 TT |
13878 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
13879 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
d0ac1c44 | 13880 | |
05ea2a05 TT |
13881 | cat >>confdefs.h <<_ACEOF |
13882 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
13883 | _ACEOF | |
13884 | ||
13885 | ||
13886 | fi | |
13887 | ||
13888 | ||
e911c666 JB |
13889 | # On FreeBSD we need libutil for the kinfo_get* functions. On |
13890 | # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. | |
13891 | # Figure out which one to use. | |
05ea2a05 TT |
13892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 |
13893 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
13894 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
5e030278 TT |
13895 | $as_echo_n "(cached) " >&6 |
13896 | else | |
05ea2a05 TT |
13897 | ac_func_search_save_LIBS=$LIBS |
13898 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13899 | /* end confdefs.h. */ |
3266f10b | 13900 | |
05ea2a05 TT |
13901 | /* Override any GCC internal prototype to avoid an error. |
13902 | Use char because int might match the return type of a GCC | |
13903 | builtin and then its argument prototype would still apply. */ | |
13904 | #ifdef __cplusplus | |
13905 | extern "C" | |
13906 | #endif | |
13907 | char kinfo_getfile (); | |
3266f10b TT |
13908 | int |
13909 | main () | |
13910 | { | |
05ea2a05 | 13911 | return kinfo_getfile (); |
3266f10b TT |
13912 | ; |
13913 | return 0; | |
13914 | } | |
13915 | _ACEOF | |
05ea2a05 TT |
13916 | for ac_lib in '' util util-freebsd; do |
13917 | if test -z "$ac_lib"; then | |
13918 | ac_res="none required" | |
13919 | else | |
13920 | ac_res=-l$ac_lib | |
13921 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13922 | fi | |
13923 | if ac_fn_c_try_link "$LINENO"; then : | |
13924 | ac_cv_search_kinfo_getfile=$ac_res | |
3266f10b | 13925 | fi |
05ea2a05 TT |
13926 | rm -f core conftest.err conftest.$ac_objext \ |
13927 | conftest$ac_exeext | |
13928 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
13929 | break | |
13930 | fi | |
13931 | done | |
13932 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
3266f10b TT |
13933 | |
13934 | else | |
05ea2a05 | 13935 | ac_cv_search_kinfo_getfile=no |
3266f10b | 13936 | fi |
05ea2a05 TT |
13937 | rm conftest.$ac_ext |
13938 | LIBS=$ac_func_search_save_LIBS | |
13939 | fi | |
13940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
13941 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
13942 | ac_res=$ac_cv_search_kinfo_getfile | |
13943 | if test "$ac_res" != no; then : | |
13944 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13945 | ||
e911c666 JB |
13946 | fi |
13947 | ||
13948 | ||
13949 | # Define HAVE_KINFO_GETFILE if kinfo_getfile is available. | |
13950 | for ac_func in kinfo_getfile | |
13951 | do : | |
13952 | ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile" | |
13953 | if test "x$ac_cv_func_kinfo_getfile" = xyes; then : | |
13954 | cat >>confdefs.h <<_ACEOF | |
13955 | #define HAVE_KINFO_GETFILE 1 | |
13956 | _ACEOF | |
3266f10b TT |
13957 | |
13958 | fi | |
e911c666 | 13959 | done |
3266f10b | 13960 | |
3266f10b | 13961 | |
05ea2a05 TT |
13962 | # Check for std::thread. This does not work on some platforms, like |
13963 | # mingw and DJGPP. | |
13964 | ac_ext=cpp | |
13965 | ac_cpp='$CXXCPP $CPPFLAGS' | |
13966 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13967 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13968 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3266f10b | 13969 | |
3266f10b | 13970 | |
3266f10b | 13971 | |
3266f10b | 13972 | |
3266f10b | 13973 | |
05ea2a05 TT |
13974 | ac_ext=c |
13975 | ac_cpp='$CPP $CPPFLAGS' | |
13976 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13977 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13978 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3266f10b | 13979 | |
05ea2a05 | 13980 | ax_pthread_ok=no |
3266f10b | 13981 | |
05ea2a05 TT |
13982 | # We used to check for pthread.h first, but this fails if pthread.h |
13983 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
13984 | # It gets checked for in the link test anyway. | |
3266f10b | 13985 | |
05ea2a05 TT |
13986 | # First of all, check if the user has set any of the PTHREAD_LIBS, |
13987 | # etcetera environment variables, and if threads linking works using | |
13988 | # them: | |
13989 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
13990 | ax_pthread_save_CC="$CC" | |
13991 | ax_pthread_save_CFLAGS="$CFLAGS" | |
13992 | ax_pthread_save_LIBS="$LIBS" | |
13993 | if test "x$PTHREAD_CC" != "x"; then : | |
13994 | CC="$PTHREAD_CC" | |
3266f10b | 13995 | fi |
05ea2a05 TT |
13996 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
13997 | LIBS="$PTHREAD_LIBS $LIBS" | |
13998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
13999 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
14000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14001 | /* end confdefs.h. */ |
05ea2a05 TT |
14002 | |
14003 | /* Override any GCC internal prototype to avoid an error. | |
14004 | Use char because int might match the return type of a GCC | |
14005 | builtin and then its argument prototype would still apply. */ | |
14006 | #ifdef __cplusplus | |
14007 | extern "C" | |
14008 | #endif | |
14009 | char pthread_join (); | |
3266f10b TT |
14010 | int |
14011 | main () | |
14012 | { | |
05ea2a05 | 14013 | return pthread_join (); |
3266f10b TT |
14014 | ; |
14015 | return 0; | |
14016 | } | |
14017 | _ACEOF | |
14018 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 | 14019 | ax_pthread_ok=yes |
3266f10b TT |
14020 | fi |
14021 | rm -f core conftest.err conftest.$ac_objext \ | |
14022 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 TT |
14023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 |
14024 | $as_echo "$ax_pthread_ok" >&6; } | |
14025 | if test "x$ax_pthread_ok" = "xno"; then | |
14026 | PTHREAD_LIBS="" | |
14027 | PTHREAD_CFLAGS="" | |
14028 | fi | |
14029 | CC="$ax_pthread_save_CC" | |
14030 | CFLAGS="$ax_pthread_save_CFLAGS" | |
14031 | LIBS="$ax_pthread_save_LIBS" | |
3266f10b | 14032 | fi |
3266f10b | 14033 | |
05ea2a05 TT |
14034 | # We must check for the threads library under a number of different |
14035 | # names; the ordering is very important because some systems | |
14036 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
14037 | # libraries is broken (non-POSIX). | |
3266f10b | 14038 | |
05ea2a05 TT |
14039 | # Create a list of thread flags to try. Items starting with a "-" are |
14040 | # C compiler flags, and other items are library names, except for "none" | |
14041 | # which indicates that we try without any flags at all, and "pthread-config" | |
14042 | # which is a program returning the flags for the Pth emulation library. | |
3266f10b | 14043 | |
05ea2a05 | 14044 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
3266f10b | 14045 | |
05ea2a05 TT |
14046 | # The ordering *is* (sometimes) important. Some notes on the |
14047 | # individual items follow: | |
3266f10b | 14048 | |
05ea2a05 TT |
14049 | # pthreads: AIX (must check this before -lpthread) |
14050 | # none: in case threads are in libc; should be tried before -Kthread and | |
14051 | # other compiler flags to prevent continual compiler warnings | |
14052 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
14053 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
14054 | # (Note: HP C rejects this with "bad form for `-t' option") | |
14055 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
14056 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
14057 | # doesn't hurt to check since this sometimes defines pthreads and | |
14058 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
14059 | # is present but should not be used directly; and before -mthreads, | |
14060 | # because the compiler interprets this as "-mt" + "-hreads") | |
14061 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
14062 | # pthread: Linux, etcetera | |
14063 | # --thread-safe: KAI C++ | |
14064 | # pthread-config: use pthread-config program (for GNU Pth library) | |
3266f10b | 14065 | |
05ea2a05 | 14066 | case $host_os in |
3266f10b | 14067 | |
05ea2a05 | 14068 | freebsd*) |
3266f10b | 14069 | |
05ea2a05 TT |
14070 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
14071 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
3266f10b | 14072 | |
05ea2a05 TT |
14073 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" |
14074 | ;; | |
3266f10b | 14075 | |
05ea2a05 | 14076 | hpux*) |
3266f10b | 14077 | |
05ea2a05 TT |
14078 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable |
14079 | # multi-threading and also sets -lpthread." | |
14080 | ||
14081 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
14082 | ;; | |
14083 | ||
14084 | openedition*) | |
14085 | ||
14086 | # IBM z/OS requires a feature-test macro to be defined in order to | |
14087 | # enable POSIX threads at all, so give the user a hint if this is | |
14088 | # not set. (We don't define these ourselves, as they can affect | |
14089 | # other portions of the system API in unpredictable ways.) | |
14090 | ||
14091 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14092 | /* end confdefs.h. */ |
05ea2a05 TT |
14093 | |
14094 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
14095 | AX_PTHREAD_ZOS_MISSING | |
14096 | # endif | |
3266f10b TT |
14097 | |
14098 | _ACEOF | |
14099 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
05ea2a05 TT |
14100 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : |
14101 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
14102 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
3266f10b TT |
14103 | fi |
14104 | rm -f conftest* | |
14105 | ||
05ea2a05 | 14106 | ;; |
3266f10b | 14107 | |
05ea2a05 | 14108 | solaris*) |
3266f10b | 14109 | |
05ea2a05 TT |
14110 | # On Solaris (at least, for some versions), libc contains stubbed |
14111 | # (non-functional) versions of the pthreads routines, so link-based | |
14112 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
14113 | # pthread_cleanup_push, or rather a function called by this macro, | |
14114 | # so we could check for that, but who knows whether they'll stub | |
14115 | # that too in a future libc.) So we'll check first for the | |
14116 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
14117 | ||
14118 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
14119 | ;; | |
14120 | esac | |
14121 | ||
14122 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
14123 | ||
14124 | if test "x$GCC" = "xyes"; then : | |
14125 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
3266f10b TT |
14126 | fi |
14127 | ||
05ea2a05 TT |
14128 | # The presence of a feature test macro requesting re-entrant function |
14129 | # definitions is, on some systems, a strong hint that pthreads support is | |
14130 | # correctly enabled | |
14131 | ||
14132 | case $host_os in | |
14133 | darwin* | hpux* | linux* | osf* | solaris*) | |
14134 | ax_pthread_check_macro="_REENTRANT" | |
14135 | ;; | |
14136 | ||
14137 | aix*) | |
14138 | ax_pthread_check_macro="_THREAD_SAFE" | |
14139 | ;; | |
14140 | ||
14141 | *) | |
14142 | ax_pthread_check_macro="--" | |
14143 | ;; | |
14144 | esac | |
14145 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
14146 | ax_pthread_check_cond=0 | |
14147 | else | |
14148 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
3266f10b TT |
14149 | fi |
14150 | ||
05ea2a05 TT |
14151 | # Are we compiling with Clang? |
14152 | ||
14153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
14154 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
14155 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
3266f10b TT |
14156 | $as_echo_n "(cached) " >&6 |
14157 | else | |
05ea2a05 TT |
14158 | ax_cv_PTHREAD_CLANG=no |
14159 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
14160 | if test "x$GCC" = "xyes"; then | |
14161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14162 | /* end confdefs.h. */ |
05ea2a05 TT |
14163 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ |
14164 | # if defined(__clang__) && defined(__llvm__) | |
14165 | AX_PTHREAD_CC_IS_CLANG | |
14166 | # endif | |
3266f10b | 14167 | |
3266f10b | 14168 | _ACEOF |
05ea2a05 TT |
14169 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
14170 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
14171 | ax_cv_PTHREAD_CLANG=yes | |
3266f10b | 14172 | fi |
05ea2a05 TT |
14173 | rm -f conftest* |
14174 | ||
14175 | fi | |
3266f10b TT |
14176 | |
14177 | fi | |
05ea2a05 TT |
14178 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 |
14179 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
14180 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
3266f10b | 14181 | |
05ea2a05 | 14182 | ax_pthread_clang_warning=no |
3266f10b | 14183 | |
05ea2a05 TT |
14184 | # Clang needs special handling, because older versions handle the -pthread |
14185 | # option in a rather... idiosyncratic way | |
3266f10b | 14186 | |
05ea2a05 | 14187 | if test "x$ax_pthread_clang" = "xyes"; then |
3266f10b | 14188 | |
05ea2a05 | 14189 | # Clang takes -pthread; it has never supported any other flag |
b2ceabe8 | 14190 | |
05ea2a05 TT |
14191 | # (Note 1: This will need to be revisited if a system that Clang |
14192 | # supports has POSIX threads in a separate library. This tends not | |
14193 | # to be the way of modern systems, but it's conceivable.) | |
b2ceabe8 | 14194 | |
05ea2a05 TT |
14195 | # (Note 2: On some systems, notably Darwin, -pthread is not needed |
14196 | # to get POSIX threads support; the API is always present and | |
14197 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
14198 | # -pthread does define _REENTRANT, and while the Darwin headers | |
14199 | # ignore this macro, third-party headers might not.) | |
b2ceabe8 | 14200 | |
05ea2a05 TT |
14201 | PTHREAD_CFLAGS="-pthread" |
14202 | PTHREAD_LIBS= | |
3266f10b | 14203 | |
05ea2a05 TT |
14204 | ax_pthread_ok=yes |
14205 | ||
14206 | # However, older versions of Clang make a point of warning the user | |
14207 | # that, in an invocation where only linking and no compilation is | |
14208 | # taking place, the -pthread option has no effect ("argument unused | |
14209 | # during compilation"). They expect -pthread to be passed in only | |
14210 | # when source code is being compiled. | |
14211 | # | |
14212 | # Problem is, this is at odds with the way Automake and most other | |
14213 | # C build frameworks function, which is that the same flags used in | |
14214 | # compilation (CFLAGS) are also used in linking. Many systems | |
14215 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
14216 | # support, and in fact it is often not straightforward to specify a | |
14217 | # flag that is used only in the compilation phase and not in | |
14218 | # linking. Such a scenario is extremely rare in practice. | |
14219 | # | |
14220 | # Even though use of the -pthread flag in linking would only print | |
14221 | # a warning, this can be a nuisance for well-run software projects | |
14222 | # that build with -Werror. So if the active version of Clang has | |
14223 | # this misfeature, we search for an option to squash it. | |
14224 | ||
14225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
14226 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
14227 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
14228 | $as_echo_n "(cached) " >&6 | |
14229 | else | |
14230 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
14231 | # Create an alternate version of $ac_link that compiles and | |
14232 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
14233 | # (.c -> exe), because the warning occurs only in the second | |
14234 | # step | |
14235 | ax_pthread_save_ac_link="$ac_link" | |
14236 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
14237 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
14238 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
14239 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14240 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
14241 | if test "x$ax_pthread_try" = "xunknown"; then : | |
14242 | break | |
14243 | fi | |
14244 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
14245 | ac_link="$ax_pthread_save_ac_link" | |
14246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14247 | /* end confdefs.h. */ | |
14248 | int main(void){return 0;} | |
3266f10b TT |
14249 | _ACEOF |
14250 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
14251 | ac_link="$ax_pthread_2step_ac_link" |
14252 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14253 | /* end confdefs.h. */ | |
14254 | int main(void){return 0;} | |
14255 | _ACEOF | |
14256 | if ac_fn_c_try_link "$LINENO"; then : | |
14257 | break | |
3266f10b TT |
14258 | fi |
14259 | rm -f core conftest.err conftest.$ac_objext \ | |
14260 | conftest$ac_exeext conftest.$ac_ext | |
14261 | ||
14262 | fi | |
05ea2a05 TT |
14263 | rm -f core conftest.err conftest.$ac_objext \ |
14264 | conftest$ac_exeext conftest.$ac_ext | |
14265 | done | |
14266 | ac_link="$ax_pthread_save_ac_link" | |
14267 | CFLAGS="$ax_pthread_save_CFLAGS" | |
14268 | if test "x$ax_pthread_try" = "x"; then : | |
14269 | ax_pthread_try=no | |
14270 | fi | |
14271 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
3266f10b | 14272 | |
05ea2a05 TT |
14273 | fi |
14274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
14275 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
3266f10b | 14276 | |
05ea2a05 TT |
14277 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in |
14278 | no | unknown) ;; | |
14279 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
14280 | esac | |
3266f10b | 14281 | |
05ea2a05 | 14282 | fi # $ax_pthread_clang = yes |
3266f10b | 14283 | |
05ea2a05 TT |
14284 | if test "x$ax_pthread_ok" = "xno"; then |
14285 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
3266f10b | 14286 | |
05ea2a05 TT |
14287 | case $ax_pthread_try_flag in |
14288 | none) | |
14289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
14290 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
14291 | ;; | |
3266f10b | 14292 | |
05ea2a05 TT |
14293 | -mt,pthread) |
14294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
14295 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
14296 | PTHREAD_CFLAGS="-mt" | |
14297 | PTHREAD_LIBS="-lpthread" | |
14298 | ;; | |
3266f10b | 14299 | |
05ea2a05 TT |
14300 | -*) |
14301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
14302 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
14303 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
14304 | ;; | |
3266f10b | 14305 | |
05ea2a05 TT |
14306 | pthread-config) |
14307 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
14308 | set dummy pthread-config; ac_word=$2 | |
14309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14310 | $as_echo_n "checking for $ac_word... " >&6; } | |
14311 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
14312 | $as_echo_n "(cached) " >&6 | |
14313 | else | |
14314 | if test -n "$ax_pthread_config"; then | |
14315 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
14316 | else | |
14317 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14318 | for as_dir in $PATH | |
14319 | do | |
14320 | IFS=$as_save_IFS | |
14321 | test -z "$as_dir" && as_dir=. | |
14322 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14323 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14324 | ac_cv_prog_ax_pthread_config="yes" | |
14325 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14326 | break 2 | |
14327 | fi | |
3266f10b | 14328 | done |
05ea2a05 TT |
14329 | done |
14330 | IFS=$as_save_IFS | |
3266f10b | 14331 | |
05ea2a05 TT |
14332 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" |
14333 | fi | |
14334 | fi | |
14335 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
14336 | if test -n "$ax_pthread_config"; then | |
14337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
14338 | $as_echo "$ax_pthread_config" >&6; } | |
3266f10b | 14339 | else |
05ea2a05 TT |
14340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14341 | $as_echo "no" >&6; } | |
3266f10b TT |
14342 | fi |
14343 | ||
5e030278 | 14344 | |
05ea2a05 TT |
14345 | if test "x$ax_pthread_config" = "xno"; then : |
14346 | continue | |
14347 | fi | |
14348 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
14349 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
14350 | ;; | |
5e030278 | 14351 | |
05ea2a05 TT |
14352 | *) |
14353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
14354 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
14355 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
14356 | ;; | |
14357 | esac | |
5e030278 | 14358 | |
5e030278 TT |
14359 | ax_pthread_save_CFLAGS="$CFLAGS" |
14360 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
14361 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
14362 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
14363 | |
14364 | # Check for various functions. We must include pthread.h, | |
14365 | # since some functions may be macros. (On the Sequent, we | |
14366 | # need a special flag -Kthread to make this header compile.) | |
14367 | # We check for pthread_join because it is in -lpthread on IRIX | |
14368 | # while pthread_create is in libc. We check for pthread_attr_init | |
14369 | # due to DEC craziness with -lpthreads. We check for | |
14370 | # pthread_cleanup_push because it is one of the few pthread | |
14371 | # functions on Solaris that doesn't have a non-functional libc stub. | |
14372 | # We try pthread_create on general principles. | |
14373 | ||
5e030278 TT |
14374 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14375 | /* end confdefs.h. */ | |
05ea2a05 TT |
14376 | #include <pthread.h> |
14377 | # if $ax_pthread_check_cond | |
14378 | # error "$ax_pthread_check_macro must be defined" | |
14379 | # endif | |
14380 | static void routine(void *a) { a = 0; } | |
14381 | static void *start_routine(void *a) { return a; } | |
5e030278 TT |
14382 | int |
14383 | main () | |
14384 | { | |
05ea2a05 TT |
14385 | pthread_t th; pthread_attr_t attr; |
14386 | pthread_create(&th, 0, start_routine, 0); | |
14387 | pthread_join(th, 0); | |
14388 | pthread_attr_init(&attr); | |
14389 | pthread_cleanup_push(routine, 0); | |
14390 | pthread_cleanup_pop(0) /* ; */ | |
5e030278 TT |
14391 | ; |
14392 | return 0; | |
14393 | } | |
14394 | _ACEOF | |
14395 | if ac_fn_c_try_link "$LINENO"; then : | |
14396 | ax_pthread_ok=yes | |
14397 | fi | |
14398 | rm -f core conftest.err conftest.$ac_objext \ | |
14399 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 14400 | |
5e030278 TT |
14401 | CFLAGS="$ax_pthread_save_CFLAGS" |
14402 | LIBS="$ax_pthread_save_LIBS" | |
05ea2a05 TT |
14403 | |
14404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
14405 | $as_echo "$ax_pthread_ok" >&6; } | |
14406 | if test "x$ax_pthread_ok" = "xyes"; then : | |
14407 | break | |
5e030278 TT |
14408 | fi |
14409 | ||
05ea2a05 TT |
14410 | PTHREAD_LIBS="" |
14411 | PTHREAD_CFLAGS="" | |
14412 | done | |
14413 | fi | |
5e030278 | 14414 | |
05ea2a05 TT |
14415 | # Various other checks: |
14416 | if test "x$ax_pthread_ok" = "xyes"; then | |
14417 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14418 | ax_pthread_save_LIBS="$LIBS" | |
14419 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
14420 | LIBS="$PTHREAD_LIBS $LIBS" | |
5e030278 | 14421 | |
05ea2a05 TT |
14422 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
14423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
14424 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
14425 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
14426 | $as_echo_n "(cached) " >&6 | |
14427 | else | |
14428 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
14429 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
14430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14431 | /* end confdefs.h. */ | |
14432 | #include <pthread.h> | |
14433 | int | |
14434 | main () | |
14435 | { | |
14436 | int attr = $ax_pthread_attr; return attr /* ; */ | |
14437 | ; | |
14438 | return 0; | |
14439 | } | |
14440 | _ACEOF | |
14441 | if ac_fn_c_try_link "$LINENO"; then : | |
14442 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
14443 | fi | |
14444 | rm -f core conftest.err conftest.$ac_objext \ | |
14445 | conftest$ac_exeext conftest.$ac_ext | |
14446 | done | |
5e030278 | 14447 | |
05ea2a05 TT |
14448 | fi |
14449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
14450 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
14451 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
14452 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
14453 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
5e030278 | 14454 | |
05ea2a05 TT |
14455 | cat >>confdefs.h <<_ACEOF |
14456 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
14457 | _ACEOF | |
5e030278 | 14458 | |
05ea2a05 | 14459 | ax_pthread_joinable_attr_defined=yes |
5e030278 | 14460 | |
05ea2a05 | 14461 | fi |
5e030278 | 14462 | |
05ea2a05 TT |
14463 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 |
14464 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
14465 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
14466 | $as_echo_n "(cached) " >&6 | |
14467 | else | |
14468 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
14469 | case $host_os in | |
14470 | solaris*) | |
14471 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
14472 | ;; | |
14473 | esac | |
5e030278 | 14474 | |
05ea2a05 TT |
14475 | fi |
14476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
14477 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
14478 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
14479 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
14480 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
14481 | ax_pthread_special_flags_added=yes | |
14482 | fi | |
5e030278 | 14483 | |
05ea2a05 TT |
14484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 |
14485 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
14486 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
14487 | $as_echo_n "(cached) " >&6 | |
14488 | else | |
14489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14490 | /* end confdefs.h. */ | |
14491 | #include <pthread.h> | |
14492 | int | |
14493 | main () | |
14494 | { | |
14495 | int i = PTHREAD_PRIO_INHERIT; | |
14496 | ; | |
14497 | return 0; | |
14498 | } | |
14499 | _ACEOF | |
14500 | if ac_fn_c_try_link "$LINENO"; then : | |
14501 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
14502 | else | |
14503 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
14504 | fi | |
14505 | rm -f core conftest.err conftest.$ac_objext \ | |
14506 | conftest$ac_exeext conftest.$ac_ext | |
5e030278 | 14507 | |
05ea2a05 TT |
14508 | fi |
14509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
14510 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
14511 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
14512 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
5e030278 | 14513 | |
05ea2a05 | 14514 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h |
5e030278 | 14515 | |
05ea2a05 | 14516 | ax_pthread_prio_inherit_defined=yes |
5e030278 | 14517 | |
05ea2a05 | 14518 | fi |
5e030278 | 14519 | |
05ea2a05 TT |
14520 | CFLAGS="$ax_pthread_save_CFLAGS" |
14521 | LIBS="$ax_pthread_save_LIBS" | |
5e030278 | 14522 | |
05ea2a05 TT |
14523 | # More AIX lossage: compile with *_r variant |
14524 | if test "x$GCC" != "xyes"; then | |
14525 | case $host_os in | |
14526 | aix*) | |
14527 | case "x/$CC" in #( | |
14528 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
14529 | #handle absolute path differently from PATH based program lookup | |
14530 | case "x$CC" in #( | |
14531 | x/*) : | |
14532 | if as_fn_executable_p ${CC}_r; then : | |
14533 | PTHREAD_CC="${CC}_r" | |
14534 | fi ;; #( | |
14535 | *) : | |
14536 | for ac_prog in ${CC}_r | |
14537 | do | |
14538 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
14539 | set dummy $ac_prog; ac_word=$2 | |
14540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14541 | $as_echo_n "checking for $ac_word... " >&6; } | |
14542 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
14543 | $as_echo_n "(cached) " >&6 | |
14544 | else | |
14545 | if test -n "$PTHREAD_CC"; then | |
14546 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
14547 | else | |
14548 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14549 | for as_dir in $PATH | |
14550 | do | |
14551 | IFS=$as_save_IFS | |
14552 | test -z "$as_dir" && as_dir=. | |
14553 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14554 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14555 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
14556 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14557 | break 2 | |
14558 | fi | |
14559 | done | |
14560 | done | |
14561 | IFS=$as_save_IFS | |
5e030278 | 14562 | |
5e030278 | 14563 | fi |
05ea2a05 TT |
14564 | fi |
14565 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
14566 | if test -n "$PTHREAD_CC"; then | |
14567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
14568 | $as_echo "$PTHREAD_CC" >&6; } | |
14569 | else | |
14570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14571 | $as_echo "no" >&6; } | |
14572 | fi | |
5e030278 | 14573 | |
5e030278 | 14574 | |
05ea2a05 TT |
14575 | test -n "$PTHREAD_CC" && break |
14576 | done | |
14577 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
14578 | ;; | |
14579 | esac ;; #( | |
14580 | *) : | |
14581 | ;; | |
5e030278 | 14582 | esac |
05ea2a05 TT |
14583 | ;; |
14584 | esac | |
14585 | fi | |
14586 | fi | |
5e030278 | 14587 | |
05ea2a05 | 14588 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
5e030278 | 14589 | |
5e030278 | 14590 | |
5e030278 | 14591 | |
5e030278 | 14592 | |
5e030278 | 14593 | |
05ea2a05 TT |
14594 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
14595 | if test "x$ax_pthread_ok" = "xyes"; then | |
14596 | threads=yes | |
14597 | : | |
5e030278 | 14598 | else |
05ea2a05 TT |
14599 | ax_pthread_ok=no |
14600 | threads=no | |
5e030278 | 14601 | fi |
05ea2a05 TT |
14602 | ac_ext=cpp |
14603 | ac_cpp='$CXXCPP $CPPFLAGS' | |
14604 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14605 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14606 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5e030278 | 14607 | |
5e030278 | 14608 | |
05ea2a05 TT |
14609 | if test "$threads" = "yes"; then |
14610 | save_LIBS="$LIBS" | |
14611 | LIBS="$PTHREAD_LIBS $LIBS" | |
14612 | save_CXXFLAGS="$CXXFLAGS" | |
14613 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
14614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
14615 | $as_echo_n "checking for std::thread... " >&6; } | |
14616 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
14617 | $as_echo_n "(cached) " >&6 | |
14618 | else | |
14619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14620 | /* end confdefs.h. */ |
05ea2a05 TT |
14621 | #include <thread> |
14622 | void callback() { } | |
14623 | int | |
14624 | main () | |
14625 | { | |
14626 | std::thread t(callback); | |
14627 | ; | |
14628 | return 0; | |
14629 | } | |
5e030278 | 14630 | _ACEOF |
05ea2a05 TT |
14631 | if ac_fn_cxx_try_compile "$LINENO"; then : |
14632 | gdb_cv_cxx_std_thread=yes | |
14633 | else | |
14634 | gdb_cv_cxx_std_thread=no | |
5e030278 | 14635 | fi |
05ea2a05 TT |
14636 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
14637 | fi | |
14638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
14639 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
5e030278 | 14640 | |
05ea2a05 TT |
14641 | # This check must be here, while LIBS includes any necessary |
14642 | # threading library. | |
14643 | for ac_func in pthread_sigmask pthread_setname_np | |
14644 | do : | |
14645 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14646 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14647 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
14648 | cat >>confdefs.h <<_ACEOF | |
14649 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14650 | _ACEOF | |
5e030278 TT |
14651 | |
14652 | fi | |
05ea2a05 | 14653 | done |
5e030278 | 14654 | |
5e030278 | 14655 | |
05ea2a05 TT |
14656 | LIBS="$save_LIBS" |
14657 | CXXFLAGS="$save_CXXFLAGS" | |
14658 | fi | |
14659 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
5e030278 | 14660 | |
05ea2a05 | 14661 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h |
5e030278 | 14662 | |
05ea2a05 TT |
14663 | fi |
14664 | ac_ext=c | |
14665 | ac_cpp='$CPP $CPPFLAGS' | |
14666 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14667 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14668 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5e030278 | 14669 | |
5e030278 | 14670 | |
05ea2a05 TT |
14671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
14672 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
14673 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
14674 | $as_echo_n "(cached) " >&6 | |
14675 | else | |
14676 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14677 | /* end confdefs.h. */ | |
b9442ec1 | 14678 | #include <setjmp.h> |
05ea2a05 TT |
14679 | int |
14680 | main () | |
14681 | { | |
b9442ec1 SM |
14682 | sigjmp_buf env; |
14683 | while (! sigsetjmp (env, 1)) | |
14684 | siglongjmp (env, 1); | |
14685 | ||
05ea2a05 TT |
14686 | ; |
14687 | return 0; | |
14688 | } | |
14689 | _ACEOF | |
14690 | if ac_fn_c_try_compile "$LINENO"; then : | |
14691 | gdb_cv_func_sigsetjmp=yes | |
14692 | else | |
14693 | gdb_cv_func_sigsetjmp=no | |
b9442ec1 | 14694 | |
05ea2a05 TT |
14695 | fi |
14696 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b9442ec1 | 14697 | |
05ea2a05 TT |
14698 | fi |
14699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
14700 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
14701 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 14702 | |
05ea2a05 | 14703 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 14704 | |
05ea2a05 TT |
14705 | fi |
14706 | ||
14707 | ||
14708 | # Check whether --with-intel_pt was given. | |
14709 | if test "${with_intel_pt+set}" = set; then : | |
14710 | withval=$with_intel_pt; | |
5e030278 | 14711 | else |
05ea2a05 | 14712 | with_intel_pt=auto |
5e030278 | 14713 | fi |
05ea2a05 TT |
14714 | |
14715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
14716 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
14717 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
14718 | $as_echo "$with_intel_pt" >&6; } | |
14719 | ||
14720 | if test "${with_intel_pt}" = no; then | |
14721 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
14722 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
14723 | HAVE_LIBIPT=no | |
14724 | else | |
14725 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14726 | /* end confdefs.h. */ |
5e030278 | 14727 | |
05ea2a05 TT |
14728 | #include <linux/perf_event.h> |
14729 | #ifndef PERF_ATTR_SIZE_VER5 | |
14730 | # error | |
14731 | #endif | |
5e030278 | 14732 | |
05ea2a05 TT |
14733 | _ACEOF |
14734 | if ac_fn_c_try_cpp "$LINENO"; then : | |
14735 | perf_event=yes | |
14736 | else | |
14737 | perf_event=no | |
5e030278 | 14738 | fi |
05ea2a05 TT |
14739 | rm -f conftest.err conftest.i conftest.$ac_ext |
14740 | if test "$perf_event" != yes; then | |
14741 | if test "$with_intel_pt" = yes; then | |
14742 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
14743 | else | |
14744 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
14745 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
14746 | fi | |
14747 | fi | |
5e030278 | 14748 | |
5e030278 | 14749 | |
5e030278 | 14750 | |
5e030278 | 14751 | |
5e030278 | 14752 | |
5e030278 | 14753 | |
5e030278 | 14754 | |
5e030278 | 14755 | |
5e030278 | 14756 | |
05ea2a05 | 14757 | use_additional=yes |
5e030278 | 14758 | |
05ea2a05 TT |
14759 | acl_save_prefix="$prefix" |
14760 | prefix="$acl_final_prefix" | |
14761 | acl_save_exec_prefix="$exec_prefix" | |
14762 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14763 | |
05ea2a05 TT |
14764 | eval additional_includedir=\"$includedir\" |
14765 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14766 | |
05ea2a05 TT |
14767 | exec_prefix="$acl_save_exec_prefix" |
14768 | prefix="$acl_save_prefix" | |
5e030278 | 14769 | |
5e030278 | 14770 | |
05ea2a05 TT |
14771 | # Check whether --with-libipt-prefix was given. |
14772 | if test "${with_libipt_prefix+set}" = set; then : | |
14773 | withval=$with_libipt_prefix; | |
14774 | if test "X$withval" = "Xno"; then | |
14775 | use_additional=no | |
14776 | else | |
14777 | if test "X$withval" = "X"; then | |
5e030278 | 14778 | |
05ea2a05 TT |
14779 | acl_save_prefix="$prefix" |
14780 | prefix="$acl_final_prefix" | |
14781 | acl_save_exec_prefix="$exec_prefix" | |
14782 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14783 | |
05ea2a05 TT |
14784 | eval additional_includedir=\"$includedir\" |
14785 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14786 | |
05ea2a05 TT |
14787 | exec_prefix="$acl_save_exec_prefix" |
14788 | prefix="$acl_save_prefix" | |
5e030278 | 14789 | |
05ea2a05 TT |
14790 | else |
14791 | additional_includedir="$withval/include" | |
14792 | additional_libdir="$withval/lib" | |
14793 | fi | |
14794 | fi | |
5e030278 TT |
14795 | |
14796 | fi | |
5e030278 | 14797 | |
9f1528a1 AB |
14798 | |
14799 | # Check whether --with-libipt-type was given. | |
14800 | if test "${with_libipt_type+set}" = set; then : | |
14801 | withval=$with_libipt_type; with_libipt_type=$withval | |
14802 | else | |
14803 | with_libipt_type=auto | |
14804 | fi | |
14805 | ||
14806 | lib_type=`eval echo \$with_libipt_type` | |
14807 | ||
05ea2a05 TT |
14808 | LIBIPT= |
14809 | LTLIBIPT= | |
14810 | INCIPT= | |
14811 | rpathdirs= | |
14812 | ltrpathdirs= | |
14813 | names_already_handled= | |
14814 | names_next_round='ipt ' | |
14815 | while test -n "$names_next_round"; do | |
14816 | names_this_round="$names_next_round" | |
14817 | names_next_round= | |
14818 | for name in $names_this_round; do | |
14819 | already_handled= | |
14820 | for n in $names_already_handled; do | |
14821 | if test "$n" = "$name"; then | |
14822 | already_handled=yes | |
14823 | break | |
14824 | fi | |
14825 | done | |
14826 | if test -z "$already_handled"; then | |
14827 | names_already_handled="$names_already_handled $name" | |
14828 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14829 | eval value=\"\$HAVE_LIB$uppername\" | |
14830 | if test -n "$value"; then | |
14831 | if test "$value" = yes; then | |
14832 | eval value=\"\$LIB$uppername\" | |
14833 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
14834 | eval value=\"\$LTLIB$uppername\" | |
14835 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
14836 | else | |
14837 | : | |
14838 | fi | |
14839 | else | |
14840 | found_dir= | |
14841 | found_la= | |
14842 | found_so= | |
14843 | found_a= | |
14844 | if test $use_additional = yes; then | |
9f1528a1 | 14845 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14846 | found_dir="$additional_libdir" |
14847 | found_so="$additional_libdir/lib$name.$shlibext" | |
14848 | if test -f "$additional_libdir/lib$name.la"; then | |
14849 | found_la="$additional_libdir/lib$name.la" | |
14850 | fi | |
9f1528a1 | 14851 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14852 | if test -f "$additional_libdir/lib$name.$libext"; then |
14853 | found_dir="$additional_libdir" | |
14854 | found_a="$additional_libdir/lib$name.$libext" | |
14855 | if test -f "$additional_libdir/lib$name.la"; then | |
14856 | found_la="$additional_libdir/lib$name.la" | |
14857 | fi | |
14858 | fi | |
14859 | fi | |
14860 | fi | |
14861 | if test "X$found_dir" = "X"; then | |
14862 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 14863 | |
05ea2a05 TT |
14864 | acl_save_prefix="$prefix" |
14865 | prefix="$acl_final_prefix" | |
14866 | acl_save_exec_prefix="$exec_prefix" | |
14867 | exec_prefix="$acl_final_exec_prefix" | |
14868 | eval x=\"$x\" | |
14869 | exec_prefix="$acl_save_exec_prefix" | |
14870 | prefix="$acl_save_prefix" | |
5e030278 | 14871 | |
05ea2a05 TT |
14872 | case "$x" in |
14873 | -L*) | |
14874 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 14875 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14876 | found_dir="$dir" |
14877 | found_so="$dir/lib$name.$shlibext" | |
14878 | if test -f "$dir/lib$name.la"; then | |
14879 | found_la="$dir/lib$name.la" | |
14880 | fi | |
9f1528a1 | 14881 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14882 | if test -f "$dir/lib$name.$libext"; then |
14883 | found_dir="$dir" | |
14884 | found_a="$dir/lib$name.$libext" | |
14885 | if test -f "$dir/lib$name.la"; then | |
14886 | found_la="$dir/lib$name.la" | |
14887 | fi | |
14888 | fi | |
14889 | fi | |
14890 | ;; | |
14891 | esac | |
14892 | if test "X$found_dir" != "X"; then | |
14893 | break | |
14894 | fi | |
14895 | done | |
14896 | fi | |
14897 | if test "X$found_dir" != "X"; then | |
14898 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
14899 | if test "X$found_so" != "X"; then | |
14900 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14901 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14902 | else | |
14903 | haveit= | |
14904 | for x in $ltrpathdirs; do | |
14905 | if test "X$x" = "X$found_dir"; then | |
14906 | haveit=yes | |
14907 | break | |
14908 | fi | |
14909 | done | |
14910 | if test -z "$haveit"; then | |
14911 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14912 | fi | |
14913 | if test "$hardcode_direct" = yes; then | |
14914 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14915 | else | |
14916 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14917 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14918 | haveit= | |
14919 | for x in $rpathdirs; do | |
14920 | if test "X$x" = "X$found_dir"; then | |
14921 | haveit=yes | |
14922 | break | |
14923 | fi | |
14924 | done | |
14925 | if test -z "$haveit"; then | |
14926 | rpathdirs="$rpathdirs $found_dir" | |
14927 | fi | |
14928 | else | |
14929 | haveit= | |
14930 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 14931 | |
05ea2a05 TT |
14932 | acl_save_prefix="$prefix" |
14933 | prefix="$acl_final_prefix" | |
14934 | acl_save_exec_prefix="$exec_prefix" | |
14935 | exec_prefix="$acl_final_exec_prefix" | |
14936 | eval x=\"$x\" | |
14937 | exec_prefix="$acl_save_exec_prefix" | |
14938 | prefix="$acl_save_prefix" | |
5e030278 | 14939 | |
05ea2a05 TT |
14940 | if test "X$x" = "X-L$found_dir"; then |
14941 | haveit=yes | |
14942 | break | |
14943 | fi | |
14944 | done | |
14945 | if test -z "$haveit"; then | |
14946 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
14947 | fi | |
14948 | if test "$hardcode_minus_L" != no; then | |
14949 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14950 | else | |
14951 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
14952 | fi | |
14953 | fi | |
14954 | fi | |
14955 | fi | |
14956 | else | |
14957 | if test "X$found_a" != "X"; then | |
14958 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
14959 | else | |
14960 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
14961 | fi | |
14962 | fi | |
14963 | additional_includedir= | |
14964 | case "$found_dir" in | |
14965 | */lib | */lib/) | |
14966 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14967 | additional_includedir="$basedir/include" | |
14968 | ;; | |
14969 | esac | |
14970 | if test "X$additional_includedir" != "X"; then | |
14971 | if test "X$additional_includedir" != "X/usr/include"; then | |
14972 | haveit= | |
14973 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14974 | if test -n "$GCC"; then | |
14975 | case $host_os in | |
14976 | linux*) haveit=yes;; | |
14977 | esac | |
14978 | fi | |
14979 | fi | |
14980 | if test -z "$haveit"; then | |
14981 | for x in $CPPFLAGS $INCIPT; do | |
5e030278 | 14982 | |
05ea2a05 TT |
14983 | acl_save_prefix="$prefix" |
14984 | prefix="$acl_final_prefix" | |
14985 | acl_save_exec_prefix="$exec_prefix" | |
14986 | exec_prefix="$acl_final_exec_prefix" | |
14987 | eval x=\"$x\" | |
14988 | exec_prefix="$acl_save_exec_prefix" | |
14989 | prefix="$acl_save_prefix" | |
5e030278 | 14990 | |
05ea2a05 TT |
14991 | if test "X$x" = "X-I$additional_includedir"; then |
14992 | haveit=yes | |
14993 | break | |
14994 | fi | |
14995 | done | |
14996 | if test -z "$haveit"; then | |
14997 | if test -d "$additional_includedir"; then | |
14998 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
14999 | fi | |
15000 | fi | |
15001 | fi | |
15002 | fi | |
15003 | fi | |
15004 | if test -n "$found_la"; then | |
15005 | save_libdir="$libdir" | |
15006 | case "$found_la" in | |
15007 | */* | *\\*) . "$found_la" ;; | |
15008 | *) . "./$found_la" ;; | |
15009 | esac | |
15010 | libdir="$save_libdir" | |
15011 | for dep in $dependency_libs; do | |
15012 | case "$dep" in | |
15013 | -L*) | |
15014 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
15015 | if test "X$additional_libdir" != "X/usr/lib"; then | |
15016 | haveit= | |
15017 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
15018 | if test -n "$GCC"; then | |
15019 | case $host_os in | |
15020 | linux*) haveit=yes;; | |
15021 | esac | |
15022 | fi | |
15023 | fi | |
15024 | if test -z "$haveit"; then | |
15025 | haveit= | |
15026 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 15027 | |
05ea2a05 TT |
15028 | acl_save_prefix="$prefix" |
15029 | prefix="$acl_final_prefix" | |
15030 | acl_save_exec_prefix="$exec_prefix" | |
15031 | exec_prefix="$acl_final_exec_prefix" | |
15032 | eval x=\"$x\" | |
15033 | exec_prefix="$acl_save_exec_prefix" | |
15034 | prefix="$acl_save_prefix" | |
5e030278 | 15035 | |
05ea2a05 TT |
15036 | if test "X$x" = "X-L$additional_libdir"; then |
15037 | haveit=yes | |
15038 | break | |
15039 | fi | |
15040 | done | |
15041 | if test -z "$haveit"; then | |
15042 | if test -d "$additional_libdir"; then | |
15043 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
15044 | fi | |
15045 | fi | |
15046 | haveit= | |
15047 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 15048 | |
05ea2a05 TT |
15049 | acl_save_prefix="$prefix" |
15050 | prefix="$acl_final_prefix" | |
15051 | acl_save_exec_prefix="$exec_prefix" | |
15052 | exec_prefix="$acl_final_exec_prefix" | |
15053 | eval x=\"$x\" | |
15054 | exec_prefix="$acl_save_exec_prefix" | |
15055 | prefix="$acl_save_prefix" | |
5e030278 | 15056 | |
05ea2a05 TT |
15057 | if test "X$x" = "X-L$additional_libdir"; then |
15058 | haveit=yes | |
15059 | break | |
15060 | fi | |
15061 | done | |
15062 | if test -z "$haveit"; then | |
15063 | if test -d "$additional_libdir"; then | |
15064 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
15065 | fi | |
15066 | fi | |
15067 | fi | |
15068 | fi | |
15069 | ;; | |
15070 | -R*) | |
15071 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
15072 | if test "$enable_rpath" != no; then | |
15073 | haveit= | |
15074 | for x in $rpathdirs; do | |
15075 | if test "X$x" = "X$dir"; then | |
15076 | haveit=yes | |
15077 | break | |
15078 | fi | |
15079 | done | |
15080 | if test -z "$haveit"; then | |
15081 | rpathdirs="$rpathdirs $dir" | |
15082 | fi | |
15083 | haveit= | |
15084 | for x in $ltrpathdirs; do | |
15085 | if test "X$x" = "X$dir"; then | |
15086 | haveit=yes | |
15087 | break | |
15088 | fi | |
15089 | done | |
15090 | if test -z "$haveit"; then | |
15091 | ltrpathdirs="$ltrpathdirs $dir" | |
15092 | fi | |
15093 | fi | |
15094 | ;; | |
15095 | -l*) | |
15096 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
15097 | ;; | |
15098 | *.la) | |
15099 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
15100 | ;; | |
15101 | *) | |
15102 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
15103 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
15104 | ;; | |
15105 | esac | |
15106 | done | |
15107 | fi | |
15108 | else | |
9f1528a1 AB |
15109 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
15110 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
15111 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
15112 | else | |
15113 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" | |
15114 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" | |
15115 | fi | |
05ea2a05 | 15116 | fi |
5e030278 | 15117 | fi |
05ea2a05 TT |
15118 | fi |
15119 | done | |
15120 | done | |
15121 | if test "X$rpathdirs" != "X"; then | |
15122 | if test -n "$hardcode_libdir_separator"; then | |
15123 | alldirs= | |
15124 | for found_dir in $rpathdirs; do | |
15125 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
15126 | done | |
15127 | acl_save_libdir="$libdir" | |
15128 | libdir="$alldirs" | |
15129 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15130 | libdir="$acl_save_libdir" | |
15131 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
15132 | else | |
15133 | for found_dir in $rpathdirs; do | |
15134 | acl_save_libdir="$libdir" | |
15135 | libdir="$found_dir" | |
15136 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15137 | libdir="$acl_save_libdir" | |
15138 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
15139 | done | |
15140 | fi | |
15141 | fi | |
15142 | if test "X$ltrpathdirs" != "X"; then | |
15143 | for found_dir in $ltrpathdirs; do | |
15144 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
15145 | done | |
15146 | fi | |
5e030278 TT |
15147 | |
15148 | ||
05ea2a05 | 15149 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 15150 | |
05ea2a05 TT |
15151 | for element in $INCIPT; do |
15152 | haveit= | |
15153 | for x in $CPPFLAGS; do | |
5e030278 | 15154 | |
05ea2a05 TT |
15155 | acl_save_prefix="$prefix" |
15156 | prefix="$acl_final_prefix" | |
15157 | acl_save_exec_prefix="$exec_prefix" | |
15158 | exec_prefix="$acl_final_exec_prefix" | |
15159 | eval x=\"$x\" | |
15160 | exec_prefix="$acl_save_exec_prefix" | |
15161 | prefix="$acl_save_prefix" | |
5e030278 | 15162 | |
05ea2a05 TT |
15163 | if test "X$x" = "X$element"; then |
15164 | haveit=yes | |
15165 | break | |
15166 | fi | |
15167 | done | |
15168 | if test -z "$haveit"; then | |
15169 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
15170 | fi | |
15171 | done | |
5e030278 TT |
15172 | |
15173 | ||
05ea2a05 TT |
15174 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 |
15175 | $as_echo_n "checking for libipt... " >&6; } | |
15176 | if ${ac_cv_libipt+:} false; then : | |
5e030278 TT |
15177 | $as_echo_n "(cached) " >&6 |
15178 | else | |
05ea2a05 TT |
15179 | |
15180 | ac_save_LIBS="$LIBS" | |
15181 | LIBS="$LIBS $LIBIPT" | |
15182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 15183 | /* end confdefs.h. */ |
05ea2a05 | 15184 | #include "intel-pt.h" |
5e030278 TT |
15185 | int |
15186 | main () | |
15187 | { | |
05ea2a05 | 15188 | pt_insn_alloc_decoder (0); |
5e030278 TT |
15189 | ; |
15190 | return 0; | |
15191 | } | |
15192 | _ACEOF | |
05ea2a05 TT |
15193 | if ac_fn_c_try_link "$LINENO"; then : |
15194 | ac_cv_libipt=yes | |
5e030278 | 15195 | else |
05ea2a05 | 15196 | ac_cv_libipt=no |
5e030278 | 15197 | fi |
05ea2a05 TT |
15198 | rm -f core conftest.err conftest.$ac_objext \ |
15199 | conftest$ac_exeext conftest.$ac_ext | |
15200 | LIBS="$ac_save_LIBS" | |
15201 | ||
5e030278 | 15202 | fi |
05ea2a05 TT |
15203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
15204 | $as_echo "$ac_cv_libipt" >&6; } | |
15205 | if test "$ac_cv_libipt" = yes; then | |
15206 | HAVE_LIBIPT=yes | |
21987b9c | 15207 | |
05ea2a05 TT |
15208 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
15209 | ||
15210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
15211 | $as_echo_n "checking how to link with libipt... " >&6; } | |
15212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
15213 | $as_echo "$LIBIPT" >&6; } | |
15214 | else | |
15215 | HAVE_LIBIPT=no | |
15216 | CPPFLAGS="$ac_save_CPPFLAGS" | |
15217 | LIBIPT= | |
15218 | LTLIBIPT= | |
15219 | fi | |
15220 | ||
15221 | ||
15222 | ||
15223 | ||
15224 | ||
15225 | ||
15226 | if test "$HAVE_LIBIPT" != yes; then | |
15227 | if test "$with_intel_pt" = yes; then | |
15228 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
15229 | else | |
15230 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
15231 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
15232 | fi | |
15233 | else | |
15234 | save_LIBS=$LIBS | |
15235 | LIBS="$LIBS $LIBIPT" | |
15236 | for ac_func in pt_insn_event | |
21987b9c | 15237 | do : |
05ea2a05 TT |
15238 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" |
15239 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
21987b9c | 15240 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 15241 | #define HAVE_PT_INSN_EVENT 1 |
21987b9c TT |
15242 | _ACEOF |
15243 | ||
15244 | fi | |
15245 | done | |
15246 | ||
05ea2a05 TT |
15247 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> |
15248 | " | |
15249 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
21987b9c | 15250 | |
05ea2a05 TT |
15251 | cat >>confdefs.h <<_ACEOF |
15252 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
15253 | _ACEOF | |
5e030278 | 15254 | |
5e030278 | 15255 | |
05ea2a05 TT |
15256 | fi |
15257 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
15258 | " | |
15259 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
15260 | ||
15261 | cat >>confdefs.h <<_ACEOF | |
15262 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
15263 | _ACEOF | |
5e030278 TT |
15264 | |
15265 | ||
05ea2a05 TT |
15266 | fi |
15267 | ||
15268 | LIBS=$save_LIBS | |
15269 | fi | |
15270 | fi | |
15271 | ||
c8693053 RO |
15272 | |
15273 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h | |
15274 | ||
15275 | for ac_header in sys/procfs.h | |
15276 | do : | |
15277 | ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default" | |
15278 | if test "x$ac_cv_header_sys_procfs_h" = xyes; then : | |
15279 | cat >>confdefs.h <<_ACEOF | |
15280 | #define HAVE_SYS_PROCFS_H 1 | |
15281 | _ACEOF | |
15282 | ||
15283 | fi | |
15284 | ||
15285 | done | |
15286 | ||
05ea2a05 | 15287 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
c8693053 RO |
15288 | |
15289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15290 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } |
15291 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
e9bcb658 GB |
15292 | $as_echo_n "(cached) " >&6 |
15293 | else | |
15294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15295 | /* end confdefs.h. */ | |
15296 | ||
05ea2a05 | 15297 | #define _SYSCALL32 |
05ea2a05 | 15298 | #include <sys/procfs.h> |
e9bcb658 GB |
15299 | int |
15300 | main () | |
15301 | { | |
05ea2a05 | 15302 | gregset_t avar |
e9bcb658 GB |
15303 | ; |
15304 | return 0; | |
15305 | } | |
15306 | _ACEOF | |
15307 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15308 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
e9bcb658 | 15309 | else |
05ea2a05 | 15310 | bfd_cv_have_sys_procfs_type_gregset_t=no |
54019719 PA |
15311 | |
15312 | fi | |
05ea2a05 | 15313 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
06825bd1 | 15314 | fi |
06825bd1 | 15315 | |
05ea2a05 | 15316 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
a3828db0 | 15317 | |
05ea2a05 | 15318 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
06825bd1 | 15319 | |
05ea2a05 TT |
15320 | fi |
15321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
15322 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
15323 | ||
c8693053 RO |
15324 | |
15325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15326 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } |
15327 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
81ecdfbb | 15328 | $as_echo_n "(cached) " >&6 |
bec39cab | 15329 | else |
81ecdfbb | 15330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15331 | /* end confdefs.h. */ |
05ea2a05 TT |
15332 | |
15333 | #define _SYSCALL32 | |
05ea2a05 | 15334 | #include <sys/procfs.h> |
bec39cab AC |
15335 | int |
15336 | main () | |
15337 | { | |
05ea2a05 | 15338 | fpregset_t avar |
064ef605 DJ |
15339 | ; |
15340 | return 0; | |
15341 | } | |
15342 | _ACEOF | |
9b30624b | 15343 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15344 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
15345 | else | |
15346 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
15347 | ||
15348 | fi | |
15349 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15350 | fi | |
15351 | ||
15352 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
15353 | ||
15354 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
15355 | ||
15356 | fi | |
15357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
15358 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
15359 | ||
c8693053 RO |
15360 | |
15361 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15362 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } |
15363 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
15364 | $as_echo_n "(cached) " >&6 | |
064ef605 | 15365 | else |
81ecdfbb | 15366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15367 | /* end confdefs.h. */ |
05ea2a05 TT |
15368 | |
15369 | #define _SYSCALL32 | |
05ea2a05 | 15370 | #include <sys/procfs.h> |
064ef605 DJ |
15371 | int |
15372 | main () | |
15373 | { | |
05ea2a05 | 15374 | prgregset_t avar |
bec39cab AC |
15375 | ; |
15376 | return 0; | |
15377 | } | |
15378 | _ACEOF | |
9b30624b | 15379 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15380 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
70f9f479 | 15381 | else |
05ea2a05 TT |
15382 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
15383 | ||
70f9f479 | 15384 | fi |
81ecdfbb | 15385 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 15386 | fi |
bec39cab | 15387 | |
05ea2a05 | 15388 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
70f9f479 | 15389 | |
05ea2a05 TT |
15390 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
15391 | ||
15392 | fi | |
15393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
15394 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
15395 | ||
c8693053 RO |
15396 | |
15397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15398 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } |
15399 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
81ecdfbb | 15400 | $as_echo_n "(cached) " >&6 |
bec39cab | 15401 | else |
81ecdfbb | 15402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15403 | /* end confdefs.h. */ |
05ea2a05 TT |
15404 | |
15405 | #define _SYSCALL32 | |
05ea2a05 | 15406 | #include <sys/procfs.h> |
064ef605 DJ |
15407 | int |
15408 | main () | |
15409 | { | |
05ea2a05 | 15410 | prfpregset_t avar |
064ef605 DJ |
15411 | ; |
15412 | return 0; | |
15413 | } | |
15414 | _ACEOF | |
9b30624b | 15415 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15416 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
064ef605 | 15417 | else |
05ea2a05 | 15418 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
064ef605 | 15419 | |
5c7f2947 | 15420 | fi |
81ecdfbb | 15421 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
05ea2a05 TT |
15422 | fi |
15423 | ||
15424 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
15425 | ||
15426 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h | |
15427 | ||
15428 | fi | |
15429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
15430 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
15431 | ||
c8693053 RO |
15432 | |
15433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15434 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } |
15435 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
15436 | $as_echo_n "(cached) " >&6 | |
15437 | else | |
15438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15439 | /* end confdefs.h. */ |
05ea2a05 TT |
15440 | |
15441 | #define _SYSCALL32 | |
05ea2a05 | 15442 | #include <sys/procfs.h> |
bec39cab AC |
15443 | int |
15444 | main () | |
15445 | { | |
05ea2a05 | 15446 | prgregset32_t avar |
bec39cab AC |
15447 | ; |
15448 | return 0; | |
15449 | } | |
15450 | _ACEOF | |
9b30624b | 15451 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15452 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
15453 | else | |
15454 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
a3828db0 | 15455 | |
064ef605 | 15456 | fi |
81ecdfbb | 15457 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 15458 | fi |
96d7229d | 15459 | |
05ea2a05 | 15460 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
78434e59 | 15461 | |
05ea2a05 | 15462 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
78434e59 | 15463 | |
05ea2a05 TT |
15464 | fi |
15465 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
15466 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
54019719 | 15467 | |
c8693053 RO |
15468 | |
15469 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15470 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } |
15471 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
81ecdfbb | 15472 | $as_echo_n "(cached) " >&6 |
bec39cab | 15473 | else |
81ecdfbb | 15474 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15475 | /* end confdefs.h. */ |
05ea2a05 TT |
15476 | |
15477 | #define _SYSCALL32 | |
05ea2a05 | 15478 | #include <sys/procfs.h> |
bec39cab AC |
15479 | int |
15480 | main () | |
15481 | { | |
05ea2a05 | 15482 | lwpid_t avar |
bec39cab AC |
15483 | ; |
15484 | return 0; | |
15485 | } | |
15486 | _ACEOF | |
05ea2a05 TT |
15487 | if ac_fn_c_try_compile "$LINENO"; then : |
15488 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
c906108c | 15489 | else |
05ea2a05 TT |
15490 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
15491 | ||
c906108c | 15492 | fi |
05ea2a05 | 15493 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15494 | fi |
81ecdfbb | 15495 | |
05ea2a05 | 15496 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
a3828db0 | 15497 | |
05ea2a05 | 15498 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
97bf5e38 | 15499 | |
05ea2a05 TT |
15500 | fi |
15501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
15502 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
a3828db0 | 15503 | |
c8693053 RO |
15504 | |
15505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15506 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } |
15507 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
81ecdfbb | 15508 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15509 | else |
81ecdfbb | 15510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15511 | /* end confdefs.h. */ |
a3828db0 | 15512 | |
05ea2a05 | 15513 | #define _SYSCALL32 |
05ea2a05 | 15514 | #include <sys/procfs.h> |
bec39cab AC |
15515 | int |
15516 | main () | |
15517 | { | |
05ea2a05 | 15518 | psaddr_t avar |
bec39cab AC |
15519 | ; |
15520 | return 0; | |
15521 | } | |
15522 | _ACEOF | |
81ecdfbb | 15523 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15524 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 15525 | else |
05ea2a05 TT |
15526 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
15527 | ||
c906108c | 15528 | fi |
81ecdfbb | 15529 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 15530 | fi |
c3f6f71d | 15531 | |
05ea2a05 | 15532 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
c906108c | 15533 | |
05ea2a05 | 15534 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
db1ff28b | 15535 | |
05ea2a05 TT |
15536 | fi |
15537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
15538 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
15539 | ||
c8693053 RO |
15540 | |
15541 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15542 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } |
15543 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
db1ff28b JK |
15544 | $as_echo_n "(cached) " >&6 |
15545 | else | |
15546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15547 | /* end confdefs.h. */ | |
05ea2a05 TT |
15548 | |
15549 | #define _SYSCALL32 | |
05ea2a05 | 15550 | #include <sys/procfs.h> |
db1ff28b JK |
15551 | int |
15552 | main () | |
15553 | { | |
05ea2a05 | 15554 | elf_fpregset_t avar |
db1ff28b JK |
15555 | ; |
15556 | return 0; | |
15557 | } | |
15558 | _ACEOF | |
15559 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15560 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
db1ff28b | 15561 | else |
05ea2a05 TT |
15562 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
15563 | ||
db1ff28b JK |
15564 | fi |
15565 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15566 | fi | |
db1ff28b | 15567 | |
05ea2a05 | 15568 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
db1ff28b | 15569 | |
05ea2a05 | 15570 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
db1ff28b | 15571 | |
05ea2a05 TT |
15572 | fi |
15573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
15574 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
db1ff28b | 15575 | |
05ea2a05 TT |
15576 | fi |
15577 | ||
15578 | ||
15579 | # Check the return and argument types of ptrace. | |
15580 | ||
15581 | ||
15582 | for ac_header in sys/ptrace.h ptrace.h | |
15583 | do : | |
15584 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
15585 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
15586 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
15587 | cat >>confdefs.h <<_ACEOF | |
15588 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
15589 | _ACEOF | |
db1ff28b JK |
15590 | |
15591 | fi | |
15592 | ||
05ea2a05 TT |
15593 | done |
15594 | ||
81ecdfbb | 15595 | |
05ea2a05 TT |
15596 | gdb_ptrace_headers=' |
15597 | #include <sys/types.h> | |
15598 | #if HAVE_SYS_PTRACE_H | |
15599 | # include <sys/ptrace.h> | |
15600 | #endif | |
15601 | #if HAVE_UNISTD_H | |
15602 | # include <unistd.h> | |
15603 | #endif | |
15604 | ' | |
5c45e068 | 15605 | |
05ea2a05 TT |
15606 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
15607 | # empty argument list, so check for that explicitly. | |
15608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
15609 | $as_echo_n "checking return type of ptrace... " >&6; } | |
15610 | if ${gdb_cv_func_ptrace_ret+:} false; then : | |
81ecdfbb | 15611 | $as_echo_n "(cached) " >&6 |
bec39cab | 15612 | else |
81ecdfbb | 15613 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15614 | /* end confdefs.h. */ |
5164c117 | 15615 | Â $gdb_ptrace_headers |
bec39cab AC |
15616 | int |
15617 | main () | |
15618 | { | |
05ea2a05 | 15619 | extern long ptrace (enum __ptrace_request, ...); |
5164c117 | 15620 | |
bec39cab AC |
15621 | ; |
15622 | return 0; | |
15623 | } | |
15624 | _ACEOF | |
81ecdfbb | 15625 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15626 | gdb_cv_func_ptrace_ret='long' |
bec39cab | 15627 | else |
81ecdfbb | 15628 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15629 | /* end confdefs.h. */ |
05ea2a05 | 15630 | $gdb_ptrace_headers |
bec39cab AC |
15631 | int |
15632 | main () | |
15633 | { | |
05ea2a05 | 15634 | extern int ptrace (); |
5164c117 | 15635 | |
bec39cab AC |
15636 | ; |
15637 | return 0; | |
15638 | } | |
15639 | _ACEOF | |
81ecdfbb | 15640 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15641 | gdb_cv_func_ptrace_ret='int' |
27ca5dad | 15642 | else |
05ea2a05 | 15643 | gdb_cv_func_ptrace_ret='long' |
b6fb30ed | 15644 | |
27ca5dad | 15645 | fi |
81ecdfbb | 15646 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15647 | |
27ca5dad | 15648 | fi |
05ea2a05 | 15649 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15650 | |
27ca5dad | 15651 | fi |
05ea2a05 TT |
15652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
15653 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
5c45e068 | 15654 | |
b6fb30ed | 15655 | |
5c45e068 | 15656 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 15657 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret |
bec39cab | 15658 | _ACEOF |
3862412b | 15659 | |
b6fb30ed | 15660 | |
05ea2a05 TT |
15661 | # Check argument types. |
15662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
15663 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
15664 | if ${gdb_cv_func_ptrace_args+:} false; then : | |
15665 | $as_echo_n "(cached) " >&6 | |
15666 | else | |
05ea2a05 TT |
15667 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15668 | /* end confdefs.h. */ | |
15669 | $gdb_ptrace_headers | |
15670 | int | |
15671 | main () | |
15672 | { | |
15673 | extern long ptrace (enum __ptrace_request, ...); | |
5164c117 | 15674 | |
05ea2a05 TT |
15675 | ; |
15676 | return 0; | |
15677 | } | |
bec39cab | 15678 | _ACEOF |
05ea2a05 TT |
15679 | if ac_fn_c_try_compile "$LINENO"; then : |
15680 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' | |
15681 | else | |
b6fb30ed SM |
15682 | for gdb_arg1 in 'int' 'long'; do |
15683 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
15684 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
15685 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
15686 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
15687 | /* end confdefs.h. */ |
15688 | $gdb_ptrace_headers | |
15689 | int | |
15690 | main () | |
15691 | { | |
b6fb30ed | 15692 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); |
5164c117 | 15693 | |
05ea2a05 TT |
15694 | ; |
15695 | return 0; | |
15696 | } | |
15697 | _ACEOF | |
15698 | if ac_fn_c_try_compile "$LINENO"; then : | |
15699 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | |
b6fb30ed SM |
15700 | break 4; |
15701 | ||
97bf5e38 | 15702 | fi |
05ea2a05 | 15703 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed SM |
15704 | |
15705 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
15706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
15707 | /* end confdefs.h. */ |
15708 | $gdb_ptrace_headers | |
15709 | int | |
15710 | main () | |
15711 | { | |
b6fb30ed | 15712 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); |
5164c117 | 15713 | |
05ea2a05 TT |
15714 | ; |
15715 | return 0; | |
15716 | } | |
6fea9e18 | 15717 | _ACEOF |
05ea2a05 | 15718 | if ac_fn_c_try_compile "$LINENO"; then : |
b6fb30ed SM |
15719 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
15720 | break 5; | |
6fea9e18 | 15721 | |
05ea2a05 TT |
15722 | fi |
15723 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed SM |
15724 | done |
15725 | done | |
15726 | done | |
15727 | done | |
15728 | done | |
15729 | # Provide a safe default value. | |
15730 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
6fea9e18 L |
15731 | |
15732 | fi | |
05ea2a05 | 15733 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15734 | |
05ea2a05 TT |
15735 | fi |
15736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
15737 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
b6fb30ed | 15738 | |
05ea2a05 TT |
15739 | ac_save_IFS=$IFS; IFS=',' |
15740 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
15741 | IFS=$ac_save_IFS | |
15742 | shift | |
6fea9e18 L |
15743 | |
15744 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15745 | #define PTRACE_TYPE_ARG1 $1 |
6fea9e18 L |
15746 | _ACEOF |
15747 | ||
15748 | ||
05ea2a05 TT |
15749 | cat >>confdefs.h <<_ACEOF |
15750 | #define PTRACE_TYPE_ARG3 $3 | |
bec39cab | 15751 | _ACEOF |
451928c5 | 15752 | |
60ca704f | 15753 | |
05ea2a05 TT |
15754 | cat >>confdefs.h <<_ACEOF |
15755 | #define PTRACE_TYPE_ARG4 $4 | |
15756 | _ACEOF | |
15757 | ||
15758 | if test -n "$5"; then | |
15759 | ||
15760 | cat >>confdefs.h <<_ACEOF | |
15761 | #define PTRACE_TYPE_ARG5 $5 | |
15762 | _ACEOF | |
451928c5 | 15763 | |
97bf5e38 | 15764 | fi |
451928c5 | 15765 | |
05ea2a05 TT |
15766 | |
15767 | if test "$cross_compiling" = no; then | |
15768 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15769 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15770 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15771 | $as_echo_n "(cached) " >&6 |
05ea2a05 TT |
15772 | else |
15773 | if test "$cross_compiling" = yes; then : | |
15774 | as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
451928c5 | 15775 | else |
81ecdfbb | 15776 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15777 | /* end confdefs.h. */ |
05ea2a05 | 15778 | $ac_includes_default |
bec39cab AC |
15779 | int |
15780 | main () | |
15781 | { | |
05ea2a05 TT |
15782 | /* If this system has a BSD-style setpgrp which takes arguments, |
15783 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
15784 | exit successfully. */ | |
15785 | return setpgrp (1,1) != -1; | |
bec39cab AC |
15786 | ; |
15787 | return 0; | |
15788 | } | |
15789 | _ACEOF | |
05ea2a05 TT |
15790 | if ac_fn_c_try_run "$LINENO"; then : |
15791 | ac_cv_func_setpgrp_void=no | |
451928c5 | 15792 | else |
05ea2a05 | 15793 | ac_cv_func_setpgrp_void=yes |
451928c5 | 15794 | fi |
05ea2a05 TT |
15795 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15796 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
451928c5 AC |
15797 | fi |
15798 | ||
05ea2a05 TT |
15799 | fi |
15800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 | |
15801 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15802 | if test $ac_cv_func_setpgrp_void = yes; then | |
60ca704f | 15803 | |
05ea2a05 | 15804 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
451928c5 | 15805 | |
97bf5e38 | 15806 | fi |
451928c5 | 15807 | |
05ea2a05 TT |
15808 | else |
15809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15810 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15811 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15812 | $as_echo_n "(cached) " >&6 |
3862412b | 15813 | else |
81ecdfbb | 15814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15815 | /* end confdefs.h. */ |
05ea2a05 | 15816 | #include <unistd.h> |
bec39cab AC |
15817 | int |
15818 | main () | |
15819 | { | |
5593a99a SM |
15820 | if (setpgrp(1,1) == -1) |
15821 | exit (0); | |
15822 | else | |
15823 | exit (1); | |
05ea2a05 | 15824 | |
bec39cab AC |
15825 | ; |
15826 | return 0; | |
15827 | } | |
15828 | _ACEOF | |
81ecdfbb | 15829 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15830 | ac_cv_func_setpgrp_void=no |
3862412b | 15831 | else |
05ea2a05 | 15832 | ac_cv_func_setpgrp_void=yes |
5593a99a | 15833 | |
3862412b | 15834 | fi |
81ecdfbb | 15835 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15836 | |
3862412b | 15837 | fi |
05ea2a05 TT |
15838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
15839 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15840 | if test "$ac_cv_func_setpgrp_void" = yes; then | |
15841 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h | |
3862412b | 15842 | |
05ea2a05 | 15843 | fi |
97bf5e38 | 15844 | fi |
3862412b | 15845 | |
05ea2a05 TT |
15846 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
15847 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
15848 | #include <sys/proc.h> | |
6e9567fe | 15849 | |
e6cdd38e | 15850 | " |
05ea2a05 | 15851 | if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : |
e6cdd38e JB |
15852 | |
15853 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15854 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
e6cdd38e JB |
15855 | _ACEOF |
15856 | ||
15857 | ||
15858 | fi | |
15859 | ||
6e9567fe | 15860 | |
05ea2a05 TT |
15861 | # See if <sys/lwp.h> defines `struct lwp`. |
15862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 | |
15863 | $as_echo_n "checking for struct lwp... " >&6; } | |
15864 | if ${gdb_cv_struct_lwp+:} false; then : | |
81ecdfbb | 15865 | $as_echo_n "(cached) " >&6 |
596c9d4b | 15866 | else |
81ecdfbb | 15867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15868 | /* end confdefs.h. */ |
05ea2a05 | 15869 | #include <sys/param.h> |
5593a99a SM |
15870 | #define _KMEMUSER |
15871 | #include <sys/lwp.h> | |
bec39cab AC |
15872 | int |
15873 | main () | |
15874 | { | |
05ea2a05 | 15875 | struct lwp l; |
5593a99a | 15876 | |
bec39cab AC |
15877 | ; |
15878 | return 0; | |
15879 | } | |
15880 | _ACEOF | |
81ecdfbb | 15881 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15882 | gdb_cv_struct_lwp=yes |
596c9d4b | 15883 | else |
05ea2a05 | 15884 | gdb_cv_struct_lwp=no |
5593a99a | 15885 | |
596c9d4b | 15886 | fi |
81ecdfbb | 15887 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15888 | |
596c9d4b | 15889 | fi |
05ea2a05 TT |
15890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
15891 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
15892 | if test "$gdb_cv_struct_lwp" = yes; then | |
596c9d4b | 15893 | |
05ea2a05 | 15894 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
596c9d4b | 15895 | |
05ea2a05 | 15896 | fi |
451928c5 | 15897 | |
05ea2a05 TT |
15898 | # See if <machine/reg.h> degines `struct reg'. |
15899 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 | |
15900 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
15901 | if ${gdb_cv_struct_reg+:} false; then : | |
81ecdfbb | 15902 | $as_echo_n "(cached) " >&6 |
d84dd0c5 | 15903 | else |
81ecdfbb | 15904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15905 | /* end confdefs.h. */ |
05ea2a05 | 15906 | #include <sys/types.h> |
5593a99a | 15907 | #include <machine/reg.h> |
bec39cab AC |
15908 | int |
15909 | main () | |
15910 | { | |
05ea2a05 | 15911 | struct reg r; |
5593a99a | 15912 | |
bec39cab AC |
15913 | ; |
15914 | return 0; | |
15915 | } | |
15916 | _ACEOF | |
81ecdfbb | 15917 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15918 | gdb_cv_struct_reg=yes |
d84dd0c5 | 15919 | else |
05ea2a05 | 15920 | gdb_cv_struct_reg=no |
5593a99a | 15921 | |
d84dd0c5 | 15922 | fi |
81ecdfbb | 15923 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15924 | |
d84dd0c5 | 15925 | fi |
05ea2a05 TT |
15926 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
15927 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
15928 | if test "$gdb_cv_struct_reg" = yes; then | |
d84dd0c5 | 15929 | |
05ea2a05 | 15930 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
bec39cab | 15931 | |
05ea2a05 | 15932 | fi |
d84dd0c5 | 15933 | |
05ea2a05 TT |
15934 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
15935 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
15936 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> | |
15937 | #include <machine/reg.h> | |
15938 | " | |
15939 | if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : | |
d84dd0c5 | 15940 | |
05ea2a05 TT |
15941 | cat >>confdefs.h <<_ACEOF |
15942 | #define HAVE_STRUCT_REG_R_FS 1 | |
15943 | _ACEOF | |
15944 | ||
15945 | ||
15946 | fi | |
15947 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> | |
15948 | #include <machine/reg.h> | |
15949 | " | |
15950 | if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : | |
15951 | ||
15952 | cat >>confdefs.h <<_ACEOF | |
15953 | #define HAVE_STRUCT_REG_R_GS 1 | |
15954 | _ACEOF | |
15955 | ||
15956 | ||
15957 | fi | |
15958 | ||
15959 | ||
05ea2a05 TT |
15960 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
15961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 | |
15962 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
15963 | if ${gdb_cv_have_ptrace_getregs+:} false; then : | |
81ecdfbb | 15964 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15965 | else |
81ecdfbb | 15966 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15967 | /* end confdefs.h. */ |
05ea2a05 | 15968 | #include <sys/ptrace.h> |
bec39cab AC |
15969 | int |
15970 | main () | |
15971 | { | |
05ea2a05 | 15972 | PTRACE_GETREGS; |
bec39cab AC |
15973 | ; |
15974 | return 0; | |
15975 | } | |
15976 | _ACEOF | |
81ecdfbb | 15977 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15978 | gdb_cv_have_ptrace_getregs=yes |
d45fe813 | 15979 | else |
05ea2a05 | 15980 | gdb_cv_have_ptrace_getregs=no |
5593a99a | 15981 | |
d45fe813 | 15982 | fi |
81ecdfbb | 15983 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15984 | |
d45fe813 KB |
15985 | fi |
15986 | ||
05ea2a05 TT |
15987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
15988 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
15989 | if test "$gdb_cv_have_ptrace_getregs" = yes; then | |
bec39cab | 15990 | |
05ea2a05 | 15991 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
d45fe813 | 15992 | |
05ea2a05 | 15993 | fi |
d45fe813 | 15994 | |
05ea2a05 TT |
15995 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
15996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 | |
15997 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
15998 | if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : | |
81ecdfbb | 15999 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16000 | else |
81ecdfbb | 16001 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16002 | /* end confdefs.h. */ |
05ea2a05 | 16003 | #include <sys/ptrace.h> |
bec39cab AC |
16004 | int |
16005 | main () | |
16006 | { | |
05ea2a05 | 16007 | PTRACE_GETFPXREGS; |
bec39cab AC |
16008 | ; |
16009 | return 0; | |
16010 | } | |
16011 | _ACEOF | |
81ecdfbb | 16012 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16013 | gdb_cv_have_ptrace_getfpxregs=yes |
d45fe813 | 16014 | else |
05ea2a05 | 16015 | gdb_cv_have_ptrace_getfpxregs=no |
5593a99a | 16016 | |
d45fe813 | 16017 | fi |
81ecdfbb | 16018 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16019 | |
d45fe813 KB |
16020 | fi |
16021 | ||
05ea2a05 TT |
16022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
16023 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
16024 | if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then | |
bec39cab | 16025 | |
05ea2a05 | 16026 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
d45fe813 | 16027 | |
05ea2a05 | 16028 | fi |
d45fe813 | 16029 | |
05ea2a05 TT |
16030 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
16031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 | |
16032 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
16033 | if ${gdb_cv_have_pt_getdbregs+:} false; then : | |
81ecdfbb | 16034 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16035 | else |
81ecdfbb | 16036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16037 | /* end confdefs.h. */ |
05ea2a05 | 16038 | #include <sys/types.h> |
5593a99a | 16039 | #include <sys/ptrace.h> |
bec39cab AC |
16040 | int |
16041 | main () | |
16042 | { | |
05ea2a05 | 16043 | PT_GETDBREGS; |
5593a99a | 16044 | |
bec39cab AC |
16045 | ; |
16046 | return 0; | |
16047 | } | |
16048 | _ACEOF | |
81ecdfbb | 16049 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16050 | gdb_cv_have_pt_getdbregs=yes |
d45fe813 | 16051 | else |
05ea2a05 | 16052 | gdb_cv_have_pt_getdbregs=no |
5593a99a | 16053 | |
d45fe813 | 16054 | fi |
81ecdfbb | 16055 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16056 | |
d45fe813 KB |
16057 | fi |
16058 | ||
05ea2a05 TT |
16059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
16060 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
16061 | if test "$gdb_cv_have_pt_getdbregs" = yes; then | |
bec39cab | 16062 | |
05ea2a05 | 16063 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
d45fe813 | 16064 | |
05ea2a05 | 16065 | fi |
c906108c | 16066 | |
05ea2a05 TT |
16067 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
16068 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 | |
16069 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
16070 | if ${gdb_cv_have_pt_getxmmregs+:} false; then : | |
81ecdfbb | 16071 | $as_echo_n "(cached) " >&6 |
c906108c | 16072 | else |
81ecdfbb | 16073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16074 | /* end confdefs.h. */ |
05ea2a05 | 16075 | #include <sys/types.h> |
5593a99a | 16076 | #include <sys/ptrace.h> |
bec39cab AC |
16077 | int |
16078 | main () | |
16079 | { | |
05ea2a05 | 16080 | PT_GETXMMREGS; |
5593a99a | 16081 | |
bec39cab AC |
16082 | ; |
16083 | return 0; | |
16084 | } | |
16085 | _ACEOF | |
81ecdfbb | 16086 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16087 | gdb_cv_have_pt_getxmmregs=yes |
c906108c | 16088 | else |
05ea2a05 | 16089 | gdb_cv_have_pt_getxmmregs=no |
5593a99a | 16090 | |
c906108c | 16091 | fi |
81ecdfbb | 16092 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16093 | |
c906108c SS |
16094 | fi |
16095 | ||
05ea2a05 TT |
16096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
16097 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
16098 | if test "$gdb_cv_have_pt_getxmmregs" = yes; then | |
bec39cab | 16099 | |
05ea2a05 | 16100 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
c906108c | 16101 | |
05ea2a05 | 16102 | fi |
c906108c | 16103 | |
05ea2a05 TT |
16104 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
16105 | # Older FreeBSD versions don't have the pl_tdname member of | |
16106 | # `struct ptrace_lwpinfo'. | |
16107 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
16108 | " | |
16109 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : | |
43b7e92b | 16110 | |
05ea2a05 TT |
16111 | cat >>confdefs.h <<_ACEOF |
16112 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
43b7e92b | 16113 | _ACEOF |
43b7e92b | 16114 | |
05ea2a05 | 16115 | |
43b7e92b GB |
16116 | fi |
16117 | ||
43b7e92b | 16118 | |
05ea2a05 TT |
16119 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
16120 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
16121 | # FreeBSD 10.3. | |
16122 | 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> | |
16123 | " | |
16124 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : | |
16125 | ||
16126 | cat >>confdefs.h <<_ACEOF | |
16127 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
16128 | _ACEOF | |
43b7e92b | 16129 | |
43b7e92b | 16130 | |
c906108c | 16131 | fi |
c906108c | 16132 | |
05ea2a05 | 16133 | |
bc8bcb4b | 16134 | # Check if the compiler supports the `long long' type. |
c906108c | 16135 | |
81ecdfbb RW |
16136 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
16137 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
d0ac1c44 | 16138 | if ${gdb_cv_c_long_long+:} false; then : |
81ecdfbb | 16139 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16140 | else |
81ecdfbb | 16141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16142 | /* end confdefs.h. */ |
bc8bcb4b | 16143 | extern long long foo; |
bec39cab AC |
16144 | int |
16145 | main () | |
16146 | { | |
bc8bcb4b | 16147 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
16148 | ; |
16149 | return 0; | |
16150 | } | |
16151 | _ACEOF | |
81ecdfbb | 16152 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
16153 | gdb_cv_c_long_long=yes |
16154 | else | |
81ecdfbb | 16155 | gdb_cv_c_long_long=no |
97bf5e38 | 16156 | fi |
81ecdfbb | 16157 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16158 | fi |
81ecdfbb RW |
16159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
16160 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
0ad6b8ee | 16161 | if test "$gdb_cv_c_long_long" != yes; then |
74a0d9f6 | 16162 | # libdecnumber requires long long. |
d0ac1c44 | 16163 | as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 |
97bf5e38 MK |
16164 | fi |
16165 | ||
bc8bcb4b | 16166 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 16167 | |
81ecdfbb RW |
16168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
16169 | $as_echo_n "checking for long long support in printf... " >&6; } | |
d0ac1c44 | 16170 | if ${gdb_cv_printf_has_long_long+:} false; then : |
81ecdfbb | 16171 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16172 | else |
81ecdfbb | 16173 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16174 | gdb_cv_printf_has_long_long=no |
16175 | else | |
81ecdfbb | 16176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16177 | /* end confdefs.h. */ |
bc8bcb4b MK |
16178 | $ac_includes_default |
16179 | int | |
16180 | main () | |
16181 | { | |
16182 | char buf[32]; | |
97bf5e38 MK |
16183 | long long l = 0; |
16184 | l = (l << 16) + 0x0123; | |
16185 | l = (l << 16) + 0x4567; | |
16186 | l = (l << 16) + 0x89ab; | |
16187 | l = (l << 16) + 0xcdef; | |
16188 | sprintf (buf, "0x%016llx", l); | |
16189 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
16190 | ; |
16191 | return 0; | |
c906108c | 16192 | } |
bec39cab | 16193 | _ACEOF |
81ecdfbb | 16194 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
16195 | gdb_cv_printf_has_long_long=yes |
16196 | else | |
81ecdfbb | 16197 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 16198 | fi |
81ecdfbb RW |
16199 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16200 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 16201 | fi |
81ecdfbb | 16202 | |
97bf5e38 | 16203 | fi |
81ecdfbb RW |
16204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
16205 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
0ad6b8ee | 16206 | if test "$gdb_cv_printf_has_long_long" = yes; then |
bc8bcb4b | 16207 | |
81ecdfbb | 16208 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
16209 | |
16210 | fi | |
97bf5e38 | 16211 | |
1a619819 LM |
16212 | # Check if the compiler and runtime support printing decfloats. |
16213 | ||
81ecdfbb RW |
16214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
16215 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
d0ac1c44 | 16216 | if ${gdb_cv_printf_has_decfloat+:} false; then : |
81ecdfbb | 16217 | $as_echo_n "(cached) " >&6 |
1a619819 | 16218 | else |
81ecdfbb | 16219 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
16220 | gdb_cv_printf_has_decfloat=no |
16221 | else | |
81ecdfbb | 16222 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
16223 | /* end confdefs.h. */ |
16224 | $ac_includes_default | |
16225 | int | |
16226 | main () | |
16227 | { | |
16228 | char buf[64]; | |
16229 | _Decimal32 d32 = 1.2345df; | |
16230 | _Decimal64 d64 = 1.2345dd; | |
16231 | _Decimal128 d128 = 1.2345dl; | |
16232 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
16233 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
16234 | ; | |
16235 | return 0; | |
16236 | } | |
16237 | _ACEOF | |
81ecdfbb | 16238 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
16239 | gdb_cv_printf_has_decfloat=yes |
16240 | else | |
81ecdfbb | 16241 | gdb_cv_printf_has_decfloat=no |
1a619819 | 16242 | fi |
81ecdfbb RW |
16243 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16244 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 16245 | fi |
81ecdfbb | 16246 | |
1a619819 | 16247 | fi |
81ecdfbb RW |
16248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
16249 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
0ad6b8ee | 16250 | if test "$gdb_cv_printf_has_decfloat" = yes; then |
1a619819 | 16251 | |
81ecdfbb | 16252 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
16253 | |
16254 | fi | |
16255 | ||
bc8bcb4b MK |
16256 | # Check if the compiler supports the `long double' type. We can't use |
16257 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
16258 | # constants defined in <float.h> that fail on some systems, | |
16259 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 16260 | |
81ecdfbb RW |
16261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
16262 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
d0ac1c44 | 16263 | if ${gdb_cv_c_long_double+:} false; then : |
81ecdfbb | 16264 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16265 | else |
81ecdfbb | 16266 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16267 | /* end confdefs.h. */ |
97bf5e38 | 16268 | long double foo; |
bec39cab | 16269 | _ACEOF |
81ecdfbb | 16270 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 16271 | gdb_cv_c_long_double=yes |
97bf5e38 | 16272 | else |
81ecdfbb | 16273 | gdb_cv_c_long_double=no |
97bf5e38 | 16274 | fi |
81ecdfbb | 16275 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16276 | fi |
81ecdfbb RW |
16277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
16278 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
0ad6b8ee | 16279 | if test "$gdb_cv_c_long_double" = yes; then |
c906108c | 16280 | |
81ecdfbb | 16281 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16282 | |
16283 | fi | |
16284 | ||
bc8bcb4b | 16285 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 16286 | |
81ecdfbb RW |
16287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
16288 | $as_echo_n "checking for long double support in printf... " >&6; } | |
d0ac1c44 | 16289 | if ${gdb_cv_printf_has_long_double+:} false; then : |
81ecdfbb | 16290 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16291 | else |
81ecdfbb | 16292 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16293 | gdb_cv_printf_has_long_double=no |
16294 | else | |
81ecdfbb | 16295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16296 | /* end confdefs.h. */ |
bc8bcb4b MK |
16297 | $ac_includes_default |
16298 | int | |
16299 | main () | |
16300 | { | |
16301 | char buf[16]; | |
97bf5e38 MK |
16302 | long double f = 3.141592653; |
16303 | sprintf (buf, "%Lg", f); | |
16304 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
16305 | ; |
16306 | return 0; | |
97bf5e38 | 16307 | } |
bec39cab | 16308 | _ACEOF |
81ecdfbb | 16309 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 16310 | gdb_cv_printf_has_long_double=yes |
c906108c | 16311 | else |
81ecdfbb | 16312 | gdb_cv_printf_has_long_double=no |
c906108c | 16313 | fi |
81ecdfbb RW |
16314 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16315 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 16316 | fi |
81ecdfbb | 16317 | |
c906108c | 16318 | fi |
81ecdfbb RW |
16319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
16320 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
0ad6b8ee | 16321 | if test "$gdb_cv_printf_has_long_double" = yes; then |
bc8bcb4b | 16322 | |
81ecdfbb | 16323 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16324 | |
16325 | fi | |
97bf5e38 | 16326 | |
bc8bcb4b | 16327 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 16328 | |
81ecdfbb RW |
16329 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
16330 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
d0ac1c44 | 16331 | if ${gdb_cv_scanf_has_long_double+:} false; then : |
81ecdfbb | 16332 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16333 | else |
81ecdfbb | 16334 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16335 | gdb_cv_scanf_has_long_double=no |
16336 | else | |
81ecdfbb | 16337 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16338 | /* end confdefs.h. */ |
bc8bcb4b MK |
16339 | #include <stdio.h> |
16340 | int | |
16341 | main () | |
16342 | { | |
16343 | char *buf = "3.141592653"; | |
97bf5e38 MK |
16344 | long double f = 0; |
16345 | sscanf (buf, "%Lg", &f); | |
16346 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
16347 | ; |
16348 | return 0; | |
97bf5e38 | 16349 | } |
bec39cab | 16350 | _ACEOF |
81ecdfbb | 16351 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
16352 | gdb_cv_scanf_has_long_double=yes |
16353 | else | |
81ecdfbb | 16354 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 16355 | fi |
81ecdfbb RW |
16356 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16357 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 16358 | fi |
81ecdfbb | 16359 | |
c906108c | 16360 | fi |
81ecdfbb RW |
16361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
16362 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
0ad6b8ee | 16363 | if test "$gdb_cv_scanf_has_long_double" = yes; then |
bc8bcb4b | 16364 | |
81ecdfbb | 16365 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16366 | |
16367 | fi | |
c906108c | 16368 | |
438013df AO |
16369 | case ${host_os} in |
16370 | aix*) | |
81ecdfbb RW |
16371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
16372 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d0ac1c44 | 16373 | if ${gdb_cv_bigtoc+:} false; then : |
81ecdfbb | 16374 | $as_echo_n "(cached) " >&6 |
438013df | 16375 | else |
5593a99a | 16376 | SAVE_LDFLAGS=$LDFLAGS |
bec39cab | 16377 | |
5593a99a SM |
16378 | case $GCC in |
16379 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
16380 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
16381 | esac | |
438013df | 16382 | |
5593a99a SM |
16383 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
16384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16385 | /* end confdefs.h. */ |
438013df | 16386 | |
bec39cab AC |
16387 | int |
16388 | main () | |
16389 | { | |
438013df | 16390 | int i; |
bec39cab AC |
16391 | ; |
16392 | return 0; | |
16393 | } | |
16394 | _ACEOF | |
81ecdfbb | 16395 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16396 | |
81ecdfbb RW |
16397 | else |
16398 | gdb_cv_bigtoc= | |
5593a99a | 16399 | |
438013df | 16400 | fi |
81ecdfbb RW |
16401 | rm -f core conftest.err conftest.$ac_objext \ |
16402 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 16403 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 16404 | |
bec39cab | 16405 | fi |
81ecdfbb RW |
16406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
16407 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
16408 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
16409 | ;; | |
16410 | esac | |
16411 | ||
38f6b338 | 16412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 16413 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
16414 | dynamic_list=false |
16415 | if test "${gdb_native}" = yes; then | |
16416 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
16417 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
16418 | # may not be supported there. | |
16419 | old_LDFLAGS="$LDFLAGS" | |
16420 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
16421 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
16422 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
16423 | if test "${have_libpython}" = no; then | |
16424 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
16425 | /* end confdefs.h. */ |
16426 | ||
16427 | int | |
16428 | main () | |
16429 | { | |
16430 | ||
16431 | ; | |
16432 | return 0; | |
16433 | } | |
16434 | _ACEOF | |
16435 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
16436 | dynamic_list=true |
16437 | fi | |
16438 | rm -f core conftest.err conftest.$ac_objext \ | |
16439 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
16440 | else |
16441 | # Workaround http://bugs.python.org/issue4434 where static | |
16442 | # libpythonX.Y.a would get its symbols required for | |
16443 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
16444 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
16445 | |
16446 | # Note the workaround for Python | |
16447 | # http://bugs.python.org/issue10112 earlier has removed | |
16448 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
16449 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
16450 | # always pass. | |
38f6b338 JK |
16451 | old_CFLAGS="$CFLAGS" |
16452 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
16453 | old_LIBS="$LIBS" |
16454 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
16455 | old_CPPFLAGS="$CPPFLAGS" |
16456 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 16457 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 16458 | true |
f6528abd | 16459 | else |
3bebe2f2 JK |
16460 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16461 | /* end confdefs.h. */ | |
1b4f615e | 16462 | #include "Python.h" |
3bebe2f2 JK |
16463 | int |
16464 | main () | |
16465 | { | |
16466 | int err; | |
38f6b338 | 16467 | Py_Initialize (); |
3fed4c0b | 16468 | err = PyRun_SimpleString ("import ctypes\n"); |
38f6b338 JK |
16469 | Py_Finalize (); |
16470 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
16471 | ; |
16472 | return 0; | |
16473 | } | |
16474 | _ACEOF | |
16475 | if ac_fn_c_try_run "$LINENO"; then : | |
16476 | dynamic_list=true | |
16477 | fi | |
16478 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16479 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16480 | fi | |
16481 | ||
8c1fb155 | 16482 | LIBS="$old_LIBS" |
38f6b338 | 16483 | CFLAGS="$old_CFLAGS" |
1b4f615e | 16484 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
16485 | fi |
16486 | LDFLAGS="$old_LDFLAGS" | |
16487 | fi | |
16488 | if $dynamic_list; then | |
16489 | found="-Wl,--dynamic-list" | |
16490 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 16491 | else |
38f6b338 JK |
16492 | found="-rdynamic" |
16493 | RDYNAMIC="-rdynamic" | |
f6528abd | 16494 | fi |
f6528abd | 16495 | |
38f6b338 | 16496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 16497 | $as_echo "$found" >&6; } |
0407b3f1 | 16498 | |
f6528abd | 16499 | |
0ad6b8ee | 16500 | if test "${build}" = "${host}" -a "${host}" = "${target}" ; then |
c906108c | 16501 | case ${host_os} in |
d92419e5 | 16502 | aix*) |
81ecdfbb RW |
16503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
16504 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
d0ac1c44 | 16505 | if ${gdb_cv_have_aix_thread_debug+:} false; then : |
81ecdfbb | 16506 | $as_echo_n "(cached) " >&6 |
bec39cab | 16507 | else |
81ecdfbb | 16508 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16509 | /* end confdefs.h. */ |
d92419e5 | 16510 | #include <sys/pthdebug.h> |
bec39cab AC |
16511 | int |
16512 | main () | |
16513 | { | |
d92419e5 | 16514 | #ifndef PTHDB_VERSION_3 |
5593a99a SM |
16515 | #error |
16516 | #endif | |
16517 | ||
bec39cab AC |
16518 | ; |
16519 | return 0; | |
16520 | } | |
16521 | _ACEOF | |
81ecdfbb | 16522 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
16523 | gdb_cv_have_aix_thread_debug=yes |
16524 | else | |
81ecdfbb | 16525 | gdb_cv_have_aix_thread_debug=no |
5593a99a | 16526 | |
d92419e5 | 16527 | fi |
81ecdfbb | 16528 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16529 | |
d92419e5 JB |
16530 | fi |
16531 | ||
81ecdfbb RW |
16532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
16533 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
0ad6b8ee | 16534 | if test "$gdb_cv_have_aix_thread_debug" = yes; then |
d92419e5 | 16535 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" |
3483b318 | 16536 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 16537 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
16538 | |
16539 | # Older versions of AIX do not provide the declaration for | |
16540 | # the getthrds function (it appears that it was introduced | |
16541 | # with AIX 6.x). | |
16542 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
16543 | " | |
d0ac1c44 | 16544 | if test "x$ac_cv_have_decl_getthrds" = xyes; then : |
d645e32e JB |
16545 | ac_have_decl=1 |
16546 | else | |
16547 | ac_have_decl=0 | |
16548 | fi | |
16549 | ||
16550 | cat >>confdefs.h <<_ACEOF | |
16551 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
16552 | _ACEOF | |
16553 | ||
d92419e5 JB |
16554 | fi |
16555 | ;; | |
c906108c | 16556 | esac |
bec39cab | 16557 | |
c906108c SS |
16558 | fi |
16559 | ||
3f47be5c | 16560 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
5593a99a | 16561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
81ecdfbb | 16562 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } |
d0ac1c44 | 16563 | if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : |
81ecdfbb | 16564 | $as_echo_n "(cached) " >&6 |
bec39cab | 16565 | else |
81ecdfbb | 16566 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16567 | /* end confdefs.h. */ |
3f47be5c | 16568 | #include <thread_db.h> |
bec39cab AC |
16569 | int |
16570 | main () | |
16571 | { | |
3f47be5c | 16572 | int i = TD_NOTALLOC; |
5593a99a | 16573 | |
bec39cab AC |
16574 | ; |
16575 | return 0; | |
16576 | } | |
16577 | _ACEOF | |
81ecdfbb | 16578 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
16579 | gdb_cv_thread_db_h_has_td_notalloc=yes |
16580 | else | |
81ecdfbb | 16581 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 16582 | |
3f47be5c | 16583 | fi |
81ecdfbb | 16584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 16585 | |
bec39cab | 16586 | fi |
81ecdfbb RW |
16587 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
16588 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
5593a99a SM |
16589 | |
16590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
81ecdfbb | 16591 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } |
d0ac1c44 | 16592 | if ${gdb_cv_thread_db_h_has_td_version+:} false; then : |
81ecdfbb | 16593 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16594 | else |
81ecdfbb | 16595 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16596 | /* end confdefs.h. */ |
16597 | #include <thread_db.h> | |
16598 | int | |
16599 | main () | |
16600 | { | |
16601 | int i = TD_VERSION; | |
5593a99a | 16602 | |
59f80f10 DJ |
16603 | ; |
16604 | return 0; | |
16605 | } | |
16606 | _ACEOF | |
81ecdfbb | 16607 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16608 | gdb_cv_thread_db_h_has_td_version=yes |
16609 | else | |
81ecdfbb | 16610 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
16611 | |
16612 | fi | |
81ecdfbb | 16613 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16614 | |
16615 | fi | |
81ecdfbb RW |
16616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
16617 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
5593a99a SM |
16618 | |
16619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
81ecdfbb | 16620 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } |
d0ac1c44 | 16621 | if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : |
81ecdfbb | 16622 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16623 | else |
81ecdfbb | 16624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16625 | /* end confdefs.h. */ |
16626 | #include <thread_db.h> | |
16627 | int | |
16628 | main () | |
16629 | { | |
16630 | int i = TD_NOTLS; | |
5593a99a | 16631 | |
59f80f10 DJ |
16632 | ; |
16633 | return 0; | |
16634 | } | |
16635 | _ACEOF | |
81ecdfbb | 16636 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16637 | gdb_cv_thread_db_h_has_td_notls=yes |
16638 | else | |
81ecdfbb | 16639 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
16640 | |
16641 | fi | |
81ecdfbb | 16642 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16643 | |
16644 | fi | |
81ecdfbb RW |
16645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
16646 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
16647 | fi |
16648 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 16649 | |
81ecdfbb | 16650 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 16651 | |
59f80f10 DJ |
16652 | fi |
16653 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
16654 | ||
81ecdfbb | 16655 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
16656 | |
16657 | fi | |
16658 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
16659 | ||
81ecdfbb | 16660 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 16661 | |
3f47be5c EZ |
16662 | fi |
16663 | ||
e655c1a2 PA |
16664 | case $host_os in |
16665 | go32* | *djgpp*) | |
16666 | gdbinit=gdb.ini | |
16667 | ;; | |
16668 | *) | |
16669 | gdbinit=.gdbinit | |
16670 | ;; | |
16671 | esac | |
16672 | ||
16673 | cat >>confdefs.h <<_ACEOF | |
16674 | #define GDBINIT "$gdbinit" | |
16675 | _ACEOF | |
16676 | ||
16677 | ||
fb40c209 | 16678 | |
92e4e97a AB |
16679 | cat >>confdefs.h <<_ACEOF |
16680 | #define GDBEARLYINIT ".gdbearlyinit" | |
16681 | _ACEOF | |
16682 | ||
16683 | ||
16684 | ||
f83d8a90 DE |
16685 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
16686 | # except that the argument to --with-sysroot is optional. | |
16687 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
16688 | if test "x$with_sysroot" = xyes; then | |
16689 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
16690 | fi | |
bec39cab | 16691 | |
81ecdfbb RW |
16692 | # Check whether --with-sysroot was given. |
16693 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
16694 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
16695 | else | |
16696 | TARGET_SYSTEM_ROOT= | |
16697 | fi | |
030292b7 | 16698 | |
030292b7 | 16699 | |
f83d8a90 DE |
16700 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
16701 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16702 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
16703 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 16704 | |
f83d8a90 DE |
16705 | cat >>confdefs.h <<_ACEOF |
16706 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
16707 | _ACEOF | |
bec39cab | 16708 | |
030292b7 | 16709 | |
b14b1491 | 16710 | |
f83d8a90 DE |
16711 | |
16712 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16713 | if test "x$prefix" = xNONE; then | |
16714 | test_prefix=/usr/local | |
16715 | else | |
16716 | test_prefix=$prefix | |
16717 | fi | |
16718 | else | |
16719 | test_prefix=$exec_prefix | |
16720 | fi | |
16721 | value=0 | |
16722 | case ${ac_define_dir} in | |
16723 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16724 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16725 | value=1 | |
16726 | ;; | |
16727 | esac | |
16728 | ||
16729 | cat >>confdefs.h <<_ACEOF | |
16730 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
16731 | _ACEOF | |
030292b7 DJ |
16732 | |
16733 | ||
16734 | ||
16e7150e | 16735 | |
16e7150e | 16736 | |
81ecdfbb RW |
16737 | # Check whether --with-system-gdbinit was given. |
16738 | if test "${with_system_gdbinit+set}" = set; then : | |
16739 | withval=$with_system_gdbinit; | |
b14b1491 TT |
16740 | SYSTEM_GDBINIT=$withval |
16741 | else | |
16742 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
16743 | fi |
16744 | ||
16e7150e JG |
16745 | |
16746 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16747 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 16748 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
16749 | ac_define_dir=`eval echo $ac_define_dir` |
16750 | ||
16751 | cat >>confdefs.h <<_ACEOF | |
16752 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
16753 | _ACEOF | |
16754 | ||
16755 | ||
16756 | ||
0c4a4063 | 16757 | |
b14b1491 TT |
16758 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
16759 | if test "x$prefix" = xNONE; then | |
16760 | test_prefix=/usr/local | |
16761 | else | |
16762 | test_prefix=$prefix | |
16763 | fi | |
16764 | else | |
16765 | test_prefix=$exec_prefix | |
16766 | fi | |
16767 | value=0 | |
16768 | case ${ac_define_dir} in | |
16769 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16770 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16771 | value=1 | |
16772 | ;; | |
16773 | esac | |
16e7150e | 16774 | |
b14b1491 TT |
16775 | cat >>confdefs.h <<_ACEOF |
16776 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
16777 | _ACEOF |
16778 | ||
b14b1491 | 16779 | |
16e7150e | 16780 | |
0c4a4063 | 16781 | |
b835bb52 | 16782 | |
ed2a2229 CB |
16783 | # Check whether --with-system-gdbinit-dir was given. |
16784 | if test "${with_system_gdbinit_dir+set}" = set; then : | |
16785 | withval=$with_system_gdbinit_dir; | |
16786 | SYSTEM_GDBINIT_DIR=$withval | |
16787 | else | |
16788 | SYSTEM_GDBINIT_DIR= | |
16789 | fi | |
16790 | ||
16791 | ||
16792 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16793 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16794 | ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR` | |
16795 | ac_define_dir=`eval echo $ac_define_dir` | |
16796 | ||
16797 | cat >>confdefs.h <<_ACEOF | |
16798 | #define SYSTEM_GDBINIT_DIR "$ac_define_dir" | |
16799 | _ACEOF | |
16800 | ||
16801 | ||
16802 | ||
16803 | ||
16804 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16805 | if test "x$prefix" = xNONE; then | |
16806 | test_prefix=/usr/local | |
16807 | else | |
16808 | test_prefix=$prefix | |
16809 | fi | |
16810 | else | |
16811 | test_prefix=$exec_prefix | |
16812 | fi | |
16813 | value=0 | |
16814 | case ${ac_define_dir} in | |
16815 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16816 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16817 | value=1 | |
16818 | ;; | |
16819 | esac | |
16820 | ||
16821 | cat >>confdefs.h <<_ACEOF | |
16822 | #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value | |
16823 | _ACEOF | |
16824 | ||
16825 | ||
16826 | ||
16827 | ||
16828 | ||
81ecdfbb RW |
16829 | # Check whether --enable-werror was given. |
16830 | if test "${enable_werror+set}" = set; then : | |
16831 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
16832 | yes | y) ERROR_ON_WARNING="yes" ;; |
16833 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 16834 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 16835 | esac |
81ecdfbb RW |
16836 | fi |
16837 | ||
094a342e | 16838 | |
9a084706 PA |
16839 | # Enable -Werror by default when using gcc. Turn it off for releases. |
16840 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
16841 | ERROR_ON_WARNING=yes |
16842 | fi | |
16843 | ||
16844 | WERROR_CFLAGS="" | |
16845 | if test "${ERROR_ON_WARNING}" = yes ; then | |
16846 | WERROR_CFLAGS="-Werror" | |
16847 | fi | |
16848 | ||
cf6de44d | 16849 | # The options we'll try to enable. |
aac331e4 | 16850 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 16851 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
aac331e4 | 16852 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 16853 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 16854 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
7f8a5d38 | 16855 | -Wno-mismatched-tags \ |
632e107b | 16856 | -Wno-error=deprecated-register \ |
85e26832 | 16857 | -Wsuggest-override \ |
1a34f210 | 16858 | -Wimplicit-fallthrough=3 \ |
96643e35 | 16859 | -Wduplicated-cond \ |
33a6bc35 TT |
16860 | -Wshadow=local \ |
16861 | -Wdeprecated-copy \ | |
16862 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 16863 | -Wredundant-move \ |
8ddd8e0e | 16864 | -Wmissing-declarations \ |
a0761e34 | 16865 | -Wmissing-prototypes \ |
898e7f60 SM |
16866 | -Wstrict-null-sentinel \ |
16867 | " | |
3bc3d82a | 16868 | |
3526781e | 16869 | case "${host}" in |
4fa7574e RO |
16870 | *-*-mingw32*) |
16871 | # Enable -Wno-format by default when using gcc on mingw since many | |
16872 | # GCC versions complain about %I64. | |
16873 | build_warnings="$build_warnings -Wno-format" ;; | |
16874 | *-*-solaris*) | |
16875 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
16876 | # doesn't understand. | |
16877 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
16878 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
16879 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
16880 | *) |
16881 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
16882 | # but there's a special case for this below. | |
16883 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
3526781e DJ |
16884 | esac |
16885 | ||
81ecdfbb RW |
16886 | # Check whether --enable-build-warnings was given. |
16887 | if test "${enable_build_warnings+set}" = set; then : | |
16888 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
16889 | yes) ;; |
16890 | no) build_warnings="-w";; | |
16891 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16892 | build_warnings="${build_warnings} ${t}";; | |
16893 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16894 | build_warnings="${t} ${build_warnings}";; | |
16895 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16896 | esac | |
d4f3574e | 16897 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 16898 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 16899 | fi |
81ecdfbb RW |
16900 | fi |
16901 | # Check whether --enable-gdb-build-warnings was given. | |
16902 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
16903 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
16904 | yes) ;; |
16905 | no) build_warnings="-w";; | |
16906 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16907 | build_warnings="${build_warnings} ${t}";; | |
16908 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16909 | build_warnings="${t} ${build_warnings}";; | |
16910 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16911 | esac | |
16912 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
16913 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
16914 | fi | |
81ecdfbb | 16915 | fi |
3bc3d82a PA |
16916 | |
16917 | # The set of warnings supported by a C++ compiler is not the same as | |
16918 | # of the C compiler. | |
cf6de44d | 16919 | ac_ext=cpp |
3bc3d82a PA |
16920 | ac_cpp='$CXXCPP $CPPFLAGS' |
16921 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16922 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16923 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
16924 | ||
3bc3d82a | 16925 | |
81ecdfbb | 16926 | WARN_CFLAGS="" |
c906108c SS |
16927 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
16928 | then | |
81ecdfbb RW |
16929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
16930 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
16931 | # Separate out the -Werror flag as some files just cannot be |
16932 | # compiled with it enabled. | |
16933 | for w in ${build_warnings}; do | |
7544db95 PA |
16934 | # GCC does not complain about -Wno-unknown-warning. Invert |
16935 | # and test -Wunknown-warning instead. | |
16936 | case $w in | |
16937 | -Wno-*) | |
16938 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
16939 | -Wformat-nonliteral) |
16940 | # gcc requires -Wformat before -Wformat-nonliteral | |
16941 | # will work, so stick them together. | |
16942 | w="-Wformat $w" | |
16943 | wtest="$w" | |
16944 | ;; | |
7544db95 PA |
16945 | *) |
16946 | wtest=$w ;; | |
16947 | esac | |
16948 | ||
746a987d AC |
16949 | case $w in |
16950 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
16951 | *) |
16952 | # Check whether GCC accepts it. | |
4536bbc6 | 16953 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 16954 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 16955 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 16956 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
16957 | if test "x$w" = "x-Wunused-variable"; then |
16958 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
16959 | # fixed in GCC 4.9. This test is derived from the gdb | |
16960 | # source code that triggered this bug in GCC. | |
16961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16962 | /* end confdefs.h. */ | |
16963 | struct scoped_restore_base {}; | |
864ca435 SM |
16964 | struct scoped_restore_tmpl : public scoped_restore_base { |
16965 | ~scoped_restore_tmpl() {} | |
16966 | }; | |
a0de763e TT |
16967 | int |
16968 | main () | |
16969 | { | |
16970 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
864ca435 | 16971 | |
a0de763e TT |
16972 | ; |
16973 | return 0; | |
16974 | } | |
16975 | _ACEOF | |
16976 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
16977 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
16978 | fi | |
16979 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16980 | else | |
16981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16982 | /* end confdefs.h. */ |
4536bbc6 | 16983 | |
bec39cab AC |
16984 | int |
16985 | main () | |
16986 | { | |
4536bbc6 | 16987 | |
bec39cab AC |
16988 | ; |
16989 | return 0; | |
16990 | } | |
16991 | _ACEOF | |
3bc3d82a | 16992 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 16993 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 16994 | fi |
81ecdfbb | 16995 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a0de763e | 16996 | fi |
4536bbc6 | 16997 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 16998 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
16999 | esac |
17000 | done | |
81ecdfbb RW |
17001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
17002 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
17003 | fi |
17004 | ||
17005 | ||
104c1213 | 17006 | |
cf6de44d | 17007 | ac_ext=c |
3bc3d82a PA |
17008 | ac_cpp='$CPP $CPPFLAGS' |
17009 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17010 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17011 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17012 | ||
3bc3d82a | 17013 | |
b835bb52 | 17014 | |
f35d5ade TT |
17015 | # Check whether --enable-ubsan was given. |
17016 | if test "${enable_ubsan+set}" = set; then : | |
17017 | enableval=$enable_ubsan; | |
17018 | else | |
eff98030 | 17019 | enable_ubsan=no |
f35d5ade TT |
17020 | fi |
17021 | ||
17022 | if test "x$enable_ubsan" = xauto; then | |
17023 | if $development; then | |
17024 | enable_ubsan=yes | |
17025 | fi | |
17026 | fi | |
17027 | ac_ext=cpp | |
17028 | ac_cpp='$CXXCPP $CPPFLAGS' | |
17029 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17030 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17031 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17032 | ||
17033 | if test "x$enable_ubsan" = xyes; then | |
17034 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5 | |
17035 | $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; } | |
17036 | saved_CXXFLAGS="$CXXFLAGS" | |
17037 | CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
17038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17039 | /* end confdefs.h. */ | |
17040 | ||
17041 | int | |
17042 | main () | |
17043 | { | |
17044 | ||
17045 | ; | |
17046 | return 0; | |
17047 | } | |
17048 | _ACEOF | |
17049 | if ac_fn_cxx_try_link "$LINENO"; then : | |
17050 | enable_ubsan=yes | |
17051 | else | |
17052 | enable_ubsan=no | |
ad6dba1c | 17053 | |
f35d5ade TT |
17054 | fi |
17055 | rm -f core conftest.err conftest.$ac_objext \ | |
17056 | conftest$ac_exeext conftest.$ac_ext | |
17057 | CXXFLAGS="$saved_CXXFLAGS" | |
17058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 | |
17059 | $as_echo "$enable_ubsan" >&6; } | |
17060 | if test "x$enable_ubsan" = xyes; then | |
17061 | WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
17062 | CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined" | |
17063 | fi | |
17064 | fi | |
17065 | ac_ext=c | |
17066 | ac_cpp='$CPP $CPPFLAGS' | |
17067 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17068 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17069 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17070 | ||
17071 | ||
17072 | ||
7a292a7a | 17073 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
17074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
17075 | $as_echo_n "checking for cygwin... " >&6; } | |
d0ac1c44 | 17076 | if ${gdb_cv_os_cygwin+:} false; then : |
81ecdfbb | 17077 | $as_echo_n "(cached) " >&6 |
bec39cab | 17078 | else |
81ecdfbb | 17079 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 17080 | /* end confdefs.h. */ |
7a292a7a SS |
17081 | |
17082 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
17083 | lose | |
17084 | #endif | |
bec39cab | 17085 | _ACEOF |
7a292a7a | 17086 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 17087 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
17088 | gdb_cv_os_cygwin=yes |
17089 | else | |
7a292a7a SS |
17090 | gdb_cv_os_cygwin=no |
17091 | fi | |
17092 | rm -f conftest* | |
17093 | ||
17094 | fi | |
81ecdfbb RW |
17095 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
17096 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 17097 | |
aff38e61 | 17098 | |
3eb25fda | 17099 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 17100 | case ${host} in |
95cbc983 AC |
17101 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
17102 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 17103 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
c1168a2f | 17104 | *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;; |
aff38e61 AC |
17105 | esac |
17106 | ||
17107 | ||
cd0fc7c3 SS |
17108 | # libreadline needs libuser32.a in a cygwin environment |
17109 | WIN32LIBS= | |
0ad6b8ee | 17110 | if test x"$gdb_cv_os_cygwin" = xyes; then |
c5394b80 JM |
17111 | WIN32LIBS="-luser32" |
17112 | case "${target}" in | |
17113 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
17114 | ;; | |
17115 | esac | |
cd0fc7c3 | 17116 | fi |
c906108c | 17117 | |
b4505029 | 17118 | # The ser-tcp.c module requires sockets. |
b2ceabe8 TT |
17119 | # Note that WIN32APILIBS is set by GDB_AC_COMMON. |
17120 | WIN32LIBS="$WIN32LIBS $WIN32APILIBS" | |
7a292a7a | 17121 | |
31d99776 | 17122 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
17123 | |
17124 | OLD_CFLAGS=$CFLAGS | |
17125 | OLD_LDFLAGS=$LDFLAGS | |
17126 | OLD_LIBS=$LIBS | |
17127 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
17128 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
17129 | # always want our bfd. | |
17130 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
17131 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
17132 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 17133 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 17134 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 17135 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb | 17136 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
d0ac1c44 | 17137 | if ${gdb_cv_var_elf+:} false; then : |
81ecdfbb | 17138 | $as_echo_n "(cached) " >&6 |
31d99776 | 17139 | else |
81ecdfbb | 17140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
17141 | /* end confdefs.h. */ |
17142 | #include <stdlib.h> | |
b4132322 | 17143 | #include <string.h> |
294f2697 SM |
17144 | #include "bfd.h" |
17145 | #include "elf-bfd.h" | |
31d99776 DJ |
17146 | int |
17147 | main () | |
17148 | { | |
def63ff0 | 17149 | return bfd_get_elf_phdr_upper_bound (NULL); |
294f2697 | 17150 | |
31d99776 DJ |
17151 | ; |
17152 | return 0; | |
17153 | } | |
17154 | _ACEOF | |
81ecdfbb | 17155 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
17156 | gdb_cv_var_elf=yes |
17157 | else | |
81ecdfbb | 17158 | gdb_cv_var_elf=no |
294f2697 | 17159 | |
31d99776 | 17160 | fi |
81ecdfbb RW |
17161 | rm -f core conftest.err conftest.$ac_objext \ |
17162 | conftest$ac_exeext conftest.$ac_ext | |
294f2697 | 17163 | |
31d99776 | 17164 | fi |
81ecdfbb RW |
17165 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
17166 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
17167 | CFLAGS=$OLD_CFLAGS |
17168 | LDFLAGS=$OLD_LDFLAGS | |
17169 | LIBS=$OLD_LIBS | |
0ad6b8ee | 17170 | if test "$gdb_cv_var_elf" = yes; then |
fb8f3fc0 AB |
17171 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \ |
17172 | gcore-elf.o elf-none-tdep.o" | |
31d99776 | 17173 | |
81ecdfbb | 17174 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 17175 | |
075ff26d JK |
17176 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
17177 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
17178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
17179 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 17180 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17181 | $as_echo_n "(cached) " >&6 |
17182 | else | |
17183 | ac_func_search_save_LIBS=$LIBS | |
17184 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17185 | /* end confdefs.h. */ | |
17186 | ||
17187 | /* Override any GCC internal prototype to avoid an error. | |
17188 | Use char because int might match the return type of a GCC | |
17189 | builtin and then its argument prototype would still apply. */ | |
17190 | #ifdef __cplusplus | |
17191 | extern "C" | |
17192 | #endif | |
17193 | char dlopen (); | |
17194 | int | |
17195 | main () | |
17196 | { | |
17197 | return dlopen (); | |
17198 | ; | |
17199 | return 0; | |
17200 | } | |
17201 | _ACEOF | |
17202 | for ac_lib in '' dl; do | |
17203 | if test -z "$ac_lib"; then | |
17204 | ac_res="none required" | |
17205 | else | |
17206 | ac_res=-l$ac_lib | |
17207 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
17208 | fi | |
17209 | if ac_fn_c_try_link "$LINENO"; then : | |
17210 | ac_cv_search_dlopen=$ac_res | |
17211 | fi | |
17212 | rm -f core conftest.err conftest.$ac_objext \ | |
17213 | conftest$ac_exeext | |
d0ac1c44 | 17214 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17215 | break |
17216 | fi | |
17217 | done | |
d0ac1c44 | 17218 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17219 | |
17220 | else | |
17221 | ac_cv_search_dlopen=no | |
17222 | fi | |
17223 | rm conftest.$ac_ext | |
17224 | LIBS=$ac_func_search_save_LIBS | |
17225 | fi | |
17226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
17227 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
17228 | ac_res=$ac_cv_search_dlopen | |
17229 | if test "$ac_res" != no; then : | |
17230 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
17231 | ||
17232 | fi | |
17233 | ||
075ff26d | 17234 | fi |
31d99776 | 17235 | fi |
31d99776 | 17236 | |
4f05add4 TT |
17237 | # Add macho support to GDB, but only if BFD includes it. |
17238 | ||
17239 | OLD_CFLAGS=$CFLAGS | |
17240 | OLD_LDFLAGS=$LDFLAGS | |
17241 | OLD_LIBS=$LIBS | |
17242 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
17243 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
17244 | # always want our bfd. | |
17245 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
17246 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
17247 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 17248 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 17249 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
17250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
17251 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
d0ac1c44 | 17252 | if ${gdb_cv_var_macho+:} false; then : |
4f05add4 TT |
17253 | $as_echo_n "(cached) " >&6 |
17254 | else | |
17255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17256 | /* end confdefs.h. */ | |
17257 | #include <stdlib.h> | |
b4132322 | 17258 | #include <string.h> |
294f2697 SM |
17259 | #include "bfd.h" |
17260 | #include "mach-o.h" | |
4f05add4 TT |
17261 | int |
17262 | main () | |
17263 | { | |
17264 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
294f2697 | 17265 | |
4f05add4 TT |
17266 | ; |
17267 | return 0; | |
17268 | } | |
17269 | _ACEOF | |
17270 | if ac_fn_c_try_link "$LINENO"; then : | |
17271 | gdb_cv_var_macho=yes | |
17272 | else | |
17273 | gdb_cv_var_macho=no | |
294f2697 | 17274 | |
4f05add4 TT |
17275 | fi |
17276 | rm -f core conftest.err conftest.$ac_objext \ | |
17277 | conftest$ac_exeext conftest.$ac_ext | |
294f2697 | 17278 | |
4f05add4 TT |
17279 | fi |
17280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
17281 | $as_echo "$gdb_cv_var_macho" >&6; } | |
17282 | CFLAGS=$OLD_CFLAGS | |
17283 | LDFLAGS=$OLD_LDFLAGS | |
17284 | LIBS=$OLD_LIBS | |
0ad6b8ee | 17285 | if test "$gdb_cv_var_macho" = yes; then |
4f05add4 TT |
17286 | CONFIG_OBS="$CONFIG_OBS machoread.o" |
17287 | fi | |
17288 | ||
121ce6e5 DJ |
17289 | # Add any host-specific objects to GDB. |
17290 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
17291 | ||
608e2dbb | 17292 | # If building on ELF, look for lzma support for embedded compressed debug info. |
0ad6b8ee | 17293 | if test "$gdb_cv_var_elf" = yes; then |
608e2dbb TT |
17294 | |
17295 | # Check whether --with-lzma was given. | |
17296 | if test "${with_lzma+set}" = set; then : | |
17297 | withval=$with_lzma; | |
17298 | else | |
17299 | with_lzma=auto | |
17300 | fi | |
17301 | ||
17302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
17303 | $as_echo_n "checking whether to use lzma... " >&6; } | |
17304 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
17305 | $as_echo "$with_lzma" >&6; } | |
17306 | ||
17307 | if test "${with_lzma}" != no; then | |
17308 | ||
17309 | ||
17310 | ||
17311 | ||
17312 | ||
17313 | ||
17314 | ||
17315 | ||
17316 | use_additional=yes | |
17317 | ||
17318 | acl_save_prefix="$prefix" | |
17319 | prefix="$acl_final_prefix" | |
17320 | acl_save_exec_prefix="$exec_prefix" | |
17321 | exec_prefix="$acl_final_exec_prefix" | |
17322 | ||
17323 | eval additional_includedir=\"$includedir\" | |
17324 | eval additional_libdir=\"$libdir\" | |
17325 | ||
17326 | exec_prefix="$acl_save_exec_prefix" | |
17327 | prefix="$acl_save_prefix" | |
17328 | ||
17329 | ||
17330 | # Check whether --with-liblzma-prefix was given. | |
17331 | if test "${with_liblzma_prefix+set}" = set; then : | |
17332 | withval=$with_liblzma_prefix; | |
17333 | if test "X$withval" = "Xno"; then | |
17334 | use_additional=no | |
17335 | else | |
17336 | if test "X$withval" = "X"; then | |
17337 | ||
17338 | acl_save_prefix="$prefix" | |
17339 | prefix="$acl_final_prefix" | |
17340 | acl_save_exec_prefix="$exec_prefix" | |
17341 | exec_prefix="$acl_final_exec_prefix" | |
17342 | ||
17343 | eval additional_includedir=\"$includedir\" | |
17344 | eval additional_libdir=\"$libdir\" | |
17345 | ||
17346 | exec_prefix="$acl_save_exec_prefix" | |
17347 | prefix="$acl_save_prefix" | |
17348 | ||
17349 | else | |
17350 | additional_includedir="$withval/include" | |
17351 | additional_libdir="$withval/lib" | |
17352 | fi | |
17353 | fi | |
17354 | ||
17355 | fi | |
17356 | ||
9f1528a1 AB |
17357 | |
17358 | # Check whether --with-liblzma-type was given. | |
17359 | if test "${with_liblzma_type+set}" = set; then : | |
17360 | withval=$with_liblzma_type; with_liblzma_type=$withval | |
17361 | else | |
17362 | with_liblzma_type=auto | |
17363 | fi | |
17364 | ||
17365 | lib_type=`eval echo \$with_liblzma_type` | |
17366 | ||
608e2dbb TT |
17367 | LIBLZMA= |
17368 | LTLIBLZMA= | |
17369 | INCLZMA= | |
17370 | rpathdirs= | |
17371 | ltrpathdirs= | |
17372 | names_already_handled= | |
17373 | names_next_round='lzma ' | |
17374 | while test -n "$names_next_round"; do | |
17375 | names_this_round="$names_next_round" | |
17376 | names_next_round= | |
17377 | for name in $names_this_round; do | |
17378 | already_handled= | |
17379 | for n in $names_already_handled; do | |
17380 | if test "$n" = "$name"; then | |
17381 | already_handled=yes | |
17382 | break | |
17383 | fi | |
17384 | done | |
17385 | if test -z "$already_handled"; then | |
17386 | names_already_handled="$names_already_handled $name" | |
17387 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17388 | eval value=\"\$HAVE_LIB$uppername\" | |
17389 | if test -n "$value"; then | |
17390 | if test "$value" = yes; then | |
17391 | eval value=\"\$LIB$uppername\" | |
17392 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
17393 | eval value=\"\$LTLIB$uppername\" | |
17394 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
17395 | else | |
17396 | : | |
17397 | fi | |
17398 | else | |
17399 | found_dir= | |
17400 | found_la= | |
17401 | found_so= | |
17402 | found_a= | |
17403 | if test $use_additional = yes; then | |
9f1528a1 | 17404 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17405 | found_dir="$additional_libdir" |
17406 | found_so="$additional_libdir/lib$name.$shlibext" | |
17407 | if test -f "$additional_libdir/lib$name.la"; then | |
17408 | found_la="$additional_libdir/lib$name.la" | |
17409 | fi | |
9f1528a1 | 17410 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17411 | if test -f "$additional_libdir/lib$name.$libext"; then |
17412 | found_dir="$additional_libdir" | |
17413 | found_a="$additional_libdir/lib$name.$libext" | |
17414 | if test -f "$additional_libdir/lib$name.la"; then | |
17415 | found_la="$additional_libdir/lib$name.la" | |
17416 | fi | |
17417 | fi | |
17418 | fi | |
17419 | fi | |
17420 | if test "X$found_dir" = "X"; then | |
17421 | for x in $LDFLAGS $LTLIBLZMA; do | |
17422 | ||
17423 | acl_save_prefix="$prefix" | |
17424 | prefix="$acl_final_prefix" | |
17425 | acl_save_exec_prefix="$exec_prefix" | |
17426 | exec_prefix="$acl_final_exec_prefix" | |
17427 | eval x=\"$x\" | |
17428 | exec_prefix="$acl_save_exec_prefix" | |
17429 | prefix="$acl_save_prefix" | |
17430 | ||
17431 | case "$x" in | |
17432 | -L*) | |
17433 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 17434 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17435 | found_dir="$dir" |
17436 | found_so="$dir/lib$name.$shlibext" | |
17437 | if test -f "$dir/lib$name.la"; then | |
17438 | found_la="$dir/lib$name.la" | |
17439 | fi | |
9f1528a1 | 17440 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17441 | if test -f "$dir/lib$name.$libext"; then |
17442 | found_dir="$dir" | |
17443 | found_a="$dir/lib$name.$libext" | |
17444 | if test -f "$dir/lib$name.la"; then | |
17445 | found_la="$dir/lib$name.la" | |
17446 | fi | |
17447 | fi | |
17448 | fi | |
17449 | ;; | |
17450 | esac | |
17451 | if test "X$found_dir" != "X"; then | |
17452 | break | |
17453 | fi | |
17454 | done | |
17455 | fi | |
17456 | if test "X$found_dir" != "X"; then | |
17457 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
17458 | if test "X$found_so" != "X"; then | |
17459 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17460 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17461 | else | |
17462 | haveit= | |
17463 | for x in $ltrpathdirs; do | |
17464 | if test "X$x" = "X$found_dir"; then | |
17465 | haveit=yes | |
17466 | break | |
17467 | fi | |
17468 | done | |
17469 | if test -z "$haveit"; then | |
17470 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17471 | fi | |
17472 | if test "$hardcode_direct" = yes; then | |
17473 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17474 | else | |
17475 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17476 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17477 | haveit= | |
17478 | for x in $rpathdirs; do | |
17479 | if test "X$x" = "X$found_dir"; then | |
17480 | haveit=yes | |
17481 | break | |
17482 | fi | |
17483 | done | |
17484 | if test -z "$haveit"; then | |
17485 | rpathdirs="$rpathdirs $found_dir" | |
17486 | fi | |
17487 | else | |
17488 | haveit= | |
17489 | for x in $LDFLAGS $LIBLZMA; do | |
17490 | ||
17491 | acl_save_prefix="$prefix" | |
17492 | prefix="$acl_final_prefix" | |
17493 | acl_save_exec_prefix="$exec_prefix" | |
17494 | exec_prefix="$acl_final_exec_prefix" | |
17495 | eval x=\"$x\" | |
17496 | exec_prefix="$acl_save_exec_prefix" | |
17497 | prefix="$acl_save_prefix" | |
17498 | ||
17499 | if test "X$x" = "X-L$found_dir"; then | |
17500 | haveit=yes | |
17501 | break | |
17502 | fi | |
17503 | done | |
17504 | if test -z "$haveit"; then | |
17505 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
17506 | fi | |
17507 | if test "$hardcode_minus_L" != no; then | |
17508 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17509 | else | |
17510 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17511 | fi | |
17512 | fi | |
17513 | fi | |
17514 | fi | |
17515 | else | |
17516 | if test "X$found_a" != "X"; then | |
17517 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
17518 | else | |
17519 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
17520 | fi | |
17521 | fi | |
17522 | additional_includedir= | |
17523 | case "$found_dir" in | |
17524 | */lib | */lib/) | |
17525 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17526 | additional_includedir="$basedir/include" | |
17527 | ;; | |
17528 | esac | |
17529 | if test "X$additional_includedir" != "X"; then | |
17530 | if test "X$additional_includedir" != "X/usr/include"; then | |
17531 | haveit= | |
17532 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17533 | if test -n "$GCC"; then | |
17534 | case $host_os in | |
17535 | linux*) haveit=yes;; | |
17536 | esac | |
17537 | fi | |
17538 | fi | |
17539 | if test -z "$haveit"; then | |
17540 | for x in $CPPFLAGS $INCLZMA; do | |
17541 | ||
17542 | acl_save_prefix="$prefix" | |
17543 | prefix="$acl_final_prefix" | |
17544 | acl_save_exec_prefix="$exec_prefix" | |
17545 | exec_prefix="$acl_final_exec_prefix" | |
17546 | eval x=\"$x\" | |
17547 | exec_prefix="$acl_save_exec_prefix" | |
17548 | prefix="$acl_save_prefix" | |
17549 | ||
17550 | if test "X$x" = "X-I$additional_includedir"; then | |
17551 | haveit=yes | |
17552 | break | |
17553 | fi | |
17554 | done | |
17555 | if test -z "$haveit"; then | |
17556 | if test -d "$additional_includedir"; then | |
17557 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
17558 | fi | |
17559 | fi | |
17560 | fi | |
17561 | fi | |
17562 | fi | |
17563 | if test -n "$found_la"; then | |
17564 | save_libdir="$libdir" | |
17565 | case "$found_la" in | |
17566 | */* | *\\*) . "$found_la" ;; | |
17567 | *) . "./$found_la" ;; | |
17568 | esac | |
17569 | libdir="$save_libdir" | |
17570 | for dep in $dependency_libs; do | |
17571 | case "$dep" in | |
17572 | -L*) | |
17573 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17574 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17575 | haveit= | |
17576 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17577 | if test -n "$GCC"; then | |
17578 | case $host_os in | |
17579 | linux*) haveit=yes;; | |
17580 | esac | |
17581 | fi | |
17582 | fi | |
17583 | if test -z "$haveit"; then | |
17584 | haveit= | |
17585 | for x in $LDFLAGS $LIBLZMA; do | |
17586 | ||
17587 | acl_save_prefix="$prefix" | |
17588 | prefix="$acl_final_prefix" | |
17589 | acl_save_exec_prefix="$exec_prefix" | |
17590 | exec_prefix="$acl_final_exec_prefix" | |
17591 | eval x=\"$x\" | |
17592 | exec_prefix="$acl_save_exec_prefix" | |
17593 | prefix="$acl_save_prefix" | |
17594 | ||
17595 | if test "X$x" = "X-L$additional_libdir"; then | |
17596 | haveit=yes | |
17597 | break | |
17598 | fi | |
17599 | done | |
17600 | if test -z "$haveit"; then | |
17601 | if test -d "$additional_libdir"; then | |
17602 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
17603 | fi | |
17604 | fi | |
17605 | haveit= | |
17606 | for x in $LDFLAGS $LTLIBLZMA; do | |
17607 | ||
17608 | acl_save_prefix="$prefix" | |
17609 | prefix="$acl_final_prefix" | |
17610 | acl_save_exec_prefix="$exec_prefix" | |
17611 | exec_prefix="$acl_final_exec_prefix" | |
17612 | eval x=\"$x\" | |
17613 | exec_prefix="$acl_save_exec_prefix" | |
17614 | prefix="$acl_save_prefix" | |
17615 | ||
17616 | if test "X$x" = "X-L$additional_libdir"; then | |
17617 | haveit=yes | |
17618 | break | |
17619 | fi | |
17620 | done | |
17621 | if test -z "$haveit"; then | |
17622 | if test -d "$additional_libdir"; then | |
17623 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
17624 | fi | |
17625 | fi | |
17626 | fi | |
17627 | fi | |
17628 | ;; | |
17629 | -R*) | |
17630 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17631 | if test "$enable_rpath" != no; then | |
17632 | haveit= | |
17633 | for x in $rpathdirs; do | |
17634 | if test "X$x" = "X$dir"; then | |
17635 | haveit=yes | |
17636 | break | |
17637 | fi | |
17638 | done | |
17639 | if test -z "$haveit"; then | |
17640 | rpathdirs="$rpathdirs $dir" | |
17641 | fi | |
17642 | haveit= | |
17643 | for x in $ltrpathdirs; do | |
17644 | if test "X$x" = "X$dir"; then | |
17645 | haveit=yes | |
17646 | break | |
17647 | fi | |
17648 | done | |
17649 | if test -z "$haveit"; then | |
17650 | ltrpathdirs="$ltrpathdirs $dir" | |
17651 | fi | |
17652 | fi | |
17653 | ;; | |
17654 | -l*) | |
17655 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17656 | ;; | |
17657 | *.la) | |
17658 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17659 | ;; | |
17660 | *) | |
17661 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
17662 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
17663 | ;; | |
17664 | esac | |
17665 | done | |
17666 | fi | |
17667 | else | |
9f1528a1 AB |
17668 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
17669 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17670 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
17671 | else | |
17672 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext" | |
17673 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext" | |
17674 | fi | |
608e2dbb TT |
17675 | fi |
17676 | fi | |
17677 | fi | |
17678 | done | |
17679 | done | |
17680 | if test "X$rpathdirs" != "X"; then | |
17681 | if test -n "$hardcode_libdir_separator"; then | |
17682 | alldirs= | |
17683 | for found_dir in $rpathdirs; do | |
17684 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17685 | done | |
17686 | acl_save_libdir="$libdir" | |
17687 | libdir="$alldirs" | |
17688 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17689 | libdir="$acl_save_libdir" | |
17690 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17691 | else | |
17692 | for found_dir in $rpathdirs; do | |
17693 | acl_save_libdir="$libdir" | |
17694 | libdir="$found_dir" | |
17695 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17696 | libdir="$acl_save_libdir" | |
17697 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17698 | done | |
17699 | fi | |
17700 | fi | |
17701 | if test "X$ltrpathdirs" != "X"; then | |
17702 | for found_dir in $ltrpathdirs; do | |
17703 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
17704 | done | |
17705 | fi | |
17706 | ||
17707 | ||
17708 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17709 | ||
17710 | for element in $INCLZMA; do | |
17711 | haveit= | |
17712 | for x in $CPPFLAGS; do | |
17713 | ||
17714 | acl_save_prefix="$prefix" | |
17715 | prefix="$acl_final_prefix" | |
17716 | acl_save_exec_prefix="$exec_prefix" | |
17717 | exec_prefix="$acl_final_exec_prefix" | |
17718 | eval x=\"$x\" | |
17719 | exec_prefix="$acl_save_exec_prefix" | |
17720 | prefix="$acl_save_prefix" | |
17721 | ||
17722 | if test "X$x" = "X$element"; then | |
17723 | haveit=yes | |
17724 | break | |
17725 | fi | |
17726 | done | |
17727 | if test -z "$haveit"; then | |
17728 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17729 | fi | |
17730 | done | |
17731 | ||
17732 | ||
17733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
17734 | $as_echo_n "checking for liblzma... " >&6; } | |
d0ac1c44 | 17735 | if ${ac_cv_liblzma+:} false; then : |
608e2dbb TT |
17736 | $as_echo_n "(cached) " >&6 |
17737 | else | |
17738 | ||
17739 | ac_save_LIBS="$LIBS" | |
17740 | LIBS="$LIBS $LIBLZMA" | |
17741 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17742 | /* end confdefs.h. */ | |
17743 | #include "lzma.h" | |
17744 | int | |
17745 | main () | |
17746 | { | |
17747 | lzma_index_iter iter; | |
17748 | lzma_index_iter_init (&iter, 0); | |
17749 | lzma_mf_is_supported (LZMA_MF_HC3); | |
17750 | ; | |
17751 | return 0; | |
17752 | } | |
17753 | _ACEOF | |
17754 | if ac_fn_c_try_link "$LINENO"; then : | |
17755 | ac_cv_liblzma=yes | |
17756 | else | |
17757 | ac_cv_liblzma=no | |
17758 | fi | |
17759 | rm -f core conftest.err conftest.$ac_objext \ | |
17760 | conftest$ac_exeext conftest.$ac_ext | |
17761 | LIBS="$ac_save_LIBS" | |
17762 | ||
17763 | fi | |
17764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
17765 | $as_echo "$ac_cv_liblzma" >&6; } | |
17766 | if test "$ac_cv_liblzma" = yes; then | |
17767 | HAVE_LIBLZMA=yes | |
17768 | ||
17769 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
17770 | ||
17771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
17772 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
17773 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
17774 | $as_echo "$LIBLZMA" >&6; } | |
17775 | else | |
17776 | HAVE_LIBLZMA=no | |
17777 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17778 | LIBLZMA= | |
17779 | LTLIBLZMA= | |
17780 | fi | |
17781 | ||
17782 | ||
17783 | ||
17784 | ||
17785 | ||
17786 | ||
17787 | if test "$HAVE_LIBLZMA" != yes; then | |
17788 | if test "$with_lzma" = yes; then | |
d0ac1c44 | 17789 | as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 |
608e2dbb TT |
17790 | fi |
17791 | fi | |
17792 | fi | |
17793 | fi | |
17794 | ||
3fc11d3e JM |
17795 | LIBGUI="../libgui/src/libgui.a" |
17796 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
17797 | ||
17798 | ||
7a292a7a | 17799 | |
3fc11d3e JM |
17800 | WIN32LDAPP= |
17801 | ||
17802 | ||
17803 | ||
d91670b9 | 17804 | case "${host}" in |
686a5eed | 17805 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
17806 | configdir="win" |
17807 | ;; | |
17808 | *) | |
17809 | configdir="unix" | |
17810 | ;; | |
17811 | esac | |
3fc11d3e JM |
17812 | |
17813 | GDBTKLIBS= | |
17814 | if test "${enable_gdbtk}" = "yes"; then | |
17815 | ||
d1c3b63a KS |
17816 | # Gdbtk must have an absolute path to srcdir in order to run |
17817 | # properly when not installed. | |
17818 | here=`pwd` | |
17819 | cd ${srcdir} | |
17820 | GDBTK_SRC_DIR=`pwd` | |
17821 | cd $here | |
17822 | ||
bec39cab | 17823 | |
5062cc19 KS |
17824 | # |
17825 | # Ok, lets find the tcl configuration | |
17826 | # First, look for one uninstalled. | |
17827 | # the alternative search directory is invoked by --with-tcl | |
17828 | # | |
3fc11d3e | 17829 | |
5062cc19 KS |
17830 | if test x"${no_tcl}" = x ; then |
17831 | # we reset no_tcl in case something fails here | |
17832 | no_tcl=true | |
bec39cab | 17833 | |
81ecdfbb RW |
17834 | # Check whether --with-tcl was given. |
17835 | if test "${with_tcl+set}" = set; then : | |
17836 | withval=$with_tcl; with_tclconfig=${withval} | |
17837 | fi | |
17838 | ||
17839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
17840 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
d0ac1c44 | 17841 | if ${ac_cv_c_tclconfig+:} false; then : |
81ecdfbb | 17842 | $as_echo_n "(cached) " >&6 |
3fc11d3e | 17843 | else |
bec39cab | 17844 | |
3fc11d3e | 17845 | |
5062cc19 KS |
17846 | # First check to see if --with-tcl was specified. |
17847 | case "${host}" in | |
17848 | *-*-cygwin*) platDir="win" ;; | |
17849 | *) platDir="unix" ;; | |
17850 | esac | |
17851 | if test x"${with_tclconfig}" != x ; then | |
17852 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
17853 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
17854 | else | |
d0ac1c44 | 17855 | as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17856 | fi |
17857 | fi | |
17858 | ||
17859 | # then check for a private Tcl installation | |
17860 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17861 | for i in \ | |
17862 | ../tcl \ | |
17863 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17864 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
17865 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17866 | ../../tcl \ | |
17867 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17868 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17869 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17870 | ../../../tcl \ | |
17871 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17872 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17873 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17874 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17875 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17876 | break | |
17877 | fi | |
17878 | done | |
17879 | fi | |
17880 | ||
17881 | # on Darwin, check in Framework installation locations | |
17882 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
17883 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
17884 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
17885 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
17886 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
17887 | ; do | |
17888 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
17889 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
17890 | break | |
17891 | fi | |
17892 | done | |
17893 | fi | |
17894 | ||
17895 | # check in a few common install locations | |
17896 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17897 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
17898 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
17899 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
17900 | `ls -d /usr/local/lib 2>/dev/null` \ | |
17901 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
17902 | `ls -d /usr/lib 2>/dev/null` \ | |
17903 | ; do | |
17904 | if test -f "$i/tclConfig.sh" ; then | |
17905 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
17906 | break | |
17907 | fi | |
17908 | done | |
17909 | fi | |
3fc11d3e | 17910 | |
5062cc19 KS |
17911 | # check in a few other private locations |
17912 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17913 | for i in \ | |
17914 | ${srcdir}/../tcl \ | |
17915 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17916 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
17917 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17918 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17919 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17920 | break | |
17921 | fi | |
17922 | done | |
17923 | fi | |
bec39cab | 17924 | |
3fc11d3e JM |
17925 | fi |
17926 | ||
5062cc19 KS |
17927 | |
17928 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17929 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
17930 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
17931 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
17932 | else |
17933 | no_tcl= | |
17934 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
17935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17936 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
17937 | fi |
17938 | fi | |
3fc11d3e | 17939 | |
bec39cab | 17940 | |
85541719 DE |
17941 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
17942 | # point to doing Tcl. | |
bec39cab | 17943 | |
5062cc19 KS |
17944 | # |
17945 | # Ok, lets find the tk configuration | |
17946 | # First, look for one uninstalled. | |
17947 | # the alternative search directory is invoked by --with-tk | |
17948 | # | |
3fc11d3e | 17949 | |
5062cc19 KS |
17950 | if test x"${no_tk}" = x ; then |
17951 | # we reset no_tk in case something fails here | |
17952 | no_tk=true | |
bec39cab | 17953 | |
81ecdfbb RW |
17954 | # Check whether --with-tk was given. |
17955 | if test "${with_tk+set}" = set; then : | |
17956 | withval=$with_tk; with_tkconfig=${withval} | |
17957 | fi | |
17958 | ||
17959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
17960 | $as_echo_n "checking for Tk configuration... " >&6; } | |
d0ac1c44 | 17961 | if ${ac_cv_c_tkconfig+:} false; then : |
81ecdfbb | 17962 | $as_echo_n "(cached) " >&6 |
bec39cab | 17963 | else |
3fc11d3e JM |
17964 | |
17965 | ||
5062cc19 KS |
17966 | # First check to see if --with-tkconfig was specified. |
17967 | if test x"${with_tkconfig}" != x ; then | |
17968 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
17969 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
17970 | else | |
d0ac1c44 | 17971 | as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17972 | fi |
17973 | fi | |
3fc11d3e | 17974 | |
5062cc19 KS |
17975 | # then check for a private Tk library |
17976 | case "${host}" in | |
17977 | *-*-cygwin*) platDir="win" ;; | |
17978 | *) platDir="unix" ;; | |
17979 | esac | |
17980 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17981 | for i in \ | |
17982 | ../tk \ | |
17983 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17984 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
17985 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
17986 | ../../tk \ | |
17987 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17988 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
17989 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
17990 | ../../../tk \ | |
17991 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17992 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
17993 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
17994 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
17995 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
17996 | break | |
17997 | fi | |
17998 | done | |
17999 | fi | |
18000 | ||
18001 | # on Darwin, check in Framework installation locations | |
18002 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
18003 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
18004 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
18005 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
18006 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
18007 | ; do | |
18008 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
18009 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
18010 | break | |
18011 | fi | |
18012 | done | |
18013 | fi | |
18014 | ||
18015 | # check in a few common install locations | |
18016 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18017 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
18018 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
18019 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
18020 | `ls -d /usr/local/lib 2>/dev/null` \ | |
18021 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
18022 | `ls -d /usr/lib 2>/dev/null` \ | |
18023 | ; do | |
18024 | if test -f "$i/tkConfig.sh" ; then | |
18025 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
18026 | break | |
18027 | fi | |
18028 | done | |
18029 | fi | |
18030 | # check in a few other private locations | |
18031 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18032 | for i in \ | |
18033 | ${srcdir}/../tk \ | |
18034 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18035 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
18036 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
18037 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
18038 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
18039 | break | |
18040 | fi | |
18041 | done | |
18042 | fi | |
3fc11d3e | 18043 | |
3fc11d3e JM |
18044 | fi |
18045 | ||
18046 | ||
5062cc19 KS |
18047 | if test x"${ac_cv_c_tkconfig}" = x ; then |
18048 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
18049 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
18050 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
18051 | else |
18052 | no_tk= | |
18053 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
18054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18055 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 18056 | fi |
3fc11d3e | 18057 | fi |
dd2504ab | 18058 | |
dd2504ab | 18059 | |
85541719 DE |
18060 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
18061 | ||
81ecdfbb RW |
18062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18063 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
18064 | |
18065 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
18066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
18067 | $as_echo "loading" >&6; } | |
85541719 DE |
18068 | . ${TCL_BIN_DIR}/tclConfig.sh |
18069 | else | |
81ecdfbb RW |
18070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18071 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
18072 | fi |
18073 | ||
18074 | # eval is required to do the TCL_DBGX substitution | |
18075 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
18076 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
18077 | ||
18078 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
18079 | # then set the common variable name to the value of the build variables. | |
18080 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
18081 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
18082 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
18083 | # installed and uninstalled version of Tcl. | |
18084 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
18085 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
18086 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
18087 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
18088 | elif test "`uname -s`" = "Darwin"; then | |
18089 | # If Tcl was built as a framework, attempt to use the libraries | |
18090 | # from the framework at the given location so that linking works | |
a68ffae9 | 18091 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
18092 | case ${TCL_DEFS} in |
18093 | *TCL_FRAMEWORK*) | |
18094 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
18095 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
18096 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
18097 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
18098 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
18099 | break | |
18100 | fi | |
18101 | done | |
18102 | fi | |
18103 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
18104 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
18105 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
18106 | fi | |
18107 | ;; | |
18108 | esac | |
18109 | fi | |
18110 | ||
18111 | # eval is required to do the TCL_DBGX substitution | |
18112 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
18113 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
18114 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
18115 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
18116 | ||
18117 | ||
18118 | ||
18119 | ||
18120 | ||
18121 | ||
18122 | ||
18123 | ||
18124 | ||
18125 | ||
18126 | ||
18127 | ||
18128 | ||
18129 | ||
18130 | ||
18131 | # Check for in-tree tcl | |
18132 | here=`pwd` | |
18133 | cd ${srcdir}/.. | |
18134 | topdir=`pwd` | |
18135 | cd ${here} | |
18136 | ||
18137 | intree="no" | |
18138 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
18139 | intree="yes" | |
18140 | fi | |
18141 | ||
18142 | # Find Tcl private headers | |
18143 | if test x"${intree}" = xno; then | |
18144 | ||
81ecdfbb RW |
18145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
18146 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
18147 | private_dir="" |
18148 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
18149 | if test -f ${dir}/tclInt.h ; then | |
18150 | private_dir=${dir} | |
18151 | fi | |
18152 | ||
18153 | if test x"${private_dir}" = x; then | |
d0ac1c44 | 18154 | as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
18155 | else |
18156 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
18157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
18158 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
18159 | fi |
18160 | ||
18161 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
18162 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
18163 | TCL_DEPS="" | |
18164 | else | |
18165 | # If building tcl in the same src tree, private headers | |
18166 | # are not needed, but we need to be sure to use the right | |
18167 | # headers library | |
18168 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
18169 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
18170 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
18171 | fi | |
18172 | ||
18173 | ||
18174 | ||
18175 | ||
18176 | ||
81ecdfbb RW |
18177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18178 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 18179 | |
5062cc19 | 18180 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
18181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
18182 | $as_echo "loading" >&6; } | |
5062cc19 | 18183 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 18184 | else |
81ecdfbb RW |
18185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18186 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 18187 | fi |
bec39cab | 18188 | |
5062cc19 KS |
18189 | # eval is required to do the TK_DBGX substitution |
18190 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
18191 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
18192 | ||
18193 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
18194 | # then set the common variable name to the value of the build variables. | |
18195 | # For example, the variable TK_LIB_SPEC will be set to the value | |
18196 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
18197 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
18198 | # installed and uninstalled version of Tcl. | |
85541719 | 18199 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
18200 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
18201 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
18202 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
18203 | elif test "`uname -s`" = "Darwin"; then | |
18204 | # If Tk was built as a framework, attempt to use the libraries | |
18205 | # from the framework at the given location so that linking works | |
a68ffae9 | 18206 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
18207 | case ${TK_DEFS} in |
18208 | *TK_FRAMEWORK*) | |
85541719 | 18209 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
18210 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
18211 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
18212 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
18213 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
18214 | break | |
18215 | fi | |
18216 | done | |
18217 | fi | |
85541719 | 18218 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
18219 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
18220 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
18221 | fi | |
18222 | ;; | |
18223 | esac | |
3fc11d3e JM |
18224 | fi |
18225 | ||
5062cc19 KS |
18226 | # eval is required to do the TK_DBGX substitution |
18227 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
18228 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
18229 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
18230 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 18231 | |
3fc11d3e JM |
18232 | |
18233 | ||
bec39cab AC |
18234 | |
18235 | ||
18236 | ||
18237 | ||
18238 | ||
18239 | ||
18240 | ||
3fc11d3e | 18241 | |
3fc11d3e | 18242 | |
bec39cab | 18243 | |
bec39cab | 18244 | |
85541719 DE |
18245 | # Check for in-tree Tk |
18246 | intree="no" | |
18247 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
18248 | intree="yes" | |
18249 | fi | |
3fc11d3e | 18250 | |
85541719 DE |
18251 | # Find Tk private headers |
18252 | if test x"${intree}" = xno; then | |
3fc11d3e | 18253 | |
81ecdfbb RW |
18254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
18255 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
18256 | private_dir="" |
18257 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
18258 | if test -f ${dir}/tkInt.h; then | |
18259 | private_dir=${dir} | |
3fc11d3e | 18260 | fi |
bec39cab | 18261 | |
5062cc19 | 18262 | if test x"${private_dir}" = x; then |
d0ac1c44 | 18263 | as_fn_error $? "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 18264 | else |
5062cc19 | 18265 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
18266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
18267 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 18268 | fi |
3fc11d3e | 18269 | |
85541719 DE |
18270 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
18271 | TK_LIBRARY=${TK_LIB_SPEC} | |
18272 | TK_DEPS="" | |
18273 | else | |
18274 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
18275 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
18276 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
18277 | fi | |
3fc11d3e JM |
18278 | |
18279 | ||
3fc11d3e JM |
18280 | |
18281 | ||
3fc11d3e | 18282 | |
85541719 | 18283 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 18284 | |
85541719 DE |
18285 | # Include some libraries that Tcl and Tk want. |
18286 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
18287 | # Yes, the ordering seems wrong here. But it isn't. | |
18288 | # TK_LIBS is the list of libraries that need to be linked | |
18289 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
18290 | # were in LIBS then any link tests after this point would | |
18291 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
18292 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 18293 | |
85541719 DE |
18294 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
18295 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
18296 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
18297 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
18298 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
18299 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
18300 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 18301 | |
0ad6b8ee | 18302 | if test x"$gdb_cv_os_cygwin" = xyes; then |
85541719 DE |
18303 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" |
18304 | WIN32LDAPP="-Wl,--subsystem,console" | |
18305 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 18306 | fi |
ffc6a242 | 18307 | |
f99d1d37 TT |
18308 | |
18309 | ||
18310 | subdirs="$subdirs gdbtk" | |
3ace7edb | 18311 | |
85541719 | 18312 | fi |
3fc11d3e JM |
18313 | fi |
18314 | ||
18315 | ||
18316 | ||
18317 | ||
18318 | ||
18319 | ||
18320 | ||
18321 | ||
81ecdfbb RW |
18322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
18323 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 18324 | |
c906108c | 18325 | |
81ecdfbb RW |
18326 | # Check whether --with-x was given. |
18327 | if test "${with_x+set}" = set; then : | |
18328 | withval=$with_x; | |
18329 | fi | |
c906108c SS |
18330 | |
18331 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
18332 | if test "x$with_x" = xno; then | |
18333 | # The user explicitly disabled X. | |
18334 | have_x=disabled | |
18335 | else | |
81ecdfbb | 18336 | case $x_includes,$x_libraries in #( |
d0ac1c44 SM |
18337 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
18338 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
81ecdfbb | 18339 | $as_echo_n "(cached) " >&6 |
c906108c SS |
18340 | else |
18341 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 18342 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 18343 | rm -f -r conftest.dir |
bec39cab AC |
18344 | if mkdir conftest.dir; then |
18345 | cd conftest.dir | |
bec39cab | 18346 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
18347 | incroot: |
18348 | @echo incroot='${INCROOT}' | |
18349 | usrlibdir: | |
18350 | @echo usrlibdir='${USRLIBDIR}' | |
18351 | libdir: | |
18352 | @echo libdir='${LIBDIR}' | |
18353 | _ACEOF | |
18354 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
d0ac1c44 | 18355 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
81ecdfbb RW |
18356 | for ac_var in incroot usrlibdir libdir; do |
18357 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
18358 | done | |
c906108c | 18359 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
18360 | for ac_extension in a so sl dylib la dll; do |
18361 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
18362 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 18363 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
18364 | fi |
18365 | done | |
18366 | # Screen out bogus values from the imake configuration. They are | |
18367 | # bogus both because they are the default anyway, and because | |
18368 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 18369 | case $ac_im_incroot in |
81ecdfbb | 18370 | /usr/include) ac_x_includes= ;; |
bec39cab | 18371 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 18372 | esac |
bec39cab | 18373 | case $ac_im_usrlibdir in |
81ecdfbb | 18374 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 18375 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
18376 | esac |
18377 | fi | |
18378 | cd .. | |
81ecdfbb | 18379 | rm -f -r conftest.dir |
c906108c SS |
18380 | fi |
18381 | ||
bec39cab AC |
18382 | # Standard set of common directories for X headers. |
18383 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
18384 | ac_x_header_dirs=' | |
18385 | /usr/X11/include | |
81ecdfbb | 18386 | /usr/X11R7/include |
bec39cab AC |
18387 | /usr/X11R6/include |
18388 | /usr/X11R5/include | |
18389 | /usr/X11R4/include | |
18390 | ||
18391 | /usr/include/X11 | |
81ecdfbb | 18392 | /usr/include/X11R7 |
bec39cab AC |
18393 | /usr/include/X11R6 |
18394 | /usr/include/X11R5 | |
18395 | /usr/include/X11R4 | |
18396 | ||
18397 | /usr/local/X11/include | |
81ecdfbb | 18398 | /usr/local/X11R7/include |
bec39cab AC |
18399 | /usr/local/X11R6/include |
18400 | /usr/local/X11R5/include | |
18401 | /usr/local/X11R4/include | |
18402 | ||
18403 | /usr/local/include/X11 | |
81ecdfbb | 18404 | /usr/local/include/X11R7 |
bec39cab AC |
18405 | /usr/local/include/X11R6 |
18406 | /usr/local/include/X11R5 | |
18407 | /usr/local/include/X11R4 | |
18408 | ||
18409 | /usr/X386/include | |
18410 | /usr/x386/include | |
18411 | /usr/XFree86/include/X11 | |
18412 | ||
18413 | /usr/include | |
18414 | /usr/local/include | |
18415 | /usr/unsupported/include | |
18416 | /usr/athena/include | |
18417 | /usr/local/x11r5/include | |
18418 | /usr/lpp/Xamples/include | |
18419 | ||
18420 | /usr/openwin/include | |
18421 | /usr/openwin/share/include' | |
18422 | ||
18423 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 18424 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 18425 | # First, try using that file with no special directory specified. |
81ecdfbb | 18426 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 18427 | /* end confdefs.h. */ |
81ecdfbb | 18428 | #include <X11/Xlib.h> |
bec39cab | 18429 | _ACEOF |
81ecdfbb | 18430 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
18431 | # We can compile using X headers with no special include directory. |
18432 | ac_x_includes= | |
18433 | else | |
bec39cab | 18434 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 18435 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
18436 | ac_x_includes=$ac_dir |
18437 | break | |
18438 | fi | |
18439 | done | |
c906108c | 18440 | fi |
d0ac1c44 | 18441 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 18442 | fi # $ac_x_includes = no |
c906108c | 18443 | |
bec39cab | 18444 | if test "$ac_x_libraries" = no; then |
c906108c | 18445 | # Check for the libraries. |
c906108c SS |
18446 | # See if we find them without any special options. |
18447 | # Don't add to $LIBS permanently. | |
bec39cab | 18448 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
18449 | LIBS="-lX11 $LIBS" |
18450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 18451 | /* end confdefs.h. */ |
81ecdfbb | 18452 | #include <X11/Xlib.h> |
bec39cab AC |
18453 | int |
18454 | main () | |
18455 | { | |
81ecdfbb | 18456 | XrmInitialize () |
bec39cab AC |
18457 | ; |
18458 | return 0; | |
18459 | } | |
18460 | _ACEOF | |
81ecdfbb | 18461 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 18462 | LIBS=$ac_save_LIBS |
c906108c SS |
18463 | # We can link X programs with no special library path. |
18464 | ac_x_libraries= | |
18465 | else | |
81ecdfbb RW |
18466 | LIBS=$ac_save_LIBS |
18467 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 18468 | do |
bec39cab | 18469 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
18470 | for ac_extension in a so sl dylib la dll; do |
18471 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
18472 | ac_x_libraries=$ac_dir |
18473 | break 2 | |
18474 | fi | |
18475 | done | |
18476 | done | |
18477 | fi | |
81ecdfbb RW |
18478 | rm -f core conftest.err conftest.$ac_objext \ |
18479 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 18480 | fi # $ac_x_libraries = no |
c906108c | 18481 | |
81ecdfbb RW |
18482 | case $ac_x_includes,$ac_x_libraries in #( |
18483 | no,* | *,no | *\'*) | |
18484 | # Didn't find X, or a directory has "'" in its name. | |
18485 | ac_cv_have_x="have_x=no";; #( | |
18486 | *) | |
18487 | # Record where we found X for the cache. | |
18488 | ac_cv_have_x="have_x=yes\ | |
18489 | ac_x_includes='$ac_x_includes'\ | |
18490 | ac_x_libraries='$ac_x_libraries'" | |
18491 | esac | |
c906108c | 18492 | fi |
81ecdfbb RW |
18493 | ;; #( |
18494 | *) have_x=yes;; | |
18495 | esac | |
c906108c SS |
18496 | eval "$ac_cv_have_x" |
18497 | fi # $with_x != no | |
18498 | ||
18499 | if test "$have_x" != yes; then | |
81ecdfbb RW |
18500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
18501 | $as_echo "$have_x" >&6; } | |
c906108c SS |
18502 | no_x=yes |
18503 | else | |
18504 | # If each of the values was on the command line, it overrides each guess. | |
18505 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
18506 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
18507 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
18508 | ac_cv_have_x="have_x=yes\ |
18509 | ac_x_includes='$x_includes'\ | |
18510 | ac_x_libraries='$x_libraries'" | |
18511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
18512 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
18513 | fi |
18514 | ||
18515 | ||
bec39cab | 18516 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 18517 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
18518 | # This code just checks for a few cases where we'd like to ignore those |
18519 | # definitions, even when they're present in the '.mt' file. These cases | |
18520 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 18521 | # not part of the source tree. |
7a292a7a | 18522 | # |
81ecdfbb RW |
18523 | # Check whether --enable-sim was given. |
18524 | if test "${enable_sim+set}" = set; then : | |
18525 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
18526 | echo "enableval = ${enableval}"; |
18527 | case "${enableval}" in | |
18528 | yes) ignore_sim=false ;; | |
18529 | no) ignore_sim=true ;; | |
18530 | *) ignore_sim=false ;; | |
18531 | esac | |
18532 | else | |
18533 | ignore_sim=false | |
81ecdfbb RW |
18534 | fi |
18535 | ||
7a292a7a SS |
18536 | |
18537 | if test ! -d "${srcdir}/../sim"; then | |
18538 | ignore_sim=true | |
18539 | fi | |
18540 | ||
9b624dbe UW |
18541 | SIM= |
18542 | SIM_OBS= | |
18543 | if test "${ignore_sim}" = "false"; then | |
18544 | if test x"${gdb_sim}" != x ; then | |
18545 | SIM="${gdb_sim}" | |
18546 | SIM_OBS="remote-sim.o" | |
60ca704f | 18547 | |
81ecdfbb | 18548 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 18549 | |
976102cd PA |
18550 | |
18551 | # Some tdep code should only be compiled in when the ppc sim is | |
18552 | # built. PR sim/13418. | |
18553 | case $target in | |
18554 | powerpc*-*-*) | |
18555 | ||
18556 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
18557 | ||
18558 | ;; | |
18559 | esac | |
9b624dbe | 18560 | fi |
7a292a7a SS |
18561 | fi |
18562 | ||
18563 | ||
18564 | ||
c906108c SS |
18565 | |
18566 | ||
18567 | ||
18568 | ||
18569 | ||
18570 | ||
dfcd3bfb | 18571 | |
e56ac5c3 AC |
18572 | |
18573 | ||
b3a90332 AC |
18574 | |
18575 | ||
c35f4ffc | 18576 | # List of host floatformats. |
bec39cab AC |
18577 | |
18578 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18579 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 18580 | _ACEOF |
c35f4ffc | 18581 | |
bec39cab AC |
18582 | |
18583 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18584 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
18585 | _ACEOF |
18586 | ||
c35f4ffc | 18587 | |
bec39cab | 18588 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 18589 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 18590 | _ACEOF |
c35f4ffc AC |
18591 | |
18592 | ||
c906108c SS |
18593 | # target_subdir is used by the testsuite to find the target libraries. |
18594 | target_subdir= | |
18595 | if test "${host}" != "${target}"; then | |
18596 | target_subdir="${target_alias}/" | |
18597 | fi | |
18598 | ||
18599 | ||
21ea5acd | 18600 | # Import nat definitions. |
2b351b19 | 18601 | nat_makefile_frag=/dev/null |
771b4502 | 18602 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
18603 | . ${srcdir}/configure.nat |
18604 | nativefile=$NAT_FILE | |
c906108c | 18605 | fi |
c906108c | 18606 | |
c906108c SS |
18607 | |
18608 | ||
18609 | ||
21ea5acd SDJ |
18610 | |
18611 | ||
18612 | ||
18613 | ||
18614 | ||
c906108c SS |
18615 | |
18616 | ||
b00a8037 | 18617 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
18618 | |
18619 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 18620 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 18621 | _ACEOF |
b00a8037 DJ |
18622 | |
18623 | fi | |
18624 | ||
393fd4c3 YQ |
18625 | # Check for babeltrace and babeltrace-ctf |
18626 | ||
18627 | # Check whether --with-babeltrace was given. | |
18628 | if test "${with_babeltrace+set}" = set; then : | |
18629 | withval=$with_babeltrace; | |
18630 | else | |
18631 | with_babeltrace=auto | |
18632 | fi | |
18633 | ||
18634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
18635 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
18636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
18637 | $as_echo "$with_babeltrace" >&6; } | |
18638 | ||
18639 | if test "x$with_babeltrace" = "xno"; then | |
18640 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
18641 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
18642 | else | |
18643 | # Append -Werror to CFLAGS so that configure can catch the warning | |
18644 | # "assignment from incompatible pointer type", which is related to | |
18645 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
18646 | # in GDB, while babeltrace 1.0.3 is broken. | |
18647 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
18648 | # safe to save and restore CFLAGS here. | |
18649 | saved_CFLAGS=$CFLAGS | |
18650 | CFLAGS="$CFLAGS -Werror" | |
18651 | ||
18652 | ||
18653 | ||
18654 | ||
18655 | ||
18656 | ||
18657 | ||
18658 | ||
18659 | use_additional=yes | |
18660 | ||
18661 | acl_save_prefix="$prefix" | |
18662 | prefix="$acl_final_prefix" | |
18663 | acl_save_exec_prefix="$exec_prefix" | |
18664 | exec_prefix="$acl_final_exec_prefix" | |
18665 | ||
18666 | eval additional_includedir=\"$includedir\" | |
18667 | eval additional_libdir=\"$libdir\" | |
18668 | ||
18669 | exec_prefix="$acl_save_exec_prefix" | |
18670 | prefix="$acl_save_prefix" | |
18671 | ||
18672 | ||
18673 | # Check whether --with-libbabeltrace-prefix was given. | |
18674 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
18675 | withval=$with_libbabeltrace_prefix; | |
18676 | if test "X$withval" = "Xno"; then | |
18677 | use_additional=no | |
18678 | else | |
18679 | if test "X$withval" = "X"; then | |
18680 | ||
18681 | acl_save_prefix="$prefix" | |
18682 | prefix="$acl_final_prefix" | |
18683 | acl_save_exec_prefix="$exec_prefix" | |
18684 | exec_prefix="$acl_final_exec_prefix" | |
18685 | ||
18686 | eval additional_includedir=\"$includedir\" | |
18687 | eval additional_libdir=\"$libdir\" | |
18688 | ||
18689 | exec_prefix="$acl_save_exec_prefix" | |
18690 | prefix="$acl_save_prefix" | |
18691 | ||
18692 | else | |
18693 | additional_includedir="$withval/include" | |
18694 | additional_libdir="$withval/lib" | |
18695 | fi | |
18696 | fi | |
18697 | ||
18698 | fi | |
18699 | ||
9f1528a1 AB |
18700 | |
18701 | # Check whether --with-libbabeltrace-type was given. | |
18702 | if test "${with_libbabeltrace_type+set}" = set; then : | |
18703 | withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval | |
18704 | else | |
18705 | with_libbabeltrace_type=auto | |
18706 | fi | |
18707 | ||
18708 | lib_type=`eval echo \$with_libbabeltrace_type` | |
18709 | ||
393fd4c3 YQ |
18710 | LIBBABELTRACE= |
18711 | LTLIBBABELTRACE= | |
18712 | INCBABELTRACE= | |
18713 | rpathdirs= | |
18714 | ltrpathdirs= | |
18715 | names_already_handled= | |
18716 | names_next_round='babeltrace babeltrace-ctf' | |
18717 | while test -n "$names_next_round"; do | |
18718 | names_this_round="$names_next_round" | |
18719 | names_next_round= | |
18720 | for name in $names_this_round; do | |
18721 | already_handled= | |
18722 | for n in $names_already_handled; do | |
18723 | if test "$n" = "$name"; then | |
18724 | already_handled=yes | |
18725 | break | |
18726 | fi | |
18727 | done | |
18728 | if test -z "$already_handled"; then | |
18729 | names_already_handled="$names_already_handled $name" | |
18730 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
18731 | eval value=\"\$HAVE_LIB$uppername\" | |
18732 | if test -n "$value"; then | |
18733 | if test "$value" = yes; then | |
18734 | eval value=\"\$LIB$uppername\" | |
18735 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
18736 | eval value=\"\$LTLIB$uppername\" | |
18737 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
18738 | else | |
18739 | : | |
18740 | fi | |
18741 | else | |
18742 | found_dir= | |
18743 | found_la= | |
18744 | found_so= | |
18745 | found_a= | |
18746 | if test $use_additional = yes; then | |
9f1528a1 | 18747 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18748 | found_dir="$additional_libdir" |
18749 | found_so="$additional_libdir/lib$name.$shlibext" | |
18750 | if test -f "$additional_libdir/lib$name.la"; then | |
18751 | found_la="$additional_libdir/lib$name.la" | |
18752 | fi | |
9f1528a1 | 18753 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18754 | if test -f "$additional_libdir/lib$name.$libext"; then |
18755 | found_dir="$additional_libdir" | |
18756 | found_a="$additional_libdir/lib$name.$libext" | |
18757 | if test -f "$additional_libdir/lib$name.la"; then | |
18758 | found_la="$additional_libdir/lib$name.la" | |
18759 | fi | |
18760 | fi | |
18761 | fi | |
18762 | fi | |
18763 | if test "X$found_dir" = "X"; then | |
18764 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18765 | ||
18766 | acl_save_prefix="$prefix" | |
18767 | prefix="$acl_final_prefix" | |
18768 | acl_save_exec_prefix="$exec_prefix" | |
18769 | exec_prefix="$acl_final_exec_prefix" | |
18770 | eval x=\"$x\" | |
18771 | exec_prefix="$acl_save_exec_prefix" | |
18772 | prefix="$acl_save_prefix" | |
18773 | ||
18774 | case "$x" in | |
18775 | -L*) | |
18776 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 18777 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18778 | found_dir="$dir" |
18779 | found_so="$dir/lib$name.$shlibext" | |
18780 | if test -f "$dir/lib$name.la"; then | |
18781 | found_la="$dir/lib$name.la" | |
18782 | fi | |
9f1528a1 | 18783 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18784 | if test -f "$dir/lib$name.$libext"; then |
18785 | found_dir="$dir" | |
18786 | found_a="$dir/lib$name.$libext" | |
18787 | if test -f "$dir/lib$name.la"; then | |
18788 | found_la="$dir/lib$name.la" | |
18789 | fi | |
18790 | fi | |
18791 | fi | |
18792 | ;; | |
18793 | esac | |
18794 | if test "X$found_dir" != "X"; then | |
18795 | break | |
18796 | fi | |
18797 | done | |
18798 | fi | |
18799 | if test "X$found_dir" != "X"; then | |
18800 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
18801 | if test "X$found_so" != "X"; then | |
18802 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
18803 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18804 | else | |
18805 | haveit= | |
18806 | for x in $ltrpathdirs; do | |
18807 | if test "X$x" = "X$found_dir"; then | |
18808 | haveit=yes | |
18809 | break | |
18810 | fi | |
18811 | done | |
18812 | if test -z "$haveit"; then | |
18813 | ltrpathdirs="$ltrpathdirs $found_dir" | |
18814 | fi | |
18815 | if test "$hardcode_direct" = yes; then | |
18816 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18817 | else | |
18818 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
18819 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18820 | haveit= | |
18821 | for x in $rpathdirs; do | |
18822 | if test "X$x" = "X$found_dir"; then | |
18823 | haveit=yes | |
18824 | break | |
18825 | fi | |
18826 | done | |
18827 | if test -z "$haveit"; then | |
18828 | rpathdirs="$rpathdirs $found_dir" | |
18829 | fi | |
18830 | else | |
18831 | haveit= | |
18832 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18833 | ||
18834 | acl_save_prefix="$prefix" | |
18835 | prefix="$acl_final_prefix" | |
18836 | acl_save_exec_prefix="$exec_prefix" | |
18837 | exec_prefix="$acl_final_exec_prefix" | |
18838 | eval x=\"$x\" | |
18839 | exec_prefix="$acl_save_exec_prefix" | |
18840 | prefix="$acl_save_prefix" | |
18841 | ||
18842 | if test "X$x" = "X-L$found_dir"; then | |
18843 | haveit=yes | |
18844 | break | |
18845 | fi | |
18846 | done | |
18847 | if test -z "$haveit"; then | |
18848 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
18849 | fi | |
18850 | if test "$hardcode_minus_L" != no; then | |
18851 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18852 | else | |
18853 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
18854 | fi | |
18855 | fi | |
18856 | fi | |
18857 | fi | |
18858 | else | |
18859 | if test "X$found_a" != "X"; then | |
18860 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
18861 | else | |
18862 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
18863 | fi | |
18864 | fi | |
18865 | additional_includedir= | |
18866 | case "$found_dir" in | |
18867 | */lib | */lib/) | |
18868 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
18869 | additional_includedir="$basedir/include" | |
18870 | ;; | |
18871 | esac | |
18872 | if test "X$additional_includedir" != "X"; then | |
18873 | if test "X$additional_includedir" != "X/usr/include"; then | |
18874 | haveit= | |
18875 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
18876 | if test -n "$GCC"; then | |
18877 | case $host_os in | |
18878 | linux*) haveit=yes;; | |
18879 | esac | |
18880 | fi | |
18881 | fi | |
18882 | if test -z "$haveit"; then | |
18883 | for x in $CPPFLAGS $INCBABELTRACE; do | |
18884 | ||
18885 | acl_save_prefix="$prefix" | |
18886 | prefix="$acl_final_prefix" | |
18887 | acl_save_exec_prefix="$exec_prefix" | |
18888 | exec_prefix="$acl_final_exec_prefix" | |
18889 | eval x=\"$x\" | |
18890 | exec_prefix="$acl_save_exec_prefix" | |
18891 | prefix="$acl_save_prefix" | |
18892 | ||
18893 | if test "X$x" = "X-I$additional_includedir"; then | |
18894 | haveit=yes | |
18895 | break | |
18896 | fi | |
18897 | done | |
18898 | if test -z "$haveit"; then | |
18899 | if test -d "$additional_includedir"; then | |
18900 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
18901 | fi | |
18902 | fi | |
18903 | fi | |
18904 | fi | |
18905 | fi | |
18906 | if test -n "$found_la"; then | |
18907 | save_libdir="$libdir" | |
18908 | case "$found_la" in | |
18909 | */* | *\\*) . "$found_la" ;; | |
18910 | *) . "./$found_la" ;; | |
18911 | esac | |
18912 | libdir="$save_libdir" | |
18913 | for dep in $dependency_libs; do | |
18914 | case "$dep" in | |
18915 | -L*) | |
18916 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
18917 | if test "X$additional_libdir" != "X/usr/lib"; then | |
18918 | haveit= | |
18919 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
18920 | if test -n "$GCC"; then | |
18921 | case $host_os in | |
18922 | linux*) haveit=yes;; | |
18923 | esac | |
18924 | fi | |
18925 | fi | |
18926 | if test -z "$haveit"; then | |
18927 | haveit= | |
18928 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18929 | ||
18930 | acl_save_prefix="$prefix" | |
18931 | prefix="$acl_final_prefix" | |
18932 | acl_save_exec_prefix="$exec_prefix" | |
18933 | exec_prefix="$acl_final_exec_prefix" | |
18934 | eval x=\"$x\" | |
18935 | exec_prefix="$acl_save_exec_prefix" | |
18936 | prefix="$acl_save_prefix" | |
18937 | ||
18938 | if test "X$x" = "X-L$additional_libdir"; then | |
18939 | haveit=yes | |
18940 | break | |
18941 | fi | |
18942 | done | |
18943 | if test -z "$haveit"; then | |
18944 | if test -d "$additional_libdir"; then | |
18945 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
18946 | fi | |
18947 | fi | |
18948 | haveit= | |
18949 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18950 | ||
18951 | acl_save_prefix="$prefix" | |
18952 | prefix="$acl_final_prefix" | |
18953 | acl_save_exec_prefix="$exec_prefix" | |
18954 | exec_prefix="$acl_final_exec_prefix" | |
18955 | eval x=\"$x\" | |
18956 | exec_prefix="$acl_save_exec_prefix" | |
18957 | prefix="$acl_save_prefix" | |
18958 | ||
18959 | if test "X$x" = "X-L$additional_libdir"; then | |
18960 | haveit=yes | |
18961 | break | |
18962 | fi | |
18963 | done | |
18964 | if test -z "$haveit"; then | |
18965 | if test -d "$additional_libdir"; then | |
18966 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
18967 | fi | |
18968 | fi | |
18969 | fi | |
18970 | fi | |
18971 | ;; | |
18972 | -R*) | |
18973 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
18974 | if test "$enable_rpath" != no; then | |
18975 | haveit= | |
18976 | for x in $rpathdirs; do | |
18977 | if test "X$x" = "X$dir"; then | |
18978 | haveit=yes | |
18979 | break | |
18980 | fi | |
18981 | done | |
18982 | if test -z "$haveit"; then | |
18983 | rpathdirs="$rpathdirs $dir" | |
18984 | fi | |
18985 | haveit= | |
18986 | for x in $ltrpathdirs; do | |
18987 | if test "X$x" = "X$dir"; then | |
18988 | haveit=yes | |
18989 | break | |
18990 | fi | |
18991 | done | |
18992 | if test -z "$haveit"; then | |
18993 | ltrpathdirs="$ltrpathdirs $dir" | |
18994 | fi | |
18995 | fi | |
18996 | ;; | |
18997 | -l*) | |
18998 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
18999 | ;; | |
19000 | *.la) | |
19001 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19002 | ;; | |
19003 | *) | |
19004 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
19005 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
19006 | ;; | |
19007 | esac | |
19008 | done | |
19009 | fi | |
19010 | else | |
9f1528a1 AB |
19011 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19012 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
19013 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
19014 | else | |
19015 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext" | |
19016 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext" | |
19017 | fi | |
393fd4c3 YQ |
19018 | fi |
19019 | fi | |
19020 | fi | |
19021 | done | |
19022 | done | |
19023 | if test "X$rpathdirs" != "X"; then | |
19024 | if test -n "$hardcode_libdir_separator"; then | |
19025 | alldirs= | |
19026 | for found_dir in $rpathdirs; do | |
19027 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19028 | done | |
19029 | acl_save_libdir="$libdir" | |
19030 | libdir="$alldirs" | |
19031 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19032 | libdir="$acl_save_libdir" | |
19033 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
19034 | else | |
19035 | for found_dir in $rpathdirs; do | |
19036 | acl_save_libdir="$libdir" | |
19037 | libdir="$found_dir" | |
19038 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19039 | libdir="$acl_save_libdir" | |
19040 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
19041 | done | |
19042 | fi | |
19043 | fi | |
19044 | if test "X$ltrpathdirs" != "X"; then | |
19045 | for found_dir in $ltrpathdirs; do | |
19046 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
19047 | done | |
19048 | fi | |
19049 | ||
19050 | ||
19051 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19052 | ||
19053 | for element in $INCBABELTRACE; do | |
19054 | haveit= | |
19055 | for x in $CPPFLAGS; do | |
19056 | ||
19057 | acl_save_prefix="$prefix" | |
19058 | prefix="$acl_final_prefix" | |
19059 | acl_save_exec_prefix="$exec_prefix" | |
19060 | exec_prefix="$acl_final_exec_prefix" | |
19061 | eval x=\"$x\" | |
19062 | exec_prefix="$acl_save_exec_prefix" | |
19063 | prefix="$acl_save_prefix" | |
19064 | ||
19065 | if test "X$x" = "X$element"; then | |
19066 | haveit=yes | |
19067 | break | |
19068 | fi | |
19069 | done | |
19070 | if test -z "$haveit"; then | |
19071 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19072 | fi | |
19073 | done | |
19074 | ||
19075 | ||
19076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
19077 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
d0ac1c44 | 19078 | if ${ac_cv_libbabeltrace+:} false; then : |
393fd4c3 YQ |
19079 | $as_echo_n "(cached) " >&6 |
19080 | else | |
19081 | ||
19082 | ac_save_LIBS="$LIBS" | |
19083 | LIBS="$LIBS $LIBBABELTRACE" | |
19084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19085 | /* end confdefs.h. */ | |
19086 | #include <babeltrace/babeltrace.h> | |
19087 | #include <babeltrace/ctf/events.h> | |
19088 | #include <babeltrace/ctf/iterator.h> | |
19089 | int | |
19090 | main () | |
19091 | { | |
19092 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
19093 | struct bt_ctf_event *event = NULL; | |
19094 | const struct bt_definition *scope; | |
19095 | ||
13cdc2af | 19096 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 19097 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
19098 | scope = bt_ctf_get_top_level_scope (event, |
19099 | BT_STREAM_EVENT_HEADER); | |
19100 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
19101 | ||
19102 | ; | |
19103 | return 0; | |
19104 | } | |
19105 | _ACEOF | |
19106 | if ac_fn_c_try_link "$LINENO"; then : | |
19107 | ac_cv_libbabeltrace=yes | |
19108 | else | |
19109 | ac_cv_libbabeltrace=no | |
19110 | fi | |
19111 | rm -f core conftest.err conftest.$ac_objext \ | |
19112 | conftest$ac_exeext conftest.$ac_ext | |
19113 | LIBS="$ac_save_LIBS" | |
19114 | ||
19115 | fi | |
19116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
19117 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
19118 | if test "$ac_cv_libbabeltrace" = yes; then | |
19119 | HAVE_LIBBABELTRACE=yes | |
19120 | ||
19121 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
19122 | ||
19123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
19124 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
19125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
19126 | $as_echo "$LIBBABELTRACE" >&6; } | |
19127 | else | |
19128 | HAVE_LIBBABELTRACE=no | |
19129 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19130 | LIBBABELTRACE= | |
19131 | LTLIBBABELTRACE= | |
19132 | fi | |
19133 | ||
19134 | ||
19135 | ||
19136 | ||
19137 | ||
19138 | ||
19139 | CFLAGS=$saved_CFLAGS | |
19140 | ||
19141 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
19142 | if test "$with_babeltrace" = yes; then | |
d0ac1c44 | 19143 | as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 |
393fd4c3 YQ |
19144 | else |
19145 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
19146 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
19147 | fi | |
19148 | fi | |
19149 | fi | |
19150 | ||
ccb1ba62 CB |
19151 | # Check for xxhash |
19152 | ||
19153 | # Check whether --with-xxhash was given. | |
19154 | if test "${with_xxhash+set}" = set; then : | |
19155 | withval=$with_xxhash; | |
19156 | else | |
19157 | with_xxhash=auto | |
19158 | fi | |
19159 | ||
19160 | ||
1776e3e5 NA |
19161 | # Check whether --enable-libctf was given. |
19162 | if test "${enable_libctf+set}" = set; then : | |
19163 | enableval=$enable_libctf; | |
19164 | case "$enableval" in | |
19165 | yes|no) ;; | |
19166 | *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;; | |
19167 | esac | |
19168 | ||
19169 | else | |
19170 | enable_libctf=yes | |
19171 | fi | |
19172 | ||
19173 | ||
19174 | if test x${enable_static} = xno; then | |
19175 | LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so" | |
19176 | CTF_DEPS="../libctf/.libs/libctf.so" | |
19177 | else | |
19178 | LIBCTF="../libctf/.libs/libctf.a" | |
19179 | CTF_DEPS="$LIBCTF" | |
19180 | fi | |
19181 | if test "${enable_libctf}" = yes; then | |
19182 | ||
19183 | $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h | |
19184 | ||
19185 | else | |
19186 | LIBCTF= | |
19187 | CTF_DEPS= | |
19188 | fi | |
19189 | ||
19190 | ||
19191 | ||
19192 | ||
19193 | # If nativefile (NAT_FILE) is not set in configure.nat, we link to an | |
19194 | # empty version. | |
19195 | ||
ccb1ba62 CB |
19196 | if test "x$with_xxhash" != "xno"; then |
19197 | ||
19198 | ||
19199 | ||
19200 | ||
19201 | ||
19202 | ||
19203 | ||
19204 | ||
19205 | use_additional=yes | |
19206 | ||
19207 | acl_save_prefix="$prefix" | |
19208 | prefix="$acl_final_prefix" | |
19209 | acl_save_exec_prefix="$exec_prefix" | |
19210 | exec_prefix="$acl_final_exec_prefix" | |
19211 | ||
19212 | eval additional_includedir=\"$includedir\" | |
19213 | eval additional_libdir=\"$libdir\" | |
19214 | ||
19215 | exec_prefix="$acl_save_exec_prefix" | |
19216 | prefix="$acl_save_prefix" | |
19217 | ||
19218 | ||
19219 | # Check whether --with-libxxhash-prefix was given. | |
19220 | if test "${with_libxxhash_prefix+set}" = set; then : | |
19221 | withval=$with_libxxhash_prefix; | |
19222 | if test "X$withval" = "Xno"; then | |
19223 | use_additional=no | |
19224 | else | |
19225 | if test "X$withval" = "X"; then | |
19226 | ||
19227 | acl_save_prefix="$prefix" | |
19228 | prefix="$acl_final_prefix" | |
19229 | acl_save_exec_prefix="$exec_prefix" | |
19230 | exec_prefix="$acl_final_exec_prefix" | |
19231 | ||
19232 | eval additional_includedir=\"$includedir\" | |
19233 | eval additional_libdir=\"$libdir\" | |
19234 | ||
19235 | exec_prefix="$acl_save_exec_prefix" | |
19236 | prefix="$acl_save_prefix" | |
19237 | ||
19238 | else | |
19239 | additional_includedir="$withval/include" | |
19240 | additional_libdir="$withval/lib" | |
19241 | fi | |
19242 | fi | |
19243 | ||
19244 | fi | |
19245 | ||
9f1528a1 AB |
19246 | |
19247 | # Check whether --with-libxxhash-type was given. | |
19248 | if test "${with_libxxhash_type+set}" = set; then : | |
19249 | withval=$with_libxxhash_type; with_libxxhash_type=$withval | |
19250 | else | |
19251 | with_libxxhash_type=auto | |
19252 | fi | |
19253 | ||
19254 | lib_type=`eval echo \$with_libxxhash_type` | |
19255 | ||
ccb1ba62 CB |
19256 | LIBXXHASH= |
19257 | LTLIBXXHASH= | |
19258 | INCXXHASH= | |
19259 | rpathdirs= | |
19260 | ltrpathdirs= | |
19261 | names_already_handled= | |
19262 | names_next_round='xxhash ' | |
19263 | while test -n "$names_next_round"; do | |
19264 | names_this_round="$names_next_round" | |
19265 | names_next_round= | |
19266 | for name in $names_this_round; do | |
19267 | already_handled= | |
19268 | for n in $names_already_handled; do | |
19269 | if test "$n" = "$name"; then | |
19270 | already_handled=yes | |
19271 | break | |
19272 | fi | |
19273 | done | |
19274 | if test -z "$already_handled"; then | |
19275 | names_already_handled="$names_already_handled $name" | |
19276 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
19277 | eval value=\"\$HAVE_LIB$uppername\" | |
19278 | if test -n "$value"; then | |
19279 | if test "$value" = yes; then | |
19280 | eval value=\"\$LIB$uppername\" | |
19281 | test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" | |
19282 | eval value=\"\$LTLIB$uppername\" | |
19283 | test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" | |
19284 | else | |
19285 | : | |
19286 | fi | |
19287 | else | |
19288 | found_dir= | |
19289 | found_la= | |
19290 | found_so= | |
19291 | found_a= | |
19292 | if test $use_additional = yes; then | |
9f1528a1 | 19293 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
19294 | found_dir="$additional_libdir" |
19295 | found_so="$additional_libdir/lib$name.$shlibext" | |
19296 | if test -f "$additional_libdir/lib$name.la"; then | |
19297 | found_la="$additional_libdir/lib$name.la" | |
19298 | fi | |
9f1528a1 | 19299 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
19300 | if test -f "$additional_libdir/lib$name.$libext"; then |
19301 | found_dir="$additional_libdir" | |
19302 | found_a="$additional_libdir/lib$name.$libext" | |
19303 | if test -f "$additional_libdir/lib$name.la"; then | |
19304 | found_la="$additional_libdir/lib$name.la" | |
19305 | fi | |
19306 | fi | |
19307 | fi | |
19308 | fi | |
19309 | if test "X$found_dir" = "X"; then | |
19310 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19311 | ||
19312 | acl_save_prefix="$prefix" | |
19313 | prefix="$acl_final_prefix" | |
19314 | acl_save_exec_prefix="$exec_prefix" | |
19315 | exec_prefix="$acl_final_exec_prefix" | |
19316 | eval x=\"$x\" | |
19317 | exec_prefix="$acl_save_exec_prefix" | |
19318 | prefix="$acl_save_prefix" | |
19319 | ||
19320 | case "$x" in | |
19321 | -L*) | |
19322 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 19323 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
19324 | found_dir="$dir" |
19325 | found_so="$dir/lib$name.$shlibext" | |
19326 | if test -f "$dir/lib$name.la"; then | |
19327 | found_la="$dir/lib$name.la" | |
19328 | fi | |
9f1528a1 | 19329 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
19330 | if test -f "$dir/lib$name.$libext"; then |
19331 | found_dir="$dir" | |
19332 | found_a="$dir/lib$name.$libext" | |
19333 | if test -f "$dir/lib$name.la"; then | |
19334 | found_la="$dir/lib$name.la" | |
19335 | fi | |
19336 | fi | |
19337 | fi | |
19338 | ;; | |
19339 | esac | |
19340 | if test "X$found_dir" != "X"; then | |
19341 | break | |
19342 | fi | |
19343 | done | |
19344 | fi | |
19345 | if test "X$found_dir" != "X"; then | |
19346 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name" | |
19347 | if test "X$found_so" != "X"; then | |
19348 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
19349 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19350 | else | |
19351 | haveit= | |
19352 | for x in $ltrpathdirs; do | |
19353 | if test "X$x" = "X$found_dir"; then | |
19354 | haveit=yes | |
19355 | break | |
19356 | fi | |
19357 | done | |
19358 | if test -z "$haveit"; then | |
19359 | ltrpathdirs="$ltrpathdirs $found_dir" | |
19360 | fi | |
19361 | if test "$hardcode_direct" = yes; then | |
19362 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19363 | else | |
19364 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
19365 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19366 | haveit= | |
19367 | for x in $rpathdirs; do | |
19368 | if test "X$x" = "X$found_dir"; then | |
19369 | haveit=yes | |
19370 | break | |
19371 | fi | |
19372 | done | |
19373 | if test -z "$haveit"; then | |
19374 | rpathdirs="$rpathdirs $found_dir" | |
19375 | fi | |
19376 | else | |
19377 | haveit= | |
19378 | for x in $LDFLAGS $LIBXXHASH; do | |
19379 | ||
19380 | acl_save_prefix="$prefix" | |
19381 | prefix="$acl_final_prefix" | |
19382 | acl_save_exec_prefix="$exec_prefix" | |
19383 | exec_prefix="$acl_final_exec_prefix" | |
19384 | eval x=\"$x\" | |
19385 | exec_prefix="$acl_save_exec_prefix" | |
19386 | prefix="$acl_save_prefix" | |
19387 | ||
19388 | if test "X$x" = "X-L$found_dir"; then | |
19389 | haveit=yes | |
19390 | break | |
19391 | fi | |
19392 | done | |
19393 | if test -z "$haveit"; then | |
19394 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" | |
19395 | fi | |
19396 | if test "$hardcode_minus_L" != no; then | |
19397 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19398 | else | |
19399 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19400 | fi | |
19401 | fi | |
19402 | fi | |
19403 | fi | |
19404 | else | |
19405 | if test "X$found_a" != "X"; then | |
19406 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" | |
19407 | else | |
19408 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" | |
19409 | fi | |
19410 | fi | |
19411 | additional_includedir= | |
19412 | case "$found_dir" in | |
19413 | */lib | */lib/) | |
19414 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
19415 | additional_includedir="$basedir/include" | |
19416 | ;; | |
19417 | esac | |
19418 | if test "X$additional_includedir" != "X"; then | |
19419 | if test "X$additional_includedir" != "X/usr/include"; then | |
19420 | haveit= | |
19421 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
19422 | if test -n "$GCC"; then | |
19423 | case $host_os in | |
19424 | linux*) haveit=yes;; | |
19425 | esac | |
19426 | fi | |
19427 | fi | |
19428 | if test -z "$haveit"; then | |
19429 | for x in $CPPFLAGS $INCXXHASH; do | |
19430 | ||
19431 | acl_save_prefix="$prefix" | |
19432 | prefix="$acl_final_prefix" | |
19433 | acl_save_exec_prefix="$exec_prefix" | |
19434 | exec_prefix="$acl_final_exec_prefix" | |
19435 | eval x=\"$x\" | |
19436 | exec_prefix="$acl_save_exec_prefix" | |
19437 | prefix="$acl_save_prefix" | |
19438 | ||
19439 | if test "X$x" = "X-I$additional_includedir"; then | |
19440 | haveit=yes | |
19441 | break | |
19442 | fi | |
19443 | done | |
19444 | if test -z "$haveit"; then | |
19445 | if test -d "$additional_includedir"; then | |
19446 | INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" | |
19447 | fi | |
19448 | fi | |
19449 | fi | |
19450 | fi | |
19451 | fi | |
19452 | if test -n "$found_la"; then | |
19453 | save_libdir="$libdir" | |
19454 | case "$found_la" in | |
19455 | */* | *\\*) . "$found_la" ;; | |
19456 | *) . "./$found_la" ;; | |
19457 | esac | |
19458 | libdir="$save_libdir" | |
19459 | for dep in $dependency_libs; do | |
19460 | case "$dep" in | |
19461 | -L*) | |
19462 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
19463 | if test "X$additional_libdir" != "X/usr/lib"; then | |
19464 | haveit= | |
19465 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
19466 | if test -n "$GCC"; then | |
19467 | case $host_os in | |
19468 | linux*) haveit=yes;; | |
19469 | esac | |
19470 | fi | |
19471 | fi | |
19472 | if test -z "$haveit"; then | |
19473 | haveit= | |
19474 | for x in $LDFLAGS $LIBXXHASH; do | |
19475 | ||
19476 | acl_save_prefix="$prefix" | |
19477 | prefix="$acl_final_prefix" | |
19478 | acl_save_exec_prefix="$exec_prefix" | |
19479 | exec_prefix="$acl_final_exec_prefix" | |
19480 | eval x=\"$x\" | |
19481 | exec_prefix="$acl_save_exec_prefix" | |
19482 | prefix="$acl_save_prefix" | |
19483 | ||
19484 | if test "X$x" = "X-L$additional_libdir"; then | |
19485 | haveit=yes | |
19486 | break | |
19487 | fi | |
19488 | done | |
19489 | if test -z "$haveit"; then | |
19490 | if test -d "$additional_libdir"; then | |
19491 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" | |
19492 | fi | |
19493 | fi | |
19494 | haveit= | |
19495 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19496 | ||
19497 | acl_save_prefix="$prefix" | |
19498 | prefix="$acl_final_prefix" | |
19499 | acl_save_exec_prefix="$exec_prefix" | |
19500 | exec_prefix="$acl_final_exec_prefix" | |
19501 | eval x=\"$x\" | |
19502 | exec_prefix="$acl_save_exec_prefix" | |
19503 | prefix="$acl_save_prefix" | |
19504 | ||
19505 | if test "X$x" = "X-L$additional_libdir"; then | |
19506 | haveit=yes | |
19507 | break | |
19508 | fi | |
19509 | done | |
19510 | if test -z "$haveit"; then | |
19511 | if test -d "$additional_libdir"; then | |
19512 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" | |
19513 | fi | |
19514 | fi | |
19515 | fi | |
19516 | fi | |
19517 | ;; | |
19518 | -R*) | |
19519 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
19520 | if test "$enable_rpath" != no; then | |
19521 | haveit= | |
19522 | for x in $rpathdirs; do | |
19523 | if test "X$x" = "X$dir"; then | |
19524 | haveit=yes | |
19525 | break | |
19526 | fi | |
19527 | done | |
19528 | if test -z "$haveit"; then | |
19529 | rpathdirs="$rpathdirs $dir" | |
19530 | fi | |
19531 | haveit= | |
19532 | for x in $ltrpathdirs; do | |
19533 | if test "X$x" = "X$dir"; then | |
19534 | haveit=yes | |
19535 | break | |
19536 | fi | |
19537 | done | |
19538 | if test -z "$haveit"; then | |
19539 | ltrpathdirs="$ltrpathdirs $dir" | |
19540 | fi | |
19541 | fi | |
19542 | ;; | |
19543 | -l*) | |
19544 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
19545 | ;; | |
19546 | *.la) | |
19547 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19548 | ;; | |
19549 | *) | |
19550 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" | |
19551 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" | |
19552 | ;; | |
19553 | esac | |
19554 | done | |
19555 | fi | |
19556 | else | |
9f1528a1 AB |
19557 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19558 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19559 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" | |
19560 | else | |
19561 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext" | |
19562 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext" | |
19563 | fi | |
ccb1ba62 CB |
19564 | fi |
19565 | fi | |
19566 | fi | |
19567 | done | |
19568 | done | |
19569 | if test "X$rpathdirs" != "X"; then | |
19570 | if test -n "$hardcode_libdir_separator"; then | |
19571 | alldirs= | |
19572 | for found_dir in $rpathdirs; do | |
19573 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19574 | done | |
19575 | acl_save_libdir="$libdir" | |
19576 | libdir="$alldirs" | |
19577 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19578 | libdir="$acl_save_libdir" | |
19579 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19580 | else | |
19581 | for found_dir in $rpathdirs; do | |
19582 | acl_save_libdir="$libdir" | |
19583 | libdir="$found_dir" | |
19584 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19585 | libdir="$acl_save_libdir" | |
19586 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19587 | done | |
19588 | fi | |
19589 | fi | |
19590 | if test "X$ltrpathdirs" != "X"; then | |
19591 | for found_dir in $ltrpathdirs; do | |
19592 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" | |
19593 | done | |
19594 | fi | |
19595 | ||
19596 | ||
19597 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19598 | ||
19599 | for element in $INCXXHASH; do | |
19600 | haveit= | |
19601 | for x in $CPPFLAGS; do | |
19602 | ||
19603 | acl_save_prefix="$prefix" | |
19604 | prefix="$acl_final_prefix" | |
19605 | acl_save_exec_prefix="$exec_prefix" | |
19606 | exec_prefix="$acl_final_exec_prefix" | |
19607 | eval x=\"$x\" | |
19608 | exec_prefix="$acl_save_exec_prefix" | |
19609 | prefix="$acl_save_prefix" | |
19610 | ||
19611 | if test "X$x" = "X$element"; then | |
19612 | haveit=yes | |
19613 | break | |
19614 | fi | |
19615 | done | |
19616 | if test -z "$haveit"; then | |
19617 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19618 | fi | |
19619 | done | |
19620 | ||
19621 | ||
19622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 | |
19623 | $as_echo_n "checking for libxxhash... " >&6; } | |
19624 | if ${ac_cv_libxxhash+:} false; then : | |
19625 | $as_echo_n "(cached) " >&6 | |
19626 | else | |
19627 | ||
19628 | ac_save_LIBS="$LIBS" | |
19629 | LIBS="$LIBS $LIBXXHASH" | |
19630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19631 | /* end confdefs.h. */ | |
19632 | #include <xxhash.h> | |
19633 | int | |
19634 | main () | |
19635 | { | |
19636 | XXH32("foo", 3, 0); | |
19637 | ||
19638 | ; | |
19639 | return 0; | |
19640 | } | |
19641 | _ACEOF | |
19642 | if ac_fn_c_try_link "$LINENO"; then : | |
19643 | ac_cv_libxxhash=yes | |
19644 | else | |
19645 | ac_cv_libxxhash=no | |
19646 | fi | |
19647 | rm -f core conftest.err conftest.$ac_objext \ | |
19648 | conftest$ac_exeext conftest.$ac_ext | |
19649 | LIBS="$ac_save_LIBS" | |
19650 | ||
19651 | fi | |
19652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 | |
19653 | $as_echo "$ac_cv_libxxhash" >&6; } | |
19654 | if test "$ac_cv_libxxhash" = yes; then | |
19655 | HAVE_LIBXXHASH=yes | |
19656 | ||
19657 | $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h | |
19658 | ||
19659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 | |
19660 | $as_echo_n "checking how to link with libxxhash... " >&6; } | |
19661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 | |
19662 | $as_echo "$LIBXXHASH" >&6; } | |
19663 | else | |
19664 | HAVE_LIBXXHASH=no | |
19665 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19666 | LIBXXHASH= | |
19667 | LTLIBXXHASH= | |
19668 | fi | |
19669 | ||
19670 | ||
19671 | ||
19672 | ||
19673 | ||
19674 | ||
19675 | if test "$HAVE_LIBXXHASH" != yes; then | |
19676 | if test "$with_xxhash" = yes; then | |
19677 | as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 | |
19678 | fi | |
19679 | fi | |
19680 | if test "x$with_xxhash" = "xauto"; then | |
19681 | with_xxhash="$HAVE_LIBXXHASH" | |
19682 | fi | |
19683 | fi | |
19684 | ||
19685 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 | |
19686 | $as_echo_n "checking whether to use xxhash... " >&6; } | |
19687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 | |
19688 | $as_echo "$with_xxhash" >&6; } | |
19689 | ||
a0a461e5 | 19690 | NM_H= |
c906108c SS |
19691 | rm -f nm.h |
19692 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
19693 | case "${nativefile}" in |
19694 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
19695 | * ) GDB_NM_FILE="${nativefile}" | |
19696 | esac | |
a0a461e5 TT |
19697 | ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE" |
19698 | ||
60ca704f SE |
19699 | |
19700 | cat >>confdefs.h <<_ACEOF | |
b78960be | 19701 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 19702 | _ACEOF |
5a2402b8 | 19703 | |
a0a461e5 | 19704 | NM_H=nm.h |
c906108c | 19705 | fi |
5a2402b8 AC |
19706 | |
19707 | ||
a0a461e5 | 19708 | |
e3487908 GKB |
19709 | for ac_prog in xsltproc |
19710 | do | |
19711 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
19712 | set dummy $ac_prog; ac_word=$2 | |
19713 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
19714 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 19715 | if ${ac_cv_path_XSLTPROC+:} false; then : |
e3487908 GKB |
19716 | $as_echo_n "(cached) " >&6 |
19717 | else | |
19718 | case $XSLTPROC in | |
19719 | [\\/]* | ?:[\\/]*) | |
19720 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
19721 | ;; | |
19722 | *) | |
19723 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
19724 | for as_dir in $PATH | |
19725 | do | |
19726 | IFS=$as_save_IFS | |
19727 | test -z "$as_dir" && as_dir=. | |
19728 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 19729 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e3487908 GKB |
19730 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" |
19731 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
19732 | break 2 | |
19733 | fi | |
19734 | done | |
19735 | done | |
19736 | IFS=$as_save_IFS | |
19737 | ||
19738 | ;; | |
19739 | esac | |
19740 | fi | |
19741 | XSLTPROC=$ac_cv_path_XSLTPROC | |
19742 | if test -n "$XSLTPROC"; then | |
19743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
19744 | $as_echo "$XSLTPROC" >&6; } | |
19745 | else | |
19746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
19747 | $as_echo "no" >&6; } | |
19748 | fi | |
19749 | ||
19750 | ||
19751 | test -n "$XSLTPROC" && break | |
19752 | done | |
19753 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
19754 | ||
19755 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
19756 | if test "${XSLTPROC}" = missing; then | |
d0ac1c44 | 19757 | as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 |
e3487908 GKB |
19758 | fi |
19759 | fi | |
19760 | ||
19761 | ||
c906108c SS |
19762 | |
19763 | ||
c906108c | 19764 | |
81ecdfbb | 19765 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 19766 | |
bec39cab | 19767 | |
8ecfd7bd SDJ |
19768 | |
19769 | # Check whether we will enable the inclusion of unit tests when | |
19770 | # compiling GDB. | |
19771 | # | |
19772 | # The default value of this option changes depending whether we're on | |
19773 | # development mode (in which case it's "true") or not (in which case | |
db6878ac SM |
19774 | # it's "false"). The $development variable is set by the GDB_AC_COMMON |
19775 | # macro, which must therefore be used before GDB_AC_SELFTEST. | |
4d696a5c SM |
19776 | |
19777 | if test "x$development" != xtrue && test "x$development" != xfalse; then : | |
19778 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 | |
19779 | fi | |
19780 | ||
8ecfd7bd SDJ |
19781 | # Check whether --enable-unit-tests was given. |
19782 | if test "${enable_unit_tests+set}" = set; then : | |
19783 | enableval=$enable_unit_tests; case "${enableval}" in | |
19784 | yes) enable_unittests=true ;; | |
19785 | no) enable_unittests=false ;; | |
19786 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
19787 | esac | |
19788 | else | |
19789 | enable_unittests=$development | |
19790 | fi | |
19791 | ||
19792 | ||
19793 | if $enable_unittests; then | |
dcd1f979 TT |
19794 | |
19795 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
19796 | ||
8ecfd7bd | 19797 | |
74cd3f9d SM |
19798 | CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)" |
19799 | CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)" | |
8ecfd7bd | 19800 | |
dcd1f979 TT |
19801 | fi |
19802 | ||
b292c783 | 19803 | |
8ecfd7bd | 19804 | |
f6a88844 JM |
19805 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
19806 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
19807 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
19808 | GDB_TRANSFORM_NAME=gdb | |
19809 | fi | |
19810 | ||
19811 | ||
19812 | ||
19813 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19814 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
19815 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
19816 | GCORE_TRANSFORM_NAME=gcore | |
19817 | fi | |
19818 | ||
b292c783 JK |
19819 | |
19820 | ac_config_files="$ac_config_files gcore" | |
19821 | ||
141ec9f6 | 19822 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" |
81ecdfbb | 19823 | |
f99d1d37 TT |
19824 | # Transform the name of some programs for the testsuite/lib/pdtrace |
19825 | # test tool. | |
19826 | ||
19827 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19828 | STRIP_TRANSFORM_NAME=`echo strip | sed -e "$gdb_ac_transform"` | |
19829 | if test "x$STRIP_TRANSFORM_NAME" = x; then | |
19830 | STRIP_TRANSFORM_NAME=strip | |
19831 | fi | |
19832 | ||
19833 | ||
19834 | ||
19835 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19836 | READELF_TRANSFORM_NAME=`echo readelf | sed -e "$gdb_ac_transform"` | |
19837 | if test "x$READELF_TRANSFORM_NAME" = x; then | |
19838 | READELF_TRANSFORM_NAME=readelf | |
19839 | fi | |
19840 | ||
19841 | ||
19842 | ||
19843 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19844 | GAS_TRANSFORM_NAME=`echo as | sed -e "$gdb_ac_transform"` | |
19845 | if test "x$GAS_TRANSFORM_NAME" = x; then | |
19846 | GAS_TRANSFORM_NAME=as | |
19847 | fi | |
19848 | ||
19849 | ||
19850 | ||
19851 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19852 | NM_TRANSFORM_NAME=`echo nm | sed -e "$gdb_ac_transform"` | |
19853 | if test "x$NM_TRANSFORM_NAME" = x; then | |
19854 | NM_TRANSFORM_NAME=nm | |
19855 | fi | |
19856 | ||
19857 | ||
19858 | ac_config_files="$ac_config_files testsuite/lib/pdtrace" | |
19859 | ||
19860 | ac_config_files="$ac_config_files testsuite/Makefile" | |
19861 | ||
89a34d1b | 19862 | |
bec39cab AC |
19863 | cat >confcache <<\_ACEOF |
19864 | # This file is a shell script that caches the results of configure | |
19865 | # tests run on this system so they can be shared between configure | |
19866 | # scripts and configure runs, see configure's option --config-cache. | |
19867 | # It is not useful on other systems. If it contains results you don't | |
19868 | # want to keep, you may remove or edit it. | |
19869 | # | |
19870 | # config.status only pays attention to the cache file if you give it | |
19871 | # the --recheck option to rerun configure. | |
19872 | # | |
19873 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
19874 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
19875 | # following values. | |
19876 | ||
19877 | _ACEOF | |
19878 | ||
19879 | # The following way of writing the cache mishandles newlines in values, | |
19880 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 19881 | # So, we kill variables containing newlines. |
bec39cab AC |
19882 | # Ultrix sh set writes to stderr and can't be redirected directly, |
19883 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
19884 | ( |
19885 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
19886 | eval ac_val=\$$ac_var | |
19887 | case $ac_val in #( | |
19888 | *${as_nl}*) | |
19889 | case $ac_var in #( | |
19890 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
19891 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
19892 | esac | |
19893 | case $ac_var in #( | |
19894 | _ | IFS | as_nl) ;; #( | |
19895 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
19896 | *) { eval $ac_var=; unset $ac_var;} ;; | |
19897 | esac ;; | |
19898 | esac | |
19899 | done | |
19900 | ||
bec39cab | 19901 | (set) 2>&1 | |
81ecdfbb RW |
19902 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
19903 | *${as_nl}ac_space=\ *) | |
19904 | # `set' does not quote correctly, so add quotes: double-quote | |
19905 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
19906 | sed -n \ |
19907 | "s/'/'\\\\''/g; | |
19908 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 19909 | ;; #( |
bec39cab AC |
19910 | *) |
19911 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 19912 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 19913 | ;; |
81ecdfbb RW |
19914 | esac | |
19915 | sort | |
19916 | ) | | |
bec39cab | 19917 | sed ' |
81ecdfbb | 19918 | /^ac_cv_env_/b end |
bec39cab | 19919 | t clear |
81ecdfbb | 19920 | :clear |
bec39cab AC |
19921 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
19922 | t end | |
81ecdfbb RW |
19923 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
19924 | :end' >>confcache | |
19925 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
19926 | if test -w "$cache_file"; then | |
d0ac1c44 | 19927 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
19928 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
19929 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
19930 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
19931 | cat confcache >"$cache_file" | |
19932 | else | |
19933 | case $cache_file in #( | |
19934 | */* | ?:*) | |
19935 | mv -f confcache "$cache_file"$$ && | |
19936 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
19937 | *) | |
19938 | mv -f confcache "$cache_file" ;; | |
19939 | esac | |
19940 | fi | |
19941 | fi | |
bec39cab | 19942 | else |
81ecdfbb RW |
19943 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
19944 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
19945 | fi |
19946 | fi | |
19947 | rm -f confcache | |
19948 | ||
19949 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
19950 | # Let make expand exec_prefix. | |
19951 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
19952 | ||
bec39cab AC |
19953 | DEFS=-DHAVE_CONFIG_H |
19954 | ||
19955 | ac_libobjs= | |
19956 | ac_ltlibobjs= | |
d0ac1c44 | 19957 | U= |
bec39cab AC |
19958 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
19959 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
19960 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
19961 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
19962 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
19963 | # will be set to the directory where LIBOBJS objects are built. | |
19964 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
19965 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
19966 | done |
19967 | LIBOBJS=$ac_libobjs | |
19968 | ||
19969 | LTLIBOBJS=$ac_ltlibobjs | |
19970 | ||
19971 | ||
85981d60 | 19972 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 19973 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
81ecdfbb | 19974 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
85981d60 | 19975 | fi |
4df42755 | 19976 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
d0ac1c44 | 19977 | as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. |
4df42755 DE |
19978 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19979 | fi | |
19980 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
d0ac1c44 | 19981 | as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. |
4df42755 DE |
19982 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19983 | fi | |
81ecdfbb RW |
19984 | |
19985 | ||
d0ac1c44 | 19986 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 19987 | ac_write_fail=0 |
bec39cab AC |
19988 | ac_clean_files_save=$ac_clean_files |
19989 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
19990 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
19991 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
19992 | as_write_fail=0 | |
19993 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
19994 | #! $SHELL |
19995 | # Generated by $as_me. | |
19996 | # Run this file to recreate the current configuration. | |
19997 | # Compiler output produced by configure, useful for debugging | |
19998 | # configure, is in config.log if it exists. | |
19999 | ||
20000 | debug=false | |
20001 | ac_cs_recheck=false | |
20002 | ac_cs_silent=false | |
bec39cab | 20003 | |
81ecdfbb RW |
20004 | SHELL=\${CONFIG_SHELL-$SHELL} |
20005 | export SHELL | |
20006 | _ASEOF | |
20007 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
20008 | ## -------------------- ## | |
20009 | ## M4sh Initialization. ## | |
20010 | ## -------------------- ## | |
20011 | ||
20012 | # Be more Bourne compatible | |
20013 | DUALCASE=1; export DUALCASE # for MKS sh | |
20014 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
20015 | emulate sh |
20016 | NULLCMD=: | |
81ecdfbb | 20017 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
20018 | # is contrary to our usage. Disable this feature. |
20019 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
20020 | setopt NO_GLOB_SUBST |
20021 | else | |
20022 | case `(set -o) 2>/dev/null` in #( | |
20023 | *posix*) : | |
20024 | set -o posix ;; #( | |
20025 | *) : | |
20026 | ;; | |
20027 | esac | |
bec39cab | 20028 | fi |
bec39cab | 20029 | |
81ecdfbb RW |
20030 | |
20031 | as_nl=' | |
20032 | ' | |
20033 | export as_nl | |
20034 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
20035 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
20036 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
20037 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
20038 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
20039 | # but without wasting forks for bash or zsh. | |
20040 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
20041 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
20042 | as_echo='print -r --' | |
20043 | as_echo_n='print -rn --' | |
20044 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
20045 | as_echo='printf %s\n' | |
20046 | as_echo_n='printf %s' | |
20047 | else | |
20048 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
20049 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
20050 | as_echo_n='/usr/ucb/echo -n' | |
20051 | else | |
20052 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
20053 | as_echo_n_body='eval | |
20054 | arg=$1; | |
20055 | case $arg in #( | |
20056 | *"$as_nl"*) | |
20057 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
20058 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
20059 | esac; | |
20060 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
20061 | ' | |
20062 | export as_echo_n_body | |
20063 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
20064 | fi | |
20065 | export as_echo_body | |
20066 | as_echo='sh -c $as_echo_body as_echo' | |
20067 | fi | |
20068 | ||
20069 | # The user is always right. | |
20070 | if test "${PATH_SEPARATOR+set}" != set; then | |
20071 | PATH_SEPARATOR=: | |
20072 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
20073 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
20074 | PATH_SEPARATOR=';' | |
20075 | } | |
bec39cab AC |
20076 | fi |
20077 | ||
20078 | ||
81ecdfbb RW |
20079 | # IFS |
20080 | # We need space, tab and new line, in precisely that order. Quoting is | |
20081 | # there to prevent editors from complaining about space-tab. | |
20082 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
20083 | # splitting by setting IFS to empty value.) | |
20084 | IFS=" "" $as_nl" | |
20085 | ||
20086 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 20087 | as_myself= |
81ecdfbb RW |
20088 | case $0 in #(( |
20089 | *[\\/]* ) as_myself=$0 ;; | |
20090 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20091 | for as_dir in $PATH | |
20092 | do | |
20093 | IFS=$as_save_IFS | |
20094 | test -z "$as_dir" && as_dir=. | |
20095 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
20096 | done | |
20097 | IFS=$as_save_IFS | |
20098 | ||
20099 | ;; | |
20100 | esac | |
20101 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
20102 | # in which case we are not to be found in the path. | |
20103 | if test "x$as_myself" = x; then | |
20104 | as_myself=$0 | |
20105 | fi | |
20106 | if test ! -f "$as_myself"; then | |
20107 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
20108 | exit 1 | |
20109 | fi | |
20110 | ||
20111 | # Unset variables that we do not need and which cause bugs (e.g. in | |
20112 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
20113 | # suppresses any "Segmentation fault" message there. '((' could | |
20114 | # trigger a bug in pdksh 5.2.14. | |
20115 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
20116 | do eval test x\${$as_var+set} = xset \ | |
20117 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
20118 | done | |
bec39cab AC |
20119 | PS1='$ ' |
20120 | PS2='> ' | |
20121 | PS4='+ ' | |
20122 | ||
20123 | # NLS nuisances. | |
81ecdfbb RW |
20124 | LC_ALL=C |
20125 | export LC_ALL | |
20126 | LANGUAGE=C | |
20127 | export LANGUAGE | |
20128 | ||
20129 | # CDPATH. | |
20130 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
20131 | ||
20132 | ||
d0ac1c44 SM |
20133 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
20134 | # ---------------------------------------- | |
81ecdfbb RW |
20135 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
20136 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 20137 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
20138 | as_fn_error () |
20139 | { | |
d0ac1c44 SM |
20140 | as_status=$1; test $as_status -eq 0 && as_status=1 |
20141 | if test "$4"; then | |
20142 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
20143 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 20144 | fi |
d0ac1c44 | 20145 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
20146 | as_fn_exit $as_status |
20147 | } # as_fn_error | |
20148 | ||
20149 | ||
20150 | # as_fn_set_status STATUS | |
20151 | # ----------------------- | |
20152 | # Set $? to STATUS, without forking. | |
20153 | as_fn_set_status () | |
20154 | { | |
20155 | return $1 | |
20156 | } # as_fn_set_status | |
20157 | ||
20158 | # as_fn_exit STATUS | |
20159 | # ----------------- | |
20160 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
20161 | as_fn_exit () | |
20162 | { | |
20163 | set +e | |
20164 | as_fn_set_status $1 | |
20165 | exit $1 | |
20166 | } # as_fn_exit | |
20167 | ||
20168 | # as_fn_unset VAR | |
20169 | # --------------- | |
20170 | # Portably unset VAR. | |
20171 | as_fn_unset () | |
20172 | { | |
20173 | { eval $1=; unset $1;} | |
20174 | } | |
20175 | as_unset=as_fn_unset | |
20176 | # as_fn_append VAR VALUE | |
20177 | # ---------------------- | |
20178 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
20179 | # advantage of any shell optimizations that allow amortized linear growth over | |
20180 | # repeated appends, instead of the typical quadratic growth present in naive | |
20181 | # implementations. | |
20182 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
20183 | eval 'as_fn_append () | |
20184 | { | |
20185 | eval $1+=\$2 | |
20186 | }' | |
20187 | else | |
20188 | as_fn_append () | |
20189 | { | |
20190 | eval $1=\$$1\$2 | |
20191 | } | |
20192 | fi # as_fn_append | |
20193 | ||
20194 | # as_fn_arith ARG... | |
20195 | # ------------------ | |
20196 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
20197 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
20198 | # must be portable across $(()) and expr. | |
20199 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
20200 | eval 'as_fn_arith () | |
20201 | { | |
20202 | as_val=$(( $* )) | |
20203 | }' | |
20204 | else | |
20205 | as_fn_arith () | |
20206 | { | |
20207 | as_val=`expr "$@" || test $? -eq 1` | |
20208 | } | |
20209 | fi # as_fn_arith | |
bec39cab | 20210 | |
81ecdfbb RW |
20211 | |
20212 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
20213 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
20214 | as_expr=expr |
20215 | else | |
20216 | as_expr=false | |
20217 | fi | |
20218 | ||
81ecdfbb | 20219 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
20220 | as_basename=basename |
20221 | else | |
20222 | as_basename=false | |
20223 | fi | |
20224 | ||
81ecdfbb RW |
20225 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
20226 | as_dirname=dirname | |
20227 | else | |
20228 | as_dirname=false | |
20229 | fi | |
bec39cab | 20230 | |
81ecdfbb | 20231 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
20232 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
20233 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
20234 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
20235 | $as_echo X/"$0" | | |
20236 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
20237 | s//\1/ | |
20238 | q | |
20239 | } | |
20240 | /^X\/\(\/\/\)$/{ | |
20241 | s//\1/ | |
20242 | q | |
20243 | } | |
20244 | /^X\/\(\/\).*/{ | |
20245 | s//\1/ | |
20246 | q | |
20247 | } | |
20248 | s/.*/./; q'` | |
b4e70030 | 20249 | |
b4e70030 JB |
20250 | # Avoid depending upon Character Ranges. |
20251 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
20252 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
20253 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
20254 | as_cr_digits='0123456789' | |
20255 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
20256 | ||
81ecdfbb RW |
20257 | ECHO_C= ECHO_N= ECHO_T= |
20258 | case `echo -n x` in #((((( | |
20259 | -n*) | |
20260 | case `echo 'xy\c'` in | |
20261 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
20262 | xy) ECHO_C='\c';; | |
20263 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
20264 | ECHO_T=' ';; | |
20265 | esac;; | |
20266 | *) | |
20267 | ECHO_N='-n';; | |
bec39cab AC |
20268 | esac |
20269 | ||
81ecdfbb RW |
20270 | rm -f conf$$ conf$$.exe conf$$.file |
20271 | if test -d conf$$.dir; then | |
20272 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 20273 | else |
81ecdfbb RW |
20274 | rm -f conf$$.dir |
20275 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 20276 | fi |
81ecdfbb RW |
20277 | if (echo >conf$$.file) 2>/dev/null; then |
20278 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 20279 | as_ln_s='ln -s' |
81ecdfbb RW |
20280 | # ... but there are two gotchas: |
20281 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
20282 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 20283 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 20284 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 20285 | as_ln_s='cp -pR' |
81ecdfbb RW |
20286 | elif ln conf$$.file conf$$ 2>/dev/null; then |
20287 | as_ln_s=ln | |
20288 | else | |
d0ac1c44 | 20289 | as_ln_s='cp -pR' |
b4e70030 | 20290 | fi |
bec39cab | 20291 | else |
d0ac1c44 | 20292 | as_ln_s='cp -pR' |
bec39cab | 20293 | fi |
81ecdfbb RW |
20294 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
20295 | rmdir conf$$.dir 2>/dev/null | |
20296 | ||
20297 | ||
20298 | # as_fn_mkdir_p | |
20299 | # ------------- | |
20300 | # Create "$as_dir" as a directory, including parents if necessary. | |
20301 | as_fn_mkdir_p () | |
20302 | { | |
20303 | ||
20304 | case $as_dir in #( | |
20305 | -*) as_dir=./$as_dir;; | |
20306 | esac | |
20307 | test -d "$as_dir" || eval $as_mkdir_p || { | |
20308 | as_dirs= | |
20309 | while :; do | |
20310 | case $as_dir in #( | |
20311 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
20312 | *) as_qdir=$as_dir;; | |
20313 | esac | |
20314 | as_dirs="'$as_qdir' $as_dirs" | |
20315 | as_dir=`$as_dirname -- "$as_dir" || | |
20316 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
20317 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
20318 | X"$as_dir" : 'X\(//\)$' \| \ | |
20319 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
20320 | $as_echo X"$as_dir" | | |
20321 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
20322 | s//\1/ | |
20323 | q | |
20324 | } | |
20325 | /^X\(\/\/\)[^/].*/{ | |
20326 | s//\1/ | |
20327 | q | |
20328 | } | |
20329 | /^X\(\/\/\)$/{ | |
20330 | s//\1/ | |
20331 | q | |
20332 | } | |
20333 | /^X\(\/\).*/{ | |
20334 | s//\1/ | |
20335 | q | |
20336 | } | |
20337 | s/.*/./; q'` | |
20338 | test -d "$as_dir" && break | |
20339 | done | |
20340 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 20341 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb | 20342 | |
bec39cab | 20343 | |
81ecdfbb | 20344 | } # as_fn_mkdir_p |
bec39cab | 20345 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 20346 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
20347 | else |
20348 | test -d ./-p && rmdir ./-p | |
20349 | as_mkdir_p=false | |
20350 | fi | |
20351 | ||
d0ac1c44 SM |
20352 | |
20353 | # as_fn_executable_p FILE | |
20354 | # ----------------------- | |
20355 | # Test if FILE is an executable regular file. | |
20356 | as_fn_executable_p () | |
20357 | { | |
20358 | test -f "$1" && test -x "$1" | |
20359 | } # as_fn_executable_p | |
20360 | as_test_x='test -x' | |
20361 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
20362 | |
20363 | # Sed expression to map a string onto a valid CPP name. | |
20364 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
20365 | ||
20366 | # Sed expression to map a string onto a valid variable name. | |
20367 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
20368 | ||
20369 | ||
bec39cab | 20370 | exec 6>&1 |
81ecdfbb RW |
20371 | ## ----------------------------------- ## |
20372 | ## Main body of $CONFIG_STATUS script. ## | |
20373 | ## ----------------------------------- ## | |
20374 | _ASEOF | |
20375 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
20376 | ||
20377 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20378 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 20379 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
20380 | # values after options handling. |
20381 | ac_log=" | |
bec39cab | 20382 | This file was extended by $as_me, which was |
d0ac1c44 | 20383 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
20384 | |
20385 | CONFIG_FILES = $CONFIG_FILES | |
20386 | CONFIG_HEADERS = $CONFIG_HEADERS | |
20387 | CONFIG_LINKS = $CONFIG_LINKS | |
20388 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
20389 | $ $0 $@ | |
20390 | ||
81ecdfbb RW |
20391 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
20392 | " | |
20393 | ||
bec39cab AC |
20394 | _ACEOF |
20395 | ||
81ecdfbb RW |
20396 | case $ac_config_files in *" |
20397 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
20398 | esac | |
234b45d4 | 20399 | |
81ecdfbb RW |
20400 | case $ac_config_headers in *" |
20401 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
20402 | esac | |
b4e70030 | 20403 | |
b4e70030 | 20404 | |
81ecdfbb RW |
20405 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
20406 | # Files that config.status was made for. | |
20407 | config_files="$ac_config_files" | |
20408 | config_headers="$ac_config_headers" | |
20409 | config_links="$ac_config_links" | |
20410 | config_commands="$ac_config_commands" | |
234b45d4 | 20411 | |
81ecdfbb | 20412 | _ACEOF |
b4e70030 | 20413 | |
81ecdfbb | 20414 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 20415 | ac_cs_usage="\ |
81ecdfbb RW |
20416 | \`$as_me' instantiates files and other configuration actions |
20417 | from templates according to the current configuration. Unless the files | |
20418 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 20419 | |
81ecdfbb | 20420 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 20421 | |
bec39cab | 20422 | -h, --help print this help, then exit |
81ecdfbb | 20423 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 20424 | --config print configuration, then exit |
81ecdfbb RW |
20425 | -q, --quiet, --silent |
20426 | do not print progress messages | |
bec39cab AC |
20427 | -d, --debug don't remove temporary files |
20428 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
20429 | --file=FILE[:TEMPLATE] |
20430 | instantiate the configuration file FILE | |
20431 | --header=FILE[:TEMPLATE] | |
20432 | instantiate the configuration header FILE | |
234b45d4 | 20433 | |
bec39cab AC |
20434 | Configuration files: |
20435 | $config_files | |
234b45d4 | 20436 | |
bec39cab AC |
20437 | Configuration headers: |
20438 | $config_headers | |
234b45d4 | 20439 | |
bec39cab AC |
20440 | Configuration links: |
20441 | $config_links | |
234b45d4 | 20442 | |
bec39cab AC |
20443 | Configuration commands: |
20444 | $config_commands | |
20445 | ||
81ecdfbb | 20446 | Report bugs to the package provider." |
b4e70030 | 20447 | |
81ecdfbb RW |
20448 | _ACEOF |
20449 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20450 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
20451 | ac_cs_version="\\ |
20452 | config.status | |
d0ac1c44 SM |
20453 | configured by $0, generated by GNU Autoconf 2.69, |
20454 | with options \\"\$ac_cs_config\\" | |
bec39cab | 20455 | |
d0ac1c44 | 20456 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
20457 | This config.status script is free software; the Free Software Foundation |
20458 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
20459 | |
20460 | ac_pwd='$ac_pwd' | |
20461 | srcdir='$srcdir' | |
20462 | INSTALL='$INSTALL' | |
81ecdfbb RW |
20463 | AWK='$AWK' |
20464 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
20465 | _ACEOF |
20466 | ||
81ecdfbb RW |
20467 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20468 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
20469 | ac_need_defaults=: |
20470 | while test $# != 0 | |
20471 | do | |
20472 | case $1 in | |
d0ac1c44 | 20473 | --*=?*) |
81ecdfbb RW |
20474 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
20475 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 20476 | ac_shift=: |
c906108c | 20477 | ;; |
d0ac1c44 SM |
20478 | --*=) |
20479 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
20480 | ac_optarg= | |
20481 | ac_shift=: | |
20482 | ;; | |
81ecdfbb | 20483 | *) |
bec39cab AC |
20484 | ac_option=$1 |
20485 | ac_optarg=$2 | |
20486 | ac_shift=shift | |
c906108c | 20487 | ;; |
bec39cab | 20488 | esac |
c906108c | 20489 | |
bec39cab AC |
20490 | case $ac_option in |
20491 | # Handling of the options. | |
bec39cab AC |
20492 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
20493 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
20494 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
20495 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
20496 | --config | --confi | --conf | --con | --co | --c ) |
20497 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 20498 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
20499 | debug=: ;; |
20500 | --file | --fil | --fi | --f ) | |
20501 | $ac_shift | |
81ecdfbb RW |
20502 | case $ac_optarg in |
20503 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 20504 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
20505 | esac |
20506 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
20507 | ac_need_defaults=false;; |
20508 | --header | --heade | --head | --hea ) | |
20509 | $ac_shift | |
81ecdfbb RW |
20510 | case $ac_optarg in |
20511 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
20512 | esac | |
20513 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 20514 | ac_need_defaults=false;; |
81ecdfbb RW |
20515 | --he | --h) |
20516 | # Conflict between --help and --header | |
d0ac1c44 | 20517 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
20518 | Try \`$0 --help' for more information.";; |
20519 | --help | --hel | -h ) | |
20520 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
20521 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
20522 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
20523 | ac_cs_silent=: ;; | |
c906108c | 20524 | |
bec39cab | 20525 | # This is an error. |
d0ac1c44 | 20526 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 20527 | Try \`$0 --help' for more information." ;; |
c906108c | 20528 | |
81ecdfbb RW |
20529 | *) as_fn_append ac_config_targets " $1" |
20530 | ac_need_defaults=false ;; | |
c906108c | 20531 | |
bec39cab AC |
20532 | esac |
20533 | shift | |
20534 | done | |
c906108c | 20535 | |
bec39cab | 20536 | ac_configure_extra_args= |
c906108c | 20537 | |
bec39cab AC |
20538 | if $ac_cs_silent; then |
20539 | exec 6>/dev/null | |
20540 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
20541 | fi | |
c906108c | 20542 | |
bec39cab | 20543 | _ACEOF |
81ecdfbb | 20544 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 20545 | if \$ac_cs_recheck; then |
d0ac1c44 | 20546 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
20547 | shift |
20548 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
20549 | CONFIG_SHELL='$SHELL' | |
20550 | export CONFIG_SHELL | |
20551 | exec "\$@" | |
bec39cab AC |
20552 | fi |
20553 | ||
20554 | _ACEOF | |
81ecdfbb RW |
20555 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20556 | exec 5>>config.log | |
20557 | { | |
20558 | echo | |
20559 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
20560 | ## Running $as_me. ## | |
20561 | _ASBOX | |
20562 | $as_echo "$ac_log" | |
20563 | } >&5 | |
bec39cab | 20564 | |
81ecdfbb RW |
20565 | _ACEOF |
20566 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 20567 | # |
81ecdfbb | 20568 | # INIT-COMMANDS |
c906108c | 20569 | # |
a417dc56 | 20570 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
a0a461e5 | 20571 | GDB_NM_FILE=$GDB_NM_FILE |
b4e70030 | 20572 | |
bec39cab AC |
20573 | _ACEOF |
20574 | ||
81ecdfbb | 20575 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 20576 | |
81ecdfbb | 20577 | # Handling of arguments. |
bec39cab | 20578 | for ac_config_target in $ac_config_targets |
c906108c | 20579 | do |
81ecdfbb RW |
20580 | case $ac_config_target in |
20581 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
20582 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 20583 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
a0a461e5 | 20584 | "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;; |
b292c783 | 20585 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 20586 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 20587 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
141ec9f6 | 20588 | "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; |
5ae98d25 | 20589 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 20590 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
f99d1d37 TT |
20591 | "testsuite/lib/pdtrace") CONFIG_FILES="$CONFIG_FILES testsuite/lib/pdtrace" ;; |
20592 | "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; | |
81ecdfbb | 20593 | |
d0ac1c44 | 20594 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c906108c SS |
20595 | esac |
20596 | done | |
20597 | ||
81ecdfbb | 20598 | |
bec39cab AC |
20599 | # If the user did not use the arguments to specify the items to instantiate, |
20600 | # then the envvar interface is used. Set only those that are not. | |
20601 | # We use the long form for the default assignment because of an extremely | |
20602 | # bizarre bug on SunOS 4.1.3. | |
20603 | if $ac_need_defaults; then | |
20604 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
20605 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
20606 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
20607 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
20608 | fi | |
20609 | ||
b4e70030 | 20610 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 20611 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 20612 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
20613 | # Hook for its removal unless debugging. |
20614 | # Note that there is a small window in which the directory will not be cleaned: | |
20615 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
20616 | $debug || |
20617 | { | |
d0ac1c44 | 20618 | tmp= ac_tmp= |
81ecdfbb | 20619 | trap 'exit_status=$? |
d0ac1c44 SM |
20620 | : "${ac_tmp:=$tmp}" |
20621 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
20622 | ' 0 |
20623 | trap 'as_fn_exit 1' 1 2 13 15 | |
20624 | } | |
20625 | # Create a (secure) tmp directory for tmp files. | |
20626 | ||
20627 | { | |
20628 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 20629 | test -d "$tmp" |
81ecdfbb RW |
20630 | } || |
20631 | { | |
20632 | tmp=./conf$$-$RANDOM | |
20633 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
20634 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
20635 | ac_tmp=$tmp | |
81ecdfbb RW |
20636 | |
20637 | # Set up the scripts for CONFIG_FILES section. | |
20638 | # No need to generate them if there are no CONFIG_FILES. | |
20639 | # This happens for instance with `./config.status config.h'. | |
20640 | if test -n "$CONFIG_FILES"; then | |
20641 | ||
20642 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
20643 | ac_cs_awk_getline=: | |
20644 | ac_cs_awk_pipe_init= | |
20645 | ac_cs_awk_read_file=' | |
20646 | while ((getline aline < (F[key])) > 0) | |
20647 | print(aline) | |
20648 | close(F[key])' | |
20649 | ac_cs_awk_pipe_fini= | |
20650 | else | |
20651 | ac_cs_awk_getline=false | |
20652 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
20653 | ac_cs_awk_read_file=' | |
20654 | print "|#_!!_#|" | |
20655 | print "cat " F[key] " &&" | |
20656 | '$ac_cs_awk_pipe_init | |
20657 | # The final `:' finishes the AND list. | |
20658 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
20659 | fi | |
20660 | ac_cr=`echo X | tr X '\015'` | |
20661 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
20662 | # But we know of no other shell where ac_cr would be empty at this | |
20663 | # point, so we can use a bashism as a fallback. | |
20664 | if test "x$ac_cr" = x; then | |
20665 | eval ac_cr=\$\'\\r\' | |
20666 | fi | |
20667 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
20668 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 20669 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
20670 | else |
20671 | ac_cs_awk_cr=$ac_cr | |
20672 | fi | |
20673 | ||
d0ac1c44 | 20674 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
20675 | _ACEOF |
20676 | ||
20677 | # Create commands to substitute file output variables. | |
20678 | { | |
20679 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d0ac1c44 | 20680 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
81ecdfbb RW |
20681 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
20682 | echo "_ACAWK" && | |
20683 | echo "_ACEOF" | |
20684 | } >conf$$files.sh && | |
20685 | . ./conf$$files.sh || | |
d0ac1c44 | 20686 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20687 | rm -f conf$$files.sh |
20688 | ||
20689 | { | |
20690 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
20691 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
20692 | echo "_ACEOF" | |
20693 | } >conf$$subs.sh || | |
d0ac1c44 SM |
20694 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
20695 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
20696 | ac_delim='%!_!# ' |
20697 | for ac_last_try in false false false false false :; do | |
20698 | . ./conf$$subs.sh || | |
d0ac1c44 | 20699 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20700 | |
20701 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
20702 | if test $ac_delim_n = $ac_delim_num; then | |
20703 | break | |
20704 | elif $ac_last_try; then | |
d0ac1c44 | 20705 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20706 | else |
20707 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20708 | fi | |
20709 | done | |
20710 | rm -f conf$$subs.sh | |
20711 | ||
20712 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20713 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
20714 | _ACEOF |
20715 | sed -n ' | |
20716 | h | |
20717 | s/^/S["/; s/!.*/"]=/ | |
20718 | p | |
20719 | g | |
20720 | s/^[^!]*!// | |
20721 | :repl | |
20722 | t repl | |
20723 | s/'"$ac_delim"'$// | |
20724 | t delim | |
20725 | :nl | |
20726 | h | |
d0ac1c44 | 20727 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20728 | t more1 |
20729 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
20730 | p | |
20731 | n | |
20732 | b repl | |
20733 | :more1 | |
20734 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20735 | p | |
20736 | g | |
20737 | s/.\{148\}// | |
20738 | t nl | |
20739 | :delim | |
20740 | h | |
d0ac1c44 | 20741 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20742 | t more2 |
20743 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
20744 | p | |
20745 | b | |
20746 | :more2 | |
20747 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20748 | p | |
20749 | g | |
20750 | s/.\{148\}// | |
20751 | t delim | |
20752 | ' <conf$$subs.awk | sed ' | |
20753 | /^[^""]/{ | |
20754 | N | |
20755 | s/\n// | |
20756 | } | |
20757 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
20758 | rm -f conf$$subs.awk | |
20759 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20760 | _ACAWK | |
d0ac1c44 | 20761 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
20762 | for (key in S) S_is_set[key] = 1 |
20763 | FS = "\a" | |
20764 | \$ac_cs_awk_pipe_init | |
20765 | } | |
20766 | { | |
20767 | line = $ 0 | |
20768 | nfields = split(line, field, "@") | |
20769 | substed = 0 | |
20770 | len = length(field[1]) | |
20771 | for (i = 2; i < nfields; i++) { | |
20772 | key = field[i] | |
20773 | keylen = length(key) | |
20774 | if (S_is_set[key]) { | |
20775 | value = S[key] | |
20776 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
20777 | len += length(value) + length(field[++i]) | |
20778 | substed = 1 | |
20779 | } else | |
20780 | len += 1 + keylen | |
20781 | } | |
20782 | if (nfields == 3 && !substed) { | |
20783 | key = field[2] | |
20784 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
20785 | \$ac_cs_awk_read_file | |
20786 | next | |
20787 | } | |
20788 | } | |
20789 | print line | |
b4e70030 | 20790 | } |
81ecdfbb RW |
20791 | \$ac_cs_awk_pipe_fini |
20792 | _ACAWK | |
20793 | _ACEOF | |
20794 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20795 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
20796 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
20797 | else | |
20798 | cat | |
d0ac1c44 SM |
20799 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
20800 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
81ecdfbb RW |
20801 | _ACEOF |
20802 | ||
d0ac1c44 SM |
20803 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
20804 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
20805 | # trailing colons and then remove the whole line if VPATH becomes empty |
20806 | # (actually we leave an empty line to preserve line numbers). | |
20807 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
20808 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
20809 | h | |
20810 | s/// | |
20811 | s/^/:/ | |
20812 | s/[ ]*$/:/ | |
20813 | s/:\$(srcdir):/:/g | |
20814 | s/:\${srcdir}:/:/g | |
20815 | s/:@srcdir@:/:/g | |
20816 | s/^:*// | |
81ecdfbb | 20817 | s/:*$// |
d0ac1c44 SM |
20818 | x |
20819 | s/\(=[ ]*\).*/\1/ | |
20820 | G | |
20821 | s/\n// | |
81ecdfbb RW |
20822 | s/^[^=]*=[ ]*$// |
20823 | }' | |
20824 | fi | |
20825 | ||
20826 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20827 | fi # test -n "$CONFIG_FILES" | |
20828 | ||
20829 | # Set up the scripts for CONFIG_HEADERS section. | |
20830 | # No need to generate them if there are no CONFIG_HEADERS. | |
20831 | # This happens for instance with `./config.status Makefile'. | |
20832 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 20833 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb RW |
20834 | BEGIN { |
20835 | _ACEOF | |
20836 | ||
20837 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
20838 | # here-document in config.status, that substitutes the proper values into | |
20839 | # config.h.in to produce config.h. | |
4e8d927d | 20840 | |
81ecdfbb RW |
20841 | # Create a delimiter string that does not exist in confdefs.h, to ease |
20842 | # handling of long lines. | |
20843 | ac_delim='%!_!# ' | |
20844 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
20845 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
20846 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
20847 | break |
20848 | elif $ac_last_try; then | |
d0ac1c44 | 20849 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
20850 | else |
20851 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20852 | fi | |
20853 | done | |
4e8d927d | 20854 | |
81ecdfbb RW |
20855 | # For the awk script, D is an array of macro values keyed by name, |
20856 | # likewise P contains macro parameters if any. Preserve backslash | |
20857 | # newline sequences. | |
20858 | ||
20859 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
20860 | sed -n ' | |
20861 | s/.\{148\}/&'"$ac_delim"'/g | |
20862 | t rset | |
20863 | :rset | |
20864 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
20865 | t def | |
20866 | d | |
20867 | :def | |
20868 | s/\\$// | |
20869 | t bsnl | |
20870 | s/["\\]/\\&/g | |
20871 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
20872 | D["\1"]=" \3"/p | |
20873 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
20874 | d | |
20875 | :bsnl | |
20876 | s/["\\]/\\&/g | |
20877 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
20878 | D["\1"]=" \3\\\\\\n"\\/p | |
20879 | t cont | |
20880 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
20881 | t cont | |
20882 | d | |
20883 | :cont | |
20884 | n | |
20885 | s/.\{148\}/&'"$ac_delim"'/g | |
20886 | t clear | |
20887 | :clear | |
20888 | s/\\$// | |
20889 | t bsnlc | |
20890 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
20891 | d | |
20892 | :bsnlc | |
20893 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
20894 | b cont | |
20895 | ' <confdefs.h | sed ' | |
20896 | s/'"$ac_delim"'/"\\\ | |
20897 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
20898 | ||
20899 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20900 | for (key in D) D_is_set[key] = 1 | |
20901 | FS = "\a" | |
20902 | } | |
20903 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
20904 | line = \$ 0 | |
20905 | split(line, arg, " ") | |
20906 | if (arg[1] == "#") { | |
20907 | defundef = arg[2] | |
20908 | mac1 = arg[3] | |
20909 | } else { | |
20910 | defundef = substr(arg[1], 2) | |
20911 | mac1 = arg[2] | |
20912 | } | |
20913 | split(mac1, mac2, "(") #) | |
20914 | macro = mac2[1] | |
20915 | prefix = substr(line, 1, index(line, defundef) - 1) | |
20916 | if (D_is_set[macro]) { | |
20917 | # Preserve the white space surrounding the "#". | |
20918 | print prefix "define", macro P[macro] D[macro] | |
20919 | next | |
20920 | } else { | |
20921 | # Replace #undef with comments. This is necessary, for example, | |
20922 | # in the case of _POSIX_SOURCE, which is predefined and required | |
20923 | # on some systems where configure will not decide to define it. | |
20924 | if (defundef == "undef") { | |
20925 | print "/*", prefix defundef, macro, "*/" | |
20926 | next | |
20927 | } | |
20928 | } | |
b4e70030 | 20929 | } |
81ecdfbb RW |
20930 | { print } |
20931 | _ACAWK | |
b4e70030 | 20932 | _ACEOF |
81ecdfbb | 20933 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 20934 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb | 20935 | fi # test -n "$CONFIG_HEADERS" |
4e8d927d | 20936 | |
4e8d927d | 20937 | |
81ecdfbb RW |
20938 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
20939 | shift | |
20940 | for ac_tag | |
20941 | do | |
20942 | case $ac_tag in | |
20943 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
20944 | esac | |
20945 | case $ac_mode$ac_tag in | |
20946 | :[FHL]*:*);; | |
d0ac1c44 | 20947 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
20948 | :[FH]-) ac_tag=-:-;; |
20949 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
20950 | esac | |
20951 | ac_save_IFS=$IFS | |
20952 | IFS=: | |
20953 | set x $ac_tag | |
20954 | IFS=$ac_save_IFS | |
20955 | shift | |
20956 | ac_file=$1 | |
20957 | shift | |
4e8d927d | 20958 | |
81ecdfbb RW |
20959 | case $ac_mode in |
20960 | :L) ac_source=$1;; | |
20961 | :[FH]) | |
20962 | ac_file_inputs= | |
20963 | for ac_f | |
20964 | do | |
20965 | case $ac_f in | |
d0ac1c44 | 20966 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
20967 | *) # Look for the file first in the build tree, then in the source tree |
20968 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
20969 | # because $ac_f cannot contain `:'. | |
20970 | test -f "$ac_f" || | |
20971 | case $ac_f in | |
20972 | [\\/$]*) false;; | |
20973 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
20974 | esac || | |
d0ac1c44 | 20975 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
20976 | esac |
20977 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
20978 | as_fn_append ac_file_inputs " '$ac_f'" | |
20979 | done | |
20980 | ||
20981 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
20982 | # use $as_me), people would be surprised to read: | |
20983 | # /* config.h. Generated by config.status. */ | |
20984 | configure_input='Generated from '` | |
20985 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
20986 | `' by configure.' | |
20987 | if test x"$ac_file" != x-; then | |
20988 | configure_input="$ac_file. $configure_input" | |
20989 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
20990 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 20991 | fi |
81ecdfbb RW |
20992 | # Neutralize special characters interpreted by sed in replacement strings. |
20993 | case $configure_input in #( | |
20994 | *\&* | *\|* | *\\* ) | |
20995 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
20996 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
20997 | *) ac_sed_conf_input=$configure_input;; | |
20998 | esac | |
4e8d927d | 20999 | |
81ecdfbb | 21000 | case $ac_tag in |
d0ac1c44 SM |
21001 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
21002 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
21003 | esac |
21004 | ;; | |
c906108c SS |
21005 | esac |
21006 | ||
81ecdfbb | 21007 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
21008 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
21009 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
21010 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
21011 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
21012 | $as_echo X"$ac_file" | | |
21013 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
21014 | s//\1/ | |
21015 | q | |
21016 | } | |
21017 | /^X\(\/\/\)[^/].*/{ | |
21018 | s//\1/ | |
21019 | q | |
21020 | } | |
21021 | /^X\(\/\/\)$/{ | |
21022 | s//\1/ | |
21023 | q | |
21024 | } | |
21025 | /^X\(\/\).*/{ | |
21026 | s//\1/ | |
21027 | q | |
21028 | } | |
21029 | s/.*/./; q'` | |
21030 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
21031 | ac_builddir=. |
21032 | ||
81ecdfbb RW |
21033 | case "$ac_dir" in |
21034 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21035 | *) | |
21036 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
21037 | # A ".." for each directory in $ac_dir_suffix. | |
21038 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
21039 | case $ac_top_builddir_sub in | |
21040 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21041 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
21042 | esac ;; | |
21043 | esac | |
21044 | ac_abs_top_builddir=$ac_pwd | |
21045 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
21046 | # for backward compatibility: | |
21047 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
21048 | |
21049 | case $srcdir in | |
81ecdfbb | 21050 | .) # We are building in place. |
bec39cab | 21051 | ac_srcdir=. |
81ecdfbb RW |
21052 | ac_top_srcdir=$ac_top_builddir_sub |
21053 | ac_abs_top_srcdir=$ac_pwd ;; | |
21054 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 21055 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
21056 | ac_top_srcdir=$srcdir |
21057 | ac_abs_top_srcdir=$srcdir ;; | |
21058 | *) # Relative name. | |
21059 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
21060 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
21061 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 21062 | esac |
81ecdfbb | 21063 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 21064 | |
c906108c | 21065 | |
81ecdfbb RW |
21066 | case $ac_mode in |
21067 | :F) | |
21068 | # | |
21069 | # CONFIG_FILE | |
21070 | # | |
c906108c | 21071 | |
bec39cab AC |
21072 | case $INSTALL in |
21073 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 21074 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 21075 | esac |
81ecdfbb | 21076 | _ACEOF |
121ce6e5 | 21077 | |
81ecdfbb RW |
21078 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
21079 | # If the template does not know about datarootdir, expand it. | |
21080 | # FIXME: This hack should be removed a few years after 2.60. | |
21081 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
21082 | ac_sed_dataroot=' | |
21083 | /datarootdir/ { | |
21084 | p | |
21085 | q | |
21086 | } | |
21087 | /@datadir@/p | |
21088 | /@docdir@/p | |
21089 | /@infodir@/p | |
21090 | /@localedir@/p | |
21091 | /@mandir@/p' | |
21092 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
21093 | *datarootdir*) ac_datarootdir_seen=yes;; | |
21094 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
21095 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
21096 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
21097 | _ACEOF | |
21098 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21099 | ac_datarootdir_hack=' | |
21100 | s&@datadir@&$datadir&g | |
21101 | s&@docdir@&$docdir&g | |
21102 | s&@infodir@&$infodir&g | |
21103 | s&@localedir@&$localedir&g | |
21104 | s&@mandir@&$mandir&g | |
21105 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
21106 | esac | |
4e8d927d | 21107 | _ACEOF |
81ecdfbb RW |
21108 | |
21109 | # Neutralize VPATH when `$srcdir' = `.'. | |
21110 | # Shell code in configure.ac might set extrasub. | |
21111 | # FIXME: do we really want to maintain this feature? | |
21112 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21113 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
21114 | $extrasub |
21115 | _ACEOF | |
81ecdfbb | 21116 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
21117 | :t |
21118 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
21119 | s|@configure_input@|$ac_sed_conf_input|;t t |
21120 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
21121 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
21122 | s&@srcdir@&$ac_srcdir&;t t | |
21123 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
21124 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
21125 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
21126 | s&@builddir@&$ac_builddir&;t t | |
21127 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
21128 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
21129 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
21130 | $ac_datarootdir_hack |
21131 | " | |
21132 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
21133 | if $ac_cs_awk_getline; then | |
d0ac1c44 | 21134 | $AWK -f "$ac_tmp/subs.awk" |
81ecdfbb | 21135 | else |
d0ac1c44 SM |
21136 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
21137 | fi \ | |
21138 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
21139 | |
21140 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
21141 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
21142 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
21143 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 21144 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 21145 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 21146 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 21147 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 21148 | |
d0ac1c44 | 21149 | rm -f "$ac_tmp/stdin" |
bec39cab | 21150 | case $ac_file in |
d0ac1c44 SM |
21151 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
21152 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 21153 | esac \ |
d0ac1c44 | 21154 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
21155 | ;; |
21156 | :H) | |
21157 | # | |
21158 | # CONFIG_HEADER | |
21159 | # | |
bec39cab | 21160 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
21161 | { |
21162 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
21163 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
21164 | } >"$ac_tmp/config.h" \ | |
21165 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
21166 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
21167 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
21168 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 21169 | else |
81ecdfbb | 21170 | rm -f "$ac_file" |
d0ac1c44 SM |
21171 | mv "$ac_tmp/config.h" "$ac_file" \ |
21172 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
21173 | fi |
21174 | else | |
81ecdfbb | 21175 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
21176 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
21177 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
bec39cab | 21178 | fi |
81ecdfbb RW |
21179 | ;; |
21180 | :L) | |
21181 | # | |
21182 | # CONFIG_LINK | |
21183 | # | |
c906108c | 21184 | |
81ecdfbb RW |
21185 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
21186 | : | |
b4e70030 | 21187 | else |
81ecdfbb RW |
21188 | # Prefer the file from the source tree if names are identical. |
21189 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
21190 | ac_source=$srcdir/$ac_source | |
21191 | fi | |
b4e70030 | 21192 | |
81ecdfbb RW |
21193 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
21194 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 21195 | |
81ecdfbb | 21196 | if test ! -r "$ac_source"; then |
d0ac1c44 | 21197 | as_fn_error $? "$ac_source: file not found" "$LINENO" 5 |
81ecdfbb RW |
21198 | fi |
21199 | rm -f "$ac_file" | |
bec39cab | 21200 | |
81ecdfbb | 21201 | # Try a relative symlink, then a hard link, then a copy. |
d0ac1c44 | 21202 | case $ac_source in |
81ecdfbb RW |
21203 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; |
21204 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
21205 | esac | |
21206 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
21207 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
21208 | cp -p "$ac_source" "$ac_file" || | |
d0ac1c44 | 21209 | as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 |
81ecdfbb RW |
21210 | fi |
21211 | ;; | |
21212 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
21213 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
21214 | ;; | |
c906108c | 21215 | esac |
b4e70030 | 21216 | |
bec39cab | 21217 | |
81ecdfbb | 21218 | case $ac_file$ac_mode in |
c5adaa19 | 21219 | "config.h":H) echo > stamp-h ;; |
81ecdfbb | 21220 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
a0a461e5 | 21221 | "nm.h":L) echo > stamp-nmh ;; |
b292c783 | 21222 | "gcore":F) chmod +x gcore ;; |
f99d1d37 | 21223 | "testsuite/lib/pdtrace":F) chmod +x testsuite/lib/pdtrace ;; |
81ecdfbb | 21224 | |
bec39cab | 21225 | esac |
81ecdfbb | 21226 | done # for ac_tag |
c906108c | 21227 | |
bec39cab | 21228 | |
81ecdfbb | 21229 | as_fn_exit 0 |
bec39cab | 21230 | _ACEOF |
bec39cab AC |
21231 | ac_clean_files=$ac_clean_files_save |
21232 | ||
81ecdfbb | 21233 | test $ac_write_fail = 0 || |
d0ac1c44 | 21234 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 21235 | |
bec39cab AC |
21236 | |
21237 | # configure is writing to config.log, and then calls config.status. | |
21238 | # config.status does its own redirection, appending to config.log. | |
21239 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
21240 | # by configure, so config.status won't be able to write to it; its | |
21241 | # output is simply discarded. So we exec the FD to /dev/null, | |
21242 | # effectively closing config.log, so it can be properly (re)opened and | |
21243 | # appended to by config.status. When coming back to configure, we | |
21244 | # need to make the FD available again. | |
21245 | if test "$no_create" != yes; then | |
21246 | ac_cs_success=: | |
21247 | ac_config_status_args= | |
21248 | test "$silent" = yes && | |
21249 | ac_config_status_args="$ac_config_status_args --quiet" | |
21250 | exec 5>/dev/null | |
21251 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
21252 | exec 5>>config.log | |
21253 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
21254 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 21255 | $ac_cs_success || as_fn_exit 1 |
bec39cab | 21256 | fi |
c906108c | 21257 | |
bec39cab | 21258 | # |
81ecdfbb | 21259 | # CONFIG_SUBDIRS section. |
bec39cab | 21260 | # |
c906108c SS |
21261 | if test "$no_recursion" != yes; then |
21262 | ||
81ecdfbb RW |
21263 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
21264 | # so they do not pile up. | |
c906108c SS |
21265 | ac_sub_configure_args= |
21266 | ac_prev= | |
fdc59709 PB |
21267 | eval "set x $ac_configure_args" |
21268 | shift | |
21269 | for ac_arg | |
21270 | do | |
c906108c SS |
21271 | if test -n "$ac_prev"; then |
21272 | ac_prev= | |
21273 | continue | |
21274 | fi | |
bec39cab | 21275 | case $ac_arg in |
c906108c SS |
21276 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
21277 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
21278 | ac_prev=cache_file ;; | |
21279 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
21280 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
21281 | | --c=*) | |
21282 | ;; | |
21283 | --config-cache | -C) | |
c906108c SS |
21284 | ;; |
21285 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
21286 | ac_prev=srcdir ;; | |
21287 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
21288 | ;; | |
bec39cab AC |
21289 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
21290 | ac_prev=prefix ;; | |
21291 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
21292 | ;; | |
81ecdfbb RW |
21293 | --disable-option-checking) |
21294 | ;; | |
fdc59709 PB |
21295 | *) |
21296 | case $ac_arg in | |
81ecdfbb | 21297 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 21298 | esac |
81ecdfbb | 21299 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
21300 | esac |
21301 | done | |
21302 | ||
bec39cab AC |
21303 | # Always prepend --prefix to ensure using the same prefix |
21304 | # in subdir configurations. | |
fdc59709 PB |
21305 | ac_arg="--prefix=$prefix" |
21306 | case $ac_arg in | |
81ecdfbb | 21307 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 21308 | esac |
81ecdfbb RW |
21309 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
21310 | ||
21311 | # Pass --silent | |
21312 | if test "$silent" = yes; then | |
21313 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
21314 | fi | |
21315 | ||
21316 | # Always prepend --disable-option-checking to silence warnings, since | |
21317 | # different subdirs can have different --enable and --with options. | |
21318 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 21319 | |
b4e70030 | 21320 | ac_popdir=`pwd` |
bec39cab | 21321 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
21322 | |
21323 | # Do not complain, so a configure script can configure whichever | |
21324 | # parts of a large source tree are present. | |
fdc59709 | 21325 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 21326 | |
81ecdfbb RW |
21327 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
21328 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
21329 | $as_echo "$ac_msg" >&6 | |
21330 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
21331 | ac_builddir=. |
21332 | ||
81ecdfbb RW |
21333 | case "$ac_dir" in |
21334 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21335 | *) | |
21336 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
21337 | # A ".." for each directory in $ac_dir_suffix. | |
21338 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
21339 | case $ac_top_builddir_sub in | |
21340 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21341 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
21342 | esac ;; | |
21343 | esac | |
21344 | ac_abs_top_builddir=$ac_pwd | |
21345 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
21346 | # for backward compatibility: | |
21347 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
21348 | |
21349 | case $srcdir in | |
81ecdfbb | 21350 | .) # We are building in place. |
bec39cab | 21351 | ac_srcdir=. |
81ecdfbb RW |
21352 | ac_top_srcdir=$ac_top_builddir_sub |
21353 | ac_abs_top_srcdir=$ac_pwd ;; | |
21354 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 21355 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
21356 | ac_top_srcdir=$srcdir |
21357 | ac_abs_top_srcdir=$srcdir ;; | |
21358 | *) # Relative name. | |
21359 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
21360 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
21361 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 21362 | esac |
81ecdfbb | 21363 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 21364 | |
c906108c | 21365 | |
fdc59709 | 21366 | cd "$ac_dir" |
c906108c SS |
21367 | |
21368 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
21369 | if test -f "$ac_srcdir/configure.gnu"; then |
21370 | ac_sub_configure=$ac_srcdir/configure.gnu | |
21371 | elif test -f "$ac_srcdir/configure"; then | |
21372 | ac_sub_configure=$ac_srcdir/configure | |
21373 | elif test -f "$ac_srcdir/configure.in"; then | |
21374 | # This should be Cygnus configure. | |
21375 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 21376 | else |
81ecdfbb RW |
21377 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
21378 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
21379 | ac_sub_configure= |
21380 | fi | |
21381 | ||
21382 | # The recursion is here. | |
21383 | if test -n "$ac_sub_configure"; then | |
c906108c | 21384 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
21385 | case $cache_file in |
21386 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
21387 | *) # Relative name. |
21388 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 21389 | esac |
c906108c | 21390 | |
81ecdfbb RW |
21391 | { $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 |
21392 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 21393 | # The eval makes quoting arguments work. |
fdc59709 PB |
21394 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
21395 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 21396 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
21397 | fi |
21398 | ||
fdc59709 | 21399 | cd "$ac_popdir" |
c906108c SS |
21400 | done |
21401 | fi | |
81ecdfbb RW |
21402 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
21403 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
21404 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
21405 | fi | |
c906108c | 21406 |