Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
d0ac1c44 SM |
3 | # Generated by GNU Autoconf 2.69. |
4 | # | |
5 | # | |
6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
81ecdfbb | 7 | # |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 90 | as_myself= |
81ecdfbb RW |
91 | case $0 in #(( |
92 | *[\\/]* ) as_myself=$0 ;; | |
93 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
94 | for as_dir in $PATH | |
95 | do | |
96 | IFS=$as_save_IFS | |
97 | test -z "$as_dir" && as_dir=. | |
98 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
99 | done | |
100 | IFS=$as_save_IFS | |
101 | ||
102 | ;; | |
103 | esac | |
104 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
105 | # in which case we are not to be found in the path. | |
106 | if test "x$as_myself" = x; then | |
107 | as_myself=$0 | |
108 | fi | |
109 | if test ! -f "$as_myself"; then | |
110 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
111 | exit 1 | |
112 | fi | |
113 | ||
114 | # Unset variables that we do not need and which cause bugs (e.g. in | |
115 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
116 | # suppresses any "Segmentation fault" message there. '((' could | |
117 | # trigger a bug in pdksh 5.2.14. | |
118 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
119 | do eval test x\${$as_var+set} = xset \ | |
120 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
121 | done | |
bec39cab AC |
122 | PS1='$ ' |
123 | PS2='> ' | |
124 | PS4='+ ' | |
125 | ||
126 | # NLS nuisances. | |
81ecdfbb RW |
127 | LC_ALL=C |
128 | export LC_ALL | |
129 | LANGUAGE=C | |
130 | export LANGUAGE | |
131 | ||
132 | # CDPATH. | |
133 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
134 | ||
d0ac1c44 SM |
135 | # Use a proper internal environment variable to ensure we don't fall |
136 | # into an infinite loop, continuously re-executing ourselves. | |
137 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
138 | _as_can_reexec=no; export _as_can_reexec; | |
139 | # We cannot yet assume a decent shell, so we have to provide a | |
140 | # neutralization value for shells without unset; and this also | |
141 | # works around shells that cannot unset nonexistent variables. | |
142 | # Preserve -v and -x to the replacement shell. | |
143 | BASH_ENV=/dev/null | |
144 | ENV=/dev/null | |
145 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
146 | case $- in # (((( | |
147 | *v*x* | *x*v* ) as_opts=-vx ;; | |
148 | *v* ) as_opts=-v ;; | |
149 | *x* ) as_opts=-x ;; | |
150 | * ) as_opts= ;; | |
151 | esac | |
152 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
153 | # Admittedly, this is quite paranoid, since all the known shells bail | |
154 | # out after a failed `exec'. | |
155 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
156 | as_fn_exit 255 | |
157 | fi | |
158 | # We don't want this to propagate to other subprocesses. | |
159 | { _as_can_reexec=; unset _as_can_reexec;} | |
81ecdfbb RW |
160 | if test "x$CONFIG_SHELL" = x; then |
161 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
162 | emulate sh | |
163 | NULLCMD=: | |
164 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
165 | # is contrary to our usage. Disable this feature. | |
166 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
167 | setopt NO_GLOB_SUBST | |
168 | else | |
169 | case \`(set -o) 2>/dev/null\` in #( | |
170 | *posix*) : | |
171 | set -o posix ;; #( | |
172 | *) : | |
173 | ;; | |
174 | esac | |
175 | fi | |
176 | " | |
177 | as_required="as_fn_return () { (exit \$1); } | |
178 | as_fn_success () { as_fn_return 0; } | |
179 | as_fn_failure () { as_fn_return 1; } | |
180 | as_fn_ret_success () { return 0; } | |
181 | as_fn_ret_failure () { return 1; } | |
182 | ||
183 | exitcode=0 | |
184 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
185 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
186 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
187 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
188 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
189 | ||
190 | else | |
191 | exitcode=1; echo positional parameters were not saved. | |
192 | fi | |
d0ac1c44 SM |
193 | test x\$exitcode = x0 || exit 1 |
194 | test -x / || exit 1" | |
81ecdfbb RW |
195 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO |
196 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
197 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
198 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
199 | test \$(( 1 + 1 )) = 2 || exit 1" | |
200 | if (eval "$as_required") 2>/dev/null; then : | |
201 | as_have_required=yes | |
202 | else | |
203 | as_have_required=no | |
204 | fi | |
205 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
206 | ||
207 | else | |
208 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
209 | as_found=false | |
210 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 211 | do |
81ecdfbb RW |
212 | IFS=$as_save_IFS |
213 | test -z "$as_dir" && as_dir=. | |
214 | as_found=: | |
215 | case $as_dir in #( | |
216 | /*) | |
217 | for as_base in sh bash ksh sh5; do | |
218 | # Try only shells that exist, to save several forks. | |
219 | as_shell=$as_dir/$as_base | |
220 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
221 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
222 | CONFIG_SHELL=$as_shell as_have_required=yes | |
223 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
224 | break 2 | |
225 | fi | |
226 | fi | |
227 | done;; | |
228 | esac | |
229 | as_found=false | |
230 | done | |
231 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
232 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
233 | CONFIG_SHELL=$SHELL as_have_required=yes | |
234 | fi; } | |
235 | IFS=$as_save_IFS | |
236 | ||
237 | ||
238 | if test "x$CONFIG_SHELL" != x; then : | |
d0ac1c44 SM |
239 | export CONFIG_SHELL |
240 | # We cannot yet assume a decent shell, so we have to provide a | |
241 | # neutralization value for shells without unset; and this also | |
242 | # works around shells that cannot unset nonexistent variables. | |
243 | # Preserve -v and -x to the replacement shell. | |
244 | BASH_ENV=/dev/null | |
245 | ENV=/dev/null | |
246 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
247 | case $- in # (((( | |
248 | *v*x* | *x*v* ) as_opts=-vx ;; | |
249 | *v* ) as_opts=-v ;; | |
250 | *x* ) as_opts=-x ;; | |
251 | * ) as_opts= ;; | |
252 | esac | |
253 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
254 | # Admittedly, this is quite paranoid, since all the known shells bail | |
255 | # out after a failed `exec'. | |
256 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
257 | exit 255 | |
81ecdfbb RW |
258 | fi |
259 | ||
260 | if test x$as_have_required = xno; then : | |
261 | $as_echo "$0: This script requires a shell more modern than all" | |
262 | $as_echo "$0: the shells that I found on your system." | |
263 | if test x${ZSH_VERSION+set} = xset ; then | |
264 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
265 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 266 | else |
81ecdfbb RW |
267 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
268 | $0: including any error possibly output before this | |
269 | $0: message. Then install a modern shell, or manually run | |
270 | $0: the script under such a shell if you do have one." | |
bec39cab | 271 | fi |
81ecdfbb RW |
272 | exit 1 |
273 | fi | |
274 | fi | |
275 | fi | |
276 | SHELL=${CONFIG_SHELL-/bin/sh} | |
277 | export SHELL | |
278 | # Unset more variables known to interfere with behavior of common tools. | |
279 | CLICOLOR_FORCE= GREP_OPTIONS= | |
280 | unset CLICOLOR_FORCE GREP_OPTIONS | |
281 | ||
282 | ## --------------------- ## | |
283 | ## M4sh Shell Functions. ## | |
284 | ## --------------------- ## | |
285 | # as_fn_unset VAR | |
286 | # --------------- | |
287 | # Portably unset VAR. | |
288 | as_fn_unset () | |
289 | { | |
290 | { eval $1=; unset $1;} | |
291 | } | |
292 | as_unset=as_fn_unset | |
293 | ||
294 | # as_fn_set_status STATUS | |
295 | # ----------------------- | |
296 | # Set $? to STATUS, without forking. | |
297 | as_fn_set_status () | |
298 | { | |
299 | return $1 | |
300 | } # as_fn_set_status | |
bec39cab | 301 | |
81ecdfbb RW |
302 | # as_fn_exit STATUS |
303 | # ----------------- | |
304 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
305 | as_fn_exit () | |
306 | { | |
307 | set +e | |
308 | as_fn_set_status $1 | |
309 | exit $1 | |
310 | } # as_fn_exit | |
311 | ||
312 | # as_fn_mkdir_p | |
313 | # ------------- | |
314 | # Create "$as_dir" as a directory, including parents if necessary. | |
315 | as_fn_mkdir_p () | |
316 | { | |
317 | ||
318 | case $as_dir in #( | |
319 | -*) as_dir=./$as_dir;; | |
320 | esac | |
321 | test -d "$as_dir" || eval $as_mkdir_p || { | |
322 | as_dirs= | |
323 | while :; do | |
324 | case $as_dir in #( | |
325 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
326 | *) as_qdir=$as_dir;; | |
327 | esac | |
328 | as_dirs="'$as_qdir' $as_dirs" | |
329 | as_dir=`$as_dirname -- "$as_dir" || | |
330 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
331 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
332 | X"$as_dir" : 'X\(//\)$' \| \ | |
333 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
334 | $as_echo X"$as_dir" | | |
335 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
336 | s//\1/ | |
337 | q | |
338 | } | |
339 | /^X\(\/\/\)[^/].*/{ | |
340 | s//\1/ | |
341 | q | |
342 | } | |
343 | /^X\(\/\/\)$/{ | |
344 | s//\1/ | |
345 | q | |
346 | } | |
347 | /^X\(\/\).*/{ | |
348 | s//\1/ | |
349 | q | |
350 | } | |
351 | s/.*/./; q'` | |
352 | test -d "$as_dir" && break | |
353 | done | |
354 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 355 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb RW |
356 | |
357 | ||
358 | } # as_fn_mkdir_p | |
d0ac1c44 SM |
359 | |
360 | # as_fn_executable_p FILE | |
361 | # ----------------------- | |
362 | # Test if FILE is an executable regular file. | |
363 | as_fn_executable_p () | |
364 | { | |
365 | test -f "$1" && test -x "$1" | |
366 | } # as_fn_executable_p | |
81ecdfbb RW |
367 | # as_fn_append VAR VALUE |
368 | # ---------------------- | |
369 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
370 | # advantage of any shell optimizations that allow amortized linear growth over | |
371 | # repeated appends, instead of the typical quadratic growth present in naive | |
372 | # implementations. | |
373 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
374 | eval 'as_fn_append () | |
375 | { | |
376 | eval $1+=\$2 | |
377 | }' | |
378 | else | |
379 | as_fn_append () | |
380 | { | |
381 | eval $1=\$$1\$2 | |
382 | } | |
383 | fi # as_fn_append | |
384 | ||
385 | # as_fn_arith ARG... | |
386 | # ------------------ | |
387 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
388 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
389 | # must be portable across $(()) and expr. | |
390 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
391 | eval 'as_fn_arith () | |
392 | { | |
393 | as_val=$(( $* )) | |
394 | }' | |
395 | else | |
396 | as_fn_arith () | |
397 | { | |
398 | as_val=`expr "$@" || test $? -eq 1` | |
399 | } | |
400 | fi # as_fn_arith | |
401 | ||
402 | ||
d0ac1c44 SM |
403 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
404 | # ---------------------------------------- | |
81ecdfbb RW |
405 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
406 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 407 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
408 | as_fn_error () |
409 | { | |
d0ac1c44 SM |
410 | as_status=$1; test $as_status -eq 0 && as_status=1 |
411 | if test "$4"; then | |
412 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
413 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 414 | fi |
d0ac1c44 | 415 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
416 | as_fn_exit $as_status |
417 | } # as_fn_error | |
418 | ||
419 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
420 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
421 | as_expr=expr |
422 | else | |
423 | as_expr=false | |
424 | fi | |
425 | ||
81ecdfbb | 426 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
427 | as_basename=basename |
428 | else | |
429 | as_basename=false | |
430 | fi | |
431 | ||
81ecdfbb RW |
432 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
433 | as_dirname=dirname | |
434 | else | |
435 | as_dirname=false | |
436 | fi | |
bec39cab | 437 | |
81ecdfbb | 438 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
439 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
440 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
441 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
442 | $as_echo X/"$0" | | |
443 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
444 | s//\1/ | |
445 | q | |
446 | } | |
447 | /^X\/\(\/\/\)$/{ | |
448 | s//\1/ | |
449 | q | |
450 | } | |
451 | /^X\/\(\/\).*/{ | |
452 | s//\1/ | |
453 | q | |
454 | } | |
455 | s/.*/./; q'` | |
bec39cab | 456 | |
b4e70030 JB |
457 | # Avoid depending upon Character Ranges. |
458 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
459 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
460 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
461 | as_cr_digits='0123456789' | |
462 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 463 | |
bec39cab | 464 | |
81ecdfbb RW |
465 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
466 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
467 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
468 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
469 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
470 | sed -n ' | |
471 | p | |
472 | /[$]LINENO/= | |
473 | ' <$as_myself | | |
bec39cab | 474 | sed ' |
81ecdfbb RW |
475 | s/[$]LINENO.*/&-/ |
476 | t lineno | |
477 | b | |
478 | :lineno | |
bec39cab | 479 | N |
81ecdfbb RW |
480 | :loop |
481 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 482 | t loop |
81ecdfbb | 483 | s/-\n.*// |
bec39cab | 484 | ' >$as_me.lineno && |
81ecdfbb RW |
485 | chmod +x "$as_me.lineno" || |
486 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab | 487 | |
d0ac1c44 SM |
488 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have |
489 | # already done that, so ensure we don't try to do so again and fall | |
490 | # in an infinite loop. This has already happened in practice. | |
491 | _as_can_reexec=no; export _as_can_reexec | |
bec39cab AC |
492 | # Don't try to exec as it changes $[0], causing all sort of problems |
493 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
494 | # original and so on. Autoconf is especially sensitive to this). |
495 | . "./$as_me.lineno" | |
bec39cab AC |
496 | # Exit status is that of the last command. |
497 | exit | |
498 | } | |
499 | ||
81ecdfbb RW |
500 | ECHO_C= ECHO_N= ECHO_T= |
501 | case `echo -n x` in #((((( | |
502 | -n*) | |
503 | case `echo 'xy\c'` in | |
504 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
505 | xy) ECHO_C='\c';; | |
506 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
507 | ECHO_T=' ';; | |
508 | esac;; | |
509 | *) | |
510 | ECHO_N='-n';; | |
bec39cab AC |
511 | esac |
512 | ||
81ecdfbb RW |
513 | rm -f conf$$ conf$$.exe conf$$.file |
514 | if test -d conf$$.dir; then | |
515 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 516 | else |
81ecdfbb RW |
517 | rm -f conf$$.dir |
518 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 519 | fi |
81ecdfbb RW |
520 | if (echo >conf$$.file) 2>/dev/null; then |
521 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 522 | as_ln_s='ln -s' |
81ecdfbb RW |
523 | # ... but there are two gotchas: |
524 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
525 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 526 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 527 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 528 | as_ln_s='cp -pR' |
81ecdfbb RW |
529 | elif ln conf$$.file conf$$ 2>/dev/null; then |
530 | as_ln_s=ln | |
531 | else | |
d0ac1c44 | 532 | as_ln_s='cp -pR' |
b4e70030 | 533 | fi |
bec39cab | 534 | else |
d0ac1c44 | 535 | as_ln_s='cp -pR' |
bec39cab | 536 | fi |
81ecdfbb RW |
537 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
538 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
539 | |
540 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 541 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
542 | else |
543 | test -d ./-p && rmdir ./-p | |
544 | as_mkdir_p=false | |
545 | fi | |
546 | ||
d0ac1c44 SM |
547 | as_test_x='test -x' |
548 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
549 | |
550 | # Sed expression to map a string onto a valid CPP name. | |
551 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
552 | ||
553 | # Sed expression to map a string onto a valid variable name. | |
554 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
555 | ||
556 | ||
d0ac1c44 SM |
557 | test -n "$DJDIR" || exec 7<&0 </dev/null |
558 | exec 6>&1 | |
c906108c | 559 | |
bec39cab | 560 | # Name of the host. |
d0ac1c44 | 561 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
bec39cab AC |
562 | # so uname gets run too. |
563 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
564 | ||
bec39cab AC |
565 | # |
566 | # Initializations. | |
567 | # | |
c906108c | 568 | ac_default_prefix=/usr/local |
81ecdfbb | 569 | ac_clean_files= |
bec39cab | 570 | ac_config_libobj_dir=. |
81ecdfbb | 571 | LIBOBJS= |
bec39cab AC |
572 | cross_compiling=no |
573 | subdirs= | |
574 | MFLAGS= | |
575 | MAKEFLAGS= | |
b4e70030 | 576 | |
bec39cab AC |
577 | # Identity of this package. |
578 | PACKAGE_NAME= | |
579 | PACKAGE_TARNAME= | |
580 | PACKAGE_VERSION= | |
581 | PACKAGE_STRING= | |
582 | PACKAGE_BUGREPORT= | |
81ecdfbb | 583 | PACKAGE_URL= |
bec39cab AC |
584 | |
585 | ac_unique_file="main.c" | |
586 | # Factoring default headers for most tests. | |
587 | ac_includes_default="\ | |
588 | #include <stdio.h> | |
81ecdfbb | 589 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
590 | # include <sys/types.h> |
591 | #endif | |
81ecdfbb | 592 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
593 | # include <sys/stat.h> |
594 | #endif | |
81ecdfbb | 595 | #ifdef STDC_HEADERS |
bec39cab AC |
596 | # include <stdlib.h> |
597 | # include <stddef.h> | |
598 | #else | |
81ecdfbb | 599 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
600 | # include <stdlib.h> |
601 | # endif | |
602 | #endif | |
81ecdfbb RW |
603 | #ifdef HAVE_STRING_H |
604 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
605 | # include <memory.h> |
606 | # endif | |
607 | # include <string.h> | |
608 | #endif | |
81ecdfbb | 609 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
610 | # include <strings.h> |
611 | #endif | |
81ecdfbb | 612 | #ifdef HAVE_INTTYPES_H |
bec39cab | 613 | # include <inttypes.h> |
bec39cab | 614 | #endif |
81ecdfbb RW |
615 | #ifdef HAVE_STDINT_H |
616 | # include <stdint.h> | |
617 | #endif | |
618 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
619 | # include <unistd.h> |
620 | #endif" | |
621 | ||
f99d1d37 | 622 | enable_option_checking=no |
8043d65b | 623 | ac_header_list= |
c971b7fa | 624 | ac_subst_vars='LTLIBOBJS |
81ecdfbb | 625 | LIBOBJS |
b292c783 JK |
626 | GCORE_TRANSFORM_NAME |
627 | GDB_TRANSFORM_NAME | |
e3487908 | 628 | XSLTPROC |
a0a461e5 | 629 | NM_H |
81ecdfbb | 630 | GDB_NM_FILE |
ccb1ba62 CB |
631 | LTLIBXXHASH |
632 | LIBXXHASH | |
633 | HAVE_LIBXXHASH | |
1776e3e5 NA |
634 | CTF_DEPS |
635 | LIBCTF | |
393fd4c3 YQ |
636 | LTLIBBABELTRACE |
637 | LIBBABELTRACE | |
638 | HAVE_LIBBABELTRACE | |
21ea5acd SDJ |
639 | HAVE_NATIVE_GCORE_HOST |
640 | NAT_GENERATED_FILES | |
641 | XM_CLIBS | |
642 | MH_CFLAGS | |
643 | LOADLIBES | |
644 | NAT_CDEPS | |
645 | NATDEPFILES | |
646 | NAT_FILE | |
81ecdfbb RW |
647 | target_subdir |
648 | CONFIG_UNINSTALL | |
649 | CONFIG_INSTALL | |
650 | CONFIG_CLEAN | |
651 | CONFIG_ALL | |
652 | CONFIG_SRCS | |
653 | CONFIG_DEPS | |
654 | CONFIG_OBS | |
655 | PROFILE_CFLAGS | |
656 | ENABLE_CFLAGS | |
657 | SIM_OBS | |
658 | SIM | |
659 | XMKMF | |
660 | GDBTK_SRC_DIR | |
661 | GDBTK_CFLAGS | |
662 | GDBTKLIBS | |
663 | X_LIBS | |
664 | X_LDFLAGS | |
665 | X_CFLAGS | |
666 | TK_XINCLUDES | |
667 | TK_DEPS | |
668 | TK_LIBRARY | |
669 | TK_INCLUDE | |
670 | TK_STUB_LIB_SPEC | |
671 | TK_STUB_LIB_FLAG | |
672 | TK_STUB_LIB_FILE | |
673 | TK_LIB_SPEC | |
674 | TK_LIB_FLAG | |
675 | TK_LIB_FILE | |
676 | TK_SRC_DIR | |
677 | TK_BIN_DIR | |
678 | TK_VERSION | |
679 | TCL_DEPS | |
680 | TCL_LIBRARY | |
681 | TCL_INCLUDE | |
682 | TCL_STUB_LIB_SPEC | |
683 | TCL_STUB_LIB_FLAG | |
684 | TCL_STUB_LIB_FILE | |
685 | TCL_LIB_SPEC | |
686 | TCL_LIB_FLAG | |
687 | TCL_LIB_FILE | |
688 | TCL_SRC_DIR | |
689 | TCL_BIN_DIR | |
690 | TCL_PATCH_LEVEL | |
691 | TCL_VERSION | |
692 | WIN32LDAPP | |
b2ceabe8 | 693 | WIN32LIBS |
81ecdfbb RW |
694 | GUI_CFLAGS_X |
695 | LIBGUI | |
608e2dbb TT |
696 | LTLIBLZMA |
697 | LIBLZMA | |
698 | HAVE_LIBLZMA | |
81ecdfbb RW |
699 | SER_HARDWIRE |
700 | WERROR_CFLAGS | |
701 | WARN_CFLAGS | |
ed2a2229 | 702 | SYSTEM_GDBINIT_DIR |
81ecdfbb | 703 | SYSTEM_GDBINIT |
81ecdfbb RW |
704 | TARGET_SYSTEM_ROOT |
705 | CONFIG_LDFLAGS | |
f6528abd | 706 | RDYNAMIC |
05ea2a05 TT |
707 | LTLIBIPT |
708 | LIBIPT | |
709 | HAVE_LIBIPT | |
5e030278 TT |
710 | PTHREAD_CFLAGS |
711 | PTHREAD_LIBS | |
712 | PTHREAD_CC | |
713 | ax_pthread_config | |
714 | SED | |
81ecdfbb | 715 | ALLOCA |
62f29fda TT |
716 | SRCHIGH_CFLAGS |
717 | SRCHIGH_LIBS | |
4df42755 DE |
718 | HAVE_GUILE_FALSE |
719 | HAVE_GUILE_TRUE | |
ed3ef339 DE |
720 | GUILE_LIBS |
721 | GUILE_CPPFLAGS | |
e76c5d17 DE |
722 | GUILD_TARGET_FLAG |
723 | GUILD | |
ed3ef339 | 724 | pkg_config_prog_path |
4df42755 DE |
725 | HAVE_PYTHON_FALSE |
726 | HAVE_PYTHON_TRUE | |
ac534cba JB |
727 | PYTHON_LIBS |
728 | PYTHON_CPPFLAGS | |
81ecdfbb | 729 | PYTHON_CFLAGS |
ec685c5e | 730 | python_prog_path |
2400729e UW |
731 | LTLIBMPFR |
732 | LIBMPFR | |
733 | HAVE_LIBMPFR | |
2c947d9b JB |
734 | LTLIBGMP |
735 | LIBGMP | |
736 | HAVE_LIBGMP | |
81ecdfbb RW |
737 | LTLIBEXPAT |
738 | LIBEXPAT | |
739 | HAVE_LIBEXPAT | |
b8e0a31c | 740 | JIT_READER_DIR |
f997c383 | 741 | TARGET_PTR |
39037522 | 742 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
743 | READLINE_CFLAGS |
744 | READLINE_DEPS | |
745 | READLINE | |
016a3251 DD |
746 | LTLIBICONV |
747 | LIBICONV | |
711a72d3 L |
748 | zlibinc |
749 | zlibdir | |
81ecdfbb RW |
750 | MIG |
751 | WINDRES | |
752 | DLLTOOL | |
c971b7fa | 753 | AR |
81ecdfbb RW |
754 | YFLAGS |
755 | YACC | |
c971b7fa | 756 | RANLIB |
81ecdfbb | 757 | LN_S |
c971b7fa PA |
758 | INSTALL_DATA |
759 | INSTALL_SCRIPT | |
760 | INSTALL_PROGRAM | |
761 | AWK | |
81ecdfbb RW |
762 | REPORT_BUGS_TEXI |
763 | REPORT_BUGS_TO | |
764 | PKGVERSION | |
44cee4fd | 765 | CODESIGN_CERT |
f6720b1c AM |
766 | DEBUGINFOD_LIBS |
767 | DEBUGINFOD_CFLAGS | |
768 | PKG_CONFIG_LIBDIR | |
769 | PKG_CONFIG_PATH | |
770 | PKG_CONFIG | |
b292c783 | 771 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb | 772 | TARGET_OBS |
8043d65b | 773 | subdirs |
81ecdfbb RW |
774 | GDB_DATADIR |
775 | DEBUGDIR | |
5048e516 JK |
776 | MAKEINFO_EXTRA_FLAGS |
777 | MAKEINFOFLAGS | |
778 | MAKEINFO | |
81ecdfbb | 779 | PACKAGE |
81ecdfbb RW |
780 | CATOBJEXT |
781 | GENCAT | |
782 | INSTOBJEXT | |
783 | DATADIRNAME | |
784 | CATALOGS | |
785 | POSUB | |
786 | GMSGFMT | |
787 | XGETTEXT | |
788 | INCINTL | |
789 | LIBINTL_DEP | |
790 | LIBINTL | |
791 | USE_NLS | |
81ecdfbb RW |
792 | CCDEPMODE |
793 | DEPDIR | |
794 | am__leading_dot | |
0bcda685 PA |
795 | CXX_DIALECT |
796 | HAVE_CXX11 | |
b316465f | 797 | target_noncanonical |
4869db5e RM |
798 | INSTALL_STRIP_PROGRAM |
799 | STRIP | |
800 | install_sh | |
c8693053 | 801 | LARGEFILE_CPPFLAGS |
81ecdfbb RW |
802 | target_os |
803 | target_vendor | |
804 | target_cpu | |
805 | target | |
806 | host_os | |
807 | host_vendor | |
808 | host_cpu | |
809 | host | |
810 | build_os | |
811 | build_vendor | |
812 | build_cpu | |
813 | build | |
c971b7fa PA |
814 | EGREP |
815 | GREP | |
816 | CPP | |
3bc3d82a PA |
817 | ac_ct_CXX |
818 | CXXFLAGS | |
819 | CXX | |
81ecdfbb RW |
820 | OBJEXT |
821 | EXEEXT | |
822 | ac_ct_CC | |
823 | CPPFLAGS | |
824 | LDFLAGS | |
825 | CFLAGS | |
826 | CC | |
827 | MAINT | |
828 | MAINTAINER_MODE_FALSE | |
829 | MAINTAINER_MODE_TRUE | |
830 | target_alias | |
831 | host_alias | |
832 | build_alias | |
833 | LIBS | |
834 | ECHO_T | |
835 | ECHO_N | |
836 | ECHO_C | |
837 | DEFS | |
838 | mandir | |
839 | localedir | |
840 | libdir | |
841 | psdir | |
842 | pdfdir | |
843 | dvidir | |
844 | htmldir | |
845 | infodir | |
846 | docdir | |
847 | oldincludedir | |
848 | includedir | |
849 | localstatedir | |
850 | sharedstatedir | |
851 | sysconfdir | |
852 | datadir | |
853 | datarootdir | |
854 | libexecdir | |
855 | sbindir | |
856 | bindir | |
857 | program_transform_name | |
858 | prefix | |
859 | exec_prefix | |
860 | PACKAGE_URL | |
861 | PACKAGE_BUGREPORT | |
862 | PACKAGE_STRING | |
863 | PACKAGE_VERSION | |
864 | PACKAGE_TARNAME | |
865 | PACKAGE_NAME | |
866 | PATH_SEPARATOR | |
867 | SHELL' | |
2b351b19 | 868 | ac_subst_files='nat_makefile_frag' |
81ecdfbb RW |
869 | ac_user_opts=' |
870 | enable_option_checking | |
871 | enable_maintainer_mode | |
da2f07f1 JK |
872 | enable_plugins |
873 | enable_largefile | |
81ecdfbb RW |
874 | with_separate_debug_dir |
875 | with_gdb_datadir | |
876 | with_relocated_sources | |
7349ff92 | 877 | with_auto_load_dir |
bccbefd2 | 878 | with_auto_load_safe_path |
81ecdfbb RW |
879 | enable_targets |
880 | enable_64_bit_bfd | |
81ecdfbb RW |
881 | enable_gdbmi |
882 | enable_tui | |
883 | enable_gdbtk | |
0d79cdc4 | 884 | with_debuginfod |
05e7c244 | 885 | with_libunwind_ia64 |
81ecdfbb RW |
886 | with_curses |
887 | enable_profiling | |
44cee4fd | 888 | enable_codesign |
81ecdfbb RW |
889 | with_pkgversion |
890 | with_bugurl | |
711a72d3 | 891 | with_system_zlib |
016a3251 DD |
892 | with_gnu_ld |
893 | enable_rpath | |
81ecdfbb | 894 | with_libiconv_prefix |
9f1528a1 | 895 | with_libiconv_type |
478aac75 | 896 | with_iconv_bin |
81ecdfbb | 897 | with_system_readline |
b8e0a31c | 898 | with_jit_reader_dir |
81ecdfbb | 899 | with_expat |
81ecdfbb | 900 | with_libexpat_prefix |
9f1528a1 | 901 | with_libexpat_type |
2c947d9b JB |
902 | with_libgmp_prefix |
903 | with_libgmp_type | |
2400729e UW |
904 | with_mpfr |
905 | with_libmpfr_prefix | |
9f1528a1 | 906 | with_libmpfr_type |
81ecdfbb | 907 | with_python |
d13c7322 | 908 | with_python_libdir |
ed3ef339 | 909 | with_guile |
189b8c2e | 910 | enable_source_highlight |
58bfce93 MM |
911 | with_intel_pt |
912 | with_libipt_prefix | |
9f1528a1 | 913 | with_libipt_type |
81ecdfbb RW |
914 | with_sysroot |
915 | with_system_gdbinit | |
ed2a2229 | 916 | with_system_gdbinit_dir |
81ecdfbb RW |
917 | enable_werror |
918 | enable_build_warnings | |
919 | enable_gdb_build_warnings | |
f35d5ade | 920 | enable_ubsan |
608e2dbb TT |
921 | with_lzma |
922 | with_liblzma_prefix | |
9f1528a1 | 923 | with_liblzma_type |
81ecdfbb RW |
924 | with_tcl |
925 | with_tk | |
926 | with_x | |
927 | enable_sim | |
393fd4c3 YQ |
928 | with_babeltrace |
929 | with_libbabeltrace_prefix | |
9f1528a1 | 930 | with_libbabeltrace_type |
ccb1ba62 | 931 | with_xxhash |
1776e3e5 | 932 | enable_libctf |
ccb1ba62 | 933 | with_libxxhash_prefix |
9f1528a1 | 934 | with_libxxhash_type |
8ecfd7bd | 935 | enable_unit_tests |
81ecdfbb RW |
936 | ' |
937 | ac_precious_vars='build_alias | |
938 | host_alias | |
939 | target_alias | |
940 | CC | |
941 | CFLAGS | |
942 | LDFLAGS | |
943 | LIBS | |
944 | CPPFLAGS | |
3bc3d82a PA |
945 | CXX |
946 | CXXFLAGS | |
947 | CCC | |
81ecdfbb | 948 | CPP |
f06e05e0 JK |
949 | MAKEINFO |
950 | MAKEINFOFLAGS | |
f6720b1c AM |
951 | PKG_CONFIG |
952 | PKG_CONFIG_PATH | |
953 | PKG_CONFIG_LIBDIR | |
954 | DEBUGINFOD_CFLAGS | |
955 | DEBUGINFOD_LIBS | |
81ecdfbb RW |
956 | YACC |
957 | YFLAGS | |
958 | XMKMF' | |
8043d65b SM |
959 | ac_subdirs_all='testsuite |
960 | gdbtk' | |
c906108c SS |
961 | |
962 | # Initialize some variables set by options. | |
bec39cab AC |
963 | ac_init_help= |
964 | ac_init_version=false | |
81ecdfbb RW |
965 | ac_unrecognized_opts= |
966 | ac_unrecognized_sep= | |
c906108c SS |
967 | # The variables have the same names as the options, with |
968 | # dashes changed to underlines. | |
bec39cab | 969 | cache_file=/dev/null |
c906108c | 970 | exec_prefix=NONE |
c906108c | 971 | no_create= |
c906108c SS |
972 | no_recursion= |
973 | prefix=NONE | |
974 | program_prefix=NONE | |
975 | program_suffix=NONE | |
976 | program_transform_name=s,x,x, | |
977 | silent= | |
978 | site= | |
979 | srcdir= | |
c906108c SS |
980 | verbose= |
981 | x_includes=NONE | |
982 | x_libraries=NONE | |
bec39cab AC |
983 | |
984 | # Installation directory options. | |
985 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
986 | # and all the variables that are supposed to be based on exec_prefix | |
987 | # by default will actually change. | |
988 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 989 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
990 | bindir='${exec_prefix}/bin' |
991 | sbindir='${exec_prefix}/sbin' | |
992 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
993 | datarootdir='${prefix}/share' |
994 | datadir='${datarootdir}' | |
c906108c SS |
995 | sysconfdir='${prefix}/etc' |
996 | sharedstatedir='${prefix}/com' | |
997 | localstatedir='${prefix}/var' | |
c906108c SS |
998 | includedir='${prefix}/include' |
999 | oldincludedir='/usr/include' | |
81ecdfbb RW |
1000 | docdir='${datarootdir}/doc/${PACKAGE}' |
1001 | infodir='${datarootdir}/info' | |
1002 | htmldir='${docdir}' | |
1003 | dvidir='${docdir}' | |
1004 | pdfdir='${docdir}' | |
1005 | psdir='${docdir}' | |
1006 | libdir='${exec_prefix}/lib' | |
1007 | localedir='${datarootdir}/locale' | |
1008 | mandir='${datarootdir}/man' | |
c906108c | 1009 | |
c906108c | 1010 | ac_prev= |
81ecdfbb | 1011 | ac_dashdash= |
c906108c SS |
1012 | for ac_option |
1013 | do | |
c906108c SS |
1014 | # If the previous option needs an argument, assign it. |
1015 | if test -n "$ac_prev"; then | |
81ecdfbb | 1016 | eval $ac_prev=\$ac_option |
c906108c SS |
1017 | ac_prev= |
1018 | continue | |
1019 | fi | |
1020 | ||
81ecdfbb | 1021 | case $ac_option in |
d0ac1c44 SM |
1022 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
1023 | *=) ac_optarg= ;; | |
1024 | *) ac_optarg=yes ;; | |
81ecdfbb | 1025 | esac |
c906108c SS |
1026 | |
1027 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1028 | ||
81ecdfbb RW |
1029 | case $ac_dashdash$ac_option in |
1030 | --) | |
1031 | ac_dashdash=yes ;; | |
c906108c SS |
1032 | |
1033 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1034 | ac_prev=bindir ;; | |
1035 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1036 | bindir=$ac_optarg ;; |
c906108c SS |
1037 | |
1038 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1039 | ac_prev=build_alias ;; |
c906108c | 1040 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1041 | build_alias=$ac_optarg ;; |
c906108c SS |
1042 | |
1043 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1044 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1045 | ac_prev=cache_file ;; | |
1046 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1047 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1048 | cache_file=$ac_optarg ;; |
1049 | ||
1050 | --config-cache | -C) | |
1051 | cache_file=config.cache ;; | |
c906108c | 1052 | |
81ecdfbb | 1053 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1054 | ac_prev=datadir ;; |
81ecdfbb | 1055 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1056 | datadir=$ac_optarg ;; |
c906108c | 1057 | |
81ecdfbb RW |
1058 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1059 | | --dataroo | --dataro | --datar) | |
1060 | ac_prev=datarootdir ;; | |
1061 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1062 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1063 | datarootdir=$ac_optarg ;; | |
1064 | ||
c906108c | 1065 | -disable-* | --disable-*) |
81ecdfbb | 1066 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1067 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1068 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1069 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1070 | ac_useropt_orig=$ac_useropt |
1071 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1072 | case $ac_user_opts in | |
1073 | *" | |
1074 | "enable_$ac_useropt" | |
1075 | "*) ;; | |
1076 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1077 | ac_unrecognized_sep=', ';; | |
1078 | esac | |
1079 | eval enable_$ac_useropt=no ;; | |
1080 | ||
1081 | -docdir | --docdir | --docdi | --doc | --do) | |
1082 | ac_prev=docdir ;; | |
1083 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1084 | docdir=$ac_optarg ;; | |
1085 | ||
1086 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1087 | ac_prev=dvidir ;; | |
1088 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1089 | dvidir=$ac_optarg ;; | |
c906108c SS |
1090 | |
1091 | -enable-* | --enable-*) | |
81ecdfbb | 1092 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1093 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1094 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1095 | as_fn_error $? "invalid feature name: $ac_useropt" |
81ecdfbb RW |
1096 | ac_useropt_orig=$ac_useropt |
1097 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1098 | case $ac_user_opts in | |
1099 | *" | |
1100 | "enable_$ac_useropt" | |
1101 | "*) ;; | |
1102 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1103 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1104 | esac |
81ecdfbb | 1105 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1106 | |
1107 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1108 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1109 | | --exec | --exe | --ex) | |
1110 | ac_prev=exec_prefix ;; | |
1111 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1112 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1113 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1114 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1115 | |
1116 | -gas | --gas | --ga | --g) | |
1117 | # Obsolete; use --with-gas. | |
1118 | with_gas=yes ;; | |
1119 | ||
bec39cab AC |
1120 | -help | --help | --hel | --he | -h) |
1121 | ac_init_help=long ;; | |
1122 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1123 | ac_init_help=recursive ;; | |
1124 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1125 | ac_init_help=short ;; | |
c906108c SS |
1126 | |
1127 | -host | --host | --hos | --ho) | |
bec39cab | 1128 | ac_prev=host_alias ;; |
c906108c | 1129 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1130 | host_alias=$ac_optarg ;; |
c906108c | 1131 | |
81ecdfbb RW |
1132 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1133 | ac_prev=htmldir ;; | |
1134 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1135 | | --ht=*) | |
1136 | htmldir=$ac_optarg ;; | |
1137 | ||
c906108c SS |
1138 | -includedir | --includedir | --includedi | --included | --include \ |
1139 | | --includ | --inclu | --incl | --inc) | |
1140 | ac_prev=includedir ;; | |
1141 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1142 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1143 | includedir=$ac_optarg ;; |
c906108c SS |
1144 | |
1145 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1146 | ac_prev=infodir ;; | |
1147 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1148 | infodir=$ac_optarg ;; |
c906108c SS |
1149 | |
1150 | -libdir | --libdir | --libdi | --libd) | |
1151 | ac_prev=libdir ;; | |
1152 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1153 | libdir=$ac_optarg ;; |
c906108c SS |
1154 | |
1155 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1156 | | --libexe | --libex | --libe) | |
1157 | ac_prev=libexecdir ;; | |
1158 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1159 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1160 | libexecdir=$ac_optarg ;; |
c906108c | 1161 | |
81ecdfbb RW |
1162 | -localedir | --localedir | --localedi | --localed | --locale) |
1163 | ac_prev=localedir ;; | |
1164 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1165 | localedir=$ac_optarg ;; | |
1166 | ||
c906108c | 1167 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1168 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1169 | ac_prev=localstatedir ;; |
1170 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1171 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1172 | localstatedir=$ac_optarg ;; |
c906108c SS |
1173 | |
1174 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1175 | ac_prev=mandir ;; | |
1176 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1177 | mandir=$ac_optarg ;; |
c906108c SS |
1178 | |
1179 | -nfp | --nfp | --nf) | |
1180 | # Obsolete; use --without-fp. | |
1181 | with_fp=no ;; | |
1182 | ||
1183 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1184 | | --no-cr | --no-c | -n) |
c906108c SS |
1185 | no_create=yes ;; |
1186 | ||
1187 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1188 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1189 | no_recursion=yes ;; | |
1190 | ||
1191 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1192 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1193 | | --oldin | --oldi | --old | --ol | --o) | |
1194 | ac_prev=oldincludedir ;; | |
1195 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1196 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1197 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1198 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1199 | |
1200 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1201 | ac_prev=prefix ;; | |
1202 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1203 | prefix=$ac_optarg ;; |
c906108c SS |
1204 | |
1205 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1206 | | --program-pre | --program-pr | --program-p) | |
1207 | ac_prev=program_prefix ;; | |
1208 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1209 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1210 | program_prefix=$ac_optarg ;; |
c906108c SS |
1211 | |
1212 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1213 | | --program-suf | --program-su | --program-s) | |
1214 | ac_prev=program_suffix ;; | |
1215 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1216 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1217 | program_suffix=$ac_optarg ;; |
c906108c SS |
1218 | |
1219 | -program-transform-name | --program-transform-name \ | |
1220 | | --program-transform-nam | --program-transform-na \ | |
1221 | | --program-transform-n | --program-transform- \ | |
1222 | | --program-transform | --program-transfor \ | |
1223 | | --program-transfo | --program-transf \ | |
1224 | | --program-trans | --program-tran \ | |
1225 | | --progr-tra | --program-tr | --program-t) | |
1226 | ac_prev=program_transform_name ;; | |
1227 | -program-transform-name=* | --program-transform-name=* \ | |
1228 | | --program-transform-nam=* | --program-transform-na=* \ | |
1229 | | --program-transform-n=* | --program-transform-=* \ | |
1230 | | --program-transform=* | --program-transfor=* \ | |
1231 | | --program-transfo=* | --program-transf=* \ | |
1232 | | --program-trans=* | --program-tran=* \ | |
1233 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1234 | program_transform_name=$ac_optarg ;; |
c906108c | 1235 | |
81ecdfbb RW |
1236 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1237 | ac_prev=pdfdir ;; | |
1238 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1239 | pdfdir=$ac_optarg ;; | |
1240 | ||
1241 | -psdir | --psdir | --psdi | --psd | --ps) | |
1242 | ac_prev=psdir ;; | |
1243 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1244 | psdir=$ac_optarg ;; | |
1245 | ||
c906108c SS |
1246 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1247 | | -silent | --silent | --silen | --sile | --sil) | |
1248 | silent=yes ;; | |
1249 | ||
1250 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1251 | ac_prev=sbindir ;; | |
1252 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1253 | | --sbi=* | --sb=*) | |
bec39cab | 1254 | sbindir=$ac_optarg ;; |
c906108c SS |
1255 | |
1256 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1257 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1258 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1259 | | --sha | --sh) | |
1260 | ac_prev=sharedstatedir ;; | |
1261 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1262 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1263 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1264 | | --sha=* | --sh=*) | |
bec39cab | 1265 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1266 | |
1267 | -site | --site | --sit) | |
1268 | ac_prev=site ;; | |
1269 | -site=* | --site=* | --sit=*) | |
bec39cab | 1270 | site=$ac_optarg ;; |
3ace7edb | 1271 | |
c906108c SS |
1272 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1273 | ac_prev=srcdir ;; | |
1274 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1275 | srcdir=$ac_optarg ;; |
c906108c SS |
1276 | |
1277 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1278 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1279 | ac_prev=sysconfdir ;; | |
1280 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1281 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1282 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1283 | |
1284 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1285 | ac_prev=target_alias ;; |
c906108c | 1286 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1287 | target_alias=$ac_optarg ;; |
c906108c SS |
1288 | |
1289 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1290 | verbose=yes ;; | |
1291 | ||
bec39cab AC |
1292 | -version | --version | --versio | --versi | --vers | -V) |
1293 | ac_init_version=: ;; | |
c906108c SS |
1294 | |
1295 | -with-* | --with-*) | |
81ecdfbb | 1296 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1297 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1298 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1299 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1300 | ac_useropt_orig=$ac_useropt |
1301 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1302 | case $ac_user_opts in | |
1303 | *" | |
1304 | "with_$ac_useropt" | |
1305 | "*) ;; | |
1306 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1307 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1308 | esac |
81ecdfbb | 1309 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1310 | |
1311 | -without-* | --without-*) | |
81ecdfbb | 1312 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1313 | # Reject names that are not valid shell variable names. |
81ecdfbb | 1314 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
d0ac1c44 | 1315 | as_fn_error $? "invalid package name: $ac_useropt" |
81ecdfbb RW |
1316 | ac_useropt_orig=$ac_useropt |
1317 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1318 | case $ac_user_opts in | |
1319 | *" | |
1320 | "with_$ac_useropt" | |
1321 | "*) ;; | |
1322 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1323 | ac_unrecognized_sep=', ';; | |
1324 | esac | |
1325 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1326 | |
1327 | --x) | |
1328 | # Obsolete; use --with-x. | |
1329 | with_x=yes ;; | |
1330 | ||
1331 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1332 | | --x-incl | --x-inc | --x-in | --x-i) | |
1333 | ac_prev=x_includes ;; | |
1334 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1335 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1336 | x_includes=$ac_optarg ;; |
c906108c SS |
1337 | |
1338 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1339 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1340 | ac_prev=x_libraries ;; | |
1341 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1342 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1343 | x_libraries=$ac_optarg ;; |
c906108c | 1344 | |
d0ac1c44 SM |
1345 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1346 | Try \`$0 --help' for more information" | |
c906108c SS |
1347 | ;; |
1348 | ||
bec39cab AC |
1349 | *=*) |
1350 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1351 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1352 | case $ac_envvar in #( |
1353 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
d0ac1c44 | 1354 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
81ecdfbb RW |
1355 | esac |
1356 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1357 | export $ac_envvar ;; |
1358 | ||
c906108c | 1359 | *) |
bec39cab | 1360 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1361 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1362 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1363 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
d0ac1c44 | 1364 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
c906108c SS |
1365 | ;; |
1366 | ||
1367 | esac | |
1368 | done | |
1369 | ||
1370 | if test -n "$ac_prev"; then | |
bec39cab | 1371 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
d0ac1c44 | 1372 | as_fn_error $? "missing argument to $ac_option" |
c906108c | 1373 | fi |
c906108c | 1374 | |
81ecdfbb RW |
1375 | if test -n "$ac_unrecognized_opts"; then |
1376 | case $enable_option_checking in | |
1377 | no) ;; | |
d0ac1c44 | 1378 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
81ecdfbb | 1379 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
b4e70030 | 1380 | esac |
81ecdfbb | 1381 | fi |
b4e70030 | 1382 | |
81ecdfbb RW |
1383 | # Check all directory arguments for consistency. |
1384 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1385 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1386 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1387 | libdir localedir mandir | |
b4e70030 | 1388 | do |
81ecdfbb RW |
1389 | eval ac_val=\$$ac_var |
1390 | # Remove trailing slashes. | |
1391 | case $ac_val in | |
1392 | */ ) | |
1393 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1394 | eval $ac_var=\$ac_val;; | |
1395 | esac | |
1396 | # Be sure to have absolute directory names. | |
b4e70030 | 1397 | case $ac_val in |
81ecdfbb RW |
1398 | [\\/$]* | ?:[\\/]* ) continue;; |
1399 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1400 | esac |
d0ac1c44 | 1401 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1402 | done |
1403 | ||
bec39cab AC |
1404 | # There might be people who depend on the old broken behavior: `$host' |
1405 | # used to hold the argument of --host etc. | |
1406 | # FIXME: To remove some day. | |
1407 | build=$build_alias | |
1408 | host=$host_alias | |
1409 | target=$target_alias | |
1410 | ||
1411 | # FIXME: To remove some day. | |
1412 | if test "x$host_alias" != x; then | |
1413 | if test "x$build_alias" = x; then | |
1414 | cross_compiling=maybe | |
bec39cab AC |
1415 | elif test "x$build_alias" != "x$host_alias"; then |
1416 | cross_compiling=yes | |
1417 | fi | |
1418 | fi | |
c906108c | 1419 | |
bec39cab AC |
1420 | ac_tool_prefix= |
1421 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1422 | ||
1423 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1424 | |
c906108c | 1425 | |
81ecdfbb RW |
1426 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1427 | ac_ls_di=`ls -di .` && | |
1428 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
d0ac1c44 | 1429 | as_fn_error $? "working directory cannot be determined" |
81ecdfbb | 1430 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
d0ac1c44 | 1431 | as_fn_error $? "pwd does not report name of working directory" |
81ecdfbb RW |
1432 | |
1433 | ||
c906108c SS |
1434 | # Find the source files, if location was not specified. |
1435 | if test -z "$srcdir"; then | |
1436 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1437 | # Try the directory containing this script, then the parent directory. |
1438 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1439 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1440 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1441 | X"$as_myself" : 'X\(//\)$' \| \ | |
1442 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1443 | $as_echo X"$as_myself" | | |
1444 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1445 | s//\1/ | |
1446 | q | |
1447 | } | |
1448 | /^X\(\/\/\)[^/].*/{ | |
1449 | s//\1/ | |
1450 | q | |
1451 | } | |
1452 | /^X\(\/\/\)$/{ | |
1453 | s//\1/ | |
1454 | q | |
1455 | } | |
1456 | /^X\(\/\).*/{ | |
1457 | s//\1/ | |
1458 | q | |
1459 | } | |
1460 | s/.*/./; q'` | |
c906108c | 1461 | srcdir=$ac_confdir |
81ecdfbb | 1462 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1463 | srcdir=.. |
1464 | fi | |
1465 | else | |
1466 | ac_srcdir_defaulted=no | |
1467 | fi | |
81ecdfbb RW |
1468 | if test ! -r "$srcdir/$ac_unique_file"; then |
1469 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
d0ac1c44 | 1470 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
81ecdfbb RW |
1471 | fi |
1472 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1473 | ac_abs_confdir=`( | |
d0ac1c44 | 1474 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
81ecdfbb RW |
1475 | pwd)` |
1476 | # When building in place, set srcdir=. | |
1477 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1478 | srcdir=. | |
1479 | fi | |
1480 | # Remove unnecessary trailing slashes from srcdir. | |
1481 | # Double slashes in file names in object file debugging info | |
1482 | # mess up M-x gdb in Emacs. | |
1483 | case $srcdir in | |
1484 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1485 | esac | |
1486 | for ac_var in $ac_precious_vars; do | |
1487 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1488 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1489 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1490 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1491 | done | |
c906108c | 1492 | |
bec39cab AC |
1493 | # |
1494 | # Report the --help message. | |
1495 | # | |
1496 | if test "$ac_init_help" = "long"; then | |
1497 | # Omit some internal or obsolete options to make the list less imposing. | |
1498 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1499 | cat <<_ACEOF | |
1500 | \`configure' configures this package to adapt to many kinds of systems. | |
1501 | ||
1502 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1503 | ||
1504 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1505 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1506 | ||
1507 | Defaults for the options are specified in brackets. | |
1508 | ||
1509 | Configuration: | |
1510 | -h, --help display this help and exit | |
1511 | --help=short display options specific to this package | |
1512 | --help=recursive display the short help of all the included packages | |
1513 | -V, --version display version information and exit | |
d0ac1c44 | 1514 | -q, --quiet, --silent do not print \`checking ...' messages |
bec39cab AC |
1515 | --cache-file=FILE cache test results in FILE [disabled] |
1516 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1517 | -n, --no-create do not create output files | |
1518 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1519 | ||
bec39cab AC |
1520 | Installation directories: |
1521 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1522 | [$ac_default_prefix] |
bec39cab | 1523 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1524 | [PREFIX] |
bec39cab AC |
1525 | |
1526 | By default, \`make install' will install all the files in | |
1527 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1528 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1529 | for instance \`--prefix=\$HOME'. | |
1530 | ||
1531 | For better control, use the options below. | |
1532 | ||
1533 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1534 | --bindir=DIR user executables [EPREFIX/bin] |
1535 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1536 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1537 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1538 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1539 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1540 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1541 | --includedir=DIR C header files [PREFIX/include] | |
1542 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1543 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1544 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1545 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1546 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1547 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1548 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1549 | --htmldir=DIR html documentation [DOCDIR] | |
1550 | --dvidir=DIR dvi documentation [DOCDIR] | |
1551 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1552 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1553 | _ACEOF |
1554 | ||
1555 | cat <<\_ACEOF | |
1556 | ||
9009e1ae MR |
1557 | Program names: |
1558 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1559 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1560 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1561 | ||
bec39cab AC |
1562 | X features: |
1563 | --x-includes=DIR X include files are in DIR | |
1564 | --x-libraries=DIR X library files are in DIR | |
1565 | ||
1566 | System types: | |
1567 | --build=BUILD configure for building on BUILD [guessed] | |
1568 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1569 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1570 | _ACEOF | |
1571 | fi | |
1572 | ||
1573 | if test -n "$ac_init_help"; then | |
1574 | ||
1575 | cat <<\_ACEOF | |
1576 | ||
1577 | Optional Features: | |
81ecdfbb | 1578 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1579 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1580 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
d0ac1c44 SM |
1581 | --enable-maintainer-mode |
1582 | enable make rules and dependencies not useful (and | |
1583 | sometimes confusing) to the casual installer | |
2974be62 | 1584 | --enable-plugins Enable support for plugins |
da2f07f1 | 1585 | --disable-largefile omit support for large files |
a1220294 TT |
1586 | --enable-targets=TARGETS |
1587 | alternative target configurations | |
c0993dbe | 1588 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1589 | --disable-gdbmi disable machine-interface (MI) |
1590 | --enable-tui enable full-screen terminal user interface (TUI) | |
1591 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1592 | --enable-profiling enable profiling of GDB | |
44cee4fd | 1593 | --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
3841debe | 1594 | --disable-rpath do not hardcode runtime library paths |
189b8c2e ST |
1595 | --enable-source-highlight |
1596 | enable source-highlight for source listings | |
a1220294 | 1597 | --enable-werror treat compile warnings as errors |
32c1c914 | 1598 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1599 | --enable-gdb-build-warnings |
32c1c914 | 1600 | enable GDB specific build-time compiler warnings if |
a1220294 | 1601 | gcc is used |
f35d5ade | 1602 | --enable-ubsan enable undefined behavior sanitizer (auto/yes/no) |
32c1c914 | 1603 | --enable-sim link gdb with simulator |
1776e3e5 | 1604 | --enable-libctf Handle .ctf type-info sections [default=yes] |
8ecfd7bd SDJ |
1605 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
1606 | GDB | |
bec39cab AC |
1607 | |
1608 | Optional Packages: | |
1609 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1610 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1611 | --with-separate-debug-dir=PATH |
32c1c914 | 1612 | look for global separate debug info in this path |
62e4f60c | 1613 | [LIBDIR/debug] |
b14b1491 TT |
1614 | --with-gdb-datadir=PATH look for global separate data files in this path |
1615 | [DATADIR/gdb] | |
29b0e8a2 | 1616 | --with-relocated-sources=PATH |
32c1c914 | 1617 | automatically relocate this path for source files |
7349ff92 | 1618 | --with-auto-load-dir=PATH |
aff139ff | 1619 | directories from which to load auto-loaded scripts |
1564a261 | 1620 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1621 | --with-auto-load-safe-path=PATH |
aff139ff | 1622 | directories safe to hold auto-loaded files |
7349ff92 | 1623 | [--with-auto-load-dir] |
bccbefd2 JK |
1624 | --without-auto-load-safe-path |
1625 | do not restrict auto-loaded files locations | |
0d79cdc4 AM |
1626 | --with-debuginfod Enable debuginfo lookups with debuginfod |
1627 | (auto/yes/no) | |
05e7c244 | 1628 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1629 | --with-curses use the curses library instead of the termcap |
1630 | library | |
c16158bc JM |
1631 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1632 | --with-bugurl=URL Direct users to URL to report a bug | |
711a72d3 | 1633 | --with-system-zlib use installed libz |
016a3251 DD |
1634 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1635 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1636 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
9f1528a1 | 1637 | --with-libiconv-type=TYPE type of library to search for (auto/static/shared) |
478aac75 | 1638 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1639 | --with-system-readline use installed readline library |
b8e0a31c SD |
1640 | --with-jit-reader-dir=PATH |
1641 | directory to load the JIT readers from | |
5c39566f | 1642 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1643 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
1644 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
9f1528a1 | 1645 | --with-libexpat-type=TYPE type of library to search for (auto/static/shared) |
2c947d9b JB |
1646 | --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib |
1647 | --without-libgmp-prefix don't search for libgmp in includedir and libdir | |
1648 | --with-libgmp-type=TYPE type of library to search for (auto/static/shared) | |
2400729e UW |
1649 | --with-mpfr include MPFR support (auto/yes/no) |
1650 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib | |
1651 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir | |
9f1528a1 | 1652 | --with-libmpfr-type=TYPE type of library to search for (auto/static/shared) |
0c4a4063 DE |
1653 | --with-python[=PYTHON] include python support |
1654 | (auto/yes/no/<python-program>) | |
d13c7322 AB |
1655 | --with-python-libdir[=DIR] |
1656 | search for python's libraries in DIR | |
ed3ef339 DE |
1657 | --with-guile[=GUILE] include guile support |
1658 | (auto/yes/no/<guile-version>/<pkg-config-program>) | |
bc504a31 | 1659 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
58bfce93 MM |
1660 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
1661 | --without-libipt-prefix don't search for libipt in includedir and libdir | |
9f1528a1 | 1662 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
81ecdfbb | 1663 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1664 | --with-system-gdbinit=PATH |
32c1c914 | 1665 | automatically load a system-wide gdbinit file |
ed2a2229 CB |
1666 | --with-system-gdbinit-dir=PATH |
1667 | automatically load system-wide gdbinit files from | |
1668 | this directory | |
608e2dbb TT |
1669 | --with-lzma support lzma compression (auto/yes/no) |
1670 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1671 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
9f1528a1 | 1672 | --with-liblzma-type=TYPE type of library to search for (auto/static/shared) |
5062cc19 KS |
1673 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1674 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1675 | --with-x use the X Window System |
393fd4c3 YQ |
1676 | --with-babeltrace include babeltrace support (auto/yes/no) |
1677 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1678 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
9f1528a1 | 1679 | --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared) |
ccb1ba62 CB |
1680 | --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) |
1681 | --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib | |
1682 | --without-libxxhash-prefix don't search for libxxhash in includedir and libdir | |
9f1528a1 | 1683 | --with-libxxhash-type=TYPE type of library to search for (auto/static/shared) |
bec39cab AC |
1684 | |
1685 | Some influential environment variables: | |
1686 | CC C compiler command | |
1687 | CFLAGS C compiler flags | |
1688 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1689 | nonstandard directory <lib dir> | |
81ecdfbb | 1690 | LIBS libraries to pass to the linker, e.g. -l<library> |
d0ac1c44 | 1691 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
81ecdfbb | 1692 | you have headers in a nonstandard directory <include dir> |
3bc3d82a PA |
1693 | CXX C++ compiler command |
1694 | CXXFLAGS C++ compiler flags | |
bec39cab | 1695 | CPP C preprocessor |
f06e05e0 JK |
1696 | MAKEINFO Parent configure detects if it is of sufficient version. |
1697 | MAKEINFOFLAGS | |
1698 | Parameters for MAKEINFO. | |
f6720b1c AM |
1699 | PKG_CONFIG path to pkg-config utility |
1700 | PKG_CONFIG_PATH | |
1701 | directories to add to pkg-config's search path | |
1702 | PKG_CONFIG_LIBDIR | |
1703 | path overriding pkg-config's built-in search path | |
1704 | DEBUGINFOD_CFLAGS | |
1705 | C compiler flags for DEBUGINFOD, overriding pkg-config | |
1706 | DEBUGINFOD_LIBS | |
1707 | linker flags for DEBUGINFOD, overriding pkg-config | |
d0ac1c44 SM |
1708 | YACC The `Yet Another Compiler Compiler' implementation to use. |
1709 | Defaults to the first program found out of: `bison -y', `byacc', | |
1710 | `yacc'. | |
81ecdfbb RW |
1711 | YFLAGS The list of arguments that will be passed by default to $YACC. |
1712 | This script will default YFLAGS to the empty string to avoid a | |
1713 | default value of `-d' given by some make applications. | |
1714 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1715 | |
1716 | Use these variables to override the choices made by `configure' or to help | |
1717 | it to find libraries and programs with nonstandard names/locations. | |
1718 | ||
81ecdfbb | 1719 | Report bugs to the package provider. |
bec39cab | 1720 | _ACEOF |
81ecdfbb | 1721 | ac_status=$? |
bec39cab AC |
1722 | fi |
1723 | ||
1724 | if test "$ac_init_help" = "recursive"; then | |
1725 | # If there are subdirs, report their specific --help. | |
bec39cab | 1726 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1727 | test -d "$ac_dir" || |
1728 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1729 | continue | |
bec39cab AC |
1730 | ac_builddir=. |
1731 | ||
81ecdfbb RW |
1732 | case "$ac_dir" in |
1733 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1734 | *) | |
1735 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1736 | # A ".." for each directory in $ac_dir_suffix. | |
1737 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1738 | case $ac_top_builddir_sub in | |
1739 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1740 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1741 | esac ;; | |
1742 | esac | |
1743 | ac_abs_top_builddir=$ac_pwd | |
1744 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1745 | # for backward compatibility: | |
1746 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1747 | |
1748 | case $srcdir in | |
81ecdfbb | 1749 | .) # We are building in place. |
bec39cab | 1750 | ac_srcdir=. |
81ecdfbb RW |
1751 | ac_top_srcdir=$ac_top_builddir_sub |
1752 | ac_abs_top_srcdir=$ac_pwd ;; | |
1753 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1754 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1755 | ac_top_srcdir=$srcdir |
1756 | ac_abs_top_srcdir=$srcdir ;; | |
1757 | *) # Relative name. | |
1758 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1759 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1760 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1761 | esac |
81ecdfbb | 1762 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1763 | |
81ecdfbb RW |
1764 | cd "$ac_dir" || { ac_status=$?; continue; } |
1765 | # Check for guested configure. | |
1766 | if test -f "$ac_srcdir/configure.gnu"; then | |
1767 | echo && | |
1768 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1769 | elif test -f "$ac_srcdir/configure"; then | |
1770 | echo && | |
1771 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1772 | else |
81ecdfbb RW |
1773 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1774 | fi || ac_status=$? | |
1775 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1776 | done |
1777 | fi | |
1778 | ||
81ecdfbb | 1779 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1780 | if $ac_init_version; then |
1781 | cat <<\_ACEOF | |
81ecdfbb | 1782 | configure |
d0ac1c44 | 1783 | generated by GNU Autoconf 2.69 |
bec39cab | 1784 | |
d0ac1c44 | 1785 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
1786 | This configure script is free software; the Free Software Foundation |
1787 | gives unlimited permission to copy, distribute and modify it. | |
1788 | _ACEOF | |
81ecdfbb | 1789 | exit |
bec39cab | 1790 | fi |
bec39cab | 1791 | |
81ecdfbb RW |
1792 | ## ------------------------ ## |
1793 | ## Autoconf initialization. ## | |
1794 | ## ------------------------ ## | |
bec39cab | 1795 | |
81ecdfbb RW |
1796 | # ac_fn_c_try_compile LINENO |
1797 | # -------------------------- | |
1798 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1799 | ac_fn_c_try_compile () | |
1800 | { | |
1801 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1802 | rm -f conftest.$ac_objext | |
1803 | if { { ac_try="$ac_compile" | |
1804 | case "(($ac_try" in | |
1805 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1806 | *) ac_try_echo=$ac_try;; | |
1807 | esac | |
1808 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1809 | $as_echo "$ac_try_echo"; } >&5 | |
1810 | (eval "$ac_compile") 2>conftest.err | |
1811 | ac_status=$? | |
1812 | if test -s conftest.err; then | |
1813 | grep -v '^ *+' conftest.err >conftest.er1 | |
1814 | cat conftest.er1 >&5 | |
1815 | mv -f conftest.er1 conftest.err | |
1816 | fi | |
1817 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1818 | test $ac_status = 0; } && { | |
1819 | test -z "$ac_c_werror_flag" || | |
1820 | test ! -s conftest.err | |
1821 | } && test -s conftest.$ac_objext; then : | |
1822 | ac_retval=0 | |
1823 | else | |
1824 | $as_echo "$as_me: failed program was:" >&5 | |
1825 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1826 | |
81ecdfbb RW |
1827 | ac_retval=1 |
1828 | fi | |
d0ac1c44 SM |
1829 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1830 | as_fn_set_status $ac_retval | |
81ecdfbb RW |
1831 | |
1832 | } # ac_fn_c_try_compile | |
1833 | ||
3bc3d82a PA |
1834 | # ac_fn_cxx_try_compile LINENO |
1835 | # ---------------------------- | |
1836 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1837 | ac_fn_cxx_try_compile () | |
1838 | { | |
1839 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1840 | rm -f conftest.$ac_objext | |
1841 | if { { ac_try="$ac_compile" | |
1842 | case "(($ac_try" in | |
1843 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1844 | *) ac_try_echo=$ac_try;; | |
1845 | esac | |
1846 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1847 | $as_echo "$ac_try_echo"; } >&5 | |
1848 | (eval "$ac_compile") 2>conftest.err | |
1849 | ac_status=$? | |
1850 | if test -s conftest.err; then | |
1851 | grep -v '^ *+' conftest.err >conftest.er1 | |
1852 | cat conftest.er1 >&5 | |
1853 | mv -f conftest.er1 conftest.err | |
1854 | fi | |
1855 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1856 | test $ac_status = 0; } && { | |
1857 | test -z "$ac_cxx_werror_flag" || | |
1858 | test ! -s conftest.err | |
1859 | } && test -s conftest.$ac_objext; then : | |
1860 | ac_retval=0 | |
1861 | else | |
1862 | $as_echo "$as_me: failed program was:" >&5 | |
1863 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1864 | ||
1865 | ac_retval=1 | |
1866 | fi | |
d0ac1c44 SM |
1867 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1868 | as_fn_set_status $ac_retval | |
3bc3d82a PA |
1869 | |
1870 | } # ac_fn_cxx_try_compile | |
1871 | ||
81ecdfbb RW |
1872 | # ac_fn_c_try_cpp LINENO |
1873 | # ---------------------- | |
1874 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1875 | ac_fn_c_try_cpp () | |
bec39cab | 1876 | { |
81ecdfbb RW |
1877 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1878 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1879 | case "(($ac_try" in | |
1880 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1881 | *) ac_try_echo=$ac_try;; | |
1882 | esac | |
1883 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1884 | $as_echo "$ac_try_echo"; } >&5 | |
1885 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1886 | ac_status=$? | |
1887 | if test -s conftest.err; then | |
1888 | grep -v '^ *+' conftest.err >conftest.er1 | |
1889 | cat conftest.er1 >&5 | |
1890 | mv -f conftest.er1 conftest.err | |
1891 | fi | |
1892 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
d0ac1c44 | 1893 | test $ac_status = 0; } > conftest.i && { |
81ecdfbb RW |
1894 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1895 | test ! -s conftest.err | |
1896 | }; then : | |
1897 | ac_retval=0 | |
1898 | else | |
1899 | $as_echo "$as_me: failed program was:" >&5 | |
1900 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1901 | |
81ecdfbb RW |
1902 | ac_retval=1 |
1903 | fi | |
d0ac1c44 SM |
1904 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1905 | as_fn_set_status $ac_retval | |
bec39cab | 1906 | |
81ecdfbb | 1907 | } # ac_fn_c_try_cpp |
bec39cab | 1908 | |
81ecdfbb RW |
1909 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1910 | # ------------------------------------------------------- | |
1911 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1912 | # the include files in INCLUDES and setting the cache variable VAR | |
1913 | # accordingly. | |
1914 | ac_fn_c_check_header_mongrel () | |
1915 | { | |
1916 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
d0ac1c44 | 1917 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1919 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1920 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1921 | $as_echo_n "(cached) " >&6 |
1922 | fi | |
1923 | eval ac_res=\$$3 | |
1924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1925 | $as_echo "$ac_res" >&6; } | |
1926 | else | |
1927 | # Is the header compilable? | |
1928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1929 | $as_echo_n "checking $2 usability... " >&6; } | |
1930 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1931 | /* end confdefs.h. */ | |
1932 | $4 | |
1933 | #include <$2> | |
1934 | _ACEOF | |
1935 | if ac_fn_c_try_compile "$LINENO"; then : | |
1936 | ac_header_compiler=yes | |
1937 | else | |
1938 | ac_header_compiler=no | |
1939 | fi | |
1940 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1942 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1943 | |
81ecdfbb RW |
1944 | # Is the header present? |
1945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1946 | $as_echo_n "checking $2 presence... " >&6; } | |
1947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1948 | /* end confdefs.h. */ | |
1949 | #include <$2> | |
1950 | _ACEOF | |
1951 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1952 | ac_header_preproc=yes | |
1953 | else | |
1954 | ac_header_preproc=no | |
1955 | fi | |
d0ac1c44 | 1956 | rm -f conftest.err conftest.i conftest.$ac_ext |
81ecdfbb RW |
1957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1958 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1959 | |
81ecdfbb RW |
1960 | # So? What about this header? |
1961 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1962 | yes:no: ) | |
1963 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1964 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1965 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1966 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1967 | ;; | |
1968 | no:yes:* ) | |
1969 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1970 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1971 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1972 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1973 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1974 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1975 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1976 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1977 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1978 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1979 | ;; | |
1980 | esac | |
1981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1982 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 1983 | if eval \${$3+:} false; then : |
81ecdfbb RW |
1984 | $as_echo_n "(cached) " >&6 |
1985 | else | |
1986 | eval "$3=\$ac_header_compiler" | |
1987 | fi | |
1988 | eval ac_res=\$$3 | |
1989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1990 | $as_echo "$ac_res" >&6; } | |
1991 | fi | |
d0ac1c44 | 1992 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 1993 | |
81ecdfbb | 1994 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1995 | |
81ecdfbb RW |
1996 | # ac_fn_c_try_run LINENO |
1997 | # ---------------------- | |
1998 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1999 | # that executables *can* be run. | |
2000 | ac_fn_c_try_run () | |
2001 | { | |
2002 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2003 | if { { ac_try="$ac_link" | |
2004 | case "(($ac_try" in | |
2005 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2006 | *) ac_try_echo=$ac_try;; | |
2007 | esac | |
2008 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2009 | $as_echo "$ac_try_echo"; } >&5 | |
2010 | (eval "$ac_link") 2>&5 | |
2011 | ac_status=$? | |
2012 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2013 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
2014 | { { case "(($ac_try" in | |
2015 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2016 | *) ac_try_echo=$ac_try;; | |
2017 | esac | |
2018 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2019 | $as_echo "$ac_try_echo"; } >&5 | |
2020 | (eval "$ac_try") 2>&5 | |
2021 | ac_status=$? | |
2022 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2023 | test $ac_status = 0; }; }; then : | |
2024 | ac_retval=0 | |
2025 | else | |
2026 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2027 | $as_echo "$as_me: failed program was:" >&5 | |
2028 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2029 | |
81ecdfbb RW |
2030 | ac_retval=$ac_status |
2031 | fi | |
2032 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2033 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2034 | as_fn_set_status $ac_retval | |
bec39cab | 2035 | |
81ecdfbb | 2036 | } # ac_fn_c_try_run |
bec39cab | 2037 | |
81ecdfbb RW |
2038 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2039 | # ------------------------------------------------------- | |
2040 | # Tests whether HEADER exists and can be compiled using the include files in | |
2041 | # INCLUDES, setting the cache variable VAR accordingly. | |
2042 | ac_fn_c_check_header_compile () | |
2043 | { | |
2044 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2046 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2047 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2048 | $as_echo_n "(cached) " >&6 |
2049 | else | |
2050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2051 | /* end confdefs.h. */ | |
2052 | $4 | |
2053 | #include <$2> | |
bec39cab | 2054 | _ACEOF |
81ecdfbb RW |
2055 | if ac_fn_c_try_compile "$LINENO"; then : |
2056 | eval "$3=yes" | |
2057 | else | |
2058 | eval "$3=no" | |
2059 | fi | |
2060 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2061 | fi | |
2062 | eval ac_res=\$$3 | |
2063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2064 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2065 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
bec39cab | 2066 | |
81ecdfbb | 2067 | } # ac_fn_c_check_header_compile |
bec39cab | 2068 | |
2974be62 AM |
2069 | # ac_fn_c_try_link LINENO |
2070 | # ----------------------- | |
2071 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2072 | ac_fn_c_try_link () | |
2073 | { | |
2074 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2075 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2076 | if { { ac_try="$ac_link" | |
2077 | case "(($ac_try" in | |
2078 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2079 | *) ac_try_echo=$ac_try;; | |
2080 | esac | |
2081 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2082 | $as_echo "$ac_try_echo"; } >&5 | |
2083 | (eval "$ac_link") 2>conftest.err | |
2084 | ac_status=$? | |
2085 | if test -s conftest.err; then | |
2086 | grep -v '^ *+' conftest.err >conftest.er1 | |
2087 | cat conftest.er1 >&5 | |
2088 | mv -f conftest.er1 conftest.err | |
2089 | fi | |
2090 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2091 | test $ac_status = 0; } && { | |
2092 | test -z "$ac_c_werror_flag" || | |
2093 | test ! -s conftest.err | |
2094 | } && test -s conftest$ac_exeext && { | |
2095 | test "$cross_compiling" = yes || | |
d0ac1c44 | 2096 | test -x conftest$ac_exeext |
2974be62 AM |
2097 | }; then : |
2098 | ac_retval=0 | |
2099 | else | |
2100 | $as_echo "$as_me: failed program was:" >&5 | |
2101 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2102 | ||
2103 | ac_retval=1 | |
2104 | fi | |
2105 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2106 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2107 | # interfere with the next link command; also delete a directory that is | |
2108 | # left behind by Apple's compiler. We do this before executing the actions. | |
2109 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
d0ac1c44 SM |
2110 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2111 | as_fn_set_status $ac_retval | |
2974be62 AM |
2112 | |
2113 | } # ac_fn_c_try_link | |
2114 | ||
81ecdfbb RW |
2115 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2116 | # -------------------------------------------- | |
2117 | # Tries to find the compile-time value of EXPR in a program that includes | |
2118 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2119 | # computed | |
2120 | ac_fn_c_compute_int () | |
2121 | { | |
2122 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2123 | if test "$cross_compiling" = yes; then | |
2124 | # Depending upon the size, compute the lo and hi bounds. | |
2125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2126 | /* end confdefs.h. */ | |
2127 | $4 | |
2128 | int | |
2129 | main () | |
2130 | { | |
2131 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
d0ac1c44 SM |
2132 | test_array [0] = 0; |
2133 | return test_array [0]; | |
bec39cab | 2134 | |
81ecdfbb RW |
2135 | ; |
2136 | return 0; | |
2137 | } | |
2138 | _ACEOF | |
2139 | if ac_fn_c_try_compile "$LINENO"; then : | |
2140 | ac_lo=0 ac_mid=0 | |
2141 | while :; do | |
2142 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2143 | /* end confdefs.h. */ | |
2144 | $4 | |
2145 | int | |
2146 | main () | |
2147 | { | |
2148 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2149 | test_array [0] = 0; |
2150 | return test_array [0]; | |
bec39cab | 2151 | |
81ecdfbb RW |
2152 | ; |
2153 | return 0; | |
2154 | } | |
2155 | _ACEOF | |
2156 | if ac_fn_c_try_compile "$LINENO"; then : | |
2157 | ac_hi=$ac_mid; break | |
2158 | else | |
2159 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2160 | if test $ac_lo -le $ac_mid; then | |
2161 | ac_lo= ac_hi= | |
2162 | break | |
2163 | fi | |
2164 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2165 | fi |
81ecdfbb RW |
2166 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2167 | done | |
c906108c | 2168 | else |
81ecdfbb RW |
2169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2170 | /* end confdefs.h. */ | |
2171 | $4 | |
2172 | int | |
2173 | main () | |
2174 | { | |
2175 | static int test_array [1 - 2 * !(($2) < 0)]; | |
d0ac1c44 SM |
2176 | test_array [0] = 0; |
2177 | return test_array [0]; | |
bec39cab | 2178 | |
81ecdfbb RW |
2179 | ; |
2180 | return 0; | |
2181 | } | |
2182 | _ACEOF | |
2183 | if ac_fn_c_try_compile "$LINENO"; then : | |
2184 | ac_hi=-1 ac_mid=-1 | |
2185 | while :; do | |
2186 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2187 | /* end confdefs.h. */ | |
2188 | $4 | |
2189 | int | |
2190 | main () | |
2191 | { | |
2192 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
d0ac1c44 SM |
2193 | test_array [0] = 0; |
2194 | return test_array [0]; | |
bec39cab | 2195 | |
81ecdfbb RW |
2196 | ; |
2197 | return 0; | |
2198 | } | |
2199 | _ACEOF | |
2200 | if ac_fn_c_try_compile "$LINENO"; then : | |
2201 | ac_lo=$ac_mid; break | |
2202 | else | |
2203 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2204 | if test $ac_mid -le $ac_hi; then | |
2205 | ac_lo= ac_hi= | |
2206 | break | |
2207 | fi | |
2208 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2209 | fi | |
2210 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2211 | done | |
2212 | else | |
2213 | ac_lo= ac_hi= | |
2214 | fi | |
2215 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2216 | fi | |
2217 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2218 | # Binary search between lo and hi bounds. | |
2219 | while test "x$ac_lo" != "x$ac_hi"; do | |
2220 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2222 | /* end confdefs.h. */ | |
2223 | $4 | |
2224 | int | |
2225 | main () | |
2226 | { | |
2227 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
d0ac1c44 SM |
2228 | test_array [0] = 0; |
2229 | return test_array [0]; | |
bec39cab | 2230 | |
81ecdfbb RW |
2231 | ; |
2232 | return 0; | |
2233 | } | |
2234 | _ACEOF | |
2235 | if ac_fn_c_try_compile "$LINENO"; then : | |
2236 | ac_hi=$ac_mid | |
2237 | else | |
2238 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2239 | fi | |
2240 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2241 | done | |
2242 | case $ac_lo in #(( | |
2243 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2244 | '') ac_retval=1 ;; | |
2245 | esac | |
2246 | else | |
2247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2248 | /* end confdefs.h. */ | |
2249 | $4 | |
2250 | static long int longval () { return $2; } | |
2251 | static unsigned long int ulongval () { return $2; } | |
2252 | #include <stdio.h> | |
2253 | #include <stdlib.h> | |
2254 | int | |
2255 | main () | |
2256 | { | |
bec39cab | 2257 | |
81ecdfbb RW |
2258 | FILE *f = fopen ("conftest.val", "w"); |
2259 | if (! f) | |
2260 | return 1; | |
2261 | if (($2) < 0) | |
2262 | { | |
2263 | long int i = longval (); | |
2264 | if (i != ($2)) | |
2265 | return 1; | |
2266 | fprintf (f, "%ld", i); | |
2267 | } | |
2268 | else | |
2269 | { | |
2270 | unsigned long int i = ulongval (); | |
2271 | if (i != ($2)) | |
2272 | return 1; | |
2273 | fprintf (f, "%lu", i); | |
2274 | } | |
2275 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2276 | on some platforms. */ | |
2277 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2278 | |
81ecdfbb RW |
2279 | ; |
2280 | return 0; | |
2281 | } | |
2282 | _ACEOF | |
2283 | if ac_fn_c_try_run "$LINENO"; then : | |
2284 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2285 | else | |
2286 | ac_retval=1 | |
2287 | fi | |
2288 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2289 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2290 | rm -f conftest.val | |
bec39cab | 2291 | |
81ecdfbb | 2292 | fi |
d0ac1c44 SM |
2293 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
2294 | as_fn_set_status $ac_retval | |
bec39cab | 2295 | |
81ecdfbb | 2296 | } # ac_fn_c_compute_int |
bec39cab | 2297 | |
55a8c076 YQ |
2298 | # ac_fn_c_check_func LINENO FUNC VAR |
2299 | # ---------------------------------- | |
2300 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2301 | ac_fn_c_check_func () | |
81ecdfbb RW |
2302 | { |
2303 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2305 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2306 | if eval \${$3+:} false; then : |
81ecdfbb RW |
2307 | $as_echo_n "(cached) " >&6 |
2308 | else | |
81ecdfbb RW |
2309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2310 | /* end confdefs.h. */ | |
55a8c076 YQ |
2311 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2312 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2313 | #define $2 innocuous_$2 | |
2314 | ||
2315 | /* System header to define __stub macros and hopefully few prototypes, | |
2316 | which can conflict with char $2 (); below. | |
2317 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2318 | <limits.h> exists even on freestanding compilers. */ | |
2319 | ||
2320 | #ifdef __STDC__ | |
2321 | # include <limits.h> | |
2322 | #else | |
2323 | # include <assert.h> | |
2324 | #endif | |
2325 | ||
2326 | #undef $2 | |
2327 | ||
2328 | /* Override any GCC internal prototype to avoid an error. | |
2329 | Use char because int might match the return type of a GCC | |
2330 | builtin and then its argument prototype would still apply. */ | |
2331 | #ifdef __cplusplus | |
2332 | extern "C" | |
2333 | #endif | |
2334 | char $2 (); | |
2335 | /* The GNU C library defines this for functions which it implements | |
2336 | to always fail with ENOSYS. Some functions are actually named | |
2337 | something starting with __ and the normal name is an alias. */ | |
2338 | #if defined __stub_$2 || defined __stub___$2 | |
2339 | choke me | |
2340 | #endif | |
2341 | ||
2342 | int | |
2343 | main () | |
2344 | { | |
2345 | return $2 (); | |
2346 | ; | |
2347 | return 0; | |
2348 | } | |
2349 | _ACEOF | |
2350 | if ac_fn_c_try_link "$LINENO"; then : | |
2351 | eval "$3=yes" | |
2352 | else | |
2353 | eval "$3=no" | |
2354 | fi | |
2355 | rm -f core conftest.err conftest.$ac_objext \ | |
2356 | conftest$ac_exeext conftest.$ac_ext | |
2357 | fi | |
2358 | eval ac_res=\$$3 | |
2359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2360 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2361 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
55a8c076 YQ |
2362 | |
2363 | } # ac_fn_c_check_func | |
2364 | ||
07697489 PA |
2365 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
2366 | # ------------------------------------------- | |
2367 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2368 | # variable VAR accordingly. | |
2369 | ac_fn_c_check_type () | |
2370 | { | |
2371 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2372 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2373 | $as_echo_n "checking for $2... " >&6; } | |
d0ac1c44 | 2374 | if eval \${$3+:} false; then : |
07697489 PA |
2375 | $as_echo_n "(cached) " >&6 |
2376 | else | |
2377 | eval "$3=no" | |
2378 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2379 | /* end confdefs.h. */ | |
2380 | $4 | |
2381 | int | |
2382 | main () | |
2383 | { | |
2384 | if (sizeof ($2)) | |
2385 | return 0; | |
2386 | ; | |
2387 | return 0; | |
2388 | } | |
2389 | _ACEOF | |
2390 | if ac_fn_c_try_compile "$LINENO"; then : | |
2391 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2392 | /* end confdefs.h. */ | |
2393 | $4 | |
2394 | int | |
2395 | main () | |
2396 | { | |
2397 | if (sizeof (($2))) | |
2398 | return 0; | |
2399 | ; | |
2400 | return 0; | |
2401 | } | |
2402 | _ACEOF | |
2403 | if ac_fn_c_try_compile "$LINENO"; then : | |
2404 | ||
2405 | else | |
2406 | eval "$3=yes" | |
2407 | fi | |
2408 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2409 | fi | |
2410 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2411 | fi | |
2412 | eval ac_res=\$$3 | |
2413 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2414 | $as_echo "$ac_res" >&6; } | |
d0ac1c44 | 2415 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
07697489 PA |
2416 | |
2417 | } # ac_fn_c_check_type | |
2418 | ||
f6720b1c AM |
2419 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2420 | # --------------------------------------------- | |
2421 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2422 | # accordingly. | |
2423 | ac_fn_c_check_decl () | |
2424 | { | |
2425 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2426 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2427 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2428 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2429 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2430 | if eval \${$3+:} false; then : | |
2431 | $as_echo_n "(cached) " >&6 | |
2432 | else | |
2433 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2434 | /* end confdefs.h. */ | |
2435 | $4 | |
2436 | int | |
2437 | main () | |
2438 | { | |
2439 | #ifndef $as_decl_name | |
2440 | #ifdef __cplusplus | |
2441 | (void) $as_decl_use; | |
2442 | #else | |
2443 | (void) $as_decl_name; | |
2444 | #endif | |
2445 | #endif | |
2446 | ||
2447 | ; | |
2448 | return 0; | |
2449 | } | |
2450 | _ACEOF | |
2451 | if ac_fn_c_try_compile "$LINENO"; then : | |
2452 | eval "$3=yes" | |
2453 | else | |
2454 | eval "$3=no" | |
2455 | fi | |
2456 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2457 | fi | |
2458 | eval ac_res=\$$3 | |
2459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2460 | $as_echo "$ac_res" >&6; } | |
2461 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2462 | ||
2463 | } # ac_fn_c_check_decl | |
2464 | ||
05ea2a05 TT |
2465 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2466 | # ---------------------------------------------------- | |
2467 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2468 | # INCLUDES, setting cache variable VAR accordingly. | |
2469 | ac_fn_c_check_member () | |
2470 | { | |
2471 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2473 | $as_echo_n "checking for $2.$3... " >&6; } | |
2474 | if eval \${$4+:} false; then : | |
2475 | $as_echo_n "(cached) " >&6 | |
2476 | else | |
2477 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2478 | /* end confdefs.h. */ | |
2479 | $5 | |
2480 | int | |
2481 | main () | |
2482 | { | |
2483 | static $2 ac_aggr; | |
2484 | if (ac_aggr.$3) | |
2485 | return 0; | |
2486 | ; | |
2487 | return 0; | |
2488 | } | |
2489 | _ACEOF | |
2490 | if ac_fn_c_try_compile "$LINENO"; then : | |
2491 | eval "$4=yes" | |
2492 | else | |
2493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2494 | /* end confdefs.h. */ | |
2495 | $5 | |
2496 | int | |
2497 | main () | |
2498 | { | |
2499 | static $2 ac_aggr; | |
2500 | if (sizeof ac_aggr.$3) | |
2501 | return 0; | |
2502 | ; | |
2503 | return 0; | |
2504 | } | |
2505 | _ACEOF | |
2506 | if ac_fn_c_try_compile "$LINENO"; then : | |
2507 | eval "$4=yes" | |
2508 | else | |
2509 | eval "$4=no" | |
2510 | fi | |
2511 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2512 | fi | |
2513 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2514 | fi | |
2515 | eval ac_res=\$$4 | |
2516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2517 | $as_echo "$ac_res" >&6; } | |
2518 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2519 | ||
2520 | } # ac_fn_c_check_member | |
2521 | ||
f35d5ade TT |
2522 | # ac_fn_cxx_try_link LINENO |
2523 | # ------------------------- | |
2524 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2525 | ac_fn_cxx_try_link () | |
2526 | { | |
2527 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2528 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2529 | if { { ac_try="$ac_link" | |
2530 | case "(($ac_try" in | |
2531 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2532 | *) ac_try_echo=$ac_try;; | |
2533 | esac | |
2534 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2535 | $as_echo "$ac_try_echo"; } >&5 | |
2536 | (eval "$ac_link") 2>conftest.err | |
2537 | ac_status=$? | |
2538 | if test -s conftest.err; then | |
2539 | grep -v '^ *+' conftest.err >conftest.er1 | |
2540 | cat conftest.er1 >&5 | |
2541 | mv -f conftest.er1 conftest.err | |
2542 | fi | |
2543 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2544 | test $ac_status = 0; } && { | |
2545 | test -z "$ac_cxx_werror_flag" || | |
2546 | test ! -s conftest.err | |
2547 | } && test -s conftest$ac_exeext && { | |
2548 | test "$cross_compiling" = yes || | |
2549 | test -x conftest$ac_exeext | |
2550 | }; then : | |
2551 | ac_retval=0 | |
2552 | else | |
2553 | $as_echo "$as_me: failed program was:" >&5 | |
2554 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2555 | ||
2556 | ac_retval=1 | |
2557 | fi | |
2558 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2559 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2560 | # interfere with the next link command; also delete a directory that is | |
2561 | # left behind by Apple's compiler. We do this before executing the actions. | |
2562 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2563 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2564 | as_fn_set_status $ac_retval | |
2565 | ||
2566 | } # ac_fn_cxx_try_link | |
21987b9c TT |
2567 | |
2568 | # ac_fn_cxx_check_func LINENO FUNC VAR | |
2569 | # ------------------------------------ | |
2570 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2571 | ac_fn_cxx_check_func () | |
2572 | { | |
2573 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2574 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2575 | $as_echo_n "checking for $2... " >&6; } | |
2576 | if eval \${$3+:} false; then : | |
2577 | $as_echo_n "(cached) " >&6 | |
2578 | else | |
2579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2580 | /* end confdefs.h. */ | |
2581 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
2582 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2583 | #define $2 innocuous_$2 | |
2584 | ||
2585 | /* System header to define __stub macros and hopefully few prototypes, | |
2586 | which can conflict with char $2 (); below. | |
2587 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2588 | <limits.h> exists even on freestanding compilers. */ | |
2589 | ||
2590 | #ifdef __STDC__ | |
2591 | # include <limits.h> | |
2592 | #else | |
2593 | # include <assert.h> | |
2594 | #endif | |
2595 | ||
2596 | #undef $2 | |
2597 | ||
2598 | /* Override any GCC internal prototype to avoid an error. | |
2599 | Use char because int might match the return type of a GCC | |
2600 | builtin and then its argument prototype would still apply. */ | |
2601 | #ifdef __cplusplus | |
2602 | extern "C" | |
2603 | #endif | |
2604 | char $2 (); | |
2605 | /* The GNU C library defines this for functions which it implements | |
2606 | to always fail with ENOSYS. Some functions are actually named | |
2607 | something starting with __ and the normal name is an alias. */ | |
2608 | #if defined __stub_$2 || defined __stub___$2 | |
2609 | choke me | |
2610 | #endif | |
2611 | ||
2612 | int | |
2613 | main () | |
2614 | { | |
2615 | return $2 (); | |
2616 | ; | |
2617 | return 0; | |
2618 | } | |
2619 | _ACEOF | |
2620 | if ac_fn_cxx_try_link "$LINENO"; then : | |
2621 | eval "$3=yes" | |
2622 | else | |
2623 | eval "$3=no" | |
2624 | fi | |
2625 | rm -f core conftest.err conftest.$ac_objext \ | |
2626 | conftest$ac_exeext conftest.$ac_ext | |
2627 | fi | |
2628 | eval ac_res=\$$3 | |
2629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2630 | $as_echo "$ac_res" >&6; } | |
2631 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2632 | ||
2633 | } # ac_fn_cxx_check_func | |
81ecdfbb RW |
2634 | cat >config.log <<_ACEOF |
2635 | This file contains any messages produced by compilers while | |
2636 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2637 | |
81ecdfbb | 2638 | It was created by $as_me, which was |
d0ac1c44 | 2639 | generated by GNU Autoconf 2.69. Invocation command line was |
b4e70030 | 2640 | |
81ecdfbb | 2641 | $ $0 $@ |
413ccac7 | 2642 | |
81ecdfbb RW |
2643 | _ACEOF |
2644 | exec 5>>config.log | |
2645 | { | |
2646 | cat <<_ASUNAME | |
2647 | ## --------- ## | |
2648 | ## Platform. ## | |
2649 | ## --------- ## | |
413ccac7 | 2650 | |
81ecdfbb RW |
2651 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2652 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2653 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2654 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2655 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2656 | |
81ecdfbb RW |
2657 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2658 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2659 | |
81ecdfbb RW |
2660 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2661 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2662 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2663 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2664 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2665 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2666 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2667 | |
81ecdfbb | 2668 | _ASUNAME |
bec39cab | 2669 | |
bec39cab AC |
2670 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2671 | for as_dir in $PATH | |
2672 | do | |
2673 | IFS=$as_save_IFS | |
2674 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2675 | $as_echo "PATH: $as_dir" |
2676 | done | |
2677 | IFS=$as_save_IFS | |
bec39cab | 2678 | |
81ecdfbb | 2679 | } >&5 |
bec39cab | 2680 | |
81ecdfbb | 2681 | cat >&5 <<_ACEOF |
bec39cab | 2682 | |
bec39cab | 2683 | |
81ecdfbb RW |
2684 | ## ----------- ## |
2685 | ## Core tests. ## | |
2686 | ## ----------- ## | |
2687 | ||
2688 | _ACEOF | |
2689 | ||
2690 | ||
2691 | # Keep a trace of the command line. | |
2692 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2693 | # Strip out --silent because we don't want to record it for future runs. | |
2694 | # Also quote any args containing shell meta-characters. | |
2695 | # Make two passes to allow for proper duplicate-argument suppression. | |
2696 | ac_configure_args= | |
2697 | ac_configure_args0= | |
2698 | ac_configure_args1= | |
2699 | ac_must_keep_next=false | |
2700 | for ac_pass in 1 2 | |
2701 | do | |
2702 | for ac_arg | |
2703 | do | |
2704 | case $ac_arg in | |
2705 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2706 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2707 | | -silent | --silent | --silen | --sile | --sil) | |
2708 | continue ;; | |
2709 | *\'*) | |
2710 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2711 | esac | |
2712 | case $ac_pass in | |
2713 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2714 | 2) | |
2715 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2716 | if test $ac_must_keep_next = true; then | |
2717 | ac_must_keep_next=false # Got value, back to normal. | |
2718 | else | |
2719 | case $ac_arg in | |
2720 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2721 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2722 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2723 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2724 | case "$ac_configure_args0 " in | |
2725 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2726 | esac | |
2727 | ;; | |
2728 | -* ) ac_must_keep_next=true ;; | |
2729 | esac | |
2730 | fi | |
2731 | as_fn_append ac_configure_args " '$ac_arg'" | |
2732 | ;; | |
2733 | esac | |
2734 | done | |
2735 | done | |
2736 | { ac_configure_args0=; unset ac_configure_args0;} | |
2737 | { ac_configure_args1=; unset ac_configure_args1;} | |
2738 | ||
2739 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2740 | # config.log. We remove comments because anyway the quotes in there | |
2741 | # would cause problems or look ugly. | |
2742 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2743 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2744 | trap 'exit_status=$? | |
2745 | # Save into config.log some information that might help in debugging. | |
2746 | { | |
2747 | echo | |
2748 | ||
d0ac1c44 | 2749 | $as_echo "## ---------------- ## |
81ecdfbb | 2750 | ## Cache variables. ## |
d0ac1c44 | 2751 | ## ---------------- ##" |
81ecdfbb RW |
2752 | echo |
2753 | # The following way of writing the cache mishandles newlines in values, | |
2754 | ( | |
2755 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2756 | eval ac_val=\$$ac_var | |
2757 | case $ac_val in #( | |
2758 | *${as_nl}*) | |
2759 | case $ac_var in #( | |
2760 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2761 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2762 | esac | |
2763 | case $ac_var in #( | |
2764 | _ | IFS | as_nl) ;; #( | |
2765 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2766 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2767 | esac ;; | |
2768 | esac | |
2769 | done | |
2770 | (set) 2>&1 | | |
2771 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2772 | *${as_nl}ac_space=\ *) | |
2773 | sed -n \ | |
2774 | "s/'\''/'\''\\\\'\'''\''/g; | |
2775 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2776 | ;; #( | |
2777 | *) | |
2778 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2779 | ;; | |
2780 | esac | | |
2781 | sort | |
2782 | ) | |
2783 | echo | |
2784 | ||
d0ac1c44 | 2785 | $as_echo "## ----------------- ## |
81ecdfbb | 2786 | ## Output variables. ## |
d0ac1c44 | 2787 | ## ----------------- ##" |
81ecdfbb RW |
2788 | echo |
2789 | for ac_var in $ac_subst_vars | |
2790 | do | |
2791 | eval ac_val=\$$ac_var | |
2792 | case $ac_val in | |
2793 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2794 | esac | |
2795 | $as_echo "$ac_var='\''$ac_val'\''" | |
2796 | done | sort | |
2797 | echo | |
2798 | ||
2799 | if test -n "$ac_subst_files"; then | |
d0ac1c44 | 2800 | $as_echo "## ------------------- ## |
81ecdfbb | 2801 | ## File substitutions. ## |
d0ac1c44 | 2802 | ## ------------------- ##" |
81ecdfbb RW |
2803 | echo |
2804 | for ac_var in $ac_subst_files | |
2805 | do | |
2806 | eval ac_val=\$$ac_var | |
2807 | case $ac_val in | |
2808 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2809 | esac | |
2810 | $as_echo "$ac_var='\''$ac_val'\''" | |
2811 | done | sort | |
2812 | echo | |
2813 | fi | |
2814 | ||
2815 | if test -s confdefs.h; then | |
d0ac1c44 | 2816 | $as_echo "## ----------- ## |
81ecdfbb | 2817 | ## confdefs.h. ## |
d0ac1c44 | 2818 | ## ----------- ##" |
81ecdfbb RW |
2819 | echo |
2820 | cat confdefs.h | |
2821 | echo | |
2822 | fi | |
2823 | test "$ac_signal" != 0 && | |
2824 | $as_echo "$as_me: caught signal $ac_signal" | |
2825 | $as_echo "$as_me: exit $exit_status" | |
2826 | } >&5 | |
2827 | rm -f core *.core core.conftest.* && | |
2828 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2829 | exit $exit_status | |
2830 | ' 0 | |
2831 | for ac_signal in 1 2 13 15; do | |
2832 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2833 | done | |
2834 | ac_signal=0 | |
2835 | ||
2836 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2837 | rm -f -r conftest* confdefs.h | |
2838 | ||
2839 | $as_echo "/* confdefs.h */" > confdefs.h | |
2840 | ||
2841 | # Predefined preprocessor variables. | |
2842 | ||
2843 | cat >>confdefs.h <<_ACEOF | |
2844 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2845 | _ACEOF | |
2846 | ||
2847 | cat >>confdefs.h <<_ACEOF | |
2848 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2849 | _ACEOF | |
2850 | ||
2851 | cat >>confdefs.h <<_ACEOF | |
2852 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2853 | _ACEOF | |
2854 | ||
2855 | cat >>confdefs.h <<_ACEOF | |
2856 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2857 | _ACEOF | |
2858 | ||
2859 | cat >>confdefs.h <<_ACEOF | |
2860 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2861 | _ACEOF | |
2862 | ||
2863 | cat >>confdefs.h <<_ACEOF | |
2864 | #define PACKAGE_URL "$PACKAGE_URL" | |
2865 | _ACEOF | |
2866 | ||
2867 | ||
2868 | # Let the site file select an alternate cache file if it wants to. | |
2869 | # Prefer an explicitly selected file to automatically selected ones. | |
2870 | ac_site_file1=NONE | |
2871 | ac_site_file2=NONE | |
2872 | if test -n "$CONFIG_SITE"; then | |
d0ac1c44 SM |
2873 | # We do not want a PATH search for config.site. |
2874 | case $CONFIG_SITE in #(( | |
2875 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2876 | */*) ac_site_file1=$CONFIG_SITE;; | |
2877 | *) ac_site_file1=./$CONFIG_SITE;; | |
2878 | esac | |
81ecdfbb RW |
2879 | elif test "x$prefix" != xNONE; then |
2880 | ac_site_file1=$prefix/share/config.site | |
2881 | ac_site_file2=$prefix/etc/config.site | |
2882 | else | |
2883 | ac_site_file1=$ac_default_prefix/share/config.site | |
2884 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2885 | fi | |
2886 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2887 | do | |
2888 | test "x$ac_site_file" = xNONE && continue | |
d0ac1c44 | 2889 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
81ecdfbb RW |
2890 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2891 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2892 | sed 's/^/| /' "$ac_site_file" >&5 | |
d0ac1c44 SM |
2893 | . "$ac_site_file" \ |
2894 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2895 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2896 | as_fn_error $? "failed to load site script $ac_site_file | |
2897 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
2898 | fi |
2899 | done | |
2900 | ||
2901 | if test -r "$cache_file"; then | |
d0ac1c44 SM |
2902 | # Some versions of bash will fail to source /dev/null (special files |
2903 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2904 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
81ecdfbb RW |
2905 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2906 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2907 | case $cache_file in | |
2908 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2909 | *) . "./$cache_file";; | |
2910 | esac | |
2911 | fi | |
2912 | else | |
2913 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2914 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2915 | >$cache_file | |
bec39cab AC |
2916 | fi |
2917 | ||
d0ac1c44 SM |
2918 | as_fn_append ac_header_list " stdlib.h" |
2919 | as_fn_append ac_header_list " unistd.h" | |
2920 | as_fn_append ac_header_list " sys/param.h" | |
81ecdfbb RW |
2921 | # Check that the precious variables saved in the cache have kept the same |
2922 | # value. | |
2923 | ac_cache_corrupted=false | |
2924 | for ac_var in $ac_precious_vars; do | |
2925 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2926 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2927 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2928 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2929 | case $ac_old_set,$ac_new_set in | |
2930 | set,) | |
2931 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2932 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2933 | ac_cache_corrupted=: ;; | |
2934 | ,set) | |
2935 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2936 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2937 | ac_cache_corrupted=: ;; | |
2938 | ,);; | |
2939 | *) | |
2940 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2941 | # differences in whitespace do not lead to failure. | |
2942 | ac_old_val_w=`echo x $ac_old_val` | |
2943 | ac_new_val_w=`echo x $ac_new_val` | |
2944 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2945 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2946 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2947 | ac_cache_corrupted=: | |
2948 | else | |
2949 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2950 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2951 | eval $ac_var=\$ac_old_val | |
2952 | fi | |
2953 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2954 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2955 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2956 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2957 | fi;; | |
2958 | esac | |
2959 | # Pass precious variables to config.status. | |
2960 | if test "$ac_new_set" = set; then | |
2961 | case $ac_new_val in | |
2962 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2963 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2964 | esac | |
2965 | case " $ac_configure_args " in | |
2966 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2967 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2968 | esac | |
2969 | fi | |
2970 | done | |
2971 | if $ac_cache_corrupted; then | |
2972 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2973 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2974 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2975 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
d0ac1c44 | 2976 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
81ecdfbb RW |
2977 | fi |
2978 | ## -------------------- ## | |
2979 | ## Main body of script. ## | |
2980 | ## -------------------- ## | |
2981 | ||
2982 | ac_ext=c | |
2983 | ac_cpp='$CPP $CPPFLAGS' | |
2984 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2985 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2986 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2987 | ||
2988 | ||
2989 | ||
2990 | ||
2991 | ||
5593a99a | 2992 | |
7e3941ac | 2993 | |
81ecdfbb RW |
2994 | ac_config_headers="$ac_config_headers config.h:config.in" |
2995 | ||
2996 | ||
2997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2998 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2999 | # Check whether --enable-maintainer-mode was given. | |
3000 | if test "${enable_maintainer_mode+set}" = set; then : | |
3001 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
3002 | else | |
3003 | USE_MAINTAINER_MODE=no | |
3004 | fi | |
3005 | ||
3006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
3007 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
3008 | if test $USE_MAINTAINER_MODE = yes; then | |
3009 | MAINTAINER_MODE_TRUE= | |
3010 | MAINTAINER_MODE_FALSE='#' | |
3011 | else | |
3012 | MAINTAINER_MODE_TRUE='#' | |
3013 | MAINTAINER_MODE_FALSE= | |
3014 | fi | |
3015 | ||
3016 | MAINT=$MAINTAINER_MODE_TRUE | |
3017 | ||
3018 | ||
3019 | ||
3020 | ac_ext=c | |
3021 | ac_cpp='$CPP $CPPFLAGS' | |
3022 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3023 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3024 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3025 | if test -n "$ac_tool_prefix"; then | |
3026 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3027 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3029 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3030 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3031 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3032 | else |
3033 | if test -n "$CC"; then | |
3034 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3035 | else | |
bec39cab AC |
3036 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3037 | for as_dir in $PATH | |
3038 | do | |
3039 | IFS=$as_save_IFS | |
3040 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3041 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3042 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3043 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
3044 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3045 | break 2 |
3046 | fi | |
3047 | done | |
81ecdfbb RW |
3048 | done |
3049 | IFS=$as_save_IFS | |
bec39cab | 3050 | |
c906108c SS |
3051 | fi |
3052 | fi | |
bec39cab | 3053 | CC=$ac_cv_prog_CC |
c906108c | 3054 | if test -n "$CC"; then |
81ecdfbb RW |
3055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3056 | $as_echo "$CC" >&6; } | |
c906108c | 3057 | else |
81ecdfbb RW |
3058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3059 | $as_echo "no" >&6; } | |
c906108c SS |
3060 | fi |
3061 | ||
81ecdfbb | 3062 | |
b4e70030 JB |
3063 | fi |
3064 | if test -z "$ac_cv_prog_CC"; then | |
3065 | ac_ct_CC=$CC | |
81ecdfbb RW |
3066 | # Extract the first word of "gcc", so it can be a program name with args. |
3067 | set dummy gcc; ac_word=$2 | |
3068 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3069 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3070 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3071 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
3072 | else |
3073 | if test -n "$ac_ct_CC"; then | |
3074 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3075 | else | |
3076 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3077 | for as_dir in $PATH | |
3078 | do | |
3079 | IFS=$as_save_IFS | |
3080 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3081 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3082 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3083 | ac_cv_prog_ac_ct_CC="gcc" |
3084 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 3085 | break 2 |
4e8d927d | 3086 | fi |
b4e70030 | 3087 | done |
81ecdfbb RW |
3088 | done |
3089 | IFS=$as_save_IFS | |
b4e70030 JB |
3090 | |
3091 | fi | |
3092 | fi | |
3093 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3094 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3095 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3096 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 3097 | else |
81ecdfbb RW |
3098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3099 | $as_echo "no" >&6; } | |
b4e70030 JB |
3100 | fi |
3101 | ||
81ecdfbb RW |
3102 | if test "x$ac_ct_CC" = x; then |
3103 | CC="" | |
3104 | else | |
3105 | case $cross_compiling:$ac_tool_warned in | |
3106 | yes:) | |
3107 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3108 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3109 | ac_tool_warned=yes ;; | |
3110 | esac | |
3111 | CC=$ac_ct_CC | |
3112 | fi | |
b4e70030 JB |
3113 | else |
3114 | CC="$ac_cv_prog_CC" | |
3115 | fi | |
3116 | ||
c906108c | 3117 | if test -z "$CC"; then |
81ecdfbb RW |
3118 | if test -n "$ac_tool_prefix"; then |
3119 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3120 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3122 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3123 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3124 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3125 | else |
3126 | if test -n "$CC"; then | |
3127 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3128 | else | |
bec39cab AC |
3129 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3130 | for as_dir in $PATH | |
3131 | do | |
3132 | IFS=$as_save_IFS | |
3133 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3134 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3135 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3136 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
3137 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
3138 | break 2 |
3139 | fi | |
3140 | done | |
81ecdfbb RW |
3141 | done |
3142 | IFS=$as_save_IFS | |
3143 | ||
3144 | fi | |
3145 | fi | |
3146 | CC=$ac_cv_prog_CC | |
3147 | if test -n "$CC"; then | |
3148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3149 | $as_echo "$CC" >&6; } | |
3150 | else | |
3151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3152 | $as_echo "no" >&6; } | |
3153 | fi | |
3154 | ||
3155 | ||
3156 | fi | |
3157 | fi | |
3158 | if test -z "$CC"; then | |
3159 | # Extract the first word of "cc", so it can be a program name with args. | |
3160 | set dummy cc; ac_word=$2 | |
3161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3162 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3163 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb RW |
3164 | $as_echo_n "(cached) " >&6 |
3165 | else | |
3166 | if test -n "$CC"; then | |
3167 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3168 | else | |
3169 | ac_prog_rejected=no | |
3170 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3171 | for as_dir in $PATH | |
3172 | do | |
3173 | IFS=$as_save_IFS | |
3174 | test -z "$as_dir" && as_dir=. | |
3175 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3176 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
81ecdfbb RW |
3177 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3178 | ac_prog_rejected=yes | |
3179 | continue | |
3180 | fi | |
3181 | ac_cv_prog_CC="cc" | |
3182 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3183 | break 2 | |
3184 | fi | |
3185 | done | |
3186 | done | |
3187 | IFS=$as_save_IFS | |
bec39cab | 3188 | |
c906108c SS |
3189 | if test $ac_prog_rejected = yes; then |
3190 | # We found a bogon in the path, so make sure we never use it. | |
3191 | set dummy $ac_cv_prog_CC | |
3192 | shift | |
bec39cab | 3193 | if test $# != 0; then |
c906108c SS |
3194 | # We chose a different compiler from the bogus one. |
3195 | # However, it has the same basename, so the bogon will be chosen | |
3196 | # first if we set CC to just the basename; use the full file name. | |
3197 | shift | |
bec39cab | 3198 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3199 | fi |
3200 | fi | |
3201 | fi | |
3202 | fi | |
bec39cab | 3203 | CC=$ac_cv_prog_CC |
c906108c | 3204 | if test -n "$CC"; then |
81ecdfbb RW |
3205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3206 | $as_echo "$CC" >&6; } | |
c906108c | 3207 | else |
81ecdfbb RW |
3208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3209 | $as_echo "no" >&6; } | |
c906108c SS |
3210 | fi |
3211 | ||
81ecdfbb | 3212 | |
bec39cab AC |
3213 | fi |
3214 | if test -z "$CC"; then | |
3215 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3216 | for ac_prog in cl.exe |
bec39cab AC |
3217 | do |
3218 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3219 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3221 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3222 | if ${ac_cv_prog_CC+:} false; then : |
81ecdfbb | 3223 | $as_echo_n "(cached) " >&6 |
c906108c SS |
3224 | else |
3225 | if test -n "$CC"; then | |
3226 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3227 | else | |
bec39cab AC |
3228 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3229 | for as_dir in $PATH | |
3230 | do | |
3231 | IFS=$as_save_IFS | |
3232 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3233 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3234 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3235 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3236 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3237 | break 2 |
3238 | fi | |
3239 | done | |
81ecdfbb RW |
3240 | done |
3241 | IFS=$as_save_IFS | |
bec39cab | 3242 | |
c906108c SS |
3243 | fi |
3244 | fi | |
bec39cab | 3245 | CC=$ac_cv_prog_CC |
c906108c | 3246 | if test -n "$CC"; then |
81ecdfbb RW |
3247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3248 | $as_echo "$CC" >&6; } | |
c906108c | 3249 | else |
81ecdfbb RW |
3250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3251 | $as_echo "no" >&6; } | |
c906108c | 3252 | fi |
bec39cab | 3253 | |
81ecdfbb | 3254 | |
bec39cab AC |
3255 | test -n "$CC" && break |
3256 | done | |
3257 | fi | |
3258 | if test -z "$CC"; then | |
3259 | ac_ct_CC=$CC | |
81ecdfbb | 3260 | for ac_prog in cl.exe |
bec39cab AC |
3261 | do |
3262 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3263 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3264 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3265 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3266 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
81ecdfbb | 3267 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
3268 | else |
3269 | if test -n "$ac_ct_CC"; then | |
3270 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3271 | else | |
3272 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3273 | for as_dir in $PATH | |
3274 | do | |
3275 | IFS=$as_save_IFS | |
3276 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 3277 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 3278 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 3279 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3280 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3281 | break 2 |
c906108c | 3282 | fi |
bec39cab | 3283 | done |
81ecdfbb RW |
3284 | done |
3285 | IFS=$as_save_IFS | |
bec39cab AC |
3286 | |
3287 | fi | |
3288 | fi | |
3289 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3290 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3292 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3293 | else |
81ecdfbb RW |
3294 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3295 | $as_echo "no" >&6; } | |
c906108c SS |
3296 | fi |
3297 | ||
81ecdfbb | 3298 | |
bec39cab AC |
3299 | test -n "$ac_ct_CC" && break |
3300 | done | |
c906108c | 3301 | |
81ecdfbb RW |
3302 | if test "x$ac_ct_CC" = x; then |
3303 | CC="" | |
3304 | else | |
3305 | case $cross_compiling:$ac_tool_warned in | |
3306 | yes:) | |
3307 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3308 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3309 | ac_tool_warned=yes ;; | |
3310 | esac | |
3311 | CC=$ac_ct_CC | |
3312 | fi | |
bec39cab AC |
3313 | fi |
3314 | ||
3315 | fi | |
3316 | ||
3317 | ||
81ecdfbb RW |
3318 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3319 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3320 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3321 | See \`config.log' for more details" "$LINENO" 5; } | |
bec39cab AC |
3322 | |
3323 | # Provide some information about the compiler. | |
81ecdfbb RW |
3324 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3325 | set X $ac_compile | |
3326 | ac_compiler=$2 | |
3327 | for ac_option in --version -v -V -qversion; do | |
3328 | { { ac_try="$ac_compiler $ac_option >&5" | |
3329 | case "(($ac_try" in | |
3330 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3331 | *) ac_try_echo=$ac_try;; | |
3332 | esac | |
3333 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3334 | $as_echo "$ac_try_echo"; } >&5 | |
3335 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3336 | ac_status=$? |
81ecdfbb RW |
3337 | if test -s conftest.err; then |
3338 | sed '10a\ | |
3339 | ... rest of stderr output deleted ... | |
3340 | 10q' conftest.err >conftest.er1 | |
3341 | cat conftest.er1 >&5 | |
81ecdfbb | 3342 | fi |
d0ac1c44 | 3343 | rm -f conftest.er1 conftest.err |
81ecdfbb RW |
3344 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3345 | test $ac_status = 0; } | |
3346 | done | |
bec39cab | 3347 | |
81ecdfbb | 3348 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3349 | /* end confdefs.h. */ |
3350 | ||
3351 | int | |
3352 | main () | |
3353 | { | |
3354 | ||
3355 | ; | |
3356 | return 0; | |
3357 | } | |
3358 | _ACEOF | |
3359 | ac_clean_files_save=$ac_clean_files | |
d0ac1c44 | 3360 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
bec39cab AC |
3361 | # Try to create an executable without -o first, disregard a.out. |
3362 | # It will help us diagnose broken compilers, and finding out an intuition | |
3363 | # of exeext. | |
d0ac1c44 SM |
3364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3365 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
81ecdfbb RW |
3366 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3367 | ||
3368 | # The possible output files: | |
3369 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3370 | ||
3371 | ac_rmfiles= | |
3372 | for ac_file in $ac_files | |
3373 | do | |
3374 | case $ac_file in | |
3375 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3376 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3377 | esac | |
3378 | done | |
3379 | rm -f $ac_rmfiles | |
3380 | ||
3381 | if { { ac_try="$ac_link_default" | |
3382 | case "(($ac_try" in | |
3383 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3384 | *) ac_try_echo=$ac_try;; | |
3385 | esac | |
3386 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3387 | $as_echo "$ac_try_echo"; } >&5 | |
3388 | (eval "$ac_link_default") 2>&5 | |
3389 | ac_status=$? | |
3390 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3391 | test $ac_status = 0; }; then : | |
3392 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3393 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3394 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3395 | # so that the user can short-circuit this test for compilers unknown to | |
3396 | # Autoconf. | |
3397 | for ac_file in $ac_files '' | |
bec39cab AC |
3398 | do |
3399 | test -f "$ac_file" || continue | |
3400 | case $ac_file in | |
81ecdfbb | 3401 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3402 | ;; |
3403 | [ab].out ) | |
3404 | # We found the default executable, but exeext='' is most | |
3405 | # certainly right. | |
3406 | break;; | |
3407 | *.* ) | |
81ecdfbb RW |
3408 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3409 | then :; else | |
3410 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3411 | fi | |
3412 | # We set ac_cv_exeext here because the later test for it is not | |
3413 | # safe: cross compilers may not add the suffix if given an `-o' | |
3414 | # argument, so we may need to know it at that point already. | |
3415 | # Even if this section looks crufty: it has the advantage of | |
3416 | # actually working. | |
b4e70030 JB |
3417 | break;; |
3418 | * ) | |
3419 | break;; | |
bec39cab AC |
3420 | esac |
3421 | done | |
81ecdfbb RW |
3422 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3423 | ||
bec39cab | 3424 | else |
81ecdfbb RW |
3425 | ac_file='' |
3426 | fi | |
81ecdfbb | 3427 | if test -z "$ac_file"; then : |
d0ac1c44 SM |
3428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3429 | $as_echo "no" >&6; } | |
3430 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3431 | sed 's/^/| /' conftest.$ac_ext >&5 |
3432 | ||
81ecdfbb RW |
3433 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3434 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3435 | as_fn_error 77 "C compiler cannot create executables |
3436 | See \`config.log' for more details" "$LINENO" 5; } | |
3437 | else | |
3438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3439 | $as_echo "yes" >&6; } | |
bec39cab | 3440 | fi |
d0ac1c44 SM |
3441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3442 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3444 | $as_echo "$ac_file" >&6; } | |
b4e70030 | 3445 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3446 | |
d0ac1c44 | 3447 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
b4e70030 | 3448 | ac_clean_files=$ac_clean_files_save |
81ecdfbb RW |
3449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3450 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3451 | if { { ac_try="$ac_link" | |
3452 | case "(($ac_try" in | |
3453 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3454 | *) ac_try_echo=$ac_try;; | |
3455 | esac | |
3456 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3457 | $as_echo "$ac_try_echo"; } >&5 | |
3458 | (eval "$ac_link") 2>&5 | |
bec39cab | 3459 | ac_status=$? |
81ecdfbb RW |
3460 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3461 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3462 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3463 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3464 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3465 | # `rm'. | |
3466 | for ac_file in conftest.exe conftest conftest.*; do | |
3467 | test -f "$ac_file" || continue | |
3468 | case $ac_file in | |
81ecdfbb | 3469 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3470 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3471 | break;; |
3472 | * ) break;; | |
3473 | esac | |
3474 | done | |
c906108c | 3475 | else |
81ecdfbb RW |
3476 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3477 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3478 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3479 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3480 | fi |
d0ac1c44 | 3481 | rm -f conftest conftest$ac_cv_exeext |
81ecdfbb RW |
3482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3483 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3484 | |
b4e70030 | 3485 | rm -f conftest.$ac_ext |
bec39cab AC |
3486 | EXEEXT=$ac_cv_exeext |
3487 | ac_exeext=$EXEEXT | |
d0ac1c44 SM |
3488 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3489 | /* end confdefs.h. */ | |
3490 | #include <stdio.h> | |
3491 | int | |
3492 | main () | |
3493 | { | |
3494 | FILE *f = fopen ("conftest.out", "w"); | |
3495 | return ferror (f) || fclose (f) != 0; | |
3496 | ||
3497 | ; | |
3498 | return 0; | |
3499 | } | |
3500 | _ACEOF | |
3501 | ac_clean_files="$ac_clean_files conftest.out" | |
3502 | # Check that the compiler produces executables we can run. If not, either | |
3503 | # the compiler is broken, or we cross compile. | |
3504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3505 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3506 | if test "$cross_compiling" != yes; then | |
3507 | { { ac_try="$ac_link" | |
3508 | case "(($ac_try" in | |
3509 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3510 | *) ac_try_echo=$ac_try;; | |
3511 | esac | |
3512 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3513 | $as_echo "$ac_try_echo"; } >&5 | |
3514 | (eval "$ac_link") 2>&5 | |
3515 | ac_status=$? | |
3516 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3517 | test $ac_status = 0; } | |
3518 | if { ac_try='./conftest$ac_cv_exeext' | |
3519 | { { case "(($ac_try" in | |
3520 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3521 | *) ac_try_echo=$ac_try;; | |
3522 | esac | |
3523 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3524 | $as_echo "$ac_try_echo"; } >&5 | |
3525 | (eval "$ac_try") 2>&5 | |
3526 | ac_status=$? | |
3527 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3528 | test $ac_status = 0; }; }; then | |
3529 | cross_compiling=no | |
3530 | else | |
3531 | if test "$cross_compiling" = maybe; then | |
3532 | cross_compiling=yes | |
3533 | else | |
3534 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3535 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3536 | as_fn_error $? "cannot run C compiled programs. | |
3537 | If you meant to cross compile, use \`--host'. | |
3538 | See \`config.log' for more details" "$LINENO" 5; } | |
3539 | fi | |
3540 | fi | |
3541 | fi | |
3542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3543 | $as_echo "$cross_compiling" >&6; } | |
3544 | ||
3545 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3546 | ac_clean_files=$ac_clean_files_save | |
81ecdfbb RW |
3547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3548 | $as_echo_n "checking for suffix of object files... " >&6; } | |
d0ac1c44 | 3549 | if ${ac_cv_objext+:} false; then : |
81ecdfbb | 3550 | $as_echo_n "(cached) " >&6 |
bec39cab | 3551 | else |
81ecdfbb | 3552 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3553 | /* end confdefs.h. */ |
3554 | ||
3555 | int | |
3556 | main () | |
3557 | { | |
3558 | ||
3559 | ; | |
3560 | return 0; | |
3561 | } | |
3562 | _ACEOF | |
3563 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3564 | if { { ac_try="$ac_compile" |
3565 | case "(($ac_try" in | |
3566 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3567 | *) ac_try_echo=$ac_try;; | |
3568 | esac | |
3569 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3570 | $as_echo "$ac_try_echo"; } >&5 | |
3571 | (eval "$ac_compile") 2>&5 | |
3572 | ac_status=$? | |
3573 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3574 | test $ac_status = 0; }; then : | |
3575 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3576 | test -f "$ac_file" || continue; | |
bec39cab | 3577 | case $ac_file in |
81ecdfbb | 3578 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3579 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3580 | break;; | |
3581 | esac | |
3582 | done | |
c906108c | 3583 | else |
81ecdfbb | 3584 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3585 | sed 's/^/| /' conftest.$ac_ext >&5 |
3586 | ||
81ecdfbb RW |
3587 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3588 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
3589 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3590 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 3591 | fi |
b4e70030 | 3592 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3593 | fi |
81ecdfbb RW |
3594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3595 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3596 | OBJEXT=$ac_cv_objext |
3597 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3599 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
d0ac1c44 | 3600 | if ${ac_cv_c_compiler_gnu+:} false; then : |
81ecdfbb | 3601 | $as_echo_n "(cached) " >&6 |
c906108c | 3602 | else |
81ecdfbb | 3603 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3604 | /* end confdefs.h. */ |
3605 | ||
3606 | int | |
3607 | main () | |
3608 | { | |
3609 | #ifndef __GNUC__ | |
3610 | choke me | |
3611 | #endif | |
3612 | ||
3613 | ; | |
3614 | return 0; | |
3615 | } | |
3616 | _ACEOF | |
81ecdfbb | 3617 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3618 | ac_compiler_gnu=yes |
3619 | else | |
81ecdfbb | 3620 | ac_compiler_gnu=no |
bec39cab | 3621 | fi |
81ecdfbb | 3622 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3623 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3624 | ||
3625 | fi | |
81ecdfbb RW |
3626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3627 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3628 | if test $ac_compiler_gnu = yes; then | |
3629 | GCC=yes | |
3630 | else | |
3631 | GCC= | |
3632 | fi | |
bec39cab AC |
3633 | ac_test_CFLAGS=${CFLAGS+set} |
3634 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3636 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
d0ac1c44 | 3637 | if ${ac_cv_prog_cc_g+:} false; then : |
81ecdfbb | 3638 | $as_echo_n "(cached) " >&6 |
bec39cab | 3639 | else |
81ecdfbb RW |
3640 | ac_save_c_werror_flag=$ac_c_werror_flag |
3641 | ac_c_werror_flag=yes | |
3642 | ac_cv_prog_cc_g=no | |
3643 | CFLAGS="-g" | |
3644 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3645 | /* end confdefs.h. */ |
3646 | ||
3647 | int | |
3648 | main () | |
3649 | { | |
3650 | ||
3651 | ; | |
3652 | return 0; | |
3653 | } | |
3654 | _ACEOF | |
81ecdfbb | 3655 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3656 | ac_cv_prog_cc_g=yes |
3657 | else | |
81ecdfbb RW |
3658 | CFLAGS="" |
3659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3660 | /* end confdefs.h. */ | |
3661 | ||
3662 | int | |
3663 | main () | |
3664 | { | |
3665 | ||
3666 | ; | |
3667 | return 0; | |
3668 | } | |
3669 | _ACEOF | |
3670 | if ac_fn_c_try_compile "$LINENO"; then : | |
3671 | ||
3672 | else | |
3673 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3674 | CFLAGS="-g" | |
3675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3676 | /* end confdefs.h. */ | |
3677 | ||
3678 | int | |
3679 | main () | |
3680 | { | |
c906108c | 3681 | |
81ecdfbb RW |
3682 | ; |
3683 | return 0; | |
3684 | } | |
3685 | _ACEOF | |
3686 | if ac_fn_c_try_compile "$LINENO"; then : | |
3687 | ac_cv_prog_cc_g=yes | |
3688 | fi | |
3689 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3690 | fi | |
3691 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3692 | fi |
81ecdfbb RW |
3693 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3694 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3695 | fi |
81ecdfbb RW |
3696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3697 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3698 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3699 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3700 | elif test $ac_cv_prog_cc_g = yes; then |
3701 | if test "$GCC" = yes; then | |
3702 | CFLAGS="-g -O2" | |
3703 | else | |
3704 | CFLAGS="-g" | |
3705 | fi | |
3706 | else | |
3707 | if test "$GCC" = yes; then | |
3708 | CFLAGS="-O2" | |
3709 | else | |
3710 | CFLAGS= | |
3711 | fi | |
3712 | fi | |
81ecdfbb RW |
3713 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3714 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
d0ac1c44 | 3715 | if ${ac_cv_prog_cc_c89+:} false; then : |
81ecdfbb | 3716 | $as_echo_n "(cached) " >&6 |
bec39cab | 3717 | else |
81ecdfbb | 3718 | ac_cv_prog_cc_c89=no |
bec39cab | 3719 | ac_save_CC=$CC |
81ecdfbb | 3720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3721 | /* end confdefs.h. */ |
c906108c SS |
3722 | #include <stdarg.h> |
3723 | #include <stdio.h> | |
d0ac1c44 | 3724 | struct stat; |
c906108c SS |
3725 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3726 | struct buf { int x; }; | |
3727 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3728 | static char *e (p, i) | |
3729 | char **p; | |
3730 | int i; | |
3731 | { | |
3732 | return p[i]; | |
3733 | } | |
3734 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3735 | { | |
3736 | char *s; | |
3737 | va_list v; | |
3738 | va_start (v,p); | |
3739 | s = g (p, va_arg (v,int)); | |
3740 | va_end (v); | |
3741 | return s; | |
3742 | } | |
bec39cab AC |
3743 | |
3744 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3745 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3746 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3747 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3748 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3749 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3750 | that's true only with -std. */ |
bec39cab AC |
3751 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3752 | ||
81ecdfbb RW |
3753 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3754 | inside strings and character constants. */ | |
3755 | #define FOO(x) 'x' | |
3756 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3757 | ||
c906108c SS |
3758 | int test (int i, double x); |
3759 | struct s1 {int (*f) (int a);}; | |
3760 | struct s2 {int (*f) (double a);}; | |
3761 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3762 | int argc; | |
3763 | char **argv; | |
bec39cab AC |
3764 | int |
3765 | main () | |
3766 | { | |
c906108c | 3767 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3768 | ; |
3769 | return 0; | |
3770 | } | |
3771 | _ACEOF | |
81ecdfbb RW |
3772 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3773 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3774 | do |
3775 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3776 | if ac_fn_c_try_compile "$LINENO"; then : |
3777 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3778 | fi |
81ecdfbb RW |
3779 | rm -f core conftest.err conftest.$ac_objext |
3780 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3781 | done |
81ecdfbb | 3782 | rm -f conftest.$ac_ext |
bec39cab | 3783 | CC=$ac_save_CC |
c906108c SS |
3784 | |
3785 | fi | |
81ecdfbb RW |
3786 | # AC_CACHE_VAL |
3787 | case "x$ac_cv_prog_cc_c89" in | |
3788 | x) | |
3789 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3790 | $as_echo "none needed" >&6; } ;; | |
3791 | xno) | |
3792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3793 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3794 | *) |
81ecdfbb RW |
3795 | CC="$CC $ac_cv_prog_cc_c89" |
3796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3797 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3798 | esac |
81ecdfbb | 3799 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3800 | |
b4e70030 JB |
3801 | fi |
3802 | ||
bec39cab AC |
3803 | ac_ext=c |
3804 | ac_cpp='$CPP $CPPFLAGS' | |
3805 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3806 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3807 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3808 | |
3bc3d82a PA |
3809 | ac_ext=cpp |
3810 | ac_cpp='$CXXCPP $CPPFLAGS' | |
3811 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3812 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3813 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3814 | if test -z "$CXX"; then | |
3815 | if test -n "$CCC"; then | |
3816 | CXX=$CCC | |
3817 | else | |
3818 | if test -n "$ac_tool_prefix"; then | |
3819 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3820 | do | |
3821 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3822 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
3823 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3824 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3825 | if ${ac_cv_prog_CXX+:} false; then : |
3bc3d82a PA |
3826 | $as_echo_n "(cached) " >&6 |
3827 | else | |
3828 | if test -n "$CXX"; then | |
3829 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
3830 | else | |
3831 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3832 | for as_dir in $PATH | |
3833 | do | |
3834 | IFS=$as_save_IFS | |
3835 | test -z "$as_dir" && as_dir=. | |
3836 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3837 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3838 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
3839 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3840 | break 2 | |
3841 | fi | |
3842 | done | |
3843 | done | |
3844 | IFS=$as_save_IFS | |
3845 | ||
3846 | fi | |
3847 | fi | |
3848 | CXX=$ac_cv_prog_CXX | |
3849 | if test -n "$CXX"; then | |
3850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
3851 | $as_echo "$CXX" >&6; } | |
3852 | else | |
3853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3854 | $as_echo "no" >&6; } | |
3855 | fi | |
3856 | ||
3857 | ||
3858 | test -n "$CXX" && break | |
3859 | done | |
3860 | fi | |
3861 | if test -z "$CXX"; then | |
3862 | ac_ct_CXX=$CXX | |
3863 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
3864 | do | |
3865 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3866 | set dummy $ac_prog; ac_word=$2 | |
3867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3868 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 3869 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
3bc3d82a PA |
3870 | $as_echo_n "(cached) " >&6 |
3871 | else | |
3872 | if test -n "$ac_ct_CXX"; then | |
3873 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
3874 | else | |
3875 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3876 | for as_dir in $PATH | |
3877 | do | |
3878 | IFS=$as_save_IFS | |
3879 | test -z "$as_dir" && as_dir=. | |
3880 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 3881 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
3bc3d82a PA |
3882 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
3883 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3884 | break 2 | |
3885 | fi | |
3886 | done | |
3887 | done | |
3888 | IFS=$as_save_IFS | |
3889 | ||
3890 | fi | |
3891 | fi | |
3892 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
3893 | if test -n "$ac_ct_CXX"; then | |
3894 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
3895 | $as_echo "$ac_ct_CXX" >&6; } | |
3896 | else | |
3897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3898 | $as_echo "no" >&6; } | |
3899 | fi | |
3900 | ||
3901 | ||
3902 | test -n "$ac_ct_CXX" && break | |
3903 | done | |
3904 | ||
3905 | if test "x$ac_ct_CXX" = x; then | |
3906 | CXX="g++" | |
3907 | else | |
3908 | case $cross_compiling:$ac_tool_warned in | |
3909 | yes:) | |
3910 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3911 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3912 | ac_tool_warned=yes ;; | |
3913 | esac | |
3914 | CXX=$ac_ct_CXX | |
3915 | fi | |
3916 | fi | |
3917 | ||
3918 | fi | |
3919 | fi | |
3920 | # Provide some information about the compiler. | |
3921 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3922 | set X $ac_compile | |
3923 | ac_compiler=$2 | |
3924 | for ac_option in --version -v -V -qversion; do | |
3925 | { { ac_try="$ac_compiler $ac_option >&5" | |
3926 | case "(($ac_try" in | |
3927 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3928 | *) ac_try_echo=$ac_try;; | |
3929 | esac | |
3930 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3931 | $as_echo "$ac_try_echo"; } >&5 | |
3932 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3933 | ac_status=$? | |
3934 | if test -s conftest.err; then | |
3935 | sed '10a\ | |
3936 | ... rest of stderr output deleted ... | |
3937 | 10q' conftest.err >conftest.er1 | |
3938 | cat conftest.er1 >&5 | |
3bc3d82a | 3939 | fi |
d0ac1c44 | 3940 | rm -f conftest.er1 conftest.err |
3bc3d82a PA |
3941 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3942 | test $ac_status = 0; } | |
3943 | done | |
3944 | ||
3945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3946 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
d0ac1c44 | 3947 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
3bc3d82a PA |
3948 | $as_echo_n "(cached) " >&6 |
3949 | else | |
3950 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3951 | /* end confdefs.h. */ | |
3952 | ||
3953 | int | |
3954 | main () | |
3955 | { | |
3956 | #ifndef __GNUC__ | |
3957 | choke me | |
3958 | #endif | |
3959 | ||
3960 | ; | |
3961 | return 0; | |
3962 | } | |
3963 | _ACEOF | |
3964 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
3965 | ac_compiler_gnu=yes | |
3966 | else | |
3967 | ac_compiler_gnu=no | |
3968 | fi | |
3969 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3970 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3971 | ||
3972 | fi | |
3973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3974 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3975 | if test $ac_compiler_gnu = yes; then | |
3976 | GXX=yes | |
3977 | else | |
3978 | GXX= | |
3979 | fi | |
3980 | ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3981 | ac_save_CXXFLAGS=$CXXFLAGS | |
3982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3983 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
d0ac1c44 | 3984 | if ${ac_cv_prog_cxx_g+:} false; then : |
3bc3d82a PA |
3985 | $as_echo_n "(cached) " >&6 |
3986 | else | |
3987 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3988 | ac_cxx_werror_flag=yes | |
3989 | ac_cv_prog_cxx_g=no | |
3990 | CXXFLAGS="-g" | |
3991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3992 | /* end confdefs.h. */ | |
3993 | ||
3994 | int | |
3995 | main () | |
3996 | { | |
3997 | ||
3998 | ; | |
3999 | return 0; | |
4000 | } | |
4001 | _ACEOF | |
4002 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4003 | ac_cv_prog_cxx_g=yes | |
4004 | else | |
4005 | CXXFLAGS="" | |
4006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4007 | /* end confdefs.h. */ | |
4008 | ||
4009 | int | |
4010 | main () | |
4011 | { | |
4012 | ||
4013 | ; | |
4014 | return 0; | |
4015 | } | |
4016 | _ACEOF | |
4017 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4018 | ||
4019 | else | |
4020 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4021 | CXXFLAGS="-g" | |
4022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4023 | /* end confdefs.h. */ | |
4024 | ||
4025 | int | |
4026 | main () | |
4027 | { | |
4028 | ||
4029 | ; | |
4030 | return 0; | |
4031 | } | |
4032 | _ACEOF | |
4033 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
4034 | ac_cv_prog_cxx_g=yes | |
4035 | fi | |
4036 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4037 | fi | |
4038 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4039 | fi | |
4040 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4041 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
4042 | fi | |
4043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
4044 | $as_echo "$ac_cv_prog_cxx_g" >&6; } | |
4045 | if test "$ac_test_CXXFLAGS" = set; then | |
4046 | CXXFLAGS=$ac_save_CXXFLAGS | |
4047 | elif test $ac_cv_prog_cxx_g = yes; then | |
4048 | if test "$GXX" = yes; then | |
4049 | CXXFLAGS="-g -O2" | |
4050 | else | |
4051 | CXXFLAGS="-g" | |
4052 | fi | |
4053 | else | |
4054 | if test "$GXX" = yes; then | |
4055 | CXXFLAGS="-O2" | |
4056 | else | |
4057 | CXXFLAGS= | |
4058 | fi | |
4059 | fi | |
4060 | ac_ext=c | |
4061 | ac_cpp='$CPP $CPPFLAGS' | |
4062 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4063 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4064 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4065 | ||
4066 | ||
60ca704f | 4067 | |
bec39cab AC |
4068 | ac_ext=c |
4069 | ac_cpp='$CPP $CPPFLAGS' | |
4070 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4071 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4072 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
4073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
4074 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
4075 | # On Suns, sometimes $CPP names a directory. |
4076 | if test -n "$CPP" && test -d "$CPP"; then | |
4077 | CPP= | |
8bb2c122 | 4078 | fi |
bec39cab | 4079 | if test -z "$CPP"; then |
d0ac1c44 | 4080 | if ${ac_cv_prog_CPP+:} false; then : |
81ecdfbb | 4081 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
4082 | else |
4083 | # Double quotes because CPP needs to be expanded | |
4084 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4085 | do | |
4086 | ac_preproc_ok=false | |
4087 | for ac_c_preproc_warn_flag in '' yes | |
4088 | do | |
4089 | # Use a header file that comes with gcc, so configuring glibc | |
4090 | # with a fresh cross-compiler works. | |
4091 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4092 | # <limits.h> exists even on freestanding compilers. | |
4093 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4094 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4096 | /* end confdefs.h. */ |
4097 | #ifdef __STDC__ | |
4098 | # include <limits.h> | |
4099 | #else | |
4100 | # include <assert.h> | |
4101 | #endif | |
4102 | Syntax error | |
4103 | _ACEOF | |
81ecdfbb | 4104 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4105 | |
81ecdfbb | 4106 | else |
bec39cab AC |
4107 | # Broken: fails on valid input. |
4108 | continue | |
4109 | fi | |
d0ac1c44 | 4110 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4111 | |
81ecdfbb | 4112 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4113 | # can be detected and how. |
81ecdfbb | 4114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4115 | /* end confdefs.h. */ |
4116 | #include <ac_nonexistent.h> | |
4117 | _ACEOF | |
81ecdfbb | 4118 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4119 | # Broken: success on invalid input. |
4120 | continue | |
8bb2c122 | 4121 | else |
bec39cab AC |
4122 | # Passes both tests. |
4123 | ac_preproc_ok=: | |
4124 | break | |
8bb2c122 | 4125 | fi |
d0ac1c44 | 4126 | rm -f conftest.err conftest.i conftest.$ac_ext |
8bb2c122 | 4127 | |
bec39cab AC |
4128 | done |
4129 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4130 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb | 4131 | if $ac_preproc_ok; then : |
bec39cab AC |
4132 | break |
4133 | fi | |
8bb2c122 | 4134 | |
bec39cab AC |
4135 | done |
4136 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 4137 | |
c906108c | 4138 | fi |
bec39cab AC |
4139 | CPP=$ac_cv_prog_CPP |
4140 | else | |
4141 | ac_cv_prog_CPP=$CPP | |
c906108c | 4142 | fi |
81ecdfbb RW |
4143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
4144 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
4145 | ac_preproc_ok=false |
4146 | for ac_c_preproc_warn_flag in '' yes | |
4147 | do | |
4148 | # Use a header file that comes with gcc, so configuring glibc | |
4149 | # with a fresh cross-compiler works. | |
4150 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4151 | # <limits.h> exists even on freestanding compilers. | |
4152 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
4153 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 4154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4155 | /* end confdefs.h. */ |
4156 | #ifdef __STDC__ | |
4157 | # include <limits.h> | |
4158 | #else | |
4159 | # include <assert.h> | |
4160 | #endif | |
4161 | Syntax error | |
4162 | _ACEOF | |
81ecdfbb | 4163 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 4164 | |
81ecdfbb | 4165 | else |
bec39cab AC |
4166 | # Broken: fails on valid input. |
4167 | continue | |
4168 | fi | |
d0ac1c44 | 4169 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 4170 | |
81ecdfbb | 4171 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 4172 | # can be detected and how. |
81ecdfbb | 4173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
4174 | /* end confdefs.h. */ |
4175 | #include <ac_nonexistent.h> | |
4176 | _ACEOF | |
81ecdfbb | 4177 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
4178 | # Broken: success on invalid input. |
4179 | continue | |
c906108c | 4180 | else |
bec39cab AC |
4181 | # Passes both tests. |
4182 | ac_preproc_ok=: | |
4183 | break | |
c906108c | 4184 | fi |
d0ac1c44 | 4185 | rm -f conftest.err conftest.i conftest.$ac_ext |
c906108c | 4186 | |
bec39cab AC |
4187 | done |
4188 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
d0ac1c44 | 4189 | rm -f conftest.i conftest.err conftest.$ac_ext |
81ecdfbb RW |
4190 | if $ac_preproc_ok; then : |
4191 | ||
c906108c | 4192 | else |
81ecdfbb RW |
4193 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
4194 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
4195 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4196 | See \`config.log' for more details" "$LINENO" 5; } | |
c906108c | 4197 | fi |
c906108c | 4198 | |
bec39cab AC |
4199 | ac_ext=c |
4200 | ac_cpp='$CPP $CPPFLAGS' | |
4201 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4202 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4203 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4204 | ||
4205 | ||
81ecdfbb RW |
4206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4207 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
d0ac1c44 | 4208 | if ${ac_cv_path_GREP+:} false; then : |
81ecdfbb | 4209 | $as_echo_n "(cached) " >&6 |
4e8d927d | 4210 | else |
81ecdfbb RW |
4211 | if test -z "$GREP"; then |
4212 | ac_path_GREP_found=false | |
4213 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4214 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4215 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4216 | do | |
4217 | IFS=$as_save_IFS | |
4218 | test -z "$as_dir" && as_dir=. | |
4219 | for ac_prog in grep ggrep; do | |
4220 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4221 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4222 | as_fn_executable_p "$ac_path_GREP" || continue |
81ecdfbb RW |
4223 | # Check for GNU ac_path_GREP and select it if it is found. |
4224 | # Check for GNU $ac_path_GREP | |
4225 | case `"$ac_path_GREP" --version 2>&1` in | |
4226 | *GNU*) | |
4227 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4228 | *) | |
4229 | ac_count=0 | |
4230 | $as_echo_n 0123456789 >"conftest.in" | |
4231 | while : | |
4232 | do | |
4233 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4234 | mv "conftest.tmp" "conftest.in" | |
4235 | cp "conftest.in" "conftest.nl" | |
4236 | $as_echo 'GREP' >> "conftest.nl" | |
4237 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4238 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4239 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4240 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4241 | # Best one so far, save it but keep looking for a better one | |
4242 | ac_cv_path_GREP="$ac_path_GREP" | |
4243 | ac_path_GREP_max=$ac_count | |
bec39cab | 4244 | fi |
81ecdfbb RW |
4245 | # 10*(2^10) chars as input seems more than enough |
4246 | test $ac_count -gt 10 && break | |
4247 | done | |
4248 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4249 | esac | |
bec39cab | 4250 | |
81ecdfbb RW |
4251 | $ac_path_GREP_found && break 3 |
4252 | done | |
4253 | done | |
4254 | done | |
4255 | IFS=$as_save_IFS | |
4256 | if test -z "$ac_cv_path_GREP"; then | |
d0ac1c44 | 4257 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
81ecdfbb | 4258 | fi |
c906108c | 4259 | else |
81ecdfbb | 4260 | ac_cv_path_GREP=$GREP |
c906108c | 4261 | fi |
c906108c | 4262 | |
81ecdfbb RW |
4263 | fi |
4264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4265 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4266 | GREP="$ac_cv_path_GREP" | |
c906108c | 4267 | |
c906108c | 4268 | |
81ecdfbb RW |
4269 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
4270 | $as_echo_n "checking for egrep... " >&6; } | |
d0ac1c44 | 4271 | if ${ac_cv_path_EGREP+:} false; then : |
81ecdfbb | 4272 | $as_echo_n "(cached) " >&6 |
783e057b | 4273 | else |
81ecdfbb RW |
4274 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
4275 | then ac_cv_path_EGREP="$GREP -E" | |
4276 | else | |
4277 | if test -z "$EGREP"; then | |
4278 | ac_path_EGREP_found=false | |
4279 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4280 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4281 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
4282 | do |
4283 | IFS=$as_save_IFS | |
4284 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4285 | for ac_prog in egrep; do |
4286 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4287 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
d0ac1c44 | 4288 | as_fn_executable_p "$ac_path_EGREP" || continue |
81ecdfbb RW |
4289 | # Check for GNU ac_path_EGREP and select it if it is found. |
4290 | # Check for GNU $ac_path_EGREP | |
4291 | case `"$ac_path_EGREP" --version 2>&1` in | |
4292 | *GNU*) | |
4293 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4294 | *) | |
4295 | ac_count=0 | |
4296 | $as_echo_n 0123456789 >"conftest.in" | |
4297 | while : | |
4298 | do | |
4299 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4300 | mv "conftest.tmp" "conftest.in" | |
4301 | cp "conftest.in" "conftest.nl" | |
4302 | $as_echo 'EGREP' >> "conftest.nl" | |
4303 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4304 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4305 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4306 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4307 | # Best one so far, save it but keep looking for a better one | |
4308 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4309 | ac_path_EGREP_max=$ac_count | |
4310 | fi | |
4311 | # 10*(2^10) chars as input seems more than enough | |
4312 | test $ac_count -gt 10 && break | |
4313 | done | |
4314 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4315 | esac | |
bec39cab | 4316 | |
81ecdfbb RW |
4317 | $ac_path_EGREP_found && break 3 |
4318 | done | |
4319 | done | |
4320 | done | |
4321 | IFS=$as_save_IFS | |
4322 | if test -z "$ac_cv_path_EGREP"; then | |
d0ac1c44 | 4323 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
783e057b | 4324 | fi |
783e057b | 4325 | else |
81ecdfbb | 4326 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
4327 | fi |
4328 | ||
81ecdfbb | 4329 | fi |
783e057b | 4330 | fi |
81ecdfbb RW |
4331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4332 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4333 | EGREP="$ac_cv_path_EGREP" | |
4334 | ||
783e057b | 4335 | |
81ecdfbb RW |
4336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4337 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
d0ac1c44 | 4338 | if ${ac_cv_header_stdc+:} false; then : |
81ecdfbb | 4339 | $as_echo_n "(cached) " >&6 |
783e057b | 4340 | else |
81ecdfbb | 4341 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4342 | /* end confdefs.h. */ |
783e057b | 4343 | #include <stdlib.h> |
bec39cab | 4344 | #include <stdarg.h> |
783e057b DJ |
4345 | #include <string.h> |
4346 | #include <float.h> | |
c906108c | 4347 | |
bec39cab AC |
4348 | int |
4349 | main () | |
4350 | { | |
c906108c | 4351 | |
bec39cab AC |
4352 | ; |
4353 | return 0; | |
4354 | } | |
4355 | _ACEOF | |
81ecdfbb | 4356 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4357 | ac_cv_header_stdc=yes |
c906108c | 4358 | else |
81ecdfbb | 4359 | ac_cv_header_stdc=no |
c906108c | 4360 | fi |
81ecdfbb | 4361 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4362 | |
783e057b DJ |
4363 | if test $ac_cv_header_stdc = yes; then |
4364 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4365 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4366 | /* end confdefs.h. */ |
4367 | #include <string.h> | |
c906108c | 4368 | |
783e057b DJ |
4369 | _ACEOF |
4370 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4371 | $EGREP "memchr" >/dev/null 2>&1; then : |
4372 | ||
c906108c | 4373 | else |
783e057b | 4374 | ac_cv_header_stdc=no |
c906108c | 4375 | fi |
783e057b | 4376 | rm -f conftest* |
c906108c SS |
4377 | |
4378 | fi | |
4379 | ||
783e057b DJ |
4380 | if test $ac_cv_header_stdc = yes; then |
4381 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4382 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4383 | /* end confdefs.h. */ |
4384 | #include <stdlib.h> | |
bec39cab | 4385 | |
783e057b DJ |
4386 | _ACEOF |
4387 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4388 | $EGREP "free" >/dev/null 2>&1; then : |
4389 | ||
bec39cab | 4390 | else |
783e057b | 4391 | ac_cv_header_stdc=no |
bec39cab | 4392 | fi |
783e057b | 4393 | rm -f conftest* |
bec39cab AC |
4394 | |
4395 | fi | |
bec39cab | 4396 | |
783e057b DJ |
4397 | if test $ac_cv_header_stdc = yes; then |
4398 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4399 | if test "$cross_compiling" = yes; then : |
783e057b | 4400 | : |
bec39cab | 4401 | else |
81ecdfbb | 4402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4403 | /* end confdefs.h. */ |
4404 | #include <ctype.h> | |
81ecdfbb | 4405 | #include <stdlib.h> |
783e057b DJ |
4406 | #if ((' ' & 0x0FF) == 0x020) |
4407 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4408 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4409 | #else | |
4410 | # define ISLOWER(c) \ | |
4411 | (('a' <= (c) && (c) <= 'i') \ | |
4412 | || ('j' <= (c) && (c) <= 'r') \ | |
4413 | || ('s' <= (c) && (c) <= 'z')) | |
4414 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4415 | #endif | |
4416 | ||
4417 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4418 | int | |
4419 | main () | |
4420 | { | |
4421 | int i; | |
4422 | for (i = 0; i < 256; i++) | |
4423 | if (XOR (islower (i), ISLOWER (i)) | |
4424 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4425 | return 2; |
4426 | return 0; | |
783e057b DJ |
4427 | } |
4428 | _ACEOF | |
81ecdfbb | 4429 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4430 | |
81ecdfbb RW |
4431 | else |
4432 | ac_cv_header_stdc=no | |
783e057b | 4433 | fi |
81ecdfbb RW |
4434 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4435 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4436 | fi |
81ecdfbb | 4437 | |
783e057b DJ |
4438 | fi |
4439 | fi | |
81ecdfbb RW |
4440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4441 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4442 | if test $ac_cv_header_stdc = yes; then |
4443 | ||
81ecdfbb | 4444 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4445 | |
4446 | fi | |
4447 | ||
4448 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4449 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4450 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4451 | do : |
4452 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4453 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4454 | " | |
d0ac1c44 | 4455 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
783e057b | 4456 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4457 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4458 | _ACEOF |
4459 | ||
4460 | fi | |
4461 | ||
4462 | done | |
4463 | ||
4464 | ||
4465 | ||
81ecdfbb | 4466 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
d0ac1c44 | 4467 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
783e057b DJ |
4468 | MINIX=yes |
4469 | else | |
4470 | MINIX= | |
4471 | fi | |
4472 | ||
4473 | ||
4474 | if test "$MINIX" = yes; then | |
4475 | ||
81ecdfbb | 4476 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4477 | |
4478 | ||
81ecdfbb | 4479 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4480 | |
4481 | ||
81ecdfbb | 4482 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4483 | |
4484 | fi | |
4485 | ||
4486 | ||
81ecdfbb RW |
4487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4488 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
d0ac1c44 | 4489 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
81ecdfbb | 4490 | $as_echo_n "(cached) " >&6 |
783e057b | 4491 | else |
81ecdfbb | 4492 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4493 | /* end confdefs.h. */ |
4494 | ||
d0ac1c44 SM |
4495 | # define __EXTENSIONS__ 1 |
4496 | $ac_includes_default | |
783e057b DJ |
4497 | int |
4498 | main () | |
4499 | { | |
4500 | ||
4501 | ; | |
4502 | return 0; | |
4503 | } | |
4504 | _ACEOF | |
81ecdfbb | 4505 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4506 | ac_cv_safe_to_define___extensions__=yes |
4507 | else | |
81ecdfbb | 4508 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4509 | fi |
81ecdfbb | 4510 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4511 | fi |
81ecdfbb RW |
4512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4513 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4514 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4515 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4516 | |
81ecdfbb | 4517 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4518 | |
81ecdfbb | 4519 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4520 | |
81ecdfbb | 4521 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4522 | |
81ecdfbb | 4523 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4524 | |
4525 | ||
c971b7fa PA |
4526 | ac_aux_dir= |
4527 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
d0ac1c44 SM |
4528 | if test -f "$ac_dir/install-sh"; then |
4529 | ac_aux_dir=$ac_dir | |
4530 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
4531 | break | |
4532 | elif test -f "$ac_dir/install.sh"; then | |
4533 | ac_aux_dir=$ac_dir | |
4534 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
4535 | break | |
4536 | elif test -f "$ac_dir/shtool"; then | |
4537 | ac_aux_dir=$ac_dir | |
4538 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
4539 | break | |
4540 | fi | |
c971b7fa PA |
4541 | done |
4542 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 4543 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
c971b7fa | 4544 | fi |
770d76d7 | 4545 | |
c971b7fa PA |
4546 | # These three variables are undocumented and unsupported, |
4547 | # and are intended to be withdrawn in a future Autoconf release. | |
4548 | # They can cause serious problems if a builder's source tree is in a directory | |
4549 | # whose full name contains unusual characters. | |
4550 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4551 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4552 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 4553 | |
770d76d7 | 4554 | |
c971b7fa PA |
4555 | # Make sure we can run config.sub. |
4556 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
d0ac1c44 | 4557 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
770d76d7 | 4558 | |
c971b7fa PA |
4559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
4560 | $as_echo_n "checking build system type... " >&6; } | |
d0ac1c44 | 4561 | if ${ac_cv_build+:} false; then : |
c971b7fa | 4562 | $as_echo_n "(cached) " >&6 |
770d76d7 | 4563 | else |
c971b7fa PA |
4564 | ac_build_alias=$build_alias |
4565 | test "x$ac_build_alias" = x && | |
4566 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4567 | test "x$ac_build_alias" = x && | |
d0ac1c44 | 4568 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
c971b7fa | 4569 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
d0ac1c44 | 4570 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
c971b7fa | 4571 | |
770d76d7 | 4572 | fi |
c971b7fa PA |
4573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
4574 | $as_echo "$ac_cv_build" >&6; } | |
4575 | case $ac_cv_build in | |
4576 | *-*-*) ;; | |
d0ac1c44 | 4577 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
770d76d7 | 4578 | esac |
c971b7fa PA |
4579 | build=$ac_cv_build |
4580 | ac_save_IFS=$IFS; IFS='-' | |
4581 | set x $ac_cv_build | |
4582 | shift | |
4583 | build_cpu=$1 | |
4584 | build_vendor=$2 | |
4585 | shift; shift | |
4586 | # Remember, the first character of IFS is used to create $*, | |
4587 | # except with old shells: | |
4588 | build_os=$* | |
4589 | IFS=$ac_save_IFS | |
4590 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
4591 | |
4592 | ||
c971b7fa PA |
4593 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
4594 | $as_echo_n "checking host system type... " >&6; } | |
d0ac1c44 | 4595 | if ${ac_cv_host+:} false; then : |
81ecdfbb RW |
4596 | $as_echo_n "(cached) " >&6 |
4597 | else | |
c971b7fa PA |
4598 | if test "x$host_alias" = x; then |
4599 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4600 | else |
c971b7fa | 4601 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
d0ac1c44 | 4602 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
81ecdfbb | 4603 | fi |
81ecdfbb RW |
4604 | |
4605 | fi | |
c971b7fa PA |
4606 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4607 | $as_echo "$ac_cv_host" >&6; } | |
4608 | case $ac_cv_host in | |
4609 | *-*-*) ;; | |
d0ac1c44 | 4610 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
81ecdfbb | 4611 | esac |
c971b7fa PA |
4612 | host=$ac_cv_host |
4613 | ac_save_IFS=$IFS; IFS='-' | |
4614 | set x $ac_cv_host | |
4615 | shift | |
4616 | host_cpu=$1 | |
4617 | host_vendor=$2 | |
4618 | shift; shift | |
4619 | # Remember, the first character of IFS is used to create $*, | |
4620 | # except with old shells: | |
4621 | host_os=$* | |
4622 | IFS=$ac_save_IFS | |
4623 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4624 | |
4625 | ||
4626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4627 | $as_echo_n "checking target system type... " >&6; } | |
d0ac1c44 | 4628 | if ${ac_cv_target+:} false; then : |
3388710e JM |
4629 | $as_echo_n "(cached) " >&6 |
4630 | else | |
4631 | if test "x$target_alias" = x; then | |
4632 | ac_cv_target=$ac_cv_host | |
4633 | else | |
4634 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
d0ac1c44 | 4635 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
3388710e JM |
4636 | fi |
4637 | ||
4638 | fi | |
4639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4640 | $as_echo "$ac_cv_target" >&6; } | |
4641 | case $ac_cv_target in | |
4642 | *-*-*) ;; | |
d0ac1c44 | 4643 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
3388710e JM |
4644 | esac |
4645 | target=$ac_cv_target | |
4646 | ac_save_IFS=$IFS; IFS='-' | |
4647 | set x $ac_cv_target | |
4648 | shift | |
4649 | target_cpu=$1 | |
4650 | target_vendor=$2 | |
4651 | shift; shift | |
4652 | # Remember, the first character of IFS is used to create $*, | |
4653 | # except with old shells: | |
4654 | target_os=$* | |
4655 | IFS=$ac_save_IFS | |
4656 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4657 | ||
4658 | ||
4659 | # The aliases save the names the user supplied, while $host etc. | |
4660 | # will get canonicalized. | |
4661 | test -n "$target_alias" && | |
4662 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4663 | NONENONEs,x,x, && | |
4664 | program_prefix=${target_alias}- | |
4665 | ||
4666 | # The tests for host and target for $enable_largefile require | |
4667 | # canonical names. | |
4668 | ||
4669 | ||
81ecdfbb | 4670 | |
da2f07f1 JK |
4671 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4672 | # even in directories otherwise not depending on the $plugins option. | |
4673 | ||
4674 | ||
2974be62 AM |
4675 | maybe_plugins=no |
4676 | for ac_header in dlfcn.h | |
4677 | do : | |
4678 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default | |
4679 | " | |
d0ac1c44 | 4680 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : |
2974be62 AM |
4681 | cat >>confdefs.h <<_ACEOF |
4682 | #define HAVE_DLFCN_H 1 | |
4683 | _ACEOF | |
4684 | maybe_plugins=yes | |
4685 | fi | |
4686 | ||
4687 | done | |
4688 | ||
4689 | for ac_header in windows.h | |
4690 | do : | |
4691 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
4692 | " | |
d0ac1c44 | 4693 | if test "x$ac_cv_header_windows_h" = xyes; then : |
2974be62 AM |
4694 | cat >>confdefs.h <<_ACEOF |
4695 | #define HAVE_WINDOWS_H 1 | |
4696 | _ACEOF | |
4697 | maybe_plugins=yes | |
4698 | fi | |
4699 | ||
4700 | done | |
4701 | ||
4702 | ||
4703 | # Check whether --enable-plugins was given. | |
da2f07f1 JK |
4704 | if test "${enable_plugins+set}" = set; then : |
4705 | enableval=$enable_plugins; case "${enableval}" in | |
2974be62 AM |
4706 | no) plugins=no ;; |
4707 | *) plugins=yes | |
4708 | if test "$maybe_plugins" != "yes" ; then | |
d0ac1c44 | 4709 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 |
2974be62 AM |
4710 | fi ;; |
4711 | esac | |
da2f07f1 | 4712 | else |
2974be62 AM |
4713 | plugins=$maybe_plugins |
4714 | ||
da2f07f1 JK |
4715 | fi |
4716 | ||
2974be62 | 4717 | if test "$plugins" = "yes"; then |
458412c3 TT |
4718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
4719 | $as_echo_n "checking for library containing dlsym... " >&6; } | |
d0ac1c44 | 4720 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4721 | $as_echo_n "(cached) " >&6 |
4722 | else | |
4723 | ac_func_search_save_LIBS=$LIBS | |
4724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4725 | /* end confdefs.h. */ | |
4726 | ||
4727 | /* Override any GCC internal prototype to avoid an error. | |
4728 | Use char because int might match the return type of a GCC | |
4729 | builtin and then its argument prototype would still apply. */ | |
4730 | #ifdef __cplusplus | |
4731 | extern "C" | |
4732 | #endif | |
458412c3 | 4733 | char dlsym (); |
2974be62 AM |
4734 | int |
4735 | main () | |
4736 | { | |
458412c3 | 4737 | return dlsym (); |
2974be62 AM |
4738 | ; |
4739 | return 0; | |
4740 | } | |
4741 | _ACEOF | |
4742 | for ac_lib in '' dl; do | |
4743 | if test -z "$ac_lib"; then | |
4744 | ac_res="none required" | |
4745 | else | |
4746 | ac_res=-l$ac_lib | |
4747 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4748 | fi | |
4749 | if ac_fn_c_try_link "$LINENO"; then : | |
458412c3 | 4750 | ac_cv_search_dlsym=$ac_res |
2974be62 AM |
4751 | fi |
4752 | rm -f core conftest.err conftest.$ac_objext \ | |
4753 | conftest$ac_exeext | |
d0ac1c44 | 4754 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4755 | break |
4756 | fi | |
4757 | done | |
d0ac1c44 | 4758 | if ${ac_cv_search_dlsym+:} false; then : |
2974be62 AM |
4759 | |
4760 | else | |
458412c3 | 4761 | ac_cv_search_dlsym=no |
2974be62 AM |
4762 | fi |
4763 | rm conftest.$ac_ext | |
4764 | LIBS=$ac_func_search_save_LIBS | |
4765 | fi | |
458412c3 TT |
4766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
4767 | $as_echo "$ac_cv_search_dlsym" >&6; } | |
4768 | ac_res=$ac_cv_search_dlsym | |
2974be62 AM |
4769 | if test "$ac_res" != no; then : |
4770 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4771 | ||
4772 | fi | |
4773 | ||
4774 | fi | |
da2f07f1 JK |
4775 | |
4776 | ||
4777 | case "${host}" in | |
c8693053 RO |
4778 | sparc-*-solaris*|i?86-*-solaris*) |
4779 | # On native 32-bit Solaris/SPARC and x86, large-file and procfs support | |
4780 | # were mutually exclusive until Solaris 11.3. Without procfs support, | |
4781 | # the bfd/ elf module cannot provide certain routines such as | |
4782 | # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user | |
4783 | # explicitly requested large-file support through the | |
4784 | # --enable-largefile switch, disable large-file support in favor of | |
4785 | # procfs support. | |
4786 | # | |
4787 | # Check if <sys/procfs.h> is incompatible with large-file support. | |
4788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4789 | /* end confdefs.h. */ | |
4790 | #define _FILE_OFFSET_BITS 64 | |
4791 | #define _STRUCTURED_PROC 1 | |
4792 | #include <sys/procfs.h> | |
4793 | int | |
4794 | main () | |
4795 | { | |
4796 | ||
4797 | ; | |
4798 | return 0; | |
4799 | } | |
4800 | _ACEOF | |
4801 | if ac_fn_c_try_compile "$LINENO"; then : | |
4802 | acx_cv_procfs_lfs=yes | |
4803 | else | |
4804 | acx_cv_procfs_lfs=no | |
4805 | fi | |
4806 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4807 | # | |
4808 | # Forcefully disable large-file support only if necessary, gdb is in | |
4809 | # tree and enabled. | |
4810 | if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \ | |
4811 | -a -d $srcdir/../gdb -a "$enable_gdb" != no; then | |
4812 | : ${enable_largefile="no"} | |
4813 | if test "$plugins" = yes; then | |
4814 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | |
4815 | plugin support disabled; require large-file support which is incompatible with GDB." >&5 | |
4816 | $as_echo "$as_me: WARNING: | |
4817 | plugin support disabled; require large-file support which is incompatible with GDB." >&2;} | |
4818 | plugins=no | |
4819 | fi | |
4820 | fi | |
4821 | # | |
4822 | # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the | |
4823 | # benefit of g++ 9+ which predefines it on Solaris. | |
4824 | if test "$enable_largefile" = no; then | |
4825 | LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS" | |
4826 | ||
4827 | fi | |
da2f07f1 JK |
4828 | ;; |
4829 | esac | |
4830 | ||
4831 | # Check whether --enable-largefile was given. | |
4832 | if test "${enable_largefile+set}" = set; then : | |
4833 | enableval=$enable_largefile; | |
4834 | fi | |
4835 | ||
4836 | if test "$enable_largefile" != no; then | |
4837 | ||
4838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4839 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
d0ac1c44 | 4840 | if ${ac_cv_sys_largefile_CC+:} false; then : |
da2f07f1 JK |
4841 | $as_echo_n "(cached) " >&6 |
4842 | else | |
4843 | ac_cv_sys_largefile_CC=no | |
4844 | if test "$GCC" != yes; then | |
4845 | ac_save_CC=$CC | |
4846 | while :; do | |
4847 | # IRIX 6.2 and later do not support large files by default, | |
4848 | # so use the C compiler's -n32 option if that helps. | |
4849 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4850 | /* end confdefs.h. */ | |
4851 | #include <sys/types.h> | |
4852 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4853 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4854 | since some C++ compilers masquerading as C compilers | |
4855 | incorrectly reject 9223372036854775807. */ | |
4856 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4857 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4858 | && LARGE_OFF_T % 2147483647 == 1) | |
4859 | ? 1 : -1]; | |
4860 | int | |
4861 | main () | |
4862 | { | |
4863 | ||
4864 | ; | |
4865 | return 0; | |
4866 | } | |
4867 | _ACEOF | |
4868 | if ac_fn_c_try_compile "$LINENO"; then : | |
4869 | break | |
4870 | fi | |
4871 | rm -f core conftest.err conftest.$ac_objext | |
4872 | CC="$CC -n32" | |
4873 | if ac_fn_c_try_compile "$LINENO"; then : | |
4874 | ac_cv_sys_largefile_CC=' -n32'; break | |
4875 | fi | |
4876 | rm -f core conftest.err conftest.$ac_objext | |
4877 | break | |
4878 | done | |
4879 | CC=$ac_save_CC | |
4880 | rm -f conftest.$ac_ext | |
4881 | fi | |
4882 | fi | |
4883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4884 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4885 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4886 | CC=$CC$ac_cv_sys_largefile_CC | |
4887 | fi | |
4888 | ||
4889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4890 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
d0ac1c44 | 4891 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
da2f07f1 JK |
4892 | $as_echo_n "(cached) " >&6 |
4893 | else | |
4894 | while :; do | |
4895 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4896 | /* end confdefs.h. */ | |
4897 | #include <sys/types.h> | |
4898 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4899 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4900 | since some C++ compilers masquerading as C compilers | |
4901 | incorrectly reject 9223372036854775807. */ | |
4902 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4903 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4904 | && LARGE_OFF_T % 2147483647 == 1) | |
4905 | ? 1 : -1]; | |
4906 | int | |
4907 | main () | |
4908 | { | |
4909 | ||
4910 | ; | |
4911 | return 0; | |
4912 | } | |
4913 | _ACEOF | |
4914 | if ac_fn_c_try_compile "$LINENO"; then : | |
4915 | ac_cv_sys_file_offset_bits=no; break | |
4916 | fi | |
4917 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4918 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4919 | /* end confdefs.h. */ | |
4920 | #define _FILE_OFFSET_BITS 64 | |
4921 | #include <sys/types.h> | |
4922 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4923 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4924 | since some C++ compilers masquerading as C compilers | |
4925 | incorrectly reject 9223372036854775807. */ | |
4926 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4927 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4928 | && LARGE_OFF_T % 2147483647 == 1) | |
4929 | ? 1 : -1]; | |
4930 | int | |
4931 | main () | |
4932 | { | |
4933 | ||
4934 | ; | |
4935 | return 0; | |
4936 | } | |
4937 | _ACEOF | |
4938 | if ac_fn_c_try_compile "$LINENO"; then : | |
4939 | ac_cv_sys_file_offset_bits=64; break | |
4940 | fi | |
4941 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4942 | ac_cv_sys_file_offset_bits=unknown | |
4943 | break | |
4944 | done | |
4945 | fi | |
4946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4947 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4948 | case $ac_cv_sys_file_offset_bits in #( | |
4949 | no | unknown) ;; | |
4950 | *) | |
4951 | cat >>confdefs.h <<_ACEOF | |
4952 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4953 | _ACEOF | |
4954 | ;; | |
4955 | esac | |
4956 | rm -rf conftest* | |
4957 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4959 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
d0ac1c44 | 4960 | if ${ac_cv_sys_large_files+:} false; then : |
da2f07f1 JK |
4961 | $as_echo_n "(cached) " >&6 |
4962 | else | |
4963 | while :; do | |
4964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4965 | /* end confdefs.h. */ | |
4966 | #include <sys/types.h> | |
4967 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4968 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4969 | since some C++ compilers masquerading as C compilers | |
4970 | incorrectly reject 9223372036854775807. */ | |
4971 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4972 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4973 | && LARGE_OFF_T % 2147483647 == 1) | |
4974 | ? 1 : -1]; | |
4975 | int | |
4976 | main () | |
4977 | { | |
4978 | ||
4979 | ; | |
4980 | return 0; | |
4981 | } | |
4982 | _ACEOF | |
4983 | if ac_fn_c_try_compile "$LINENO"; then : | |
4984 | ac_cv_sys_large_files=no; break | |
4985 | fi | |
4986 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4988 | /* end confdefs.h. */ | |
4989 | #define _LARGE_FILES 1 | |
4990 | #include <sys/types.h> | |
4991 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4992 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4993 | since some C++ compilers masquerading as C compilers | |
4994 | incorrectly reject 9223372036854775807. */ | |
4995 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4996 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4997 | && LARGE_OFF_T % 2147483647 == 1) | |
4998 | ? 1 : -1]; | |
4999 | int | |
5000 | main () | |
5001 | { | |
5002 | ||
5003 | ; | |
5004 | return 0; | |
5005 | } | |
5006 | _ACEOF | |
5007 | if ac_fn_c_try_compile "$LINENO"; then : | |
5008 | ac_cv_sys_large_files=1; break | |
5009 | fi | |
5010 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5011 | ac_cv_sys_large_files=unknown | |
5012 | break | |
5013 | done | |
5014 | fi | |
5015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
5016 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
5017 | case $ac_cv_sys_large_files in #( | |
5018 | no | unknown) ;; | |
5019 | *) | |
5020 | cat >>confdefs.h <<_ACEOF | |
5021 | #define _LARGE_FILES $ac_cv_sys_large_files | |
5022 | _ACEOF | |
5023 | ;; | |
5024 | esac | |
5025 | rm -rf conftest* | |
5026 | fi | |
d0ac1c44 SM |
5027 | |
5028 | ||
da2f07f1 JK |
5029 | fi |
5030 | ||
5031 | ||
d0ac1c44 SM |
5032 | # Expand $ac_aux_dir to an absolute path. |
5033 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
4869db5e | 5034 | |
d0ac1c44 | 5035 | if test x"${install_sh+set}" != xset; then |
4869db5e RM |
5036 | case $am_aux_dir in |
5037 | *\ * | *\ *) | |
5038 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
5039 | *) | |
5040 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
5041 | esac | |
5042 | fi | |
5043 | ||
d0ac1c44 SM |
5044 | # Installed binaries are usually stripped using 'strip' when the user |
5045 | # run "make install-strip". However 'strip' might not be the right | |
4869db5e | 5046 | # tool to use in cross-compilation environments, therefore Automake |
d0ac1c44 | 5047 | # will honor the 'STRIP' environment variable to overrule this program. |
4869db5e RM |
5048 | if test "$cross_compiling" != no; then |
5049 | if test -n "$ac_tool_prefix"; then | |
5050 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
5051 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
5052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5053 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5054 | if ${ac_cv_prog_STRIP+:} false; then : |
4869db5e RM |
5055 | $as_echo_n "(cached) " >&6 |
5056 | else | |
5057 | if test -n "$STRIP"; then | |
5058 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
5059 | else | |
5060 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5061 | for as_dir in $PATH | |
5062 | do | |
5063 | IFS=$as_save_IFS | |
5064 | test -z "$as_dir" && as_dir=. | |
5065 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5066 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5067 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
5068 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5069 | break 2 | |
5070 | fi | |
5071 | done | |
5072 | done | |
5073 | IFS=$as_save_IFS | |
5074 | ||
5075 | fi | |
5076 | fi | |
5077 | STRIP=$ac_cv_prog_STRIP | |
5078 | if test -n "$STRIP"; then | |
5079 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
5080 | $as_echo "$STRIP" >&6; } | |
5081 | else | |
5082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5083 | $as_echo "no" >&6; } | |
5084 | fi | |
5085 | ||
5086 | ||
5087 | fi | |
5088 | if test -z "$ac_cv_prog_STRIP"; then | |
5089 | ac_ct_STRIP=$STRIP | |
5090 | # Extract the first word of "strip", so it can be a program name with args. | |
5091 | set dummy strip; ac_word=$2 | |
5092 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5093 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 5094 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
4869db5e RM |
5095 | $as_echo_n "(cached) " >&6 |
5096 | else | |
5097 | if test -n "$ac_ct_STRIP"; then | |
5098 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
5099 | else | |
5100 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5101 | for as_dir in $PATH | |
5102 | do | |
5103 | IFS=$as_save_IFS | |
5104 | test -z "$as_dir" && as_dir=. | |
5105 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 5106 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4869db5e RM |
5107 | ac_cv_prog_ac_ct_STRIP="strip" |
5108 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5109 | break 2 | |
5110 | fi | |
5111 | done | |
5112 | done | |
5113 | IFS=$as_save_IFS | |
5114 | ||
5115 | fi | |
5116 | fi | |
5117 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
5118 | if test -n "$ac_ct_STRIP"; then | |
5119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
5120 | $as_echo "$ac_ct_STRIP" >&6; } | |
5121 | else | |
5122 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5123 | $as_echo "no" >&6; } | |
5124 | fi | |
5125 | ||
5126 | if test "x$ac_ct_STRIP" = x; then | |
5127 | STRIP=":" | |
5128 | else | |
5129 | case $cross_compiling:$ac_tool_warned in | |
5130 | yes:) | |
5131 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5132 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5133 | ac_tool_warned=yes ;; | |
5134 | esac | |
5135 | STRIP=$ac_ct_STRIP | |
5136 | fi | |
5137 | else | |
5138 | STRIP="$ac_cv_prog_STRIP" | |
5139 | fi | |
5140 | ||
5141 | fi | |
5142 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
5143 | ||
783e057b DJ |
5144 | |
5145 | ac_aux_dir= | |
81ecdfbb | 5146 | for ac_dir in .. "$srcdir"/..; do |
d0ac1c44 SM |
5147 | if test -f "$ac_dir/install-sh"; then |
5148 | ac_aux_dir=$ac_dir | |
5149 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
5150 | break | |
5151 | elif test -f "$ac_dir/install.sh"; then | |
5152 | ac_aux_dir=$ac_dir | |
5153 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
5154 | break | |
5155 | elif test -f "$ac_dir/shtool"; then | |
5156 | ac_aux_dir=$ac_dir | |
5157 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
5158 | break | |
5159 | fi | |
783e057b DJ |
5160 | done |
5161 | if test -z "$ac_aux_dir"; then | |
d0ac1c44 | 5162 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 5163 | fi |
81ecdfbb RW |
5164 | |
5165 | # These three variables are undocumented and unsupported, | |
5166 | # and are intended to be withdrawn in a future Autoconf release. | |
5167 | # They can cause serious problems if a builder's source tree is in a directory | |
5168 | # whose full name contains unusual characters. | |
5169 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
5170 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
5171 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
5172 | ||
783e057b | 5173 | |
783e057b | 5174 | |
91e1a0ed SM |
5175 | # Set build, build_cpu, build_vendor and build_os. |
5176 | ||
5177 | ||
5178 | # Set host, host_cpu, host_vendor, and host_os. | |
5179 | ||
5180 | ||
5181 | # Set target, target_cpu, target_vendor, and target_os. | |
5182 | ||
5183 | ||
b316465f TT |
5184 | case ${build_alias} in |
5185 | "") build_noncanonical=${build} ;; | |
5186 | *) build_noncanonical=${build_alias} ;; | |
5187 | esac | |
5188 | ||
5189 | case ${host_alias} in | |
5190 | "") host_noncanonical=${build_noncanonical} ;; | |
5191 | *) host_noncanonical=${host_alias} ;; | |
5192 | esac | |
5193 | ||
5194 | case ${target_alias} in | |
5195 | "") target_noncanonical=${host_noncanonical} ;; | |
5196 | *) target_noncanonical=${target_alias} ;; | |
5197 | esac | |
5198 | ||
5199 | ||
5200 | ||
5201 | ||
9009e1ae MR |
5202 | test "$program_prefix" != NONE && |
5203 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
5204 | # Use a double $ so make ignores it. | |
5205 | test "$program_suffix" != NONE && | |
5206 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
5207 | # Double any \ or $. | |
5208 | # By default was `s,x,x', remove it if useless. | |
5209 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
5210 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
5211 | ||
81ecdfbb | 5212 | |
0bcda685 PA |
5213 | # We require a C++11 compiler. Check if one is available, and if |
5214 | # necessary, set CXX_DIALECT to some -std=xxx switch. | |
5215 | ||
41260ac2 | 5216 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
0bcda685 PA |
5217 | ac_ext=cpp |
5218 | ac_cpp='$CXXCPP $CPPFLAGS' | |
5219 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5220 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5221 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5222 | CXX_DIALECT="" | |
5223 | ac_success=no | |
5224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 | |
5225 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } | |
d0ac1c44 | 5226 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
0bcda685 PA |
5227 | $as_echo_n "(cached) " >&6 |
5228 | else | |
5229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5230 | /* end confdefs.h. */ | |
5231 | ||
5232 | ||
5233 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5234 | // Hopefully, this will speed up the test. | |
5235 | ||
5236 | #ifndef __cplusplus | |
5237 | ||
5238 | #error "This is not a C++ compiler" | |
5239 | ||
5240 | #elif __cplusplus < 201103L | |
5241 | ||
5242 | #error "This is not a C++11 compiler" | |
5243 | ||
5244 | #else | |
5245 | ||
5246 | namespace cxx11 | |
5247 | { | |
5248 | ||
5249 | namespace test_static_assert | |
5250 | { | |
5251 | ||
5252 | template <typename T> | |
5253 | struct check | |
5254 | { | |
5255 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5256 | }; | |
5257 | ||
5258 | } | |
5259 | ||
5260 | namespace test_final_override | |
5261 | { | |
5262 | ||
5263 | struct Base | |
5264 | { | |
5265 | virtual void f() {} | |
5266 | }; | |
5267 | ||
5268 | struct Derived : public Base | |
5269 | { | |
5270 | virtual void f() override {} | |
5271 | }; | |
5272 | ||
5273 | } | |
5274 | ||
5275 | namespace test_double_right_angle_brackets | |
5276 | { | |
5277 | ||
5278 | template < typename T > | |
5279 | struct check {}; | |
5280 | ||
5281 | typedef check<void> single_type; | |
5282 | typedef check<check<void>> double_type; | |
5283 | typedef check<check<check<void>>> triple_type; | |
5284 | typedef check<check<check<check<void>>>> quadruple_type; | |
5285 | ||
5286 | } | |
5287 | ||
5288 | namespace test_decltype | |
5289 | { | |
5290 | ||
5291 | int | |
5292 | f() | |
5293 | { | |
5294 | int a = 1; | |
5295 | decltype(a) b = 2; | |
5296 | return a + b; | |
5297 | } | |
5298 | ||
5299 | } | |
5300 | ||
5301 | namespace test_type_deduction | |
5302 | { | |
5303 | ||
5304 | template < typename T1, typename T2 > | |
5305 | struct is_same | |
5306 | { | |
5307 | static const bool value = false; | |
5308 | }; | |
5309 | ||
5310 | template < typename T > | |
5311 | struct is_same<T, T> | |
5312 | { | |
5313 | static const bool value = true; | |
5314 | }; | |
5315 | ||
5316 | template < typename T1, typename T2 > | |
5317 | auto | |
5318 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5319 | { | |
5320 | return a1 + a2; | |
5321 | } | |
5322 | ||
5323 | int | |
5324 | test(const int c, volatile int v) | |
5325 | { | |
5326 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5327 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5328 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5329 | auto ac = c; | |
5330 | auto av = v; | |
5331 | auto sumi = ac + av + 'x'; | |
5332 | auto sumf = ac + av + 1.0; | |
5333 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5334 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5335 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5336 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5337 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5338 | return (sumf > 0.0) ? sumi : add(c, v); | |
5339 | } | |
5340 | ||
5341 | } | |
5342 | ||
5343 | namespace test_noexcept | |
5344 | { | |
5345 | ||
5346 | int f() { return 0; } | |
5347 | int g() noexcept { return 0; } | |
5348 | ||
5349 | static_assert(noexcept(f()) == false, ""); | |
5350 | static_assert(noexcept(g()) == true, ""); | |
5351 | ||
5352 | } | |
5353 | ||
5354 | namespace test_constexpr | |
5355 | { | |
5356 | ||
5357 | template < typename CharT > | |
5358 | unsigned long constexpr | |
5359 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5360 | { | |
5361 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5362 | } | |
5363 | ||
5364 | template < typename CharT > | |
5365 | unsigned long constexpr | |
5366 | strlen_c(const CharT *const s) noexcept | |
5367 | { | |
5368 | return strlen_c_r(s, 0UL); | |
5369 | } | |
5370 | ||
5371 | static_assert(strlen_c("") == 0UL, ""); | |
5372 | static_assert(strlen_c("1") == 1UL, ""); | |
5373 | static_assert(strlen_c("example") == 7UL, ""); | |
5374 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5375 | ||
5376 | } | |
5377 | ||
5378 | namespace test_rvalue_references | |
5379 | { | |
5380 | ||
5381 | template < int N > | |
5382 | struct answer | |
5383 | { | |
5384 | static constexpr int value = N; | |
5385 | }; | |
5386 | ||
5387 | answer<1> f(int&) { return answer<1>(); } | |
5388 | answer<2> f(const int&) { return answer<2>(); } | |
5389 | answer<3> f(int&&) { return answer<3>(); } | |
5390 | ||
5391 | void | |
5392 | test() | |
5393 | { | |
5394 | int i = 0; | |
5395 | const int c = 0; | |
5396 | static_assert(decltype(f(i))::value == 1, ""); | |
5397 | static_assert(decltype(f(c))::value == 2, ""); | |
5398 | static_assert(decltype(f(0))::value == 3, ""); | |
5399 | } | |
5400 | ||
5401 | } | |
5402 | ||
5403 | namespace test_uniform_initialization | |
5404 | { | |
5405 | ||
5406 | struct test | |
5407 | { | |
5408 | static const int zero {}; | |
5409 | static const int one {1}; | |
5410 | }; | |
5411 | ||
5412 | static_assert(test::zero == 0, ""); | |
5413 | static_assert(test::one == 1, ""); | |
5414 | ||
5415 | } | |
5416 | ||
5417 | namespace test_lambdas | |
5418 | { | |
5419 | ||
5420 | void | |
5421 | test1() | |
5422 | { | |
5423 | auto lambda1 = [](){}; | |
5424 | auto lambda2 = lambda1; | |
5425 | lambda1(); | |
5426 | lambda2(); | |
5427 | } | |
5428 | ||
5429 | int | |
5430 | test2() | |
5431 | { | |
5432 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5433 | auto b = []() -> int { return '0'; }(); | |
5434 | auto c = [=](){ return a + b; }(); | |
5435 | auto d = [&](){ return c; }(); | |
5436 | auto e = [a, &b](int x) mutable { | |
5437 | const auto identity = [](int y){ return y; }; | |
5438 | for (auto i = 0; i < a; ++i) | |
5439 | a += b--; | |
5440 | return x + identity(a + b); | |
5441 | }(0); | |
5442 | return a + b + c + d + e; | |
5443 | } | |
5444 | ||
5445 | int | |
5446 | test3() | |
5447 | { | |
5448 | const auto nullary = [](){ return 0; }; | |
5449 | const auto unary = [](int x){ return x; }; | |
5450 | using nullary_t = decltype(nullary); | |
5451 | using unary_t = decltype(unary); | |
5452 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5453 | const auto higher2nd = [unary](nullary_t f1){ | |
5454 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5455 | }; | |
5456 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5457 | } | |
5458 | ||
5459 | } | |
5460 | ||
5461 | namespace test_variadic_templates | |
5462 | { | |
5463 | ||
5464 | template <int...> | |
5465 | struct sum; | |
5466 | ||
5467 | template <int N0, int... N1toN> | |
5468 | struct sum<N0, N1toN...> | |
5469 | { | |
5470 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5471 | }; | |
5472 | ||
5473 | template <> | |
5474 | struct sum<> | |
5475 | { | |
5476 | static constexpr auto value = 0; | |
5477 | }; | |
5478 | ||
5479 | static_assert(sum<>::value == 0, ""); | |
5480 | static_assert(sum<1>::value == 1, ""); | |
5481 | static_assert(sum<23>::value == 23, ""); | |
5482 | static_assert(sum<1, 2>::value == 3, ""); | |
5483 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5484 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5485 | ||
5486 | } | |
5487 | ||
5488 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5489 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5490 | // because of this. | |
5491 | namespace test_template_alias_sfinae | |
5492 | { | |
5493 | ||
5494 | struct foo {}; | |
5495 | ||
5496 | template<typename T> | |
5497 | using member = typename T::member_type; | |
5498 | ||
5499 | template<typename T> | |
5500 | void func(...) {} | |
5501 | ||
5502 | template<typename T> | |
5503 | void func(member<T>*) {} | |
5504 | ||
5505 | void test(); | |
5506 | ||
5507 | void test() { func<foo>(0); } | |
5508 | ||
5509 | } | |
5510 | ||
5511 | } // namespace cxx11 | |
5512 | ||
5513 | #endif // __cplusplus >= 201103L | |
5514 | ||
5515 | ||
5516 | ||
5517 | _ACEOF | |
5518 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5519 | ax_cv_cxx_compile_cxx11=yes | |
5520 | else | |
5521 | ax_cv_cxx_compile_cxx11=no | |
5522 | fi | |
5523 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5524 | fi | |
5525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 | |
5526 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } | |
5527 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | |
5528 | ac_success=yes | |
5529 | fi | |
5530 | ||
5531 | if test x$ac_success = xno; then | |
41260ac2 SM |
5532 | for alternative in ${ax_cxx_compile_alternatives}; do |
5533 | switch="-std=gnu++${alternative}" | |
0bcda685 PA |
5534 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
5535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
5536 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } | |
d0ac1c44 | 5537 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5538 | $as_echo_n "(cached) " >&6 |
5539 | else | |
5540 | ac_save_CXX="$CXX" | |
5541 | CXX="$CXX $switch" | |
5542 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5543 | /* end confdefs.h. */ | |
5544 | ||
5545 | ||
5546 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5547 | // Hopefully, this will speed up the test. | |
5548 | ||
5549 | #ifndef __cplusplus | |
5550 | ||
5551 | #error "This is not a C++ compiler" | |
5552 | ||
5553 | #elif __cplusplus < 201103L | |
5554 | ||
5555 | #error "This is not a C++11 compiler" | |
5556 | ||
5557 | #else | |
5558 | ||
5559 | namespace cxx11 | |
5560 | { | |
5561 | ||
5562 | namespace test_static_assert | |
5563 | { | |
5564 | ||
5565 | template <typename T> | |
5566 | struct check | |
5567 | { | |
5568 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5569 | }; | |
5570 | ||
5571 | } | |
5572 | ||
5573 | namespace test_final_override | |
5574 | { | |
5575 | ||
5576 | struct Base | |
5577 | { | |
5578 | virtual void f() {} | |
5579 | }; | |
5580 | ||
5581 | struct Derived : public Base | |
5582 | { | |
5583 | virtual void f() override {} | |
5584 | }; | |
5585 | ||
5586 | } | |
5587 | ||
5588 | namespace test_double_right_angle_brackets | |
5589 | { | |
5590 | ||
5591 | template < typename T > | |
5592 | struct check {}; | |
5593 | ||
5594 | typedef check<void> single_type; | |
5595 | typedef check<check<void>> double_type; | |
5596 | typedef check<check<check<void>>> triple_type; | |
5597 | typedef check<check<check<check<void>>>> quadruple_type; | |
5598 | ||
5599 | } | |
5600 | ||
5601 | namespace test_decltype | |
5602 | { | |
5603 | ||
5604 | int | |
5605 | f() | |
5606 | { | |
5607 | int a = 1; | |
5608 | decltype(a) b = 2; | |
5609 | return a + b; | |
5610 | } | |
5611 | ||
5612 | } | |
5613 | ||
5614 | namespace test_type_deduction | |
5615 | { | |
5616 | ||
5617 | template < typename T1, typename T2 > | |
5618 | struct is_same | |
5619 | { | |
5620 | static const bool value = false; | |
5621 | }; | |
5622 | ||
5623 | template < typename T > | |
5624 | struct is_same<T, T> | |
5625 | { | |
5626 | static const bool value = true; | |
5627 | }; | |
5628 | ||
5629 | template < typename T1, typename T2 > | |
5630 | auto | |
5631 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5632 | { | |
5633 | return a1 + a2; | |
5634 | } | |
5635 | ||
5636 | int | |
5637 | test(const int c, volatile int v) | |
5638 | { | |
5639 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5640 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5641 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5642 | auto ac = c; | |
5643 | auto av = v; | |
5644 | auto sumi = ac + av + 'x'; | |
5645 | auto sumf = ac + av + 1.0; | |
5646 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5647 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5648 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5649 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5650 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5651 | return (sumf > 0.0) ? sumi : add(c, v); | |
5652 | } | |
5653 | ||
5654 | } | |
5655 | ||
5656 | namespace test_noexcept | |
5657 | { | |
5658 | ||
5659 | int f() { return 0; } | |
5660 | int g() noexcept { return 0; } | |
5661 | ||
5662 | static_assert(noexcept(f()) == false, ""); | |
5663 | static_assert(noexcept(g()) == true, ""); | |
5664 | ||
5665 | } | |
5666 | ||
5667 | namespace test_constexpr | |
5668 | { | |
5669 | ||
5670 | template < typename CharT > | |
5671 | unsigned long constexpr | |
5672 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5673 | { | |
5674 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5675 | } | |
5676 | ||
5677 | template < typename CharT > | |
5678 | unsigned long constexpr | |
5679 | strlen_c(const CharT *const s) noexcept | |
5680 | { | |
5681 | return strlen_c_r(s, 0UL); | |
5682 | } | |
5683 | ||
5684 | static_assert(strlen_c("") == 0UL, ""); | |
5685 | static_assert(strlen_c("1") == 1UL, ""); | |
5686 | static_assert(strlen_c("example") == 7UL, ""); | |
5687 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
5688 | ||
5689 | } | |
5690 | ||
5691 | namespace test_rvalue_references | |
5692 | { | |
5693 | ||
5694 | template < int N > | |
5695 | struct answer | |
5696 | { | |
5697 | static constexpr int value = N; | |
5698 | }; | |
5699 | ||
5700 | answer<1> f(int&) { return answer<1>(); } | |
5701 | answer<2> f(const int&) { return answer<2>(); } | |
5702 | answer<3> f(int&&) { return answer<3>(); } | |
5703 | ||
5704 | void | |
5705 | test() | |
5706 | { | |
5707 | int i = 0; | |
5708 | const int c = 0; | |
5709 | static_assert(decltype(f(i))::value == 1, ""); | |
5710 | static_assert(decltype(f(c))::value == 2, ""); | |
5711 | static_assert(decltype(f(0))::value == 3, ""); | |
5712 | } | |
5713 | ||
5714 | } | |
5715 | ||
5716 | namespace test_uniform_initialization | |
5717 | { | |
5718 | ||
5719 | struct test | |
5720 | { | |
5721 | static const int zero {}; | |
5722 | static const int one {1}; | |
5723 | }; | |
5724 | ||
5725 | static_assert(test::zero == 0, ""); | |
5726 | static_assert(test::one == 1, ""); | |
5727 | ||
5728 | } | |
5729 | ||
5730 | namespace test_lambdas | |
5731 | { | |
5732 | ||
5733 | void | |
5734 | test1() | |
5735 | { | |
5736 | auto lambda1 = [](){}; | |
5737 | auto lambda2 = lambda1; | |
5738 | lambda1(); | |
5739 | lambda2(); | |
5740 | } | |
5741 | ||
5742 | int | |
5743 | test2() | |
5744 | { | |
5745 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
5746 | auto b = []() -> int { return '0'; }(); | |
5747 | auto c = [=](){ return a + b; }(); | |
5748 | auto d = [&](){ return c; }(); | |
5749 | auto e = [a, &b](int x) mutable { | |
5750 | const auto identity = [](int y){ return y; }; | |
5751 | for (auto i = 0; i < a; ++i) | |
5752 | a += b--; | |
5753 | return x + identity(a + b); | |
5754 | }(0); | |
5755 | return a + b + c + d + e; | |
5756 | } | |
5757 | ||
5758 | int | |
5759 | test3() | |
5760 | { | |
5761 | const auto nullary = [](){ return 0; }; | |
5762 | const auto unary = [](int x){ return x; }; | |
5763 | using nullary_t = decltype(nullary); | |
5764 | using unary_t = decltype(unary); | |
5765 | const auto higher1st = [](nullary_t f){ return f(); }; | |
5766 | const auto higher2nd = [unary](nullary_t f1){ | |
5767 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
5768 | }; | |
5769 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
5770 | } | |
5771 | ||
5772 | } | |
5773 | ||
5774 | namespace test_variadic_templates | |
5775 | { | |
5776 | ||
5777 | template <int...> | |
5778 | struct sum; | |
5779 | ||
5780 | template <int N0, int... N1toN> | |
5781 | struct sum<N0, N1toN...> | |
5782 | { | |
5783 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
5784 | }; | |
5785 | ||
5786 | template <> | |
5787 | struct sum<> | |
5788 | { | |
5789 | static constexpr auto value = 0; | |
5790 | }; | |
5791 | ||
5792 | static_assert(sum<>::value == 0, ""); | |
5793 | static_assert(sum<1>::value == 1, ""); | |
5794 | static_assert(sum<23>::value == 23, ""); | |
5795 | static_assert(sum<1, 2>::value == 3, ""); | |
5796 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
5797 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
5798 | ||
5799 | } | |
5800 | ||
5801 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
5802 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
5803 | // because of this. | |
5804 | namespace test_template_alias_sfinae | |
5805 | { | |
5806 | ||
5807 | struct foo {}; | |
5808 | ||
5809 | template<typename T> | |
5810 | using member = typename T::member_type; | |
5811 | ||
5812 | template<typename T> | |
5813 | void func(...) {} | |
5814 | ||
5815 | template<typename T> | |
5816 | void func(member<T>*) {} | |
5817 | ||
5818 | void test(); | |
5819 | ||
5820 | void test() { func<foo>(0); } | |
5821 | ||
5822 | } | |
5823 | ||
5824 | } // namespace cxx11 | |
5825 | ||
5826 | #endif // __cplusplus >= 201103L | |
5827 | ||
5828 | ||
5829 | ||
5830 | _ACEOF | |
5831 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
5832 | eval $cachevar=yes | |
5833 | else | |
5834 | eval $cachevar=no | |
5835 | fi | |
5836 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5837 | CXX="$ac_save_CXX" | |
5838 | fi | |
5839 | eval ac_res=\$$cachevar | |
5840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5841 | $as_echo "$ac_res" >&6; } | |
5842 | if eval test x\$$cachevar = xyes; then | |
5843 | CXX_DIALECT="$switch" | |
9b4d030e TV |
5844 | CXX="$CXX $switch" |
5845 | if test -n "$CXXCPP" ; then | |
5846 | CXXCPP="$CXXCPP $switch" | |
5847 | fi | |
0bcda685 PA |
5848 | ac_success=yes |
5849 | break | |
5850 | fi | |
5851 | done | |
5852 | fi | |
5853 | ||
5854 | if test x$ac_success = xno; then | |
41260ac2 SM |
5855 | for alternative in ${ax_cxx_compile_alternatives}; do |
5856 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | |
5857 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` | |
5858 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 | |
0bcda685 | 5859 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
d0ac1c44 | 5860 | if eval \${$cachevar+:} false; then : |
0bcda685 PA |
5861 | $as_echo_n "(cached) " >&6 |
5862 | else | |
5863 | ac_save_CXX="$CXX" | |
41260ac2 SM |
5864 | CXX="$CXX $switch" |
5865 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
0bcda685 PA |
5866 | /* end confdefs.h. */ |
5867 | ||
5868 | ||
5869 | // If the compiler admits that it is not ready for C++11, why torture it? | |
5870 | // Hopefully, this will speed up the test. | |
5871 | ||
5872 | #ifndef __cplusplus | |
5873 | ||
5874 | #error "This is not a C++ compiler" | |
5875 | ||
5876 | #elif __cplusplus < 201103L | |
5877 | ||
5878 | #error "This is not a C++11 compiler" | |
5879 | ||
5880 | #else | |
5881 | ||
5882 | namespace cxx11 | |
5883 | { | |
5884 | ||
5885 | namespace test_static_assert | |
5886 | { | |
5887 | ||
5888 | template <typename T> | |
5889 | struct check | |
5890 | { | |
5891 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | |
5892 | }; | |
5893 | ||
5894 | } | |
5895 | ||
5896 | namespace test_final_override | |
5897 | { | |
5898 | ||
5899 | struct Base | |
5900 | { | |
5901 | virtual void f() {} | |
5902 | }; | |
5903 | ||
5904 | struct Derived : public Base | |
5905 | { | |
5906 | virtual void f() override {} | |
5907 | }; | |
5908 | ||
5909 | } | |
5910 | ||
5911 | namespace test_double_right_angle_brackets | |
5912 | { | |
5913 | ||
5914 | template < typename T > | |
5915 | struct check {}; | |
5916 | ||
5917 | typedef check<void> single_type; | |
5918 | typedef check<check<void>> double_type; | |
5919 | typedef check<check<check<void>>> triple_type; | |
5920 | typedef check<check<check<check<void>>>> quadruple_type; | |
5921 | ||
5922 | } | |
5923 | ||
5924 | namespace test_decltype | |
5925 | { | |
5926 | ||
5927 | int | |
5928 | f() | |
5929 | { | |
5930 | int a = 1; | |
5931 | decltype(a) b = 2; | |
5932 | return a + b; | |
5933 | } | |
5934 | ||
5935 | } | |
5936 | ||
5937 | namespace test_type_deduction | |
5938 | { | |
5939 | ||
5940 | template < typename T1, typename T2 > | |
5941 | struct is_same | |
5942 | { | |
5943 | static const bool value = false; | |
5944 | }; | |
5945 | ||
5946 | template < typename T > | |
5947 | struct is_same<T, T> | |
5948 | { | |
5949 | static const bool value = true; | |
5950 | }; | |
5951 | ||
5952 | template < typename T1, typename T2 > | |
5953 | auto | |
5954 | add(T1 a1, T2 a2) -> decltype(a1 + a2) | |
5955 | { | |
5956 | return a1 + a2; | |
5957 | } | |
5958 | ||
5959 | int | |
5960 | test(const int c, volatile int v) | |
5961 | { | |
5962 | static_assert(is_same<int, decltype(0)>::value == true, ""); | |
5963 | static_assert(is_same<int, decltype(c)>::value == false, ""); | |
5964 | static_assert(is_same<int, decltype(v)>::value == false, ""); | |
5965 | auto ac = c; | |
5966 | auto av = v; | |
5967 | auto sumi = ac + av + 'x'; | |
5968 | auto sumf = ac + av + 1.0; | |
5969 | static_assert(is_same<int, decltype(ac)>::value == true, ""); | |
5970 | static_assert(is_same<int, decltype(av)>::value == true, ""); | |
5971 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); | |
5972 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); | |
5973 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); | |
5974 | return (sumf > 0.0) ? sumi : add(c, v); | |
5975 | } | |
5976 | ||
5977 | } | |
5978 | ||
5979 | namespace test_noexcept | |
5980 | { | |
5981 | ||
5982 | int f() { return 0; } | |
5983 | int g() noexcept { return 0; } | |
5984 | ||
5985 | static_assert(noexcept(f()) == false, ""); | |
5986 | static_assert(noexcept(g()) == true, ""); | |
5987 | ||
5988 | } | |
5989 | ||
5990 | namespace test_constexpr | |
5991 | { | |
5992 | ||
5993 | template < typename CharT > | |
5994 | unsigned long constexpr | |
5995 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept | |
5996 | { | |
5997 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; | |
5998 | } | |
5999 | ||
6000 | template < typename CharT > | |
6001 | unsigned long constexpr | |
6002 | strlen_c(const CharT *const s) noexcept | |
6003 | { | |
6004 | return strlen_c_r(s, 0UL); | |
6005 | } | |
6006 | ||
6007 | static_assert(strlen_c("") == 0UL, ""); | |
6008 | static_assert(strlen_c("1") == 1UL, ""); | |
6009 | static_assert(strlen_c("example") == 7UL, ""); | |
6010 | static_assert(strlen_c("another\0example") == 7UL, ""); | |
6011 | ||
6012 | } | |
6013 | ||
6014 | namespace test_rvalue_references | |
6015 | { | |
6016 | ||
6017 | template < int N > | |
6018 | struct answer | |
6019 | { | |
6020 | static constexpr int value = N; | |
6021 | }; | |
6022 | ||
6023 | answer<1> f(int&) { return answer<1>(); } | |
6024 | answer<2> f(const int&) { return answer<2>(); } | |
6025 | answer<3> f(int&&) { return answer<3>(); } | |
6026 | ||
6027 | void | |
6028 | test() | |
6029 | { | |
6030 | int i = 0; | |
6031 | const int c = 0; | |
6032 | static_assert(decltype(f(i))::value == 1, ""); | |
6033 | static_assert(decltype(f(c))::value == 2, ""); | |
6034 | static_assert(decltype(f(0))::value == 3, ""); | |
6035 | } | |
6036 | ||
6037 | } | |
6038 | ||
6039 | namespace test_uniform_initialization | |
6040 | { | |
6041 | ||
6042 | struct test | |
6043 | { | |
6044 | static const int zero {}; | |
6045 | static const int one {1}; | |
6046 | }; | |
6047 | ||
6048 | static_assert(test::zero == 0, ""); | |
6049 | static_assert(test::one == 1, ""); | |
6050 | ||
6051 | } | |
6052 | ||
6053 | namespace test_lambdas | |
6054 | { | |
6055 | ||
6056 | void | |
6057 | test1() | |
6058 | { | |
6059 | auto lambda1 = [](){}; | |
6060 | auto lambda2 = lambda1; | |
6061 | lambda1(); | |
6062 | lambda2(); | |
6063 | } | |
6064 | ||
6065 | int | |
6066 | test2() | |
6067 | { | |
6068 | auto a = [](int i, int j){ return i + j; }(1, 2); | |
6069 | auto b = []() -> int { return '0'; }(); | |
6070 | auto c = [=](){ return a + b; }(); | |
6071 | auto d = [&](){ return c; }(); | |
6072 | auto e = [a, &b](int x) mutable { | |
6073 | const auto identity = [](int y){ return y; }; | |
6074 | for (auto i = 0; i < a; ++i) | |
6075 | a += b--; | |
6076 | return x + identity(a + b); | |
6077 | }(0); | |
6078 | return a + b + c + d + e; | |
6079 | } | |
6080 | ||
6081 | int | |
6082 | test3() | |
6083 | { | |
6084 | const auto nullary = [](){ return 0; }; | |
6085 | const auto unary = [](int x){ return x; }; | |
6086 | using nullary_t = decltype(nullary); | |
6087 | using unary_t = decltype(unary); | |
6088 | const auto higher1st = [](nullary_t f){ return f(); }; | |
6089 | const auto higher2nd = [unary](nullary_t f1){ | |
6090 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; | |
6091 | }; | |
6092 | return higher1st(nullary) + higher2nd(nullary)(unary); | |
6093 | } | |
6094 | ||
6095 | } | |
6096 | ||
6097 | namespace test_variadic_templates | |
6098 | { | |
6099 | ||
6100 | template <int...> | |
6101 | struct sum; | |
6102 | ||
6103 | template <int N0, int... N1toN> | |
6104 | struct sum<N0, N1toN...> | |
6105 | { | |
6106 | static constexpr auto value = N0 + sum<N1toN...>::value; | |
6107 | }; | |
6108 | ||
6109 | template <> | |
6110 | struct sum<> | |
6111 | { | |
6112 | static constexpr auto value = 0; | |
6113 | }; | |
6114 | ||
6115 | static_assert(sum<>::value == 0, ""); | |
6116 | static_assert(sum<1>::value == 1, ""); | |
6117 | static_assert(sum<23>::value == 23, ""); | |
6118 | static_assert(sum<1, 2>::value == 3, ""); | |
6119 | static_assert(sum<5, 5, 11>::value == 21, ""); | |
6120 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); | |
6121 | ||
6122 | } | |
6123 | ||
6124 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae | |
6125 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function | |
6126 | // because of this. | |
6127 | namespace test_template_alias_sfinae | |
6128 | { | |
6129 | ||
6130 | struct foo {}; | |
6131 | ||
6132 | template<typename T> | |
6133 | using member = typename T::member_type; | |
6134 | ||
6135 | template<typename T> | |
6136 | void func(...) {} | |
6137 | ||
6138 | template<typename T> | |
6139 | void func(member<T>*) {} | |
6140 | ||
6141 | void test(); | |
6142 | ||
6143 | void test() { func<foo>(0); } | |
6144 | ||
6145 | } | |
6146 | ||
6147 | } // namespace cxx11 | |
6148 | ||
6149 | #endif // __cplusplus >= 201103L | |
6150 | ||
6151 | ||
6152 | ||
6153 | _ACEOF | |
6154 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
6155 | eval $cachevar=yes | |
6156 | else | |
6157 | eval $cachevar=no | |
6158 | fi | |
6159 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
41260ac2 | 6160 | CXX="$ac_save_CXX" |
0bcda685 PA |
6161 | fi |
6162 | eval ac_res=\$$cachevar | |
6163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6164 | $as_echo "$ac_res" >&6; } | |
41260ac2 SM |
6165 | if eval test x\$$cachevar = xyes; then |
6166 | CXX_DIALECT="$switch" | |
9b4d030e TV |
6167 | CXX="$CXX $switch" |
6168 | if test -n "$CXXCPP" ; then | |
6169 | CXXCPP="$CXXCPP $switch" | |
6170 | fi | |
41260ac2 SM |
6171 | ac_success=yes |
6172 | break | |
6173 | fi | |
6174 | done | |
6175 | if test x$ac_success = xyes; then | |
0bcda685 PA |
6176 | break |
6177 | fi | |
6178 | done | |
6179 | fi | |
6180 | ac_ext=c | |
6181 | ac_cpp='$CPP $CPPFLAGS' | |
6182 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6183 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6184 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6185 | ||
6186 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | |
6187 | if test x$ac_success = xno; then | |
d0ac1c44 | 6188 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
0bcda685 PA |
6189 | fi |
6190 | fi | |
6191 | if test x$ac_success = xno; then | |
6192 | HAVE_CXX11=0 | |
6193 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 | |
6194 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} | |
6195 | else | |
6196 | HAVE_CXX11=1 | |
6197 | ||
6198 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h | |
6199 | ||
6200 | fi | |
6201 | ||
6202 | ||
6203 | ||
6204 | ||
a417dc56 RW |
6205 | # Dependency checking. |
6206 | rm -rf .tst 2>/dev/null | |
6207 | mkdir .tst 2>/dev/null | |
6208 | if test -d .tst; then | |
6209 | am__leading_dot=. | |
6210 | else | |
6211 | am__leading_dot=_ | |
6212 | fi | |
6213 | rmdir .tst 2>/dev/null | |
6214 | ||
6215 | DEPDIR="${am__leading_dot}deps" | |
6216 | ||
81ecdfbb | 6217 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
6218 | |
6219 | ||
6220 | depcc="$CC" am_compiler_list= | |
6221 | ||
6222 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
6223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
6224 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
d0ac1c44 | 6225 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
81ecdfbb | 6226 | $as_echo_n "(cached) " >&6 |
a417dc56 RW |
6227 | else |
6228 | if test -f "$am_depcomp"; then | |
6229 | # We make a subdir and do the tests there. Otherwise we can end up | |
6230 | # making bogus files that we don't know about and never remove. For | |
6231 | # instance it was reported that on HP-UX the gcc test will end up | |
6232 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6233 | # in D'. | |
6234 | mkdir conftest.dir | |
6235 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6236 | # using a relative directory. | |
6237 | cp "$am_depcomp" conftest.dir | |
6238 | cd conftest.dir | |
6239 | # We will build objects and dependencies in a subdirectory because | |
6240 | # it helps to detect inapplicable dependency modes. For instance | |
6241 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
6242 | # side effect of compilation, but ICC will put the dependencies in | |
6243 | # the current directory while Tru64 will put them in the object | |
6244 | # directory. | |
6245 | mkdir sub | |
6246 | ||
6247 | am_cv_CC_dependencies_compiler_type=none | |
6248 | if test "$am_compiler_list" = ""; then | |
6249 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
6250 | fi | |
6251 | for depmode in $am_compiler_list; do | |
6252 | if test $depmode = none; then break; fi | |
6253 | ||
81ecdfbb | 6254 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
6255 | # Setup a source with many dependencies, because some compilers |
6256 | # like to wrap large dependency lists on column 80 (with \), and | |
6257 | # we should not choose a depcomp mode which is confused by this. | |
6258 | # | |
6259 | # We need to recreate these files for each test, as the compiler may | |
6260 | # overwrite some of them when testing with obscure command lines. | |
6261 | # This happens at least with the AIX C compiler. | |
6262 | : > sub/conftest.c | |
6263 | for i in 1 2 3 4 5 6; do | |
6264 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
6265 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
6266 | # Solaris 8's {/usr,}/bin/sh. | |
6267 | touch sub/conftst$i.h | |
6268 | done | |
6269 | echo "include sub/conftest.Po" > confmf | |
6270 | ||
6271 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
6272 | # mode. It turns out that the SunPro C++ compiler does not properly | |
6273 | # handle `-M -o', and we need to detect this. | |
6274 | depcmd="depmode=$depmode \ | |
6275 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
6276 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
6277 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
6278 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
6279 | if env $depcmd > conftest.err 2>&1 && | |
6280 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
6281 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
6282 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
6283 | # icc doesn't choke on unknown options, it will just issue warnings | |
6284 | # or remarks (even with -Werror). So we grep stderr for any message | |
6285 | # that says an option was ignored or not supported. | |
6286 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
6287 | # icc: Command line warning: ignoring option '-M'; no argument required | |
6288 | # The diagnosis changed in icc 8.0: | |
6289 | # icc: Command line remark: option '-MP' not supported | |
6290 | if (grep 'ignoring option' conftest.err || | |
6291 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
6292 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 6293 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
6294 | break |
6295 | fi | |
6296 | fi | |
81ecdfbb | 6297 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
6298 | sed -e 's/^/| /' < conftest.err >&5 |
6299 | done | |
6300 | ||
6301 | cd .. | |
6302 | rm -rf conftest.dir | |
6303 | else | |
6304 | am_cv_CC_dependencies_compiler_type=none | |
6305 | fi | |
6306 | ||
6307 | fi | |
81ecdfbb RW |
6308 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
6309 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 6310 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
d0ac1c44 | 6311 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
6312 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
6313 | ||
6314 | fi | |
6315 | ||
6316 | ||
c971b7fa PA |
6317 | |
6318 | CONFIG_OBS= | |
6319 | CONFIG_DEPS= | |
6320 | CONFIG_SRCS= | |
6321 | ENABLE_CFLAGS= | |
6322 | ||
6323 | CONFIG_ALL= | |
6324 | CONFIG_CLEAN= | |
6325 | CONFIG_INSTALL= | |
6326 | CONFIG_UNINSTALL= | |
6327 | ||
6328 | # If we haven't got the data from the intl directory, | |
6329 | # assume NLS is disabled. | |
6330 | USE_NLS=no | |
6331 | LIBINTL= | |
6332 | LIBINTL_DEP= | |
6333 | INCINTL= | |
6334 | XGETTEXT= | |
6335 | GMSGFMT= | |
6336 | POSUB= | |
783e057b DJ |
6337 | |
6338 | if test -f ../intl/config.intl; then | |
6339 | . ../intl/config.intl | |
6340 | fi | |
81ecdfbb RW |
6341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
6342 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 6343 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
6344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6345 | $as_echo "no" >&6; } | |
783e057b | 6346 | else |
81ecdfbb RW |
6347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
6348 | $as_echo "yes" >&6; } | |
783e057b | 6349 | |
81ecdfbb | 6350 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
6351 | |
6352 | ||
81ecdfbb RW |
6353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
6354 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
6355 | # Look for .po and .gmo files in the source directory. |
6356 | CATALOGS= | |
6357 | XLINGUAS= | |
6358 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
6359 | # If there aren't any .gmo files the shell will give us the | |
6360 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6361 | # weeded out. | |
6362 | case "$cat" in *\**) | |
6363 | continue;; | |
6364 | esac | |
6365 | # The quadruple backslash is collapsed to a double backslash | |
6366 | # by the backticks, then collapsed again by the double quotes, | |
6367 | # leaving us with one backslash in the sed expression (right | |
6368 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
6369 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
6370 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
6371 | # The user is allowed to set LINGUAS to a list of languages to | |
6372 | # install catalogs for. If it's empty that means "all of them." | |
6373 | if test "x$LINGUAS" = x; then | |
6374 | CATALOGS="$CATALOGS $cat" | |
6375 | XLINGUAS="$XLINGUAS $lang" | |
6376 | else | |
6377 | case "$LINGUAS" in *$lang*) | |
6378 | CATALOGS="$CATALOGS $cat" | |
6379 | XLINGUAS="$XLINGUAS $lang" | |
6380 | ;; | |
6381 | esac | |
e28b3332 DJ |
6382 | fi |
6383 | done | |
c971b7fa PA |
6384 | LINGUAS="$XLINGUAS" |
6385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
6386 | $as_echo "$LINGUAS" >&6; } | |
6387 | ||
6388 | ||
6389 | DATADIRNAME=share | |
6390 | ||
6391 | INSTOBJEXT=.mo | |
6392 | ||
6393 | GENCAT=gencat | |
6394 | ||
6395 | CATOBJEXT=.gmo | |
e28b3332 | 6396 | |
e28b3332 DJ |
6397 | fi |
6398 | ||
c971b7fa PA |
6399 | localedir='${datadir}/locale' |
6400 | ||
6401 | ||
6402 | if test x"$USE_NLS" = xyes; then | |
6403 | CONFIG_ALL="$CONFIG_ALL all-po" | |
6404 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
6405 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
6406 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 6407 | fi |
e28b3332 | 6408 | |
c971b7fa PA |
6409 | PACKAGE=gdb |
6410 | ||
6411 | cat >>confdefs.h <<_ACEOF | |
6412 | #define PACKAGE "$PACKAGE" | |
6413 | _ACEOF | |
6414 | ||
6415 | ||
6416 | ||
6417 | # We never need to detect it in this sub-configure. | |
6418 | # But preserve it for config.status --recheck. | |
6419 | ||
6420 | ||
6421 | ||
6422 | MAKEINFO_EXTRA_FLAGS="" | |
6423 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
6424 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
d0ac1c44 | 6425 | if ${gdb_cv_have_makeinfo_click+:} false; then : |
c971b7fa PA |
6426 | $as_echo_n "(cached) " >&6 |
6427 | else | |
6428 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
6429 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
6430 | gdb_cv_have_makeinfo_click=yes | |
6431 | else | |
6432 | gdb_cv_have_makeinfo_click=no | |
6433 | fi | |
6434 | fi | |
6435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
6436 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
6437 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
6438 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
6439 | fi | |
e28b3332 DJ |
6440 | |
6441 | ||
bec39cab AC |
6442 | |
6443 | ||
81ecdfbb RW |
6444 | # Check whether --with-separate-debug-dir was given. |
6445 | if test "${with_separate_debug_dir+set}" = set; then : | |
6446 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
6447 | DEBUGDIR=$withval |
6448 | else | |
6449 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
6450 | fi |
6451 | ||
20e95c23 | 6452 | |
783e057b DJ |
6453 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6454 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 6455 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 6456 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 6457 | |
783e057b DJ |
6458 | cat >>confdefs.h <<_ACEOF |
6459 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 6460 | _ACEOF |
20e95c23 | 6461 | |
20e95c23 | 6462 | |
20e95c23 | 6463 | |
0c4a4063 | 6464 | |
b14b1491 TT |
6465 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6466 | if test "x$prefix" = xNONE; then | |
6467 | test_prefix=/usr/local | |
6468 | else | |
6469 | test_prefix=$prefix | |
6470 | fi | |
783e057b | 6471 | else |
b14b1491 | 6472 | test_prefix=$exec_prefix |
783e057b | 6473 | fi |
b14b1491 TT |
6474 | value=0 |
6475 | case ${ac_define_dir} in | |
6476 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6477 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6478 | value=1 | |
6479 | ;; | |
6480 | esac | |
6481 | ||
6482 | cat >>confdefs.h <<_ACEOF | |
6483 | #define DEBUGDIR_RELOCATABLE $value | |
6484 | _ACEOF | |
6485 | ||
6486 | ||
6487 | ||
0c4a4063 | 6488 | |
f83d8a90 DE |
6489 | # We can't pass paths as command line arguments. |
6490 | # Mingw32 tries to be clever and will convert the paths for us. | |
6491 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
6492 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
6493 | # This breaks GDB's relocatable path conversions since paths passed in | |
6494 | # config.h would not get so translated, the path prefixes no longer match. | |
6495 | ||
6496 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6497 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6498 | ac_define_dir=`eval echo $bindir` | |
6499 | ac_define_dir=`eval echo $ac_define_dir` | |
6500 | ||
6501 | cat >>confdefs.h <<_ACEOF | |
6502 | #define BINDIR "$ac_define_dir" | |
6503 | _ACEOF | |
6504 | ||
6505 | ||
6506 | ||
b14b1491 TT |
6507 | # GDB's datadir relocation |
6508 | ||
6509 | ||
6510 | ||
81ecdfbb RW |
6511 | # Check whether --with-gdb-datadir was given. |
6512 | if test "${with_gdb_datadir+set}" = set; then : | |
6513 | withval=$with_gdb_datadir; | |
b14b1491 | 6514 | GDB_DATADIR=$withval |
20e95c23 | 6515 | else |
b14b1491 | 6516 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
6517 | fi |
6518 | ||
20e95c23 | 6519 | |
b14b1491 TT |
6520 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
6521 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6522 | ac_define_dir=`eval echo $GDB_DATADIR` | |
6523 | ac_define_dir=`eval echo $ac_define_dir` | |
6524 | ||
6525 | cat >>confdefs.h <<_ACEOF | |
6526 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
6527 | _ACEOF |
6528 | ||
b14b1491 TT |
6529 | |
6530 | ||
0c4a4063 | 6531 | |
b14b1491 TT |
6532 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
6533 | if test "x$prefix" = xNONE; then | |
6534 | test_prefix=/usr/local | |
6535 | else | |
6536 | test_prefix=$prefix | |
6537 | fi | |
6538 | else | |
6539 | test_prefix=$exec_prefix | |
6540 | fi | |
6541 | value=0 | |
6542 | case ${ac_define_dir} in | |
6543 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6544 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6545 | value=1 | |
6546 | ;; | |
6547 | esac | |
6548 | ||
6549 | cat >>confdefs.h <<_ACEOF | |
6550 | #define GDB_DATADIR_RELOCATABLE $value | |
6551 | _ACEOF | |
6552 | ||
6553 | ||
783e057b | 6554 | |
20e95c23 | 6555 | |
0c4a4063 | 6556 | |
81ecdfbb RW |
6557 | # Check whether --with-relocated-sources was given. |
6558 | if test "${with_relocated_sources+set}" = set; then : | |
6559 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
6560 | |
6561 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6562 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6563 | ac_define_dir=`eval echo $reloc_srcdir` | |
6564 | ac_define_dir=`eval echo $ac_define_dir` | |
6565 | ||
6566 | cat >>confdefs.h <<_ACEOF | |
6567 | #define RELOC_SRCDIR "$ac_define_dir" | |
6568 | _ACEOF | |
6569 | ||
6570 | ||
6571 | ||
81ecdfbb RW |
6572 | fi |
6573 | ||
29b0e8a2 | 6574 | |
7349ff92 JK |
6575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
6576 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
6577 | ||
6578 | # Check whether --with-auto-load-dir was given. | |
6579 | if test "${with_auto_load_dir+set}" = set; then : | |
6580 | withval=$with_auto_load_dir; | |
6581 | else | |
1564a261 | 6582 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
6583 | fi |
6584 | ||
2861ee4f | 6585 | escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
6586 | |
6587 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6588 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6589 | ac_define_dir=`eval echo $escape_dir` | |
6590 | ac_define_dir=`eval echo $ac_define_dir` | |
6591 | ||
6592 | cat >>confdefs.h <<_ACEOF | |
6593 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
6594 | _ACEOF | |
6595 | ||
6596 | ||
6597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
6598 | $as_echo "$with_auto_load_dir" >&6; } | |
6599 | ||
bccbefd2 JK |
6600 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
6601 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
6602 | ||
6603 | # Check whether --with-auto-load-safe-path was given. | |
6604 | if test "${with_auto_load_safe_path+set}" = set; then : | |
6605 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
6606 | with_auto_load_safe_path="/" |
6607 | fi | |
bccbefd2 | 6608 | else |
7349ff92 | 6609 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
6610 | fi |
6611 | ||
2861ee4f | 6612 | escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
6613 | |
6614 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
6615 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 6616 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
6617 | ac_define_dir=`eval echo $ac_define_dir` |
6618 | ||
6619 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 6620 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
6621 | _ACEOF |
6622 | ||
6623 | ||
6624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
6625 | $as_echo "$with_auto_load_safe_path" >&6; } | |
6626 | ||
29b0e8a2 | 6627 | |
20e95c23 | 6628 | |
8043d65b | 6629 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
6630 | |
6631 | ||
783e057b | 6632 | # Check whether to support alternative target configurations |
81ecdfbb RW |
6633 | # Check whether --enable-targets was given. |
6634 | if test "${enable_targets+set}" = set; then : | |
6635 | enableval=$enable_targets; case "${enableval}" in | |
d0ac1c44 | 6636 | yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 |
783e057b DJ |
6637 | ;; |
6638 | no) enable_targets= ;; | |
6639 | *) enable_targets=$enableval ;; | |
6640 | esac | |
81ecdfbb RW |
6641 | fi |
6642 | ||
20e95c23 | 6643 | |
783e057b | 6644 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
6645 | # Check whether --enable-64-bit-bfd was given. |
6646 | if test "${enable_64_bit_bfd+set}" = set; then : | |
6647 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
6648 | yes) want64=true ;; |
6649 | no) want64=false ;; | |
d0ac1c44 | 6650 | *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
6651 | esac |
6652 | else | |
6653 | want64=false | |
81ecdfbb RW |
6654 | fi |
6655 | ||
783e057b DJ |
6656 | # Provide defaults for some variables set by the per-host and per-target |
6657 | # configuration. | |
6658 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 6659 | |
783e057b DJ |
6660 | if test "${target}" = "${host}"; then |
6661 | gdb_native=yes | |
6662 | else | |
6663 | gdb_native=no | |
6664 | fi | |
20e95c23 | 6665 | |
783e057b | 6666 | . $srcdir/configure.host |
20e95c23 | 6667 | |
783e057b | 6668 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 6669 | |
783e057b DJ |
6670 | TARGET_OBS= |
6671 | all_targets= | |
b292c783 | 6672 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 6673 | |
783e057b | 6674 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 6675 | do |
783e057b DJ |
6676 | if test "$targ_alias" = "all"; then |
6677 | all_targets=true | |
6678 | else | |
6679 | # Canonicalize the secondary target names. | |
6680 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
6681 | if test -n "$result"; then | |
6682 | targ=$result | |
6683 | else | |
6684 | targ=$targ_alias | |
6685 | fi | |
20e95c23 | 6686 | |
783e057b | 6687 | . ${srcdir}/configure.tgt |
20e95c23 | 6688 | |
bf307134 | 6689 | if test -z "${gdb_target_obs}"; then : |
d0ac1c44 | 6690 | as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 |
bf307134 JB |
6691 | fi |
6692 | ||
783e057b DJ |
6693 | # Target-specific object files |
6694 | for i in ${gdb_target_obs}; do | |
6695 | case " $TARGET_OBS " in | |
6696 | *" ${i} "*) ;; | |
6697 | *) | |
6698 | TARGET_OBS="$TARGET_OBS ${i}" | |
6699 | ;; | |
6700 | esac | |
6701 | done | |
20e95c23 | 6702 | |
783e057b DJ |
6703 | # Check whether this target needs 64-bit CORE_ADDR |
6704 | if test x${want64} = xfalse; then | |
6705 | . ${srcdir}/../bfd/config.bfd | |
6706 | fi | |
b292c783 JK |
6707 | |
6708 | # Check whether this target is native and supports gcore. | |
6709 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
6710 | && $gdb_have_gcore; then | |
6711 | HAVE_NATIVE_GCORE_TARGET=1 | |
6712 | fi | |
783e057b | 6713 | fi |
20e95c23 DJ |
6714 | done |
6715 | ||
783e057b DJ |
6716 | if test x${all_targets} = xtrue; then |
6717 | ||
6718 | # We want all 64-bit targets if we either: | |
6719 | # - run on a 64-bit host or | |
6720 | # - already require 64-bit support for some other target or | |
6721 | # - the --enable-64-bit-bfd option was supplied | |
6722 | # Otherwise we only support all 32-bit targets. | |
6723 | # | |
6724 | # NOTE: This test must be in sync with the corresponding | |
6725 | # tests in BFD! | |
20e95c23 | 6726 | |
783e057b | 6727 | if test x${want64} = xfalse; then |
81ecdfbb RW |
6728 | # The cast to long int works around a bug in the HP C Compiler |
6729 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
6730 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
6731 | # This bug is HP SR number 8606223364. | |
6732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
6733 | $as_echo_n "checking size of long... " >&6; } | |
d0ac1c44 | 6734 | if ${ac_cv_sizeof_long+:} false; then : |
81ecdfbb | 6735 | $as_echo_n "(cached) " >&6 |
c0993dbe | 6736 | else |
81ecdfbb | 6737 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 6738 | |
81ecdfbb RW |
6739 | else |
6740 | if test "$ac_cv_type_long" = yes; then | |
6741 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6742 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
6743 | as_fn_error 77 "cannot compute sizeof (long) |
6744 | See \`config.log' for more details" "$LINENO" 5; } | |
81ecdfbb RW |
6745 | else |
6746 | ac_cv_sizeof_long=0 | |
6747 | fi | |
c0993dbe | 6748 | fi |
81ecdfbb | 6749 | |
c0993dbe | 6750 | fi |
81ecdfbb RW |
6751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
6752 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 6753 | |
c0993dbe | 6754 | |
c0993dbe | 6755 | |
c0993dbe UW |
6756 | cat >>confdefs.h <<_ACEOF |
6757 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
6758 | _ACEOF | |
6759 | ||
6760 | ||
6761 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
6762 | want64=true | |
6763 | fi | |
6764 | fi | |
6765 | if test x${want64} = xtrue; then | |
6766 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
6767 | else | |
6768 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
6769 | fi | |
6770 | fi | |
6771 | ||
6772 | ||
6773 | ||
b292c783 | 6774 | |
c0993dbe UW |
6775 | # For other settings, only the main target counts. |
6776 | gdb_sim= | |
6777 | gdb_osabi= | |
c0993dbe UW |
6778 | targ=$target; . ${srcdir}/configure.tgt |
6779 | ||
6780 | # Fetch the default architecture and default target vector from BFD. | |
6781 | targ=$target; . $srcdir/../bfd/config.bfd | |
6782 | ||
6783 | # We only want the first architecture, so strip off the others if | |
6784 | # there is more than one. | |
6785 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
6786 | ||
6787 | if test "x$targ_archs" != x; then | |
6788 | ||
6789 | cat >>confdefs.h <<_ACEOF | |
6790 | #define DEFAULT_BFD_ARCH $targ_archs | |
6791 | _ACEOF | |
6792 | ||
6793 | fi | |
6794 | if test "x$targ_defvec" != x; then | |
6795 | ||
6796 | cat >>confdefs.h <<_ACEOF | |
6797 | #define DEFAULT_BFD_VEC $targ_defvec | |
6798 | _ACEOF | |
6799 | ||
6800 | fi | |
6801 | ||
c0993dbe | 6802 | # Enable MI. |
81ecdfbb RW |
6803 | # Check whether --enable-gdbmi was given. |
6804 | if test "${enable_gdbmi+set}" = set; then : | |
6805 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
6806 | yes | no) |
6807 | ;; | |
6808 | *) | |
d0ac1c44 | 6809 | as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
6810 | esac |
6811 | else | |
6812 | enable_gdbmi=yes | |
81ecdfbb RW |
6813 | fi |
6814 | ||
c0993dbe | 6815 | if test x"$enable_gdbmi" = xyes; then |
0ad6b8ee | 6816 | if test -d "$srcdir/mi"; then |
c0993dbe UW |
6817 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" |
6818 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
6819 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
6820 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
6821 | fi | |
6822 | fi | |
6823 | ||
6824 | # Enable TUI. | |
81ecdfbb RW |
6825 | # Check whether --enable-tui was given. |
6826 | if test "${enable_tui+set}" = set; then : | |
6827 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 6828 | yes | no | auto) |
c0993dbe UW |
6829 | ;; |
6830 | *) | |
d0ac1c44 | 6831 | as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
6832 | esac |
6833 | else | |
3ca64bd3 | 6834 | enable_tui=auto |
81ecdfbb RW |
6835 | fi |
6836 | ||
c0993dbe UW |
6837 | |
6838 | # Enable gdbtk. | |
81ecdfbb RW |
6839 | # Check whether --enable-gdbtk was given. |
6840 | if test "${enable_gdbtk+set}" = set; then : | |
6841 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
6842 | yes | no) |
6843 | ;; | |
6844 | *) | |
d0ac1c44 | 6845 | as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
6846 | esac |
6847 | else | |
0ad6b8ee | 6848 | if test -d "$srcdir/gdbtk"; then |
c0993dbe UW |
6849 | enable_gdbtk=yes |
6850 | else | |
6851 | enable_gdbtk=no | |
6852 | fi | |
81ecdfbb RW |
6853 | fi |
6854 | ||
c0993dbe UW |
6855 | # We unconditionally disable gdbtk tests on selected platforms. |
6856 | case $host_os in | |
6857 | go32* | windows*) | |
81ecdfbb RW |
6858 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
6859 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
6860 | enable_gdbtk=no ;; |
6861 | esac | |
6862 | ||
0d79cdc4 AM |
6863 | # Handle optional debuginfod support |
6864 | ||
f6720b1c AM |
6865 | |
6866 | ||
6867 | ||
6868 | ||
6869 | ||
6870 | ||
6871 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
6872 | if test -n "$ac_tool_prefix"; then | |
6873 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
6874 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
6875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6876 | $as_echo_n "checking for $ac_word... " >&6; } | |
6877 | if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
6878 | $as_echo_n "(cached) " >&6 | |
6879 | else | |
6880 | case $PKG_CONFIG in | |
6881 | [\\/]* | ?:[\\/]*) | |
6882 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
6883 | ;; | |
6884 | *) | |
6885 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6886 | for as_dir in $PATH | |
6887 | do | |
6888 | IFS=$as_save_IFS | |
6889 | test -z "$as_dir" && as_dir=. | |
6890 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6891 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6892 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6893 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6894 | break 2 | |
6895 | fi | |
6896 | done | |
6897 | done | |
6898 | IFS=$as_save_IFS | |
6899 | ||
6900 | ;; | |
6901 | esac | |
6902 | fi | |
6903 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
6904 | if test -n "$PKG_CONFIG"; then | |
6905 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
6906 | $as_echo "$PKG_CONFIG" >&6; } | |
6907 | else | |
6908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6909 | $as_echo "no" >&6; } | |
6910 | fi | |
6911 | ||
6912 | ||
6913 | fi | |
6914 | if test -z "$ac_cv_path_PKG_CONFIG"; then | |
6915 | ac_pt_PKG_CONFIG=$PKG_CONFIG | |
6916 | # Extract the first word of "pkg-config", so it can be a program name with args. | |
6917 | set dummy pkg-config; ac_word=$2 | |
6918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
6919 | $as_echo_n "checking for $ac_word... " >&6; } | |
6920 | if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
6921 | $as_echo_n "(cached) " >&6 | |
6922 | else | |
6923 | case $ac_pt_PKG_CONFIG in | |
6924 | [\\/]* | ?:[\\/]*) | |
6925 | ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
6926 | ;; | |
6927 | *) | |
6928 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6929 | for as_dir in $PATH | |
6930 | do | |
6931 | IFS=$as_save_IFS | |
6932 | test -z "$as_dir" && as_dir=. | |
6933 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6934 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6935 | ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
6936 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6937 | break 2 | |
6938 | fi | |
6939 | done | |
6940 | done | |
6941 | IFS=$as_save_IFS | |
6942 | ||
6943 | ;; | |
6944 | esac | |
6945 | fi | |
6946 | ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
6947 | if test -n "$ac_pt_PKG_CONFIG"; then | |
6948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
6949 | $as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
6950 | else | |
6951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6952 | $as_echo "no" >&6; } | |
6953 | fi | |
6954 | ||
6955 | if test "x$ac_pt_PKG_CONFIG" = x; then | |
6956 | PKG_CONFIG="" | |
6957 | else | |
6958 | case $cross_compiling:$ac_tool_warned in | |
6959 | yes:) | |
6960 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6961 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6962 | ac_tool_warned=yes ;; | |
6963 | esac | |
6964 | PKG_CONFIG=$ac_pt_PKG_CONFIG | |
6965 | fi | |
6966 | else | |
6967 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
6968 | fi | |
6969 | ||
6970 | fi | |
6971 | if test -n "$PKG_CONFIG"; then | |
6972 | _pkg_min_version=0.9.0 | |
6973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
6974 | $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
6975 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
6976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6977 | $as_echo "yes" >&6; } | |
6978 | else | |
6979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6980 | $as_echo "no" >&6; } | |
6981 | PKG_CONFIG="" | |
6982 | fi | |
6983 | fi | |
6984 | ||
6985 | # Handle optional debuginfod support | |
0d79cdc4 AM |
6986 | |
6987 | # Check whether --with-debuginfod was given. | |
6988 | if test "${with_debuginfod+set}" = set; then : | |
6989 | withval=$with_debuginfod; | |
6990 | else | |
6991 | with_debuginfod=auto | |
6992 | fi | |
6993 | ||
6994 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5 | |
6995 | $as_echo_n "checking whether to use debuginfod... " >&6; } | |
6996 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5 | |
6997 | $as_echo "$with_debuginfod" >&6; } | |
6998 | ||
f6720b1c | 6999 | if test "x$with_debuginfod" != xno; then |
0d79cdc4 | 7000 | |
f6720b1c AM |
7001 | pkg_failed=no |
7002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5 | |
7003 | $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; } | |
7004 | ||
7005 | if test -n "$DEBUGINFOD_CFLAGS"; then | |
7006 | pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS" | |
7007 | elif test -n "$PKG_CONFIG"; then | |
7008 | if test -n "$PKG_CONFIG" && \ | |
7009 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7010 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7011 | ac_status=$? | |
7012 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7013 | test $ac_status = 0; }; then | |
7014 | pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null` | |
7015 | test "x$?" != "x0" && pkg_failed=yes | |
0d79cdc4 | 7016 | else |
f6720b1c | 7017 | pkg_failed=yes |
0d79cdc4 | 7018 | fi |
f6720b1c AM |
7019 | else |
7020 | pkg_failed=untried | |
0d79cdc4 | 7021 | fi |
f6720b1c AM |
7022 | if test -n "$DEBUGINFOD_LIBS"; then |
7023 | pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS" | |
7024 | elif test -n "$PKG_CONFIG"; then | |
7025 | if test -n "$PKG_CONFIG" && \ | |
7026 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5 | |
7027 | ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5 | |
7028 | ac_status=$? | |
7029 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7030 | test $ac_status = 0; }; then | |
7031 | pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null` | |
7032 | test "x$?" != "x0" && pkg_failed=yes | |
7033 | else | |
7034 | pkg_failed=yes | |
0d79cdc4 | 7035 | fi |
f6720b1c AM |
7036 | else |
7037 | pkg_failed=untried | |
0d79cdc4 | 7038 | fi |
bec39cab | 7039 | |
377170fa L |
7040 | if test $pkg_failed = no; then |
7041 | pkg_save_LDFLAGS="$LDFLAGS" | |
7042 | LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS" | |
7043 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d70f978b L |
7044 | /* end confdefs.h. */ |
7045 | ||
7046 | int | |
7047 | main () | |
7048 | { | |
377170fa | 7049 | |
d70f978b L |
7050 | ; |
7051 | return 0; | |
7052 | } | |
7053 | _ACEOF | |
7054 | if ac_fn_c_try_link "$LINENO"; then : | |
377170fa | 7055 | |
d70f978b L |
7056 | else |
7057 | pkg_failed=yes | |
7058 | fi | |
7059 | rm -f core conftest.err conftest.$ac_objext \ | |
7060 | conftest$ac_exeext conftest.$ac_ext | |
377170fa L |
7061 | LDFLAGS=$pkg_save_LDFLAGS |
7062 | fi | |
d70f978b | 7063 | |
0d79cdc4 | 7064 | |
0d79cdc4 | 7065 | |
f6720b1c AM |
7066 | if test $pkg_failed = yes; then |
7067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7068 | $as_echo "no" >&6; } | |
0d79cdc4 | 7069 | |
f6720b1c AM |
7070 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
7071 | _pkg_short_errors_supported=yes | |
7072 | else | |
7073 | _pkg_short_errors_supported=no | |
7074 | fi | |
7075 | if test $_pkg_short_errors_supported = yes; then | |
7076 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7077 | else | |
7078 | DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1` | |
7079 | fi | |
7080 | # Put the nasty error message in config.log where it belongs | |
7081 | echo "$DEBUGINFOD_PKG_ERRORS" >&5 | |
0d79cdc4 | 7082 | |
f6720b1c AM |
7083 | if test "x$with_debuginfod" = xyes; then |
7084 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7085 | else | |
7086 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7087 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7088 | fi | |
7089 | elif test $pkg_failed = untried; then | |
7090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7091 | $as_echo "no" >&6; } | |
7092 | if test "x$with_debuginfod" = xyes; then | |
7093 | as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5 | |
7094 | else | |
7095 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5 | |
7096 | $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;} | |
7097 | fi | |
7098 | else | |
7099 | DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS | |
7100 | DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS | |
7101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7102 | $as_echo "yes" >&6; } | |
7103 | ||
7104 | $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h | |
7105 | ||
7106 | fi | |
7107 | else | |
7108 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5 | |
7109 | $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;} | |
0d79cdc4 AM |
7110 | fi |
7111 | ||
7112 | ||
7113 | # Libunwind support for ia64. | |
05e7c244 JK |
7114 | |
7115 | # Check whether --with-libunwind-ia64 was given. | |
7116 | if test "${with_libunwind_ia64+set}" = set; then : | |
7117 | withval=$with_libunwind_ia64; | |
bec39cab | 7118 | else |
05e7c244 JK |
7119 | with_libunwind_ia64=auto |
7120 | fi | |
bec39cab | 7121 | |
05e7c244 JK |
7122 | |
7123 | # Backward compatibility option. | |
7124 | if test "${with_libunwind+set}" = set; then | |
7125 | if test x"$with_libunwind_ia64" != xauto; then | |
d0ac1c44 | 7126 | as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 |
05e7c244 JK |
7127 | fi |
7128 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
7129 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
7130 | with_libunwind_ia64="$with_libunwind" | |
7131 | fi | |
7132 | ||
7133 | case "$with_libunwind_ia64" in | |
7134 | yes | no) | |
7135 | ;; | |
7136 | auto) | |
7137 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 7138 | do : |
b54a8fd7 | 7139 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7140 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7141 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7142 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7143 | _ACEOF |
7144 | ||
7145 | fi | |
7146 | ||
7147 | done | |
7148 | ||
05e7c244 JK |
7149 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
7150 | ;; | |
7151 | *) | |
d0ac1c44 | 7152 | as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 |
05e7c244 JK |
7153 | ;; |
7154 | esac | |
bec39cab | 7155 | |
05e7c244 | 7156 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 7157 | for ac_header in libunwind-ia64.h |
81ecdfbb | 7158 | do : |
b54a8fd7 | 7159 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
d0ac1c44 | 7160 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
bec39cab | 7161 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 7162 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
7163 | _ACEOF |
7164 | ||
7165 | fi | |
7166 | ||
7167 | done | |
7168 | ||
05e7c244 | 7169 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
d0ac1c44 | 7170 | as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 |
05e7c244 JK |
7171 | fi |
7172 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
7173 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
7174 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
7175 | fi |
7176 | ||
cb01cfba JB |
7177 | opt_curses=no |
7178 | ||
81ecdfbb RW |
7179 | # Check whether --with-curses was given. |
7180 | if test "${with_curses+set}" = set; then : | |
7181 | withval=$with_curses; opt_curses=$withval | |
7182 | fi | |
7183 | ||
cb01cfba | 7184 | |
76a39ba7 | 7185 | prefer_curses=no |
cb01cfba | 7186 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 7187 | prefer_curses=yes |
cb01cfba JB |
7188 | fi |
7189 | ||
a9322a30 | 7190 | # Profiling support. |
81ecdfbb RW |
7191 | # Check whether --enable-profiling was given. |
7192 | if test "${enable_profiling+set}" = set; then : | |
7193 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
7194 | yes | no) |
7195 | ;; | |
7196 | *) | |
d0ac1c44 | 7197 | as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
7198 | esac |
7199 | else | |
7200 | enable_profiling=no | |
81ecdfbb | 7201 | fi |
bec39cab | 7202 | |
a9322a30 TT |
7203 | |
7204 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
7205 | do : |
7206 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7207 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 7208 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
81ecdfbb RW |
7209 | cat >>confdefs.h <<_ACEOF |
7210 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 7211 | _ACEOF |
a9322a30 | 7212 | |
81ecdfbb RW |
7213 | fi |
7214 | done | |
a9322a30 | 7215 | |
81ecdfbb RW |
7216 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
7217 | $as_echo_n "checking for _etext... " >&6; } | |
d0ac1c44 | 7218 | if ${ac_cv_var__etext+:} false; then : |
81ecdfbb RW |
7219 | $as_echo_n "(cached) " >&6 |
7220 | else | |
7221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7222 | /* end confdefs.h. */ | |
7223 | #include <stdlib.h> | |
5593a99a | 7224 | extern char _etext; |
a9322a30 TT |
7225 | int |
7226 | main () | |
7227 | { | |
7228 | free (&_etext); | |
5593a99a | 7229 | |
a9322a30 TT |
7230 | ; |
7231 | return 0; | |
7232 | } | |
bec39cab | 7233 | _ACEOF |
81ecdfbb | 7234 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7235 | ac_cv_var__etext=yes |
bec39cab | 7236 | else |
81ecdfbb | 7237 | ac_cv_var__etext=no |
5593a99a | 7238 | |
bec39cab | 7239 | fi |
81ecdfbb RW |
7240 | rm -f core conftest.err conftest.$ac_objext \ |
7241 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 7242 | |
bec39cab | 7243 | fi |
81ecdfbb RW |
7244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
7245 | $as_echo "$ac_cv_var__etext" >&6; } | |
0ad6b8ee | 7246 | if test "$ac_cv_var__etext" = yes; then |
60ca704f | 7247 | |
81ecdfbb | 7248 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 7249 | |
bec39cab | 7250 | fi |
81ecdfbb RW |
7251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
7252 | $as_echo_n "checking for etext... " >&6; } | |
d0ac1c44 | 7253 | if ${ac_cv_var_etext+:} false; then : |
81ecdfbb | 7254 | $as_echo_n "(cached) " >&6 |
bec39cab | 7255 | else |
81ecdfbb | 7256 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7257 | /* end confdefs.h. */ |
a9322a30 | 7258 | #include <stdlib.h> |
5593a99a | 7259 | extern char etext; |
bec39cab AC |
7260 | int |
7261 | main () | |
7262 | { | |
a9322a30 | 7263 | free (&etext); |
5593a99a | 7264 | |
bec39cab AC |
7265 | ; |
7266 | return 0; | |
7267 | } | |
7268 | _ACEOF | |
81ecdfbb | 7269 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 7270 | ac_cv_var_etext=yes |
bec39cab | 7271 | else |
81ecdfbb | 7272 | ac_cv_var_etext=no |
5593a99a | 7273 | |
bec39cab | 7274 | fi |
81ecdfbb RW |
7275 | rm -f core conftest.err conftest.$ac_objext \ |
7276 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 7277 | |
bec39cab | 7278 | fi |
81ecdfbb RW |
7279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
7280 | $as_echo "$ac_cv_var_etext" >&6; } | |
0ad6b8ee | 7281 | if test "$ac_cv_var_etext" = yes; then |
a9322a30 | 7282 | |
81ecdfbb | 7283 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
7284 | |
7285 | fi | |
a9322a30 | 7286 | if test "$enable_profiling" = yes ; then |
0ad6b8ee | 7287 | if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then |
d0ac1c44 | 7288 | as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
7289 | fi |
7290 | PROFILE_CFLAGS=-pg | |
7291 | OLD_CFLAGS="$CFLAGS" | |
7292 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 7293 | |
81ecdfbb RW |
7294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
7295 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
d0ac1c44 | 7296 | if ${ac_cv_cc_supports_pg+:} false; then : |
81ecdfbb | 7297 | $as_echo_n "(cached) " >&6 |
bec39cab | 7298 | else |
81ecdfbb | 7299 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 7300 | /* end confdefs.h. */ |
bec39cab AC |
7301 | |
7302 | int | |
7303 | main () | |
7304 | { | |
a9322a30 | 7305 | int x; |
bec39cab AC |
7306 | ; |
7307 | return 0; | |
7308 | } | |
7309 | _ACEOF | |
81ecdfbb | 7310 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 7311 | ac_cv_cc_supports_pg=yes |
bec39cab | 7312 | else |
81ecdfbb | 7313 | ac_cv_cc_supports_pg=no |
5593a99a | 7314 | |
bec39cab | 7315 | fi |
81ecdfbb | 7316 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 7317 | |
bec39cab | 7318 | fi |
81ecdfbb RW |
7319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
7320 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 7321 | |
0ad6b8ee | 7322 | if test "$ac_cv_cc_supports_pg" = no; then |
d0ac1c44 | 7323 | as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 7324 | fi |
bec39cab | 7325 | |
a9322a30 | 7326 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
7327 | fi |
7328 | ||
44cee4fd TT |
7329 | CODESIGN_CERT= |
7330 | # Check whether --enable-codesign was given. | |
7331 | if test "${enable_codesign+set}" = set; then : | |
7332 | enableval=$enable_codesign; CODESIGN_CERT=$enableval | |
7333 | fi | |
7334 | ||
7335 | ||
7336 | ||
c16158bc JM |
7337 | |
7338 | ||
81ecdfbb RW |
7339 | # Check whether --with-pkgversion was given. |
7340 | if test "${with_pkgversion+set}" = set; then : | |
7341 | withval=$with_pkgversion; case "$withval" in | |
d0ac1c44 | 7342 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
c16158bc JM |
7343 | no) PKGVERSION= ;; |
7344 | *) PKGVERSION="($withval) " ;; | |
7345 | esac | |
7346 | else | |
7347 | PKGVERSION="(GDB) " | |
7348 | ||
81ecdfbb | 7349 | fi |
c16158bc JM |
7350 | |
7351 | ||
7352 | ||
7353 | ||
81ecdfbb RW |
7354 | |
7355 | # Check whether --with-bugurl was given. | |
7356 | if test "${with_bugurl+set}" = set; then : | |
7357 | withval=$with_bugurl; case "$withval" in | |
d0ac1c44 | 7358 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
c16158bc JM |
7359 | no) BUGURL= |
7360 | ;; | |
7361 | *) BUGURL="$withval" | |
7362 | ;; | |
7363 | esac | |
7364 | else | |
112c22ed | 7365 | BUGURL="https://www.gnu.org/software/gdb/bugs/" |
c16158bc | 7366 | |
81ecdfbb RW |
7367 | fi |
7368 | ||
c16158bc JM |
7369 | case ${BUGURL} in |
7370 | "") | |
7371 | REPORT_BUGS_TO= | |
7372 | REPORT_BUGS_TEXI= | |
7373 | ;; | |
7374 | *) | |
7375 | REPORT_BUGS_TO="<$BUGURL>" | |
7376 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7377 | ;; | |
7378 | esac; | |
7379 | ||
7380 | ||
7381 | ||
7382 | ||
7383 | cat >>confdefs.h <<_ACEOF | |
7384 | #define PKGVERSION "$PKGVERSION" | |
7385 | _ACEOF | |
7386 | ||
7387 | ||
7388 | cat >>confdefs.h <<_ACEOF | |
7389 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
7390 | _ACEOF | |
7391 | ||
7392 | ||
bec39cab AC |
7393 | # --------------------- # |
7394 | # Checks for programs. # | |
7395 | # --------------------- # | |
7396 | ||
7397 | for ac_prog in gawk mawk nawk awk | |
7398 | do | |
7399 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7400 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7401 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7402 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7403 | if ${ac_cv_prog_AWK+:} false; then : |
81ecdfbb | 7404 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7405 | else |
7406 | if test -n "$AWK"; then | |
7407 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7408 | else | |
7409 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7410 | for as_dir in $PATH | |
7411 | do | |
7412 | IFS=$as_save_IFS | |
7413 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7414 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7415 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7416 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 7417 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7418 | break 2 |
7419 | fi | |
7420 | done | |
81ecdfbb RW |
7421 | done |
7422 | IFS=$as_save_IFS | |
bec39cab AC |
7423 | |
7424 | fi | |
7425 | fi | |
7426 | AWK=$ac_cv_prog_AWK | |
7427 | if test -n "$AWK"; then | |
81ecdfbb RW |
7428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
7429 | $as_echo "$AWK" >&6; } | |
bec39cab | 7430 | else |
81ecdfbb RW |
7431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7432 | $as_echo "no" >&6; } | |
bec39cab AC |
7433 | fi |
7434 | ||
bec39cab | 7435 | |
81ecdfbb | 7436 | test -n "$AWK" && break |
bec39cab AC |
7437 | done |
7438 | ||
c971b7fa PA |
7439 | # Find a good install program. We prefer a C program (faster), |
7440 | # so one script is as good as another. But avoid the broken or | |
7441 | # incompatible versions: | |
7442 | # SysV /etc/install, /usr/sbin/install | |
7443 | # SunOS /usr/etc/install | |
7444 | # IRIX /sbin/install | |
7445 | # AIX /bin/install | |
7446 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
7447 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
7448 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7449 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7450 | # OS/2's system install, which has a completely different semantic | |
7451 | # ./install, which can be erroneously created by make from ./install.sh. | |
7452 | # Reject install programs that cannot install multiple files. | |
7453 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
7454 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
7455 | if test -z "$INSTALL"; then | |
d0ac1c44 | 7456 | if ${ac_cv_path_install+:} false; then : |
c971b7fa PA |
7457 | $as_echo_n "(cached) " >&6 |
7458 | else | |
7459 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7460 | for as_dir in $PATH | |
7461 | do | |
7462 | IFS=$as_save_IFS | |
7463 | test -z "$as_dir" && as_dir=. | |
7464 | # Account for people who put trailing slashes in PATH elements. | |
7465 | case $as_dir/ in #(( | |
7466 | ./ | .// | /[cC]/* | \ | |
7467 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
7468 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
7469 | /usr/ucb/* ) ;; | |
7470 | *) | |
7471 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7472 | # Don't use installbsd from OSF since it installs stuff as root | |
7473 | # by default. | |
7474 | for ac_prog in ginstall scoinst install; do | |
7475 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 7476 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
c971b7fa PA |
7477 | if test $ac_prog = install && |
7478 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7479 | # AIX install. It has an incompatible calling convention. | |
7480 | : | |
7481 | elif test $ac_prog = install && | |
7482 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
7483 | # program-specific install script used by HP pwplus--don't use. | |
7484 | : | |
7485 | else | |
7486 | rm -rf conftest.one conftest.two conftest.dir | |
7487 | echo one > conftest.one | |
7488 | echo two > conftest.two | |
7489 | mkdir conftest.dir | |
7490 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
7491 | test -s conftest.one && test -s conftest.two && | |
7492 | test -s conftest.dir/conftest.one && | |
7493 | test -s conftest.dir/conftest.two | |
7494 | then | |
7495 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
7496 | break 3 | |
7497 | fi | |
7498 | fi | |
7499 | fi | |
7500 | done | |
7501 | done | |
7502 | ;; | |
7503 | esac | |
7504 | ||
7505 | done | |
7506 | IFS=$as_save_IFS | |
7507 | ||
7508 | rm -rf conftest.one conftest.two conftest.dir | |
7509 | ||
7510 | fi | |
7511 | if test "${ac_cv_path_install+set}" = set; then | |
7512 | INSTALL=$ac_cv_path_install | |
7513 | else | |
7514 | # As a last resort, use the slow shell script. Don't cache a | |
7515 | # value for INSTALL within a source directory, because that will | |
7516 | # break other packages using the cache if that directory is | |
7517 | # removed, or if the value is a relative name. | |
7518 | INSTALL=$ac_install_sh | |
7519 | fi | |
7520 | fi | |
7521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
7522 | $as_echo "$INSTALL" >&6; } | |
7523 | ||
7524 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7525 | # It thinks the first close brace ends the variable substitution. | |
7526 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7527 | ||
7528 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
7529 | ||
7530 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 7531 | |
81ecdfbb RW |
7532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
7533 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
7534 | LN_S=$as_ln_s |
7535 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
7536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
7537 | $as_echo "yes" >&6; } | |
bec39cab | 7538 | else |
81ecdfbb RW |
7539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
7540 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
7541 | fi |
7542 | ||
7543 | if test -n "$ac_tool_prefix"; then | |
7544 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7545 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
7546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7547 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7548 | if ${ac_cv_prog_RANLIB+:} false; then : |
81ecdfbb | 7549 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7550 | else |
7551 | if test -n "$RANLIB"; then | |
7552 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7553 | else | |
7554 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7555 | for as_dir in $PATH | |
7556 | do | |
7557 | IFS=$as_save_IFS | |
7558 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7559 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7560 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7561 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 7562 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7563 | break 2 |
7564 | fi | |
7565 | done | |
81ecdfbb RW |
7566 | done |
7567 | IFS=$as_save_IFS | |
bec39cab AC |
7568 | |
7569 | fi | |
7570 | fi | |
7571 | RANLIB=$ac_cv_prog_RANLIB | |
7572 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
7573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
7574 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 7575 | else |
81ecdfbb RW |
7576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7577 | $as_echo "no" >&6; } | |
bec39cab AC |
7578 | fi |
7579 | ||
81ecdfbb | 7580 | |
bec39cab AC |
7581 | fi |
7582 | if test -z "$ac_cv_prog_RANLIB"; then | |
7583 | ac_ct_RANLIB=$RANLIB | |
7584 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7585 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
7586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7587 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7588 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
81ecdfbb | 7589 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7590 | else |
7591 | if test -n "$ac_ct_RANLIB"; then | |
7592 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7593 | else | |
7594 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7595 | for as_dir in $PATH | |
7596 | do | |
7597 | IFS=$as_save_IFS | |
7598 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7599 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7600 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7601 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 7602 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7603 | break 2 |
7604 | fi | |
7605 | done | |
81ecdfbb RW |
7606 | done |
7607 | IFS=$as_save_IFS | |
bec39cab | 7608 | |
bec39cab AC |
7609 | fi |
7610 | fi | |
7611 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7612 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
7613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
7614 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 7615 | else |
81ecdfbb RW |
7616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7617 | $as_echo "no" >&6; } | |
bec39cab AC |
7618 | fi |
7619 | ||
81ecdfbb RW |
7620 | if test "x$ac_ct_RANLIB" = x; then |
7621 | RANLIB=":" | |
7622 | else | |
7623 | case $cross_compiling:$ac_tool_warned in | |
7624 | yes:) | |
7625 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7626 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7627 | ac_tool_warned=yes ;; | |
7628 | esac | |
7629 | RANLIB=$ac_ct_RANLIB | |
7630 | fi | |
bec39cab AC |
7631 | else |
7632 | RANLIB="$ac_cv_prog_RANLIB" | |
7633 | fi | |
7634 | ||
7635 | for ac_prog in 'bison -y' byacc | |
7636 | do | |
7637 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7638 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
7639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7640 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7641 | if ${ac_cv_prog_YACC+:} false; then : |
81ecdfbb | 7642 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7643 | else |
7644 | if test -n "$YACC"; then | |
7645 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
7646 | else | |
7647 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7648 | for as_dir in $PATH | |
7649 | do | |
7650 | IFS=$as_save_IFS | |
7651 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7652 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7653 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7654 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 7655 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7656 | break 2 |
7657 | fi | |
7658 | done | |
81ecdfbb RW |
7659 | done |
7660 | IFS=$as_save_IFS | |
bec39cab AC |
7661 | |
7662 | fi | |
7663 | fi | |
7664 | YACC=$ac_cv_prog_YACC | |
7665 | if test -n "$YACC"; then | |
81ecdfbb RW |
7666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
7667 | $as_echo "$YACC" >&6; } | |
bec39cab | 7668 | else |
81ecdfbb RW |
7669 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7670 | $as_echo "no" >&6; } | |
bec39cab AC |
7671 | fi |
7672 | ||
81ecdfbb | 7673 | |
bec39cab AC |
7674 | test -n "$YACC" && break |
7675 | done | |
7676 | test -n "$YACC" || YACC="yacc" | |
7677 | ||
7678 | ||
7679 | if test -n "$ac_tool_prefix"; then | |
7680 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
7681 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
7682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7683 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7684 | if ${ac_cv_prog_AR+:} false; then : |
81ecdfbb | 7685 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7686 | else |
7687 | if test -n "$AR"; then | |
7688 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7689 | else | |
7690 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7691 | for as_dir in $PATH | |
7692 | do | |
7693 | IFS=$as_save_IFS | |
7694 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7695 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7696 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7697 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 7698 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7699 | break 2 |
7700 | fi | |
7701 | done | |
81ecdfbb RW |
7702 | done |
7703 | IFS=$as_save_IFS | |
bec39cab AC |
7704 | |
7705 | fi | |
7706 | fi | |
7707 | AR=$ac_cv_prog_AR | |
7708 | if test -n "$AR"; then | |
81ecdfbb RW |
7709 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
7710 | $as_echo "$AR" >&6; } | |
bec39cab | 7711 | else |
81ecdfbb RW |
7712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7713 | $as_echo "no" >&6; } | |
bec39cab AC |
7714 | fi |
7715 | ||
81ecdfbb | 7716 | |
bec39cab AC |
7717 | fi |
7718 | if test -z "$ac_cv_prog_AR"; then | |
7719 | ac_ct_AR=$AR | |
7720 | # Extract the first word of "ar", so it can be a program name with args. | |
7721 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
7722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7723 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7724 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
81ecdfbb | 7725 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7726 | else |
7727 | if test -n "$ac_ct_AR"; then | |
7728 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
7729 | else | |
7730 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7731 | for as_dir in $PATH | |
7732 | do | |
7733 | IFS=$as_save_IFS | |
7734 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7735 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7736 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7737 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 7738 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7739 | break 2 |
7740 | fi | |
7741 | done | |
81ecdfbb RW |
7742 | done |
7743 | IFS=$as_save_IFS | |
bec39cab AC |
7744 | |
7745 | fi | |
7746 | fi | |
7747 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
7748 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
7749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
7750 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 7751 | else |
81ecdfbb RW |
7752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7753 | $as_echo "no" >&6; } | |
bec39cab AC |
7754 | fi |
7755 | ||
81ecdfbb RW |
7756 | if test "x$ac_ct_AR" = x; then |
7757 | AR="" | |
7758 | else | |
7759 | case $cross_compiling:$ac_tool_warned in | |
7760 | yes:) | |
7761 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7762 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7763 | ac_tool_warned=yes ;; | |
7764 | esac | |
7765 | AR=$ac_ct_AR | |
7766 | fi | |
bec39cab AC |
7767 | else |
7768 | AR="$ac_cv_prog_AR" | |
7769 | fi | |
7770 | ||
7771 | if test -n "$ac_tool_prefix"; then | |
7772 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
7773 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
7774 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7775 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7776 | if ${ac_cv_prog_DLLTOOL+:} false; then : |
81ecdfbb | 7777 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7778 | else |
7779 | if test -n "$DLLTOOL"; then | |
7780 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
7781 | else | |
7782 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7783 | for as_dir in $PATH | |
7784 | do | |
7785 | IFS=$as_save_IFS | |
7786 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7787 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7788 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7789 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 7790 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7791 | break 2 |
7792 | fi | |
7793 | done | |
81ecdfbb RW |
7794 | done |
7795 | IFS=$as_save_IFS | |
bec39cab AC |
7796 | |
7797 | fi | |
7798 | fi | |
7799 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
7800 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
7801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
7802 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 7803 | else |
81ecdfbb RW |
7804 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7805 | $as_echo "no" >&6; } | |
bec39cab AC |
7806 | fi |
7807 | ||
81ecdfbb | 7808 | |
bec39cab AC |
7809 | fi |
7810 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
7811 | ac_ct_DLLTOOL=$DLLTOOL | |
7812 | # Extract the first word of "dlltool", so it can be a program name with args. | |
7813 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
7814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7815 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7816 | if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : |
81ecdfbb | 7817 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7818 | else |
7819 | if test -n "$ac_ct_DLLTOOL"; then | |
7820 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
7821 | else | |
7822 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7823 | for as_dir in $PATH | |
7824 | do | |
7825 | IFS=$as_save_IFS | |
7826 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7827 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7828 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7829 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 7830 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7831 | break 2 |
7832 | fi | |
7833 | done | |
81ecdfbb RW |
7834 | done |
7835 | IFS=$as_save_IFS | |
bec39cab AC |
7836 | |
7837 | fi | |
7838 | fi | |
7839 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
7840 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
7841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
7842 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 7843 | else |
81ecdfbb RW |
7844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7845 | $as_echo "no" >&6; } | |
bec39cab AC |
7846 | fi |
7847 | ||
81ecdfbb RW |
7848 | if test "x$ac_ct_DLLTOOL" = x; then |
7849 | DLLTOOL="" | |
7850 | else | |
7851 | case $cross_compiling:$ac_tool_warned in | |
7852 | yes:) | |
7853 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7854 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7855 | ac_tool_warned=yes ;; | |
7856 | esac | |
7857 | DLLTOOL=$ac_ct_DLLTOOL | |
7858 | fi | |
bec39cab AC |
7859 | else |
7860 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
7861 | fi | |
7862 | ||
7863 | if test -n "$ac_tool_prefix"; then | |
7864 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
7865 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
7866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7867 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7868 | if ${ac_cv_prog_WINDRES+:} false; then : |
81ecdfbb | 7869 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7870 | else |
7871 | if test -n "$WINDRES"; then | |
7872 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
7873 | else | |
7874 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7875 | for as_dir in $PATH | |
7876 | do | |
7877 | IFS=$as_save_IFS | |
7878 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7879 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7880 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7881 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 7882 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7883 | break 2 |
7884 | fi | |
7885 | done | |
81ecdfbb RW |
7886 | done |
7887 | IFS=$as_save_IFS | |
bec39cab AC |
7888 | |
7889 | fi | |
7890 | fi | |
7891 | WINDRES=$ac_cv_prog_WINDRES | |
7892 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
7893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
7894 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 7895 | else |
81ecdfbb RW |
7896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7897 | $as_echo "no" >&6; } | |
bec39cab AC |
7898 | fi |
7899 | ||
81ecdfbb | 7900 | |
bec39cab AC |
7901 | fi |
7902 | if test -z "$ac_cv_prog_WINDRES"; then | |
7903 | ac_ct_WINDRES=$WINDRES | |
7904 | # Extract the first word of "windres", so it can be a program name with args. | |
7905 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
7906 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7907 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7908 | if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : |
81ecdfbb | 7909 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
7910 | else |
7911 | if test -n "$ac_ct_WINDRES"; then | |
7912 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
7913 | else | |
7914 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7915 | for as_dir in $PATH | |
7916 | do | |
7917 | IFS=$as_save_IFS | |
7918 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7919 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7920 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7921 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 7922 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7923 | break 2 |
7924 | fi | |
7925 | done | |
81ecdfbb RW |
7926 | done |
7927 | IFS=$as_save_IFS | |
bec39cab AC |
7928 | |
7929 | fi | |
7930 | fi | |
7931 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
7932 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
7933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
7934 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 7935 | else |
81ecdfbb RW |
7936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7937 | $as_echo "no" >&6; } | |
c906108c | 7938 | fi |
bec39cab | 7939 | |
81ecdfbb RW |
7940 | if test "x$ac_ct_WINDRES" = x; then |
7941 | WINDRES="" | |
7942 | else | |
7943 | case $cross_compiling:$ac_tool_warned in | |
7944 | yes:) | |
7945 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
7946 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
7947 | ac_tool_warned=yes ;; | |
7948 | esac | |
7949 | WINDRES=$ac_ct_WINDRES | |
7950 | fi | |
c906108c | 7951 | else |
bec39cab | 7952 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
7953 | fi |
7954 | ||
bec39cab | 7955 | |
036c3acb TS |
7956 | case $host_os in |
7957 | gnu*) | |
7958 | # Needed for GNU Hurd hosts. | |
7959 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
7960 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
7961 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
7962 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7963 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 7964 | if ${ac_cv_prog_MIG+:} false; then : |
81ecdfbb | 7965 | $as_echo_n "(cached) " >&6 |
c906108c | 7966 | else |
bec39cab AC |
7967 | if test -n "$MIG"; then |
7968 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
7969 | else | |
7970 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7971 | for as_dir in $PATH | |
7972 | do | |
7973 | IFS=$as_save_IFS | |
7974 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 7975 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 7976 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 7977 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 7978 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
7979 | break 2 |
7980 | fi | |
7981 | done | |
81ecdfbb RW |
7982 | done |
7983 | IFS=$as_save_IFS | |
bec39cab | 7984 | |
c906108c | 7985 | fi |
bec39cab AC |
7986 | fi |
7987 | MIG=$ac_cv_prog_MIG | |
7988 | if test -n "$MIG"; then | |
81ecdfbb RW |
7989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
7990 | $as_echo "$MIG" >&6; } | |
c906108c | 7991 | else |
81ecdfbb RW |
7992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7993 | $as_echo "no" >&6; } | |
c906108c SS |
7994 | fi |
7995 | ||
81ecdfbb | 7996 | |
bec39cab AC |
7997 | fi |
7998 | if test -z "$ac_cv_prog_MIG"; then | |
7999 | ac_ct_MIG=$MIG | |
8000 | # Extract the first word of "mig", so it can be a program name with args. | |
8001 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
8002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8003 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 8004 | if ${ac_cv_prog_ac_ct_MIG+:} false; then : |
81ecdfbb | 8005 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8006 | else |
8007 | if test -n "$ac_ct_MIG"; then | |
8008 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
8009 | else | |
8010 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8011 | for as_dir in $PATH | |
8012 | do | |
8013 | IFS=$as_save_IFS | |
8014 | test -z "$as_dir" && as_dir=. | |
81ecdfbb | 8015 | for ac_exec_ext in '' $ac_executable_extensions; do |
d0ac1c44 | 8016 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab | 8017 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 8018 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
8019 | break 2 |
8020 | fi | |
8021 | done | |
81ecdfbb RW |
8022 | done |
8023 | IFS=$as_save_IFS | |
c906108c | 8024 | |
bec39cab AC |
8025 | fi |
8026 | fi | |
8027 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
8028 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
8029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
8030 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 8031 | else |
81ecdfbb RW |
8032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8033 | $as_echo "no" >&6; } | |
bec39cab | 8034 | fi |
c906108c | 8035 | |
81ecdfbb RW |
8036 | if test "x$ac_ct_MIG" = x; then |
8037 | MIG="" | |
8038 | else | |
8039 | case $cross_compiling:$ac_tool_warned in | |
8040 | yes:) | |
8041 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8042 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8043 | ac_tool_warned=yes ;; | |
8044 | esac | |
8045 | MIG=$ac_ct_MIG | |
8046 | fi | |
bec39cab AC |
8047 | else |
8048 | MIG="$ac_cv_prog_MIG" | |
8049 | fi | |
c906108c | 8050 | |
036c3acb | 8051 | if test x"$MIG" = x; then |
d0ac1c44 | 8052 | as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 |
036c3acb TS |
8053 | fi |
8054 | ;; | |
8055 | esac | |
c906108c | 8056 | |
bec39cab AC |
8057 | # ---------------------- # |
8058 | # Checks for libraries. # | |
8059 | # ---------------------- # | |
c906108c | 8060 | |
bec39cab | 8061 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
8062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
8063 | $as_echo_n "checking for main in -lm... " >&6; } | |
d0ac1c44 | 8064 | if ${ac_cv_lib_m_main+:} false; then : |
81ecdfbb | 8065 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8066 | else |
8067 | ac_check_lib_save_LIBS=$LIBS | |
8068 | LIBS="-lm $LIBS" | |
81ecdfbb | 8069 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8070 | /* end confdefs.h. */ |
c906108c | 8071 | |
c906108c | 8072 | |
bec39cab AC |
8073 | int |
8074 | main () | |
8075 | { | |
81ecdfbb | 8076 | return main (); |
bec39cab AC |
8077 | ; |
8078 | return 0; | |
8079 | } | |
8080 | _ACEOF | |
81ecdfbb | 8081 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
8082 | ac_cv_lib_m_main=yes |
8083 | else | |
81ecdfbb | 8084 | ac_cv_lib_m_main=no |
bec39cab | 8085 | fi |
81ecdfbb RW |
8086 | rm -f core conftest.err conftest.$ac_objext \ |
8087 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
8088 | LIBS=$ac_check_lib_save_LIBS |
8089 | fi | |
81ecdfbb RW |
8090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
8091 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
d0ac1c44 | 8092 | if test "x$ac_cv_lib_m_main" = xyes; then : |
bec39cab AC |
8093 | cat >>confdefs.h <<_ACEOF |
8094 | #define HAVE_LIBM 1 | |
8095 | _ACEOF | |
8096 | ||
8097 | LIBS="-lm $LIBS" | |
c906108c | 8098 | |
c906108c | 8099 | fi |
bec39cab AC |
8100 | |
8101 | ||
bec39cab | 8102 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
8103 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
8104 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
d0ac1c44 | 8105 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb | 8106 | $as_echo_n "(cached) " >&6 |
bec39cab AC |
8107 | else |
8108 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8109 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8110 | /* end confdefs.h. */ |
ddc9cd0f | 8111 | |
81ecdfbb RW |
8112 | /* Override any GCC internal prototype to avoid an error. |
8113 | Use char because int might match the return type of a GCC | |
8114 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
8115 | #ifdef __cplusplus |
8116 | extern "C" | |
8117 | #endif | |
bec39cab AC |
8118 | char gethostbyname (); |
8119 | int | |
8120 | main () | |
8121 | { | |
81ecdfbb | 8122 | return gethostbyname (); |
bec39cab AC |
8123 | ; |
8124 | return 0; | |
8125 | } | |
8126 | _ACEOF | |
81ecdfbb RW |
8127 | for ac_lib in '' nsl; do |
8128 | if test -z "$ac_lib"; then | |
8129 | ac_res="none required" | |
8130 | else | |
8131 | ac_res=-l$ac_lib | |
b4e70030 | 8132 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8133 | fi |
8134 | if ac_fn_c_try_link "$LINENO"; then : | |
8135 | ac_cv_search_gethostbyname=$ac_res | |
8136 | fi | |
8137 | rm -f core conftest.err conftest.$ac_objext \ | |
8138 | conftest$ac_exeext | |
d0ac1c44 | 8139 | if ${ac_cv_search_gethostbyname+:} false; then : |
81ecdfbb RW |
8140 | break |
8141 | fi | |
8142 | done | |
d0ac1c44 | 8143 | if ${ac_cv_search_gethostbyname+:} false; then : |
ddc9cd0f | 8144 | |
bec39cab | 8145 | else |
81ecdfbb | 8146 | ac_cv_search_gethostbyname=no |
bec39cab | 8147 | fi |
81ecdfbb | 8148 | rm conftest.$ac_ext |
bec39cab AC |
8149 | LIBS=$ac_func_search_save_LIBS |
8150 | fi | |
81ecdfbb RW |
8151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
8152 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
8153 | ac_res=$ac_cv_search_gethostbyname | |
8154 | if test "$ac_res" != no; then : | |
8155 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 8156 | |
bec39cab | 8157 | fi |
96baa820 | 8158 | |
c906108c | 8159 | |
b4e70030 | 8160 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
8161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
8162 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
d0ac1c44 | 8163 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb | 8164 | $as_echo_n "(cached) " >&6 |
b4e70030 JB |
8165 | else |
8166 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 8167 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8168 | /* end confdefs.h. */ |
8169 | ||
81ecdfbb RW |
8170 | /* Override any GCC internal prototype to avoid an error. |
8171 | Use char because int might match the return type of a GCC | |
8172 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
8173 | #ifdef __cplusplus |
8174 | extern "C" | |
8175 | #endif | |
b4e70030 JB |
8176 | char socketpair (); |
8177 | int | |
8178 | main () | |
8179 | { | |
81ecdfbb | 8180 | return socketpair (); |
b4e70030 JB |
8181 | ; |
8182 | return 0; | |
8183 | } | |
8184 | _ACEOF | |
81ecdfbb RW |
8185 | for ac_lib in '' socket; do |
8186 | if test -z "$ac_lib"; then | |
8187 | ac_res="none required" | |
8188 | else | |
8189 | ac_res=-l$ac_lib | |
b4e70030 | 8190 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
8191 | fi |
8192 | if ac_fn_c_try_link "$LINENO"; then : | |
8193 | ac_cv_search_socketpair=$ac_res | |
8194 | fi | |
8195 | rm -f core conftest.err conftest.$ac_objext \ | |
8196 | conftest$ac_exeext | |
d0ac1c44 | 8197 | if ${ac_cv_search_socketpair+:} false; then : |
81ecdfbb RW |
8198 | break |
8199 | fi | |
8200 | done | |
d0ac1c44 | 8201 | if ${ac_cv_search_socketpair+:} false; then : |
b4e70030 | 8202 | |
b4e70030 | 8203 | else |
81ecdfbb | 8204 | ac_cv_search_socketpair=no |
b4e70030 | 8205 | fi |
81ecdfbb | 8206 | rm conftest.$ac_ext |
b4e70030 JB |
8207 | LIBS=$ac_func_search_save_LIBS |
8208 | fi | |
81ecdfbb RW |
8209 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
8210 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
8211 | ac_res=$ac_cv_search_socketpair | |
8212 | if test "$ac_res" != no; then : | |
8213 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
8214 | |
8215 | fi | |
8216 | ||
8217 | ||
233a11ab | 8218 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 | 8219 | |
711a72d3 | 8220 | # Use the system's zlib library. |
39f3de7c L |
8221 | zlibdir="-L\$(top_builddir)/../zlib" |
8222 | zlibinc="-I\$(top_srcdir)/../zlib" | |
b040ad30 | 8223 | |
711a72d3 L |
8224 | # Check whether --with-system-zlib was given. |
8225 | if test "${with_system_zlib+set}" = set; then : | |
afa59b79 L |
8226 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
8227 | zlibdir= | |
8228 | zlibinc= | |
8229 | fi | |
b040ad30 | 8230 | |
233a11ab | 8231 | fi |
233a11ab | 8232 | |
233a11ab | 8233 | |
233a11ab | 8234 | |
b040ad30 | 8235 | |
233a11ab | 8236 | |
77f120bf | 8237 | |
016a3251 DD |
8238 | if test "X$prefix" = "XNONE"; then |
8239 | acl_final_prefix="$ac_default_prefix" | |
8240 | else | |
8241 | acl_final_prefix="$prefix" | |
8242 | fi | |
8243 | if test "X$exec_prefix" = "XNONE"; then | |
8244 | acl_final_exec_prefix='${prefix}' | |
8245 | else | |
8246 | acl_final_exec_prefix="$exec_prefix" | |
8247 | fi | |
8248 | acl_save_prefix="$prefix" | |
8249 | prefix="$acl_final_prefix" | |
8250 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
8251 | prefix="$acl_save_prefix" | |
8252 | ||
8253 | ||
8254 | # Check whether --with-gnu-ld was given. | |
8255 | if test "${with_gnu_ld+set}" = set; then : | |
8256 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
8257 | else | |
8258 | with_gnu_ld=no | |
8259 | fi | |
8260 | ||
8261 | # Prepare PATH_SEPARATOR. | |
8262 | # The user is always right. | |
8263 | if test "${PATH_SEPARATOR+set}" != set; then | |
8264 | echo "#! /bin/sh" >conf$$.sh | |
8265 | echo "exit 0" >>conf$$.sh | |
8266 | chmod +x conf$$.sh | |
8267 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
8268 | PATH_SEPARATOR=';' | |
8269 | else | |
8270 | PATH_SEPARATOR=: | |
8271 | fi | |
8272 | rm -f conf$$.sh | |
8273 | fi | |
8274 | ac_prog=ld | |
8275 | if test "$GCC" = yes; then | |
8276 | # Check if gcc -print-prog-name=ld gives a path. | |
8277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 | |
8278 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
8279 | case $host in | |
8280 | *-*-mingw*) | |
8281 | # gcc leaves a trailing carriage return which upsets mingw | |
8282 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
8283 | *) | |
8284 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
8285 | esac | |
8286 | case $ac_prog in | |
8287 | # Accept absolute paths. | |
8288 | [\\/]* | [A-Za-z]:[\\/]*) | |
8289 | re_direlt='/[^/][^/]*/\.\./' | |
8290 | # Canonicalize the path of ld | |
8291 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
8292 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
8293 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
8294 | done | |
8295 | test -z "$LD" && LD="$ac_prog" | |
8296 | ;; | |
8297 | "") | |
8298 | # If it fails, then pretend we aren't using GCC. | |
8299 | ac_prog=ld | |
8300 | ;; | |
8301 | *) | |
8302 | # If it is relative, then search for the first ld in PATH. | |
8303 | with_gnu_ld=unknown | |
8304 | ;; | |
8305 | esac | |
8306 | elif test "$with_gnu_ld" = yes; then | |
8307 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
8308 | $as_echo_n "checking for GNU ld... " >&6; } | |
8309 | else | |
8310 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
8311 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
8312 | fi | |
d0ac1c44 | 8313 | if ${acl_cv_path_LD+:} false; then : |
016a3251 DD |
8314 | $as_echo_n "(cached) " >&6 |
8315 | else | |
8316 | if test -z "$LD"; then | |
8317 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
8318 | for ac_dir in $PATH; do | |
8319 | test -z "$ac_dir" && ac_dir=. | |
8320 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
8321 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
8322 | # Check to see if the program is GNU ld. I'd rather use --version, | |
8323 | # but apparently some GNU ld's only accept -v. | |
8324 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
8325 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
8326 | test "$with_gnu_ld" != no && break | |
8327 | else | |
8328 | test "$with_gnu_ld" != yes && break | |
8329 | fi | |
8330 | fi | |
8331 | done | |
8332 | IFS="$ac_save_ifs" | |
8333 | else | |
8334 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
8335 | fi | |
8336 | fi | |
8337 | ||
8338 | LD="$acl_cv_path_LD" | |
8339 | if test -n "$LD"; then | |
8340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
8341 | $as_echo "$LD" >&6; } | |
8342 | else | |
8343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8344 | $as_echo "no" >&6; } | |
8345 | fi | |
d0ac1c44 | 8346 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
016a3251 DD |
8347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
8348 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
d0ac1c44 | 8349 | if ${acl_cv_prog_gnu_ld+:} false; then : |
016a3251 DD |
8350 | $as_echo_n "(cached) " >&6 |
8351 | else | |
8352 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
8353 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
8354 | acl_cv_prog_gnu_ld=yes | |
8355 | else | |
8356 | acl_cv_prog_gnu_ld=no | |
8357 | fi | |
8358 | fi | |
8359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
8360 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
8361 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
8362 | ||
8363 | ||
8364 | ||
8365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
8366 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
d0ac1c44 | 8367 | if ${acl_cv_rpath+:} false; then : |
016a3251 DD |
8368 | $as_echo_n "(cached) " >&6 |
8369 | else | |
8370 | ||
8371 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
8372 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
8373 | . ./conftest.sh | |
8374 | rm -f ./conftest.sh | |
8375 | acl_cv_rpath=done | |
8376 | ||
8377 | fi | |
8378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
8379 | $as_echo "$acl_cv_rpath" >&6; } | |
8380 | wl="$acl_cv_wl" | |
8381 | libext="$acl_cv_libext" | |
8382 | shlibext="$acl_cv_shlibext" | |
8383 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
8384 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
8385 | hardcode_direct="$acl_cv_hardcode_direct" | |
8386 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
8387 | # Check whether --enable-rpath was given. | |
8388 | if test "${enable_rpath+set}" = set; then : | |
8389 | enableval=$enable_rpath; : | |
8390 | else | |
8391 | enable_rpath=yes | |
8392 | fi | |
8393 | ||
8394 | ||
8395 | ||
8396 | ||
8397 | ||
8398 | ||
8399 | ||
8400 | ||
8401 | use_additional=yes | |
8402 | ||
8403 | acl_save_prefix="$prefix" | |
8404 | prefix="$acl_final_prefix" | |
8405 | acl_save_exec_prefix="$exec_prefix" | |
8406 | exec_prefix="$acl_final_exec_prefix" | |
8407 | ||
8408 | eval additional_includedir=\"$includedir\" | |
8409 | eval additional_libdir=\"$libdir\" | |
8410 | ||
8411 | exec_prefix="$acl_save_exec_prefix" | |
8412 | prefix="$acl_save_prefix" | |
77f120bf | 8413 | |
6c7a06a3 | 8414 | |
81ecdfbb RW |
8415 | # Check whether --with-libiconv-prefix was given. |
8416 | if test "${with_libiconv_prefix+set}" = set; then : | |
8417 | withval=$with_libiconv_prefix; | |
016a3251 DD |
8418 | if test "X$withval" = "Xno"; then |
8419 | use_additional=no | |
8420 | else | |
8421 | if test "X$withval" = "X"; then | |
8422 | ||
8423 | acl_save_prefix="$prefix" | |
8424 | prefix="$acl_final_prefix" | |
8425 | acl_save_exec_prefix="$exec_prefix" | |
8426 | exec_prefix="$acl_final_exec_prefix" | |
8427 | ||
8428 | eval additional_includedir=\"$includedir\" | |
8429 | eval additional_libdir=\"$libdir\" | |
8430 | ||
8431 | exec_prefix="$acl_save_exec_prefix" | |
8432 | prefix="$acl_save_prefix" | |
8433 | ||
8434 | else | |
8435 | additional_includedir="$withval/include" | |
8436 | additional_libdir="$withval/lib" | |
8437 | fi | |
8438 | fi | |
6c7a06a3 | 8439 | |
81ecdfbb RW |
8440 | fi |
8441 | ||
9f1528a1 AB |
8442 | |
8443 | # Check whether --with-libiconv-type was given. | |
8444 | if test "${with_libiconv_type+set}" = set; then : | |
8445 | withval=$with_libiconv_type; with_libiconv_type=$withval | |
8446 | else | |
8447 | with_libiconv_type=auto | |
8448 | fi | |
8449 | ||
8450 | lib_type=`eval echo \$with_libiconv_type` | |
8451 | ||
016a3251 DD |
8452 | LIBICONV= |
8453 | LTLIBICONV= | |
8454 | INCICONV= | |
8455 | rpathdirs= | |
8456 | ltrpathdirs= | |
8457 | names_already_handled= | |
8458 | names_next_round='iconv ' | |
8459 | while test -n "$names_next_round"; do | |
8460 | names_this_round="$names_next_round" | |
8461 | names_next_round= | |
8462 | for name in $names_this_round; do | |
8463 | already_handled= | |
8464 | for n in $names_already_handled; do | |
8465 | if test "$n" = "$name"; then | |
8466 | already_handled=yes | |
8467 | break | |
8468 | fi | |
8469 | done | |
8470 | if test -z "$already_handled"; then | |
8471 | names_already_handled="$names_already_handled $name" | |
8472 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8473 | eval value=\"\$HAVE_LIB$uppername\" | |
8474 | if test -n "$value"; then | |
8475 | if test "$value" = yes; then | |
8476 | eval value=\"\$LIB$uppername\" | |
8477 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
8478 | eval value=\"\$LTLIB$uppername\" | |
8479 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
8480 | else | |
8481 | : | |
8482 | fi | |
8483 | else | |
8484 | found_dir= | |
8485 | found_la= | |
8486 | found_so= | |
8487 | found_a= | |
8488 | if test $use_additional = yes; then | |
9f1528a1 | 8489 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8490 | found_dir="$additional_libdir" |
8491 | found_so="$additional_libdir/lib$name.$shlibext" | |
8492 | if test -f "$additional_libdir/lib$name.la"; then | |
8493 | found_la="$additional_libdir/lib$name.la" | |
8494 | fi | |
9f1528a1 | 8495 | elif test x$lib_type != xshared; then |
016a3251 DD |
8496 | if test -f "$additional_libdir/lib$name.$libext"; then |
8497 | found_dir="$additional_libdir" | |
8498 | found_a="$additional_libdir/lib$name.$libext" | |
8499 | if test -f "$additional_libdir/lib$name.la"; then | |
8500 | found_la="$additional_libdir/lib$name.la" | |
8501 | fi | |
8502 | fi | |
8503 | fi | |
8504 | fi | |
8505 | if test "X$found_dir" = "X"; then | |
8506 | for x in $LDFLAGS $LTLIBICONV; do | |
8507 | ||
8508 | acl_save_prefix="$prefix" | |
8509 | prefix="$acl_final_prefix" | |
8510 | acl_save_exec_prefix="$exec_prefix" | |
8511 | exec_prefix="$acl_final_exec_prefix" | |
8512 | eval x=\"$x\" | |
8513 | exec_prefix="$acl_save_exec_prefix" | |
8514 | prefix="$acl_save_prefix" | |
8515 | ||
8516 | case "$x" in | |
8517 | -L*) | |
8518 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 8519 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
016a3251 DD |
8520 | found_dir="$dir" |
8521 | found_so="$dir/lib$name.$shlibext" | |
8522 | if test -f "$dir/lib$name.la"; then | |
8523 | found_la="$dir/lib$name.la" | |
8524 | fi | |
9f1528a1 | 8525 | elif test x$lib_type != xshared; then |
016a3251 DD |
8526 | if test -f "$dir/lib$name.$libext"; then |
8527 | found_dir="$dir" | |
8528 | found_a="$dir/lib$name.$libext" | |
8529 | if test -f "$dir/lib$name.la"; then | |
8530 | found_la="$dir/lib$name.la" | |
8531 | fi | |
8532 | fi | |
8533 | fi | |
8534 | ;; | |
8535 | esac | |
8536 | if test "X$found_dir" != "X"; then | |
8537 | break | |
8538 | fi | |
8539 | done | |
8540 | fi | |
8541 | if test "X$found_dir" != "X"; then | |
8542 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
8543 | if test "X$found_so" != "X"; then | |
8544 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8545 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8546 | else | |
8547 | haveit= | |
8548 | for x in $ltrpathdirs; do | |
8549 | if test "X$x" = "X$found_dir"; then | |
8550 | haveit=yes | |
8551 | break | |
8552 | fi | |
8553 | done | |
8554 | if test -z "$haveit"; then | |
8555 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8556 | fi | |
8557 | if test "$hardcode_direct" = yes; then | |
8558 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8559 | else | |
8560 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8561 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8562 | haveit= | |
8563 | for x in $rpathdirs; do | |
8564 | if test "X$x" = "X$found_dir"; then | |
8565 | haveit=yes | |
8566 | break | |
8567 | fi | |
8568 | done | |
8569 | if test -z "$haveit"; then | |
8570 | rpathdirs="$rpathdirs $found_dir" | |
8571 | fi | |
8572 | else | |
8573 | haveit= | |
8574 | for x in $LDFLAGS $LIBICONV; do | |
8575 | ||
8576 | acl_save_prefix="$prefix" | |
8577 | prefix="$acl_final_prefix" | |
8578 | acl_save_exec_prefix="$exec_prefix" | |
8579 | exec_prefix="$acl_final_exec_prefix" | |
8580 | eval x=\"$x\" | |
8581 | exec_prefix="$acl_save_exec_prefix" | |
8582 | prefix="$acl_save_prefix" | |
8583 | ||
8584 | if test "X$x" = "X-L$found_dir"; then | |
8585 | haveit=yes | |
8586 | break | |
8587 | fi | |
8588 | done | |
8589 | if test -z "$haveit"; then | |
8590 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
8591 | fi | |
8592 | if test "$hardcode_minus_L" != no; then | |
8593 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
8594 | else | |
8595 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8596 | fi | |
8597 | fi | |
8598 | fi | |
8599 | fi | |
8600 | else | |
8601 | if test "X$found_a" != "X"; then | |
8602 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
8603 | else | |
8604 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
8605 | fi | |
8606 | fi | |
8607 | additional_includedir= | |
8608 | case "$found_dir" in | |
8609 | */lib | */lib/) | |
8610 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8611 | additional_includedir="$basedir/include" | |
8612 | ;; | |
8613 | esac | |
8614 | if test "X$additional_includedir" != "X"; then | |
8615 | if test "X$additional_includedir" != "X/usr/include"; then | |
8616 | haveit= | |
8617 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8618 | if test -n "$GCC"; then | |
8619 | case $host_os in | |
8620 | linux*) haveit=yes;; | |
8621 | esac | |
8622 | fi | |
8623 | fi | |
8624 | if test -z "$haveit"; then | |
8625 | for x in $CPPFLAGS $INCICONV; do | |
8626 | ||
8627 | acl_save_prefix="$prefix" | |
8628 | prefix="$acl_final_prefix" | |
8629 | acl_save_exec_prefix="$exec_prefix" | |
8630 | exec_prefix="$acl_final_exec_prefix" | |
8631 | eval x=\"$x\" | |
8632 | exec_prefix="$acl_save_exec_prefix" | |
8633 | prefix="$acl_save_prefix" | |
8634 | ||
8635 | if test "X$x" = "X-I$additional_includedir"; then | |
8636 | haveit=yes | |
8637 | break | |
8638 | fi | |
8639 | done | |
8640 | if test -z "$haveit"; then | |
8641 | if test -d "$additional_includedir"; then | |
8642 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
8643 | fi | |
8644 | fi | |
8645 | fi | |
8646 | fi | |
8647 | fi | |
8648 | if test -n "$found_la"; then | |
8649 | save_libdir="$libdir" | |
8650 | case "$found_la" in | |
8651 | */* | *\\*) . "$found_la" ;; | |
8652 | *) . "./$found_la" ;; | |
8653 | esac | |
8654 | libdir="$save_libdir" | |
8655 | for dep in $dependency_libs; do | |
8656 | case "$dep" in | |
8657 | -L*) | |
8658 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8659 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8660 | haveit= | |
8661 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8662 | if test -n "$GCC"; then | |
8663 | case $host_os in | |
8664 | linux*) haveit=yes;; | |
8665 | esac | |
8666 | fi | |
8667 | fi | |
8668 | if test -z "$haveit"; then | |
8669 | haveit= | |
8670 | for x in $LDFLAGS $LIBICONV; do | |
8671 | ||
8672 | acl_save_prefix="$prefix" | |
8673 | prefix="$acl_final_prefix" | |
8674 | acl_save_exec_prefix="$exec_prefix" | |
8675 | exec_prefix="$acl_final_exec_prefix" | |
8676 | eval x=\"$x\" | |
8677 | exec_prefix="$acl_save_exec_prefix" | |
8678 | prefix="$acl_save_prefix" | |
8679 | ||
8680 | if test "X$x" = "X-L$additional_libdir"; then | |
8681 | haveit=yes | |
8682 | break | |
8683 | fi | |
8684 | done | |
8685 | if test -z "$haveit"; then | |
8686 | if test -d "$additional_libdir"; then | |
8687 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
8688 | fi | |
8689 | fi | |
8690 | haveit= | |
8691 | for x in $LDFLAGS $LTLIBICONV; do | |
8692 | ||
8693 | acl_save_prefix="$prefix" | |
8694 | prefix="$acl_final_prefix" | |
8695 | acl_save_exec_prefix="$exec_prefix" | |
8696 | exec_prefix="$acl_final_exec_prefix" | |
8697 | eval x=\"$x\" | |
8698 | exec_prefix="$acl_save_exec_prefix" | |
8699 | prefix="$acl_save_prefix" | |
8700 | ||
8701 | if test "X$x" = "X-L$additional_libdir"; then | |
8702 | haveit=yes | |
8703 | break | |
8704 | fi | |
8705 | done | |
8706 | if test -z "$haveit"; then | |
8707 | if test -d "$additional_libdir"; then | |
8708 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
8709 | fi | |
8710 | fi | |
8711 | fi | |
8712 | fi | |
8713 | ;; | |
8714 | -R*) | |
8715 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8716 | if test "$enable_rpath" != no; then | |
8717 | haveit= | |
8718 | for x in $rpathdirs; do | |
8719 | if test "X$x" = "X$dir"; then | |
8720 | haveit=yes | |
8721 | break | |
8722 | fi | |
8723 | done | |
8724 | if test -z "$haveit"; then | |
8725 | rpathdirs="$rpathdirs $dir" | |
8726 | fi | |
8727 | haveit= | |
8728 | for x in $ltrpathdirs; do | |
8729 | if test "X$x" = "X$dir"; then | |
8730 | haveit=yes | |
8731 | break | |
8732 | fi | |
8733 | done | |
8734 | if test -z "$haveit"; then | |
8735 | ltrpathdirs="$ltrpathdirs $dir" | |
8736 | fi | |
8737 | fi | |
8738 | ;; | |
8739 | -l*) | |
8740 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8741 | ;; | |
8742 | *.la) | |
8743 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8744 | ;; | |
8745 | *) | |
8746 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8747 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8748 | ;; | |
8749 | esac | |
8750 | done | |
8751 | fi | |
8752 | else | |
9f1528a1 AB |
8753 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
8754 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8755 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8756 | else | |
8757 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext" | |
8758 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext" | |
8759 | fi | |
016a3251 DD |
8760 | fi |
8761 | fi | |
8762 | fi | |
8763 | done | |
8764 | done | |
8765 | if test "X$rpathdirs" != "X"; then | |
8766 | if test -n "$hardcode_libdir_separator"; then | |
8767 | alldirs= | |
8768 | for found_dir in $rpathdirs; do | |
8769 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8770 | done | |
8771 | acl_save_libdir="$libdir" | |
8772 | libdir="$alldirs" | |
8773 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8774 | libdir="$acl_save_libdir" | |
8775 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8776 | else | |
8777 | for found_dir in $rpathdirs; do | |
8778 | acl_save_libdir="$libdir" | |
8779 | libdir="$found_dir" | |
8780 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8781 | libdir="$acl_save_libdir" | |
8782 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8783 | done | |
8784 | fi | |
8785 | fi | |
8786 | if test "X$ltrpathdirs" != "X"; then | |
8787 | for found_dir in $ltrpathdirs; do | |
8788 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8789 | done | |
8790 | fi | |
8791 | ||
8792 | ||
8793 | ||
8794 | ||
8795 | ||
6c7a06a3 | 8796 | |
6c7a06a3 | 8797 | |
81ecdfbb RW |
8798 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
8799 | $as_echo_n "checking for iconv... " >&6; } | |
d0ac1c44 | 8800 | if ${am_cv_func_iconv+:} false; then : |
81ecdfbb | 8801 | $as_echo_n "(cached) " >&6 |
d542061a | 8802 | else |
6c7a06a3 TT |
8803 | |
8804 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8805 | am_cv_lib_iconv=no | |
016a3251 DD |
8806 | am_save_CPPFLAGS="$CPPFLAGS" |
8807 | CPPFLAGS="$CPPFLAGS $INCICONV" | |
8808 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8809 | /* end confdefs.h. */ |
6c7a06a3 TT |
8810 | #include <stdlib.h> |
8811 | #include <iconv.h> | |
d542061a UW |
8812 | int |
8813 | main () | |
8814 | { | |
6c7a06a3 | 8815 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8816 | iconv(cd,NULL,NULL,NULL,NULL); |
8817 | iconv_close(cd); | |
d542061a UW |
8818 | ; |
8819 | return 0; | |
8820 | } | |
8821 | _ACEOF | |
81ecdfbb | 8822 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 | 8823 | am_cv_func_iconv=yes |
d542061a | 8824 | fi |
81ecdfbb RW |
8825 | rm -f core conftest.err conftest.$ac_objext \ |
8826 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 | 8827 | CPPFLAGS="$am_save_CPPFLAGS" |
94ae1714 | 8828 | |
016a3251 DD |
8829 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
8830 | for _libs in .libs _libs; do | |
8831 | am_save_CPPFLAGS="$CPPFLAGS" | |
8832 | am_save_LIBS="$LIBS" | |
8833 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" | |
8834 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" | |
8835 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 8836 | /* end confdefs.h. */ |
6c7a06a3 TT |
8837 | #include <stdlib.h> |
8838 | #include <iconv.h> | |
d542061a UW |
8839 | int |
8840 | main () | |
8841 | { | |
6c7a06a3 | 8842 | iconv_t cd = iconv_open("",""); |
016a3251 DD |
8843 | iconv(cd,NULL,NULL,NULL,NULL); |
8844 | iconv_close(cd); | |
d542061a UW |
8845 | ; |
8846 | return 0; | |
8847 | } | |
8848 | _ACEOF | |
81ecdfbb | 8849 | if ac_fn_c_try_link "$LINENO"; then : |
016a3251 DD |
8850 | INCICONV="-I../libiconv/include" |
8851 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a | |
8852 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la | |
8853 | am_cv_lib_iconv=yes | |
8854 | am_cv_func_iconv=yes | |
d542061a | 8855 | fi |
81ecdfbb RW |
8856 | rm -f core conftest.err conftest.$ac_objext \ |
8857 | conftest$ac_exeext conftest.$ac_ext | |
016a3251 DD |
8858 | CPPFLAGS="$am_save_CPPFLAGS" |
8859 | LIBS="$am_save_LIBS" | |
8860 | if test "$am_cv_func_iconv" = "yes"; then | |
8861 | break | |
8862 | fi | |
8863 | done | |
77f120bf | 8864 | fi |
94ae1714 | 8865 | |
4edb1e84 | 8866 | if test "$am_cv_func_iconv" != yes; then |
6c7a06a3 | 8867 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 | 8868 | am_save_LIBS="$LIBS" |
5d762de0 | 8869 | CPPFLAGS="$CPPFLAGS $INCICONV" |
016a3251 | 8870 | LIBS="$LIBS $LIBICONV" |
81ecdfbb | 8871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8872 | /* end confdefs.h. */ |
6c7a06a3 TT |
8873 | #include <stdlib.h> |
8874 | #include <iconv.h> | |
bec39cab AC |
8875 | int |
8876 | main () | |
8877 | { | |
6c7a06a3 TT |
8878 | iconv_t cd = iconv_open("",""); |
8879 | iconv(cd,NULL,NULL,NULL,NULL); | |
8880 | iconv_close(cd); | |
bec39cab AC |
8881 | ; |
8882 | return 0; | |
8883 | } | |
8884 | _ACEOF | |
81ecdfbb | 8885 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 8886 | am_cv_lib_iconv=yes |
6c7a06a3 | 8887 | am_cv_func_iconv=yes |
627af7ea | 8888 | fi |
81ecdfbb RW |
8889 | rm -f core conftest.err conftest.$ac_objext \ |
8890 | conftest$ac_exeext conftest.$ac_ext | |
fc3b640d | 8891 | CPPFLAGS="$am_save_CPPFLAGS" |
016a3251 | 8892 | LIBS="$am_save_LIBS" |
6c7a06a3 TT |
8893 | fi |
8894 | ||
8895 | fi | |
81ecdfbb RW |
8896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
8897 | $as_echo "$am_cv_func_iconv" >&6; } | |
016a3251 DD |
8898 | if test "$am_cv_func_iconv" = yes; then |
8899 | ||
8900 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h | |
94ae1714 | 8901 | |
016a3251 | 8902 | fi |
fc3b640d | 8903 | if test "$am_cv_lib_iconv" = yes; then |
016a3251 DD |
8904 | |
8905 | for element in $INCICONV; do | |
8906 | haveit= | |
8907 | for x in $CPPFLAGS; do | |
8908 | ||
8909 | acl_save_prefix="$prefix" | |
8910 | prefix="$acl_final_prefix" | |
8911 | acl_save_exec_prefix="$exec_prefix" | |
8912 | exec_prefix="$acl_final_exec_prefix" | |
8913 | eval x=\"$x\" | |
8914 | exec_prefix="$acl_save_exec_prefix" | |
8915 | prefix="$acl_save_prefix" | |
8916 | ||
8917 | if test "X$x" = "X$element"; then | |
8918 | haveit=yes | |
8919 | break | |
8920 | fi | |
8921 | done | |
8922 | if test -z "$haveit"; then | |
8923 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8924 | fi | |
8925 | done | |
8926 | ||
8927 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
8928 | $as_echo_n "checking how to link with libiconv... " >&6; } | |
8929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
8930 | $as_echo "$LIBICONV" >&6; } | |
94ae1714 | 8931 | else |
016a3251 DD |
8932 | LIBICONV= |
8933 | LTLIBICONV= | |
fc3b640d | 8934 | fi |
94ae1714 | 8935 | |
6c7a06a3 | 8936 | |
6c7a06a3 | 8937 | |
016a3251 | 8938 | if test "$am_cv_func_iconv" = yes; then |
81ecdfbb RW |
8939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
8940 | $as_echo_n "checking for iconv declaration... " >&6; } | |
d0ac1c44 | 8941 | if ${am_cv_proto_iconv+:} false; then : |
81ecdfbb | 8942 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
8943 | else |
8944 | ||
81ecdfbb | 8945 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
8946 | /* end confdefs.h. */ |
8947 | ||
6c7a06a3 TT |
8948 | #include <stdlib.h> |
8949 | #include <iconv.h> | |
8950 | extern | |
b4e70030 | 8951 | #ifdef __cplusplus |
6c7a06a3 | 8952 | "C" |
b4e70030 | 8953 | #endif |
6c7a06a3 TT |
8954 | #if defined(__STDC__) || defined(__cplusplus) |
8955 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8956 | #else | |
8957 | size_t iconv(); | |
8958 | #endif | |
8959 | ||
b4e70030 JB |
8960 | int |
8961 | main () | |
8962 | { | |
6c7a06a3 | 8963 | |
b4e70030 JB |
8964 | ; |
8965 | return 0; | |
8966 | } | |
8967 | _ACEOF | |
81ecdfbb | 8968 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 8969 | am_cv_proto_iconv_arg1="" |
4e8d927d | 8970 | else |
81ecdfbb | 8971 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 8972 | fi |
81ecdfbb | 8973 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
8974 | 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);" |
8975 | fi | |
8976 | ||
8977 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 8978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 8979 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
8980 | $as_echo "${ac_t:- |
8981 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
8982 | |
8983 | cat >>confdefs.h <<_ACEOF | |
8984 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
8985 | _ACEOF | |
8986 | ||
8987 | fi | |
6c7a06a3 TT |
8988 | |
8989 | ||
478aac75 DE |
8990 | # GDB may fork/exec the iconv program to get the list of supported character |
8991 | # sets. Allow the user to specify where to find it. | |
8992 | # There are several factors affecting the choice of option name: | |
8993 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
8994 | # the build-time location of libiconv files. | |
8995 | # - The program we need to find is iconv, which comes with glibc. The user | |
8996 | # doesn't necessarily have libiconv installed. Therefore naming this | |
8997 | # --with-libiconv-foo feels wrong. | |
8998 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
8999 | # defined to work on directories not files (though it really doesn't know | |
9000 | # the difference). | |
9001 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
9002 | # with --with-libiconv-prefix. | |
9003 | # Putting these together is why the option name is --with-iconv-bin. | |
9004 | ||
9005 | ||
9006 | # Check whether --with-iconv-bin was given. | |
9007 | if test "${with_iconv_bin+set}" = set; then : | |
9008 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
9009 | ||
9010 | cat >>confdefs.h <<_ACEOF | |
9011 | #define ICONV_BIN "${iconv_bin}" | |
9012 | _ACEOF | |
9013 | ||
9014 | ||
9015 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9016 | if test "x$prefix" = xNONE; then | |
9017 | test_prefix=/usr/local | |
9018 | else | |
9019 | test_prefix=$prefix | |
9020 | fi | |
9021 | else | |
9022 | test_prefix=$exec_prefix | |
9023 | fi | |
9024 | value=0 | |
9025 | case ${iconv_bin} in | |
9026 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9027 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9028 | value=1 | |
9029 | ;; | |
9030 | esac | |
9031 | ||
9032 | cat >>confdefs.h <<_ACEOF | |
9033 | #define ICONV_BIN_RELOCATABLE $value | |
9034 | _ACEOF | |
9035 | ||
9036 | ||
9037 | ||
9038 | fi | |
9039 | ||
9040 | ||
cb01cfba | 9041 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 9042 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
9043 | prefer_curses=yes |
9044 | fi | |
9045 | ||
9046 | curses_found=no | |
9047 | if test x"$prefer_curses" = xyes; then | |
9048 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
9049 | # curses library because the latter might not provide all the | |
9050 | # functionality we need. However, this leads to problems on systems | |
9051 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
9052 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
9053 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
9054 | # a situation. | |
81ecdfbb RW |
9055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
9056 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
d0ac1c44 | 9057 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9058 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9059 | else |
9060 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9062 | /* end confdefs.h. */ |
9063 | ||
81ecdfbb RW |
9064 | /* Override any GCC internal prototype to avoid an error. |
9065 | Use char because int might match the return type of a GCC | |
9066 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9067 | #ifdef __cplusplus |
9068 | extern "C" | |
9069 | #endif | |
6c7a06a3 TT |
9070 | char waddstr (); |
9071 | int | |
9072 | main () | |
9073 | { | |
81ecdfbb | 9074 | return waddstr (); |
6c7a06a3 TT |
9075 | ; |
9076 | return 0; | |
9077 | } | |
9078 | _ACEOF | |
5007d765 | 9079 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
81ecdfbb RW |
9080 | if test -z "$ac_lib"; then |
9081 | ac_res="none required" | |
9082 | else | |
9083 | ac_res=-l$ac_lib | |
9084 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9085 | fi | |
9086 | if ac_fn_c_try_link "$LINENO"; then : | |
9087 | ac_cv_search_waddstr=$ac_res | |
9088 | fi | |
9089 | rm -f core conftest.err conftest.$ac_objext \ | |
9090 | conftest$ac_exeext | |
d0ac1c44 | 9091 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb RW |
9092 | break |
9093 | fi | |
9094 | done | |
d0ac1c44 | 9095 | if ${ac_cv_search_waddstr+:} false; then : |
81ecdfbb | 9096 | |
6c7a06a3 | 9097 | else |
81ecdfbb RW |
9098 | ac_cv_search_waddstr=no |
9099 | fi | |
9100 | rm conftest.$ac_ext | |
9101 | LIBS=$ac_func_search_save_LIBS | |
9102 | fi | |
9103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
9104 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
9105 | ac_res=$ac_cv_search_waddstr | |
9106 | if test "$ac_res" != no; then : | |
9107 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
9108 | |
9109 | fi | |
9110 | ||
9111 | ||
cb01cfba JB |
9112 | if test "$ac_cv_search_waddstr" != no; then |
9113 | curses_found=yes | |
9114 | fi | |
9115 | fi | |
9116 | ||
9117 | # Check whether we should enable the TUI, but only do so if we really | |
9118 | # can. | |
9119 | if test x"$enable_tui" != xno; then | |
0ad6b8ee | 9120 | if test -d "$srcdir/tui"; then |
cb01cfba | 9121 | if test "$curses_found" != no; then |
6c7a06a3 TT |
9122 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
9123 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
9124 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
9125 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
9126 | else |
9127 | if test x"$enable_tui" = xyes; then | |
d0ac1c44 | 9128 | as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 9129 | else |
81ecdfbb RW |
9130 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
9131 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
9132 | fi |
9133 | fi | |
9134 | fi | |
9135 | fi | |
9136 | ||
9137 | # Since GDB uses Readline, we need termcap functionality. In many | |
9138 | # cases this will be provided by the curses library, but some systems | |
96fe4562 | 9139 | # have a separate termcap library, or no curses library at all. |
6c7a06a3 TT |
9140 | |
9141 | case $host_os in | |
9142 | cygwin*) | |
0ad6b8ee | 9143 | if test -d "$srcdir/libtermcap"; then |
6c7a06a3 TT |
9144 | LIBS="../libtermcap/libtermcap.a $LIBS" |
9145 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
9146 | fi ;; | |
9147 | go32* | *djgpp*) | |
9148 | ac_cv_search_tgetent="none required" | |
9149 | ;; | |
6c7a06a3 TT |
9150 | esac |
9151 | ||
9152 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
9153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
9154 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
d0ac1c44 | 9155 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb | 9156 | $as_echo_n "(cached) " >&6 |
6c7a06a3 TT |
9157 | else |
9158 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 9159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
9160 | /* end confdefs.h. */ |
9161 | ||
81ecdfbb RW |
9162 | /* Override any GCC internal prototype to avoid an error. |
9163 | Use char because int might match the return type of a GCC | |
9164 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
9165 | #ifdef __cplusplus |
9166 | extern "C" | |
9167 | #endif | |
6c7a06a3 TT |
9168 | char tgetent (); |
9169 | int | |
9170 | main () | |
9171 | { | |
81ecdfbb | 9172 | return tgetent (); |
6c7a06a3 TT |
9173 | ; |
9174 | return 0; | |
9175 | } | |
9176 | _ACEOF | |
2578ecb1 | 9177 | for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do |
81ecdfbb RW |
9178 | if test -z "$ac_lib"; then |
9179 | ac_res="none required" | |
9180 | else | |
9181 | ac_res=-l$ac_lib | |
6c7a06a3 | 9182 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
9183 | fi |
9184 | if ac_fn_c_try_link "$LINENO"; then : | |
9185 | ac_cv_search_tgetent=$ac_res | |
9186 | fi | |
9187 | rm -f core conftest.err conftest.$ac_objext \ | |
9188 | conftest$ac_exeext | |
d0ac1c44 | 9189 | if ${ac_cv_search_tgetent+:} false; then : |
81ecdfbb RW |
9190 | break |
9191 | fi | |
9192 | done | |
d0ac1c44 | 9193 | if ${ac_cv_search_tgetent+:} false; then : |
6c7a06a3 | 9194 | |
6c7a06a3 | 9195 | else |
81ecdfbb | 9196 | ac_cv_search_tgetent=no |
6c7a06a3 | 9197 | fi |
81ecdfbb | 9198 | rm conftest.$ac_ext |
6c7a06a3 TT |
9199 | LIBS=$ac_func_search_save_LIBS |
9200 | fi | |
81ecdfbb RW |
9201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
9202 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
9203 | ac_res=$ac_cv_search_tgetent | |
9204 | if test "$ac_res" != no; then : | |
9205 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 9206 | |
06825bd1 MK |
9207 | fi |
9208 | ||
06825bd1 | 9209 | |
bec39cab | 9210 | if test "$ac_cv_search_tgetent" = no; then |
7a85168d | 9211 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
8ee53726 MK |
9212 | fi |
9213 | ||
3841debe | 9214 | |
81ecdfbb RW |
9215 | # Check whether --with-system-readline was given. |
9216 | if test "${with_system_readline+set}" = set; then : | |
9217 | withval=$with_system_readline; | |
9218 | fi | |
6a30b0a5 | 9219 | |
6a30b0a5 AS |
9220 | |
9221 | if test "$with_system_readline" = yes; then | |
5593a99a | 9222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 |
86c6b807 TT |
9223 | $as_echo_n "checking whether system readline is new enough... " >&6; } |
9224 | if ${gdb_cv_readline_ok+:} false; then : | |
9225 | $as_echo_n "(cached) " >&6 | |
9226 | else | |
9227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9228 | /* end confdefs.h. */ | |
9229 | #include <stdio.h> | |
5593a99a | 9230 | #include <readline/readline.h> |
86c6b807 TT |
9231 | int |
9232 | main () | |
9233 | { | |
9234 | #if RL_VERSION_MAJOR < 7 | |
5593a99a SM |
9235 | # error "readline version 7 required" |
9236 | #endif | |
9237 | ||
86c6b807 TT |
9238 | ; |
9239 | return 0; | |
9240 | } | |
9241 | _ACEOF | |
9242 | if ac_fn_c_try_compile "$LINENO"; then : | |
9243 | gdb_cv_readline_ok=yes | |
9244 | else | |
9245 | gdb_cv_readline_ok=no | |
5593a99a | 9246 | |
86c6b807 TT |
9247 | fi |
9248 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5593a99a | 9249 | |
86c6b807 TT |
9250 | fi |
9251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 | |
9252 | $as_echo "$gdb_cv_readline_ok" >&6; } | |
9253 | if test "$gdb_cv_readline_ok" != yes; then | |
9254 | as_fn_error $? "system readline is not new enough" "$LINENO" 5 | |
9255 | fi | |
9256 | ||
6a30b0a5 AS |
9257 | READLINE=-lreadline |
9258 | READLINE_DEPS= | |
9259 | READLINE_CFLAGS= | |
39037522 | 9260 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
9261 | else |
9262 | READLINE='$(READLINE_DIR)/libreadline.a' | |
9263 | READLINE_DEPS='$(READLINE)' | |
9264 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 9265 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
9266 | fi |
9267 | ||
9268 | ||
9269 | ||
9270 | ||
9271 | ||
f997c383 SD |
9272 | # Generate jit-reader.h |
9273 | ||
9274 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
9275 | TARGET_PTR= | |
9276 | ||
9277 | # The cast to long int works around a bug in the HP C Compiler | |
9278 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9279 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9280 | # This bug is HP SR number 8606223364. | |
9281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
9282 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
d0ac1c44 | 9283 | if ${ac_cv_sizeof_unsigned_long_long+:} false; then : |
f997c383 SD |
9284 | $as_echo_n "(cached) " >&6 |
9285 | else | |
9286 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
9287 | ||
9288 | else | |
9289 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
9290 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9291 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9292 | as_fn_error 77 "cannot compute sizeof (unsigned long long) |
9293 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9294 | else |
9295 | ac_cv_sizeof_unsigned_long_long=0 | |
9296 | fi | |
9297 | fi | |
9298 | ||
9299 | fi | |
9300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
9301 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
9302 | ||
9303 | ||
9304 | ||
9305 | cat >>confdefs.h <<_ACEOF | |
9306 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
9307 | _ACEOF | |
9308 | ||
9309 | ||
9310 | # The cast to long int works around a bug in the HP C Compiler | |
9311 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9312 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9313 | # This bug is HP SR number 8606223364. | |
9314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
9315 | $as_echo_n "checking size of unsigned long... " >&6; } | |
d0ac1c44 | 9316 | if ${ac_cv_sizeof_unsigned_long+:} false; then : |
f997c383 SD |
9317 | $as_echo_n "(cached) " >&6 |
9318 | else | |
9319 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
9320 | ||
9321 | else | |
9322 | if test "$ac_cv_type_unsigned_long" = yes; then | |
9323 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9324 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9325 | as_fn_error 77 "cannot compute sizeof (unsigned long) |
9326 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9327 | else |
9328 | ac_cv_sizeof_unsigned_long=0 | |
9329 | fi | |
9330 | fi | |
9331 | ||
9332 | fi | |
9333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
9334 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
9335 | ||
9336 | ||
9337 | ||
9338 | cat >>confdefs.h <<_ACEOF | |
9339 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
9340 | _ACEOF | |
9341 | ||
9342 | ||
9343 | # The cast to long int works around a bug in the HP C Compiler | |
9344 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9345 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9346 | # This bug is HP SR number 8606223364. | |
9347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
9348 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
d0ac1c44 | 9349 | if ${ac_cv_sizeof_unsigned___int128+:} false; then : |
f997c383 SD |
9350 | $as_echo_n "(cached) " >&6 |
9351 | else | |
9352 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
9353 | ||
9354 | else | |
9355 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
9356 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9357 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
9358 | as_fn_error 77 "cannot compute sizeof (unsigned __int128) |
9359 | See \`config.log' for more details" "$LINENO" 5; } | |
f997c383 SD |
9360 | else |
9361 | ac_cv_sizeof_unsigned___int128=0 | |
9362 | fi | |
9363 | fi | |
9364 | ||
9365 | fi | |
9366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
9367 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
9368 | ||
9369 | ||
9370 | ||
9371 | cat >>confdefs.h <<_ACEOF | |
9372 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
9373 | _ACEOF | |
9374 | ||
9375 | ||
9376 | ||
9377 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
9378 | TARGET_PTR="unsigned long" | |
9379 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
9380 | TARGET_PTR="unsigned long long" | |
9381 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
9382 | TARGET_PTR="unsigned __int128" | |
9383 | else | |
9384 | TARGET_PTR="unsigned long" | |
9385 | fi | |
9386 | ||
9387 | ||
9388 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
9389 | ||
9390 | ||
a2d08b9e SD |
9391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
9392 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 9393 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9394 | $as_echo_n "(cached) " >&6 |
9395 | else | |
9396 | ac_func_search_save_LIBS=$LIBS | |
9397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9398 | /* end confdefs.h. */ | |
9399 | ||
9400 | /* Override any GCC internal prototype to avoid an error. | |
9401 | Use char because int might match the return type of a GCC | |
9402 | builtin and then its argument prototype would still apply. */ | |
9403 | #ifdef __cplusplus | |
9404 | extern "C" | |
9405 | #endif | |
9406 | char dlopen (); | |
9407 | int | |
9408 | main () | |
9409 | { | |
9410 | return dlopen (); | |
9411 | ; | |
9412 | return 0; | |
9413 | } | |
9414 | _ACEOF | |
9415 | for ac_lib in '' dl; do | |
9416 | if test -z "$ac_lib"; then | |
9417 | ac_res="none required" | |
9418 | else | |
9419 | ac_res=-l$ac_lib | |
9420 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9421 | fi | |
9422 | if ac_fn_c_try_link "$LINENO"; then : | |
9423 | ac_cv_search_dlopen=$ac_res | |
9424 | fi | |
9425 | rm -f core conftest.err conftest.$ac_objext \ | |
9426 | conftest$ac_exeext | |
d0ac1c44 | 9427 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9428 | break |
9429 | fi | |
9430 | done | |
d0ac1c44 | 9431 | if ${ac_cv_search_dlopen+:} false; then : |
a2d08b9e SD |
9432 | |
9433 | else | |
9434 | ac_cv_search_dlopen=no | |
9435 | fi | |
9436 | rm conftest.$ac_ext | |
9437 | LIBS=$ac_func_search_save_LIBS | |
9438 | fi | |
9439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
9440 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
9441 | ac_res=$ac_cv_search_dlopen | |
9442 | if test "$ac_res" != no; then : | |
9443 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
9444 | ||
9445 | fi | |
9446 | ||
9447 | ||
39037522 | 9448 | |
b8e0a31c SD |
9449 | |
9450 | # Check whether --with-jit-reader-dir was given. | |
9451 | if test "${with_jit_reader_dir+set}" = set; then : | |
9452 | withval=$with_jit_reader_dir; | |
9453 | JIT_READER_DIR=$withval | |
9454 | else | |
9455 | JIT_READER_DIR=${libdir}/gdb | |
9456 | fi | |
9457 | ||
9458 | ||
9459 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9460 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9461 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
9462 | ac_define_dir=`eval echo $ac_define_dir` | |
9463 | ||
9464 | cat >>confdefs.h <<_ACEOF | |
9465 | #define JIT_READER_DIR "$ac_define_dir" | |
9466 | _ACEOF | |
9467 | ||
9468 | ||
9469 | ||
9470 | ||
9471 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
9472 | if test "x$prefix" = xNONE; then | |
9473 | test_prefix=/usr/local | |
9474 | else | |
9475 | test_prefix=$prefix | |
9476 | fi | |
9477 | else | |
9478 | test_prefix=$exec_prefix | |
9479 | fi | |
9480 | value=0 | |
9481 | case ${ac_define_dir} in | |
9482 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9483 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9484 | value=1 | |
9485 | ;; | |
9486 | esac | |
9487 | ||
9488 | cat >>confdefs.h <<_ACEOF | |
9489 | #define JIT_READER_DIR_RELOCATABLE $value | |
9490 | _ACEOF | |
9491 | ||
9492 | ||
9493 | ||
9494 | ||
9495 | ||
81ecdfbb RW |
9496 | # Check whether --with-expat was given. |
9497 | if test "${with_expat+set}" = set; then : | |
9498 | withval=$with_expat; | |
5c39566f DJ |
9499 | else |
9500 | with_expat=auto | |
81ecdfbb RW |
9501 | fi |
9502 | ||
9503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
9504 | $as_echo_n "checking whether to use expat... " >&6; } | |
9505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
9506 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
9507 | |
9508 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
9509 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
9510 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
9511 | HAVE_LIBEXPAT=no |
9512 | else | |
9513 | ||
3841debe DJ |
9514 | |
9515 | ||
9516 | ||
9517 | ||
9518 | ||
9519 | ||
9520 | ||
9521 | use_additional=yes | |
9522 | ||
9523 | acl_save_prefix="$prefix" | |
9524 | prefix="$acl_final_prefix" | |
9525 | acl_save_exec_prefix="$exec_prefix" | |
9526 | exec_prefix="$acl_final_exec_prefix" | |
9527 | ||
9528 | eval additional_includedir=\"$includedir\" | |
9529 | eval additional_libdir=\"$libdir\" | |
9530 | ||
9531 | exec_prefix="$acl_save_exec_prefix" | |
9532 | prefix="$acl_save_prefix" | |
9533 | ||
9534 | ||
81ecdfbb RW |
9535 | # Check whether --with-libexpat-prefix was given. |
9536 | if test "${with_libexpat_prefix+set}" = set; then : | |
9537 | withval=$with_libexpat_prefix; | |
3841debe DJ |
9538 | if test "X$withval" = "Xno"; then |
9539 | use_additional=no | |
9540 | else | |
9541 | if test "X$withval" = "X"; then | |
9542 | ||
9543 | acl_save_prefix="$prefix" | |
9544 | prefix="$acl_final_prefix" | |
9545 | acl_save_exec_prefix="$exec_prefix" | |
9546 | exec_prefix="$acl_final_exec_prefix" | |
9547 | ||
9548 | eval additional_includedir=\"$includedir\" | |
9549 | eval additional_libdir=\"$libdir\" | |
9550 | ||
9551 | exec_prefix="$acl_save_exec_prefix" | |
9552 | prefix="$acl_save_prefix" | |
9553 | ||
9554 | else | |
9555 | additional_includedir="$withval/include" | |
9556 | additional_libdir="$withval/lib" | |
9557 | fi | |
9558 | fi | |
9559 | ||
81ecdfbb RW |
9560 | fi |
9561 | ||
9f1528a1 AB |
9562 | |
9563 | # Check whether --with-libexpat-type was given. | |
9564 | if test "${with_libexpat_type+set}" = set; then : | |
9565 | withval=$with_libexpat_type; with_libexpat_type=$withval | |
9566 | else | |
9567 | with_libexpat_type=auto | |
9568 | fi | |
9569 | ||
9570 | lib_type=`eval echo \$with_libexpat_type` | |
9571 | ||
3841debe DJ |
9572 | LIBEXPAT= |
9573 | LTLIBEXPAT= | |
9574 | INCEXPAT= | |
9575 | rpathdirs= | |
9576 | ltrpathdirs= | |
9577 | names_already_handled= | |
9578 | names_next_round='expat ' | |
9579 | while test -n "$names_next_round"; do | |
9580 | names_this_round="$names_next_round" | |
9581 | names_next_round= | |
9582 | for name in $names_this_round; do | |
9583 | already_handled= | |
9584 | for n in $names_already_handled; do | |
9585 | if test "$n" = "$name"; then | |
9586 | already_handled=yes | |
9587 | break | |
9588 | fi | |
9589 | done | |
9590 | if test -z "$already_handled"; then | |
9591 | names_already_handled="$names_already_handled $name" | |
9592 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
9593 | eval value=\"\$HAVE_LIB$uppername\" | |
9594 | if test -n "$value"; then | |
9595 | if test "$value" = yes; then | |
9596 | eval value=\"\$LIB$uppername\" | |
9597 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
9598 | eval value=\"\$LTLIB$uppername\" | |
9599 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
9600 | else | |
9601 | : | |
9602 | fi | |
9603 | else | |
9604 | found_dir= | |
9605 | found_la= | |
9606 | found_so= | |
9607 | found_a= | |
9608 | if test $use_additional = yes; then | |
9f1528a1 | 9609 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9610 | found_dir="$additional_libdir" |
9611 | found_so="$additional_libdir/lib$name.$shlibext" | |
9612 | if test -f "$additional_libdir/lib$name.la"; then | |
9613 | found_la="$additional_libdir/lib$name.la" | |
9614 | fi | |
9f1528a1 | 9615 | elif test x$lib_type != xshared; then |
3841debe DJ |
9616 | if test -f "$additional_libdir/lib$name.$libext"; then |
9617 | found_dir="$additional_libdir" | |
9618 | found_a="$additional_libdir/lib$name.$libext" | |
9619 | if test -f "$additional_libdir/lib$name.la"; then | |
9620 | found_la="$additional_libdir/lib$name.la" | |
9621 | fi | |
9622 | fi | |
9623 | fi | |
9624 | fi | |
9625 | if test "X$found_dir" = "X"; then | |
9626 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9627 | ||
9628 | acl_save_prefix="$prefix" | |
9629 | prefix="$acl_final_prefix" | |
9630 | acl_save_exec_prefix="$exec_prefix" | |
9631 | exec_prefix="$acl_final_exec_prefix" | |
9632 | eval x=\"$x\" | |
9633 | exec_prefix="$acl_save_exec_prefix" | |
9634 | prefix="$acl_save_prefix" | |
9635 | ||
9636 | case "$x" in | |
9637 | -L*) | |
9638 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 9639 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
3841debe DJ |
9640 | found_dir="$dir" |
9641 | found_so="$dir/lib$name.$shlibext" | |
9642 | if test -f "$dir/lib$name.la"; then | |
9643 | found_la="$dir/lib$name.la" | |
9644 | fi | |
9f1528a1 | 9645 | elif test x$lib_type != xshared; then |
3841debe DJ |
9646 | if test -f "$dir/lib$name.$libext"; then |
9647 | found_dir="$dir" | |
9648 | found_a="$dir/lib$name.$libext" | |
9649 | if test -f "$dir/lib$name.la"; then | |
9650 | found_la="$dir/lib$name.la" | |
9651 | fi | |
9652 | fi | |
9653 | fi | |
9654 | ;; | |
9655 | esac | |
9656 | if test "X$found_dir" != "X"; then | |
9657 | break | |
9658 | fi | |
9659 | done | |
9660 | fi | |
9661 | if test "X$found_dir" != "X"; then | |
9662 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
9663 | if test "X$found_so" != "X"; then | |
9664 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
9665 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9666 | else | |
9667 | haveit= | |
9668 | for x in $ltrpathdirs; do | |
9669 | if test "X$x" = "X$found_dir"; then | |
9670 | haveit=yes | |
9671 | break | |
9672 | fi | |
9673 | done | |
9674 | if test -z "$haveit"; then | |
9675 | ltrpathdirs="$ltrpathdirs $found_dir" | |
9676 | fi | |
9677 | if test "$hardcode_direct" = yes; then | |
9678 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9679 | else | |
9680 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
9681 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9682 | haveit= | |
9683 | for x in $rpathdirs; do | |
9684 | if test "X$x" = "X$found_dir"; then | |
9685 | haveit=yes | |
9686 | break | |
9687 | fi | |
9688 | done | |
9689 | if test -z "$haveit"; then | |
9690 | rpathdirs="$rpathdirs $found_dir" | |
9691 | fi | |
9692 | else | |
9693 | haveit= | |
9694 | for x in $LDFLAGS $LIBEXPAT; do | |
9695 | ||
9696 | acl_save_prefix="$prefix" | |
9697 | prefix="$acl_final_prefix" | |
9698 | acl_save_exec_prefix="$exec_prefix" | |
9699 | exec_prefix="$acl_final_exec_prefix" | |
9700 | eval x=\"$x\" | |
9701 | exec_prefix="$acl_save_exec_prefix" | |
9702 | prefix="$acl_save_prefix" | |
9703 | ||
9704 | if test "X$x" = "X-L$found_dir"; then | |
9705 | haveit=yes | |
9706 | break | |
9707 | fi | |
9708 | done | |
9709 | if test -z "$haveit"; then | |
9710 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
9711 | fi | |
9712 | if test "$hardcode_minus_L" != no; then | |
9713 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
9714 | else | |
9715 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9716 | fi | |
9717 | fi | |
9718 | fi | |
9719 | fi | |
9720 | else | |
9721 | if test "X$found_a" != "X"; then | |
9722 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
9723 | else | |
9724 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
9725 | fi | |
9726 | fi | |
9727 | additional_includedir= | |
9728 | case "$found_dir" in | |
9729 | */lib | */lib/) | |
9730 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
9731 | additional_includedir="$basedir/include" | |
9732 | ;; | |
9733 | esac | |
9734 | if test "X$additional_includedir" != "X"; then | |
9735 | if test "X$additional_includedir" != "X/usr/include"; then | |
9736 | haveit= | |
9737 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
9738 | if test -n "$GCC"; then | |
9739 | case $host_os in | |
9740 | linux*) haveit=yes;; | |
9741 | esac | |
9742 | fi | |
9743 | fi | |
9744 | if test -z "$haveit"; then | |
9745 | for x in $CPPFLAGS $INCEXPAT; do | |
9746 | ||
9747 | acl_save_prefix="$prefix" | |
9748 | prefix="$acl_final_prefix" | |
9749 | acl_save_exec_prefix="$exec_prefix" | |
9750 | exec_prefix="$acl_final_exec_prefix" | |
9751 | eval x=\"$x\" | |
9752 | exec_prefix="$acl_save_exec_prefix" | |
9753 | prefix="$acl_save_prefix" | |
9754 | ||
9755 | if test "X$x" = "X-I$additional_includedir"; then | |
9756 | haveit=yes | |
9757 | break | |
9758 | fi | |
9759 | done | |
9760 | if test -z "$haveit"; then | |
9761 | if test -d "$additional_includedir"; then | |
9762 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
9763 | fi | |
9764 | fi | |
9765 | fi | |
9766 | fi | |
9767 | fi | |
9768 | if test -n "$found_la"; then | |
9769 | save_libdir="$libdir" | |
9770 | case "$found_la" in | |
9771 | */* | *\\*) . "$found_la" ;; | |
9772 | *) . "./$found_la" ;; | |
9773 | esac | |
9774 | libdir="$save_libdir" | |
9775 | for dep in $dependency_libs; do | |
9776 | case "$dep" in | |
9777 | -L*) | |
9778 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
9779 | if test "X$additional_libdir" != "X/usr/lib"; then | |
9780 | haveit= | |
9781 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
9782 | if test -n "$GCC"; then | |
9783 | case $host_os in | |
9784 | linux*) haveit=yes;; | |
9785 | esac | |
9786 | fi | |
9787 | fi | |
9788 | if test -z "$haveit"; then | |
9789 | haveit= | |
9790 | for x in $LDFLAGS $LIBEXPAT; do | |
9791 | ||
9792 | acl_save_prefix="$prefix" | |
9793 | prefix="$acl_final_prefix" | |
9794 | acl_save_exec_prefix="$exec_prefix" | |
9795 | exec_prefix="$acl_final_exec_prefix" | |
9796 | eval x=\"$x\" | |
9797 | exec_prefix="$acl_save_exec_prefix" | |
9798 | prefix="$acl_save_prefix" | |
9799 | ||
9800 | if test "X$x" = "X-L$additional_libdir"; then | |
9801 | haveit=yes | |
9802 | break | |
9803 | fi | |
9804 | done | |
9805 | if test -z "$haveit"; then | |
9806 | if test -d "$additional_libdir"; then | |
9807 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
9808 | fi | |
9809 | fi | |
9810 | haveit= | |
9811 | for x in $LDFLAGS $LTLIBEXPAT; do | |
9812 | ||
9813 | acl_save_prefix="$prefix" | |
9814 | prefix="$acl_final_prefix" | |
9815 | acl_save_exec_prefix="$exec_prefix" | |
9816 | exec_prefix="$acl_final_exec_prefix" | |
9817 | eval x=\"$x\" | |
9818 | exec_prefix="$acl_save_exec_prefix" | |
9819 | prefix="$acl_save_prefix" | |
9820 | ||
9821 | if test "X$x" = "X-L$additional_libdir"; then | |
9822 | haveit=yes | |
9823 | break | |
9824 | fi | |
9825 | done | |
9826 | if test -z "$haveit"; then | |
9827 | if test -d "$additional_libdir"; then | |
9828 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
9829 | fi | |
9830 | fi | |
9831 | fi | |
9832 | fi | |
9833 | ;; | |
9834 | -R*) | |
9835 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
9836 | if test "$enable_rpath" != no; then | |
9837 | haveit= | |
9838 | for x in $rpathdirs; do | |
9839 | if test "X$x" = "X$dir"; then | |
9840 | haveit=yes | |
9841 | break | |
9842 | fi | |
9843 | done | |
9844 | if test -z "$haveit"; then | |
9845 | rpathdirs="$rpathdirs $dir" | |
9846 | fi | |
9847 | haveit= | |
9848 | for x in $ltrpathdirs; do | |
9849 | if test "X$x" = "X$dir"; then | |
9850 | haveit=yes | |
9851 | break | |
9852 | fi | |
9853 | done | |
9854 | if test -z "$haveit"; then | |
9855 | ltrpathdirs="$ltrpathdirs $dir" | |
9856 | fi | |
9857 | fi | |
9858 | ;; | |
9859 | -l*) | |
9860 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
9861 | ;; | |
9862 | *.la) | |
9863 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
9864 | ;; | |
9865 | *) | |
9866 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
9867 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
9868 | ;; | |
81ecdfbb RW |
9869 | esac |
9870 | done | |
9871 | fi | |
9872 | else | |
9f1528a1 AB |
9873 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
9874 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
9875 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
9876 | else | |
9877 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext" | |
9878 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext" | |
9879 | fi | |
81ecdfbb RW |
9880 | fi |
9881 | fi | |
9882 | fi | |
9883 | done | |
9884 | done | |
9885 | if test "X$rpathdirs" != "X"; then | |
9886 | if test -n "$hardcode_libdir_separator"; then | |
9887 | alldirs= | |
9888 | for found_dir in $rpathdirs; do | |
9889 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
9890 | done | |
9891 | acl_save_libdir="$libdir" | |
9892 | libdir="$alldirs" | |
9893 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9894 | libdir="$acl_save_libdir" | |
9895 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9896 | else | |
9897 | for found_dir in $rpathdirs; do | |
9898 | acl_save_libdir="$libdir" | |
9899 | libdir="$found_dir" | |
9900 | eval flag=\"$hardcode_libdir_flag_spec\" | |
9901 | libdir="$acl_save_libdir" | |
9902 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
9903 | done | |
9904 | fi | |
9905 | fi | |
9906 | if test "X$ltrpathdirs" != "X"; then | |
9907 | for found_dir in $ltrpathdirs; do | |
9908 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
9909 | done | |
9910 | fi | |
a9322a30 TT |
9911 | |
9912 | ||
81ecdfbb | 9913 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 9914 | |
81ecdfbb RW |
9915 | for element in $INCEXPAT; do |
9916 | haveit= | |
9917 | for x in $CPPFLAGS; do | |
a9322a30 | 9918 | |
81ecdfbb RW |
9919 | acl_save_prefix="$prefix" |
9920 | prefix="$acl_final_prefix" | |
9921 | acl_save_exec_prefix="$exec_prefix" | |
9922 | exec_prefix="$acl_final_exec_prefix" | |
9923 | eval x=\"$x\" | |
9924 | exec_prefix="$acl_save_exec_prefix" | |
9925 | prefix="$acl_save_prefix" | |
a8111142 | 9926 | |
81ecdfbb RW |
9927 | if test "X$x" = "X$element"; then |
9928 | haveit=yes | |
9929 | break | |
9930 | fi | |
9931 | done | |
9932 | if test -z "$haveit"; then | |
9933 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9934 | fi | |
9935 | done | |
a9322a30 TT |
9936 | |
9937 | ||
81ecdfbb RW |
9938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
9939 | $as_echo_n "checking for libexpat... " >&6; } | |
d0ac1c44 | 9940 | if ${ac_cv_libexpat+:} false; then : |
81ecdfbb | 9941 | $as_echo_n "(cached) " >&6 |
bec39cab | 9942 | else |
bec39cab | 9943 | |
81ecdfbb RW |
9944 | ac_save_LIBS="$LIBS" |
9945 | LIBS="$LIBS $LIBEXPAT" | |
9946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9947 | /* end confdefs.h. */ |
81ecdfbb RW |
9948 | #include "expat.h" |
9949 | int | |
9950 | main () | |
9951 | { | |
9952 | XML_Parser p = XML_ParserCreate (0); | |
9953 | ; | |
9954 | return 0; | |
9955 | } | |
bec39cab | 9956 | _ACEOF |
81ecdfbb RW |
9957 | if ac_fn_c_try_link "$LINENO"; then : |
9958 | ac_cv_libexpat=yes | |
c906108c | 9959 | else |
81ecdfbb | 9960 | ac_cv_libexpat=no |
bec39cab | 9961 | fi |
81ecdfbb RW |
9962 | rm -f core conftest.err conftest.$ac_objext \ |
9963 | conftest$ac_exeext conftest.$ac_ext | |
9964 | LIBS="$ac_save_LIBS" | |
c906108c | 9965 | |
95ca63c4 | 9966 | fi |
81ecdfbb RW |
9967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
9968 | $as_echo "$ac_cv_libexpat" >&6; } | |
9969 | if test "$ac_cv_libexpat" = yes; then | |
9970 | HAVE_LIBEXPAT=yes | |
bec39cab | 9971 | |
81ecdfbb | 9972 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 9973 | |
81ecdfbb RW |
9974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
9975 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
9976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
9977 | $as_echo "$LIBEXPAT" >&6; } | |
9978 | else | |
9979 | HAVE_LIBEXPAT=no | |
9980 | CPPFLAGS="$ac_save_CPPFLAGS" | |
9981 | LIBEXPAT= | |
9982 | LTLIBEXPAT= | |
9983 | fi | |
95ca63c4 CF |
9984 | |
9985 | ||
9986 | ||
7cb9022a MK |
9987 | |
9988 | ||
bec39cab | 9989 | |
81ecdfbb RW |
9990 | if test "$HAVE_LIBEXPAT" != yes; then |
9991 | if test "$with_expat" = yes; then | |
d0ac1c44 | 9992 | as_fn_error $? "expat is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
9993 | else |
9994 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
9995 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
9996 | fi | |
9997 | else | |
9998 | save_LIBS=$LIBS | |
9999 | LIBS="$LIBS $LIBEXPAT" | |
10000 | for ac_func in XML_StopParser | |
10001 | do : | |
10002 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
d0ac1c44 | 10003 | if test "x$ac_cv_func_XML_StopParser" = xyes; then : |
bec39cab | 10004 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10005 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 10006 | _ACEOF |
95ca63c4 | 10007 | |
bec39cab | 10008 | fi |
bec39cab | 10009 | done |
95ca63c4 | 10010 | |
81ecdfbb RW |
10011 | LIBS=$save_LIBS |
10012 | fi | |
a9322a30 TT |
10013 | fi |
10014 | ||
2c947d9b JB |
10015 | # Verify that we have a usable GMP library. |
10016 | ||
10017 | ||
10018 | ||
10019 | ||
10020 | ||
10021 | ||
10022 | ||
10023 | ||
10024 | use_additional=yes | |
10025 | ||
10026 | acl_save_prefix="$prefix" | |
10027 | prefix="$acl_final_prefix" | |
10028 | acl_save_exec_prefix="$exec_prefix" | |
10029 | exec_prefix="$acl_final_exec_prefix" | |
10030 | ||
10031 | eval additional_includedir=\"$includedir\" | |
10032 | eval additional_libdir=\"$libdir\" | |
10033 | ||
10034 | exec_prefix="$acl_save_exec_prefix" | |
10035 | prefix="$acl_save_prefix" | |
10036 | ||
10037 | ||
10038 | # Check whether --with-libgmp-prefix was given. | |
10039 | if test "${with_libgmp_prefix+set}" = set; then : | |
10040 | withval=$with_libgmp_prefix; | |
10041 | if test "X$withval" = "Xno"; then | |
10042 | use_additional=no | |
10043 | else | |
10044 | if test "X$withval" = "X"; then | |
10045 | ||
10046 | acl_save_prefix="$prefix" | |
10047 | prefix="$acl_final_prefix" | |
10048 | acl_save_exec_prefix="$exec_prefix" | |
10049 | exec_prefix="$acl_final_exec_prefix" | |
10050 | ||
10051 | eval additional_includedir=\"$includedir\" | |
10052 | eval additional_libdir=\"$libdir\" | |
10053 | ||
10054 | exec_prefix="$acl_save_exec_prefix" | |
10055 | prefix="$acl_save_prefix" | |
10056 | ||
10057 | else | |
10058 | additional_includedir="$withval/include" | |
10059 | additional_libdir="$withval/lib" | |
10060 | fi | |
10061 | fi | |
10062 | ||
10063 | fi | |
10064 | ||
10065 | ||
10066 | # Check whether --with-libgmp-type was given. | |
10067 | if test "${with_libgmp_type+set}" = set; then : | |
10068 | withval=$with_libgmp_type; with_libgmp_type=$withval | |
10069 | else | |
10070 | with_libgmp_type=auto | |
10071 | fi | |
10072 | ||
10073 | lib_type=`eval echo \$with_libgmp_type` | |
10074 | ||
10075 | LIBGMP= | |
10076 | LTLIBGMP= | |
10077 | INCGMP= | |
10078 | rpathdirs= | |
10079 | ltrpathdirs= | |
10080 | names_already_handled= | |
10081 | names_next_round='gmp ' | |
10082 | while test -n "$names_next_round"; do | |
10083 | names_this_round="$names_next_round" | |
10084 | names_next_round= | |
10085 | for name in $names_this_round; do | |
10086 | already_handled= | |
10087 | for n in $names_already_handled; do | |
10088 | if test "$n" = "$name"; then | |
10089 | already_handled=yes | |
10090 | break | |
10091 | fi | |
10092 | done | |
10093 | if test -z "$already_handled"; then | |
10094 | names_already_handled="$names_already_handled $name" | |
10095 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10096 | eval value=\"\$HAVE_LIB$uppername\" | |
10097 | if test -n "$value"; then | |
10098 | if test "$value" = yes; then | |
10099 | eval value=\"\$LIB$uppername\" | |
10100 | test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value" | |
10101 | eval value=\"\$LTLIB$uppername\" | |
10102 | test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value" | |
10103 | else | |
10104 | : | |
10105 | fi | |
10106 | else | |
10107 | found_dir= | |
10108 | found_la= | |
10109 | found_so= | |
10110 | found_a= | |
10111 | if test $use_additional = yes; then | |
10112 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
10113 | found_dir="$additional_libdir" | |
10114 | found_so="$additional_libdir/lib$name.$shlibext" | |
10115 | if test -f "$additional_libdir/lib$name.la"; then | |
10116 | found_la="$additional_libdir/lib$name.la" | |
10117 | fi | |
10118 | elif test x$lib_type != xshared; then | |
10119 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10120 | found_dir="$additional_libdir" | |
10121 | found_a="$additional_libdir/lib$name.$libext" | |
10122 | if test -f "$additional_libdir/lib$name.la"; then | |
10123 | found_la="$additional_libdir/lib$name.la" | |
10124 | fi | |
10125 | fi | |
10126 | fi | |
10127 | fi | |
10128 | if test "X$found_dir" = "X"; then | |
10129 | for x in $LDFLAGS $LTLIBGMP; do | |
10130 | ||
10131 | acl_save_prefix="$prefix" | |
10132 | prefix="$acl_final_prefix" | |
10133 | acl_save_exec_prefix="$exec_prefix" | |
10134 | exec_prefix="$acl_final_exec_prefix" | |
10135 | eval x=\"$x\" | |
10136 | exec_prefix="$acl_save_exec_prefix" | |
10137 | prefix="$acl_save_prefix" | |
10138 | ||
10139 | case "$x" in | |
10140 | -L*) | |
10141 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10142 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then | |
10143 | found_dir="$dir" | |
10144 | found_so="$dir/lib$name.$shlibext" | |
10145 | if test -f "$dir/lib$name.la"; then | |
10146 | found_la="$dir/lib$name.la" | |
10147 | fi | |
10148 | elif test x$lib_type != xshared; then | |
10149 | if test -f "$dir/lib$name.$libext"; then | |
10150 | found_dir="$dir" | |
10151 | found_a="$dir/lib$name.$libext" | |
10152 | if test -f "$dir/lib$name.la"; then | |
10153 | found_la="$dir/lib$name.la" | |
10154 | fi | |
10155 | fi | |
10156 | fi | |
10157 | ;; | |
10158 | esac | |
10159 | if test "X$found_dir" != "X"; then | |
10160 | break | |
10161 | fi | |
10162 | done | |
10163 | fi | |
10164 | if test "X$found_dir" != "X"; then | |
10165 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name" | |
10166 | if test "X$found_so" != "X"; then | |
10167 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10168 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10169 | else | |
10170 | haveit= | |
10171 | for x in $ltrpathdirs; do | |
10172 | if test "X$x" = "X$found_dir"; then | |
10173 | haveit=yes | |
10174 | break | |
10175 | fi | |
10176 | done | |
10177 | if test -z "$haveit"; then | |
10178 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10179 | fi | |
10180 | if test "$hardcode_direct" = yes; then | |
10181 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10182 | else | |
10183 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10184 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10185 | haveit= | |
10186 | for x in $rpathdirs; do | |
10187 | if test "X$x" = "X$found_dir"; then | |
10188 | haveit=yes | |
10189 | break | |
10190 | fi | |
10191 | done | |
10192 | if test -z "$haveit"; then | |
10193 | rpathdirs="$rpathdirs $found_dir" | |
10194 | fi | |
10195 | else | |
10196 | haveit= | |
10197 | for x in $LDFLAGS $LIBGMP; do | |
10198 | ||
10199 | acl_save_prefix="$prefix" | |
10200 | prefix="$acl_final_prefix" | |
10201 | acl_save_exec_prefix="$exec_prefix" | |
10202 | exec_prefix="$acl_final_exec_prefix" | |
10203 | eval x=\"$x\" | |
10204 | exec_prefix="$acl_save_exec_prefix" | |
10205 | prefix="$acl_save_prefix" | |
10206 | ||
10207 | if test "X$x" = "X-L$found_dir"; then | |
10208 | haveit=yes | |
10209 | break | |
10210 | fi | |
10211 | done | |
10212 | if test -z "$haveit"; then | |
10213 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir" | |
10214 | fi | |
10215 | if test "$hardcode_minus_L" != no; then | |
10216 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so" | |
10217 | else | |
10218 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name" | |
10219 | fi | |
10220 | fi | |
10221 | fi | |
10222 | fi | |
10223 | else | |
10224 | if test "X$found_a" != "X"; then | |
10225 | LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a" | |
10226 | else | |
10227 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name" | |
10228 | fi | |
10229 | fi | |
10230 | additional_includedir= | |
10231 | case "$found_dir" in | |
10232 | */lib | */lib/) | |
10233 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10234 | additional_includedir="$basedir/include" | |
10235 | ;; | |
10236 | esac | |
10237 | if test "X$additional_includedir" != "X"; then | |
10238 | if test "X$additional_includedir" != "X/usr/include"; then | |
10239 | haveit= | |
10240 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10241 | if test -n "$GCC"; then | |
10242 | case $host_os in | |
10243 | linux*) haveit=yes;; | |
10244 | esac | |
10245 | fi | |
10246 | fi | |
10247 | if test -z "$haveit"; then | |
10248 | for x in $CPPFLAGS $INCGMP; do | |
10249 | ||
10250 | acl_save_prefix="$prefix" | |
10251 | prefix="$acl_final_prefix" | |
10252 | acl_save_exec_prefix="$exec_prefix" | |
10253 | exec_prefix="$acl_final_exec_prefix" | |
10254 | eval x=\"$x\" | |
10255 | exec_prefix="$acl_save_exec_prefix" | |
10256 | prefix="$acl_save_prefix" | |
10257 | ||
10258 | if test "X$x" = "X-I$additional_includedir"; then | |
10259 | haveit=yes | |
10260 | break | |
10261 | fi | |
10262 | done | |
10263 | if test -z "$haveit"; then | |
10264 | if test -d "$additional_includedir"; then | |
10265 | INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir" | |
10266 | fi | |
10267 | fi | |
10268 | fi | |
10269 | fi | |
10270 | fi | |
10271 | if test -n "$found_la"; then | |
10272 | save_libdir="$libdir" | |
10273 | case "$found_la" in | |
10274 | */* | *\\*) . "$found_la" ;; | |
10275 | *) . "./$found_la" ;; | |
10276 | esac | |
10277 | libdir="$save_libdir" | |
10278 | for dep in $dependency_libs; do | |
10279 | case "$dep" in | |
10280 | -L*) | |
10281 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10282 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10283 | haveit= | |
10284 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10285 | if test -n "$GCC"; then | |
10286 | case $host_os in | |
10287 | linux*) haveit=yes;; | |
10288 | esac | |
10289 | fi | |
10290 | fi | |
10291 | if test -z "$haveit"; then | |
10292 | haveit= | |
10293 | for x in $LDFLAGS $LIBGMP; do | |
10294 | ||
10295 | acl_save_prefix="$prefix" | |
10296 | prefix="$acl_final_prefix" | |
10297 | acl_save_exec_prefix="$exec_prefix" | |
10298 | exec_prefix="$acl_final_exec_prefix" | |
10299 | eval x=\"$x\" | |
10300 | exec_prefix="$acl_save_exec_prefix" | |
10301 | prefix="$acl_save_prefix" | |
10302 | ||
10303 | if test "X$x" = "X-L$additional_libdir"; then | |
10304 | haveit=yes | |
10305 | break | |
10306 | fi | |
10307 | done | |
10308 | if test -z "$haveit"; then | |
10309 | if test -d "$additional_libdir"; then | |
10310 | LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir" | |
10311 | fi | |
10312 | fi | |
10313 | haveit= | |
10314 | for x in $LDFLAGS $LTLIBGMP; do | |
10315 | ||
10316 | acl_save_prefix="$prefix" | |
10317 | prefix="$acl_final_prefix" | |
10318 | acl_save_exec_prefix="$exec_prefix" | |
10319 | exec_prefix="$acl_final_exec_prefix" | |
10320 | eval x=\"$x\" | |
10321 | exec_prefix="$acl_save_exec_prefix" | |
10322 | prefix="$acl_save_prefix" | |
10323 | ||
10324 | if test "X$x" = "X-L$additional_libdir"; then | |
10325 | haveit=yes | |
10326 | break | |
10327 | fi | |
10328 | done | |
10329 | if test -z "$haveit"; then | |
10330 | if test -d "$additional_libdir"; then | |
10331 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir" | |
10332 | fi | |
10333 | fi | |
10334 | fi | |
10335 | fi | |
10336 | ;; | |
10337 | -R*) | |
10338 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10339 | if test "$enable_rpath" != no; then | |
10340 | haveit= | |
10341 | for x in $rpathdirs; do | |
10342 | if test "X$x" = "X$dir"; then | |
10343 | haveit=yes | |
10344 | break | |
10345 | fi | |
10346 | done | |
10347 | if test -z "$haveit"; then | |
10348 | rpathdirs="$rpathdirs $dir" | |
10349 | fi | |
10350 | haveit= | |
10351 | for x in $ltrpathdirs; do | |
10352 | if test "X$x" = "X$dir"; then | |
10353 | haveit=yes | |
10354 | break | |
10355 | fi | |
10356 | done | |
10357 | if test -z "$haveit"; then | |
10358 | ltrpathdirs="$ltrpathdirs $dir" | |
10359 | fi | |
10360 | fi | |
10361 | ;; | |
10362 | -l*) | |
10363 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10364 | ;; | |
10365 | *.la) | |
10366 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10367 | ;; | |
10368 | *) | |
10369 | LIBGMP="${LIBGMP}${LIBGMP:+ }$dep" | |
10370 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep" | |
10371 | ;; | |
10372 | esac | |
10373 | done | |
10374 | fi | |
10375 | else | |
10376 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then | |
10377 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name" | |
10378 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name" | |
10379 | else | |
10380 | LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext" | |
10381 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext" | |
10382 | fi | |
10383 | fi | |
10384 | fi | |
10385 | fi | |
10386 | done | |
10387 | done | |
10388 | if test "X$rpathdirs" != "X"; then | |
10389 | if test -n "$hardcode_libdir_separator"; then | |
10390 | alldirs= | |
10391 | for found_dir in $rpathdirs; do | |
10392 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10393 | done | |
10394 | acl_save_libdir="$libdir" | |
10395 | libdir="$alldirs" | |
10396 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10397 | libdir="$acl_save_libdir" | |
10398 | LIBGMP="${LIBGMP}${LIBGMP:+ }$flag" | |
10399 | else | |
10400 | for found_dir in $rpathdirs; do | |
10401 | acl_save_libdir="$libdir" | |
10402 | libdir="$found_dir" | |
10403 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10404 | libdir="$acl_save_libdir" | |
10405 | LIBGMP="${LIBGMP}${LIBGMP:+ }$flag" | |
10406 | done | |
10407 | fi | |
10408 | fi | |
10409 | if test "X$ltrpathdirs" != "X"; then | |
10410 | for found_dir in $ltrpathdirs; do | |
10411 | LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir" | |
10412 | done | |
10413 | fi | |
10414 | ||
10415 | ||
10416 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10417 | ||
10418 | for element in $INCGMP; do | |
10419 | haveit= | |
10420 | for x in $CPPFLAGS; do | |
10421 | ||
10422 | acl_save_prefix="$prefix" | |
10423 | prefix="$acl_final_prefix" | |
10424 | acl_save_exec_prefix="$exec_prefix" | |
10425 | exec_prefix="$acl_final_exec_prefix" | |
10426 | eval x=\"$x\" | |
10427 | exec_prefix="$acl_save_exec_prefix" | |
10428 | prefix="$acl_save_prefix" | |
10429 | ||
10430 | if test "X$x" = "X$element"; then | |
10431 | haveit=yes | |
10432 | break | |
10433 | fi | |
10434 | done | |
10435 | if test -z "$haveit"; then | |
10436 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10437 | fi | |
10438 | done | |
10439 | ||
10440 | ||
10441 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5 | |
10442 | $as_echo_n "checking for libgmp... " >&6; } | |
10443 | if ${ac_cv_libgmp+:} false; then : | |
10444 | $as_echo_n "(cached) " >&6 | |
10445 | else | |
10446 | ||
10447 | ac_save_LIBS="$LIBS" | |
10448 | LIBS="$LIBS $LIBGMP" | |
10449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10450 | /* end confdefs.h. */ | |
10451 | #include <gmp.h> | |
10452 | int | |
10453 | main () | |
10454 | { | |
10455 | mpz_t n; | |
10456 | mpz_init (n); | |
10457 | ; | |
10458 | return 0; | |
10459 | } | |
10460 | _ACEOF | |
10461 | if ac_fn_c_try_link "$LINENO"; then : | |
10462 | ac_cv_libgmp=yes | |
10463 | else | |
10464 | ac_cv_libgmp=no | |
10465 | fi | |
10466 | rm -f core conftest.err conftest.$ac_objext \ | |
10467 | conftest$ac_exeext conftest.$ac_ext | |
10468 | LIBS="$ac_save_LIBS" | |
10469 | ||
10470 | fi | |
10471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5 | |
10472 | $as_echo "$ac_cv_libgmp" >&6; } | |
10473 | if test "$ac_cv_libgmp" = yes; then | |
10474 | HAVE_LIBGMP=yes | |
10475 | ||
10476 | $as_echo "#define HAVE_LIBGMP 1" >>confdefs.h | |
10477 | ||
10478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5 | |
10479 | $as_echo_n "checking how to link with libgmp... " >&6; } | |
10480 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5 | |
10481 | $as_echo "$LIBGMP" >&6; } | |
10482 | else | |
10483 | HAVE_LIBGMP=no | |
10484 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10485 | LIBGMP= | |
10486 | LTLIBGMP= | |
10487 | fi | |
10488 | ||
10489 | ||
10490 | ||
10491 | ||
10492 | ||
10493 | ||
1b4ac058 JB |
10494 | if test "$HAVE_LIBGMP" != yes; then |
10495 | as_fn_error $? "GMP is missing or unusable" "$LINENO" 5 | |
10496 | fi | |
2c947d9b | 10497 | |
2400729e UW |
10498 | |
10499 | # Check whether --with-mpfr was given. | |
10500 | if test "${with_mpfr+set}" = set; then : | |
10501 | withval=$with_mpfr; | |
10502 | else | |
10503 | with_mpfr=auto | |
10504 | fi | |
10505 | ||
10506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 | |
10507 | $as_echo_n "checking whether to use MPFR... " >&6; } | |
10508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 | |
10509 | $as_echo "$with_mpfr" >&6; } | |
10510 | ||
10511 | if test "${with_mpfr}" = no; then | |
10512 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 | |
10513 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} | |
10514 | HAVE_LIBMPFR=no | |
10515 | else | |
10516 | ||
10517 | ||
10518 | ||
10519 | ||
10520 | ||
10521 | ||
10522 | ||
10523 | ||
10524 | use_additional=yes | |
10525 | ||
10526 | acl_save_prefix="$prefix" | |
10527 | prefix="$acl_final_prefix" | |
10528 | acl_save_exec_prefix="$exec_prefix" | |
10529 | exec_prefix="$acl_final_exec_prefix" | |
10530 | ||
10531 | eval additional_includedir=\"$includedir\" | |
10532 | eval additional_libdir=\"$libdir\" | |
10533 | ||
10534 | exec_prefix="$acl_save_exec_prefix" | |
10535 | prefix="$acl_save_prefix" | |
10536 | ||
10537 | ||
10538 | # Check whether --with-libmpfr-prefix was given. | |
10539 | if test "${with_libmpfr_prefix+set}" = set; then : | |
10540 | withval=$with_libmpfr_prefix; | |
10541 | if test "X$withval" = "Xno"; then | |
10542 | use_additional=no | |
10543 | else | |
10544 | if test "X$withval" = "X"; then | |
10545 | ||
10546 | acl_save_prefix="$prefix" | |
10547 | prefix="$acl_final_prefix" | |
10548 | acl_save_exec_prefix="$exec_prefix" | |
10549 | exec_prefix="$acl_final_exec_prefix" | |
10550 | ||
10551 | eval additional_includedir=\"$includedir\" | |
10552 | eval additional_libdir=\"$libdir\" | |
10553 | ||
10554 | exec_prefix="$acl_save_exec_prefix" | |
10555 | prefix="$acl_save_prefix" | |
10556 | ||
10557 | else | |
10558 | additional_includedir="$withval/include" | |
10559 | additional_libdir="$withval/lib" | |
10560 | fi | |
10561 | fi | |
10562 | ||
10563 | fi | |
10564 | ||
9f1528a1 AB |
10565 | |
10566 | # Check whether --with-libmpfr-type was given. | |
10567 | if test "${with_libmpfr_type+set}" = set; then : | |
10568 | withval=$with_libmpfr_type; with_libmpfr_type=$withval | |
10569 | else | |
10570 | with_libmpfr_type=auto | |
10571 | fi | |
10572 | ||
10573 | lib_type=`eval echo \$with_libmpfr_type` | |
10574 | ||
2400729e UW |
10575 | LIBMPFR= |
10576 | LTLIBMPFR= | |
10577 | INCMPFR= | |
10578 | rpathdirs= | |
10579 | ltrpathdirs= | |
10580 | names_already_handled= | |
da658607 | 10581 | names_next_round='mpfr gmp' |
2400729e UW |
10582 | while test -n "$names_next_round"; do |
10583 | names_this_round="$names_next_round" | |
10584 | names_next_round= | |
10585 | for name in $names_this_round; do | |
10586 | already_handled= | |
10587 | for n in $names_already_handled; do | |
10588 | if test "$n" = "$name"; then | |
10589 | already_handled=yes | |
10590 | break | |
10591 | fi | |
10592 | done | |
10593 | if test -z "$already_handled"; then | |
10594 | names_already_handled="$names_already_handled $name" | |
10595 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10596 | eval value=\"\$HAVE_LIB$uppername\" | |
10597 | if test -n "$value"; then | |
10598 | if test "$value" = yes; then | |
10599 | eval value=\"\$LIB$uppername\" | |
10600 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" | |
10601 | eval value=\"\$LTLIB$uppername\" | |
10602 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" | |
10603 | else | |
10604 | : | |
10605 | fi | |
10606 | else | |
10607 | found_dir= | |
10608 | found_la= | |
10609 | found_so= | |
10610 | found_a= | |
10611 | if test $use_additional = yes; then | |
9f1528a1 | 10612 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10613 | found_dir="$additional_libdir" |
10614 | found_so="$additional_libdir/lib$name.$shlibext" | |
10615 | if test -f "$additional_libdir/lib$name.la"; then | |
10616 | found_la="$additional_libdir/lib$name.la" | |
10617 | fi | |
9f1528a1 | 10618 | elif test x$lib_type != xshared; then |
2400729e UW |
10619 | if test -f "$additional_libdir/lib$name.$libext"; then |
10620 | found_dir="$additional_libdir" | |
10621 | found_a="$additional_libdir/lib$name.$libext" | |
10622 | if test -f "$additional_libdir/lib$name.la"; then | |
10623 | found_la="$additional_libdir/lib$name.la" | |
10624 | fi | |
10625 | fi | |
10626 | fi | |
10627 | fi | |
10628 | if test "X$found_dir" = "X"; then | |
10629 | for x in $LDFLAGS $LTLIBMPFR; do | |
10630 | ||
10631 | acl_save_prefix="$prefix" | |
10632 | prefix="$acl_final_prefix" | |
10633 | acl_save_exec_prefix="$exec_prefix" | |
10634 | exec_prefix="$acl_final_exec_prefix" | |
10635 | eval x=\"$x\" | |
10636 | exec_prefix="$acl_save_exec_prefix" | |
10637 | prefix="$acl_save_prefix" | |
10638 | ||
10639 | case "$x" in | |
10640 | -L*) | |
10641 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 10642 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
2400729e UW |
10643 | found_dir="$dir" |
10644 | found_so="$dir/lib$name.$shlibext" | |
10645 | if test -f "$dir/lib$name.la"; then | |
10646 | found_la="$dir/lib$name.la" | |
10647 | fi | |
9f1528a1 | 10648 | elif test x$lib_type != xshared; then |
2400729e UW |
10649 | if test -f "$dir/lib$name.$libext"; then |
10650 | found_dir="$dir" | |
10651 | found_a="$dir/lib$name.$libext" | |
10652 | if test -f "$dir/lib$name.la"; then | |
10653 | found_la="$dir/lib$name.la" | |
10654 | fi | |
10655 | fi | |
10656 | fi | |
10657 | ;; | |
10658 | esac | |
10659 | if test "X$found_dir" != "X"; then | |
10660 | break | |
10661 | fi | |
10662 | done | |
10663 | fi | |
10664 | if test "X$found_dir" != "X"; then | |
10665 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" | |
10666 | if test "X$found_so" != "X"; then | |
10667 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10668 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10669 | else | |
10670 | haveit= | |
10671 | for x in $ltrpathdirs; do | |
10672 | if test "X$x" = "X$found_dir"; then | |
10673 | haveit=yes | |
10674 | break | |
10675 | fi | |
10676 | done | |
10677 | if test -z "$haveit"; then | |
10678 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10679 | fi | |
10680 | if test "$hardcode_direct" = yes; then | |
10681 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10682 | else | |
10683 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10684 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10685 | haveit= | |
10686 | for x in $rpathdirs; do | |
10687 | if test "X$x" = "X$found_dir"; then | |
10688 | haveit=yes | |
10689 | break | |
10690 | fi | |
10691 | done | |
10692 | if test -z "$haveit"; then | |
10693 | rpathdirs="$rpathdirs $found_dir" | |
10694 | fi | |
10695 | else | |
10696 | haveit= | |
10697 | for x in $LDFLAGS $LIBMPFR; do | |
10698 | ||
10699 | acl_save_prefix="$prefix" | |
10700 | prefix="$acl_final_prefix" | |
10701 | acl_save_exec_prefix="$exec_prefix" | |
10702 | exec_prefix="$acl_final_exec_prefix" | |
10703 | eval x=\"$x\" | |
10704 | exec_prefix="$acl_save_exec_prefix" | |
10705 | prefix="$acl_save_prefix" | |
10706 | ||
10707 | if test "X$x" = "X-L$found_dir"; then | |
10708 | haveit=yes | |
10709 | break | |
10710 | fi | |
10711 | done | |
10712 | if test -z "$haveit"; then | |
10713 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" | |
10714 | fi | |
10715 | if test "$hardcode_minus_L" != no; then | |
10716 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" | |
10717 | else | |
10718 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10719 | fi | |
10720 | fi | |
10721 | fi | |
10722 | fi | |
10723 | else | |
10724 | if test "X$found_a" != "X"; then | |
10725 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" | |
10726 | else | |
10727 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" | |
10728 | fi | |
10729 | fi | |
10730 | additional_includedir= | |
10731 | case "$found_dir" in | |
10732 | */lib | */lib/) | |
10733 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10734 | additional_includedir="$basedir/include" | |
10735 | ;; | |
10736 | esac | |
10737 | if test "X$additional_includedir" != "X"; then | |
10738 | if test "X$additional_includedir" != "X/usr/include"; then | |
10739 | haveit= | |
10740 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10741 | if test -n "$GCC"; then | |
10742 | case $host_os in | |
10743 | linux*) haveit=yes;; | |
10744 | esac | |
10745 | fi | |
10746 | fi | |
10747 | if test -z "$haveit"; then | |
10748 | for x in $CPPFLAGS $INCMPFR; do | |
10749 | ||
10750 | acl_save_prefix="$prefix" | |
10751 | prefix="$acl_final_prefix" | |
10752 | acl_save_exec_prefix="$exec_prefix" | |
10753 | exec_prefix="$acl_final_exec_prefix" | |
10754 | eval x=\"$x\" | |
10755 | exec_prefix="$acl_save_exec_prefix" | |
10756 | prefix="$acl_save_prefix" | |
10757 | ||
10758 | if test "X$x" = "X-I$additional_includedir"; then | |
10759 | haveit=yes | |
10760 | break | |
10761 | fi | |
10762 | done | |
10763 | if test -z "$haveit"; then | |
10764 | if test -d "$additional_includedir"; then | |
10765 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" | |
10766 | fi | |
10767 | fi | |
10768 | fi | |
10769 | fi | |
10770 | fi | |
10771 | if test -n "$found_la"; then | |
10772 | save_libdir="$libdir" | |
10773 | case "$found_la" in | |
10774 | */* | *\\*) . "$found_la" ;; | |
10775 | *) . "./$found_la" ;; | |
10776 | esac | |
10777 | libdir="$save_libdir" | |
10778 | for dep in $dependency_libs; do | |
10779 | case "$dep" in | |
10780 | -L*) | |
10781 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10782 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10783 | haveit= | |
10784 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10785 | if test -n "$GCC"; then | |
10786 | case $host_os in | |
10787 | linux*) haveit=yes;; | |
10788 | esac | |
10789 | fi | |
10790 | fi | |
10791 | if test -z "$haveit"; then | |
10792 | haveit= | |
10793 | for x in $LDFLAGS $LIBMPFR; do | |
10794 | ||
10795 | acl_save_prefix="$prefix" | |
10796 | prefix="$acl_final_prefix" | |
10797 | acl_save_exec_prefix="$exec_prefix" | |
10798 | exec_prefix="$acl_final_exec_prefix" | |
10799 | eval x=\"$x\" | |
10800 | exec_prefix="$acl_save_exec_prefix" | |
10801 | prefix="$acl_save_prefix" | |
10802 | ||
10803 | if test "X$x" = "X-L$additional_libdir"; then | |
10804 | haveit=yes | |
10805 | break | |
10806 | fi | |
10807 | done | |
10808 | if test -z "$haveit"; then | |
10809 | if test -d "$additional_libdir"; then | |
10810 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" | |
10811 | fi | |
10812 | fi | |
10813 | haveit= | |
10814 | for x in $LDFLAGS $LTLIBMPFR; do | |
10815 | ||
10816 | acl_save_prefix="$prefix" | |
10817 | prefix="$acl_final_prefix" | |
10818 | acl_save_exec_prefix="$exec_prefix" | |
10819 | exec_prefix="$acl_final_exec_prefix" | |
10820 | eval x=\"$x\" | |
10821 | exec_prefix="$acl_save_exec_prefix" | |
10822 | prefix="$acl_save_prefix" | |
10823 | ||
10824 | if test "X$x" = "X-L$additional_libdir"; then | |
10825 | haveit=yes | |
10826 | break | |
10827 | fi | |
10828 | done | |
10829 | if test -z "$haveit"; then | |
10830 | if test -d "$additional_libdir"; then | |
10831 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" | |
10832 | fi | |
10833 | fi | |
10834 | fi | |
10835 | fi | |
10836 | ;; | |
10837 | -R*) | |
10838 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10839 | if test "$enable_rpath" != no; then | |
10840 | haveit= | |
10841 | for x in $rpathdirs; do | |
10842 | if test "X$x" = "X$dir"; then | |
10843 | haveit=yes | |
10844 | break | |
10845 | fi | |
10846 | done | |
10847 | if test -z "$haveit"; then | |
10848 | rpathdirs="$rpathdirs $dir" | |
10849 | fi | |
10850 | haveit= | |
10851 | for x in $ltrpathdirs; do | |
10852 | if test "X$x" = "X$dir"; then | |
10853 | haveit=yes | |
10854 | break | |
10855 | fi | |
10856 | done | |
10857 | if test -z "$haveit"; then | |
10858 | ltrpathdirs="$ltrpathdirs $dir" | |
10859 | fi | |
10860 | fi | |
10861 | ;; | |
10862 | -l*) | |
10863 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10864 | ;; | |
10865 | *.la) | |
10866 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10867 | ;; | |
10868 | *) | |
10869 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" | |
10870 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" | |
10871 | ;; | |
10872 | esac | |
10873 | done | |
10874 | fi | |
10875 | else | |
9f1528a1 AB |
10876 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
10877 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" | |
10878 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" | |
10879 | else | |
10880 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext" | |
10881 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext" | |
10882 | fi | |
2400729e UW |
10883 | fi |
10884 | fi | |
10885 | fi | |
10886 | done | |
10887 | done | |
10888 | if test "X$rpathdirs" != "X"; then | |
10889 | if test -n "$hardcode_libdir_separator"; then | |
10890 | alldirs= | |
10891 | for found_dir in $rpathdirs; do | |
10892 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10893 | done | |
10894 | acl_save_libdir="$libdir" | |
10895 | libdir="$alldirs" | |
10896 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10897 | libdir="$acl_save_libdir" | |
10898 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10899 | else | |
10900 | for found_dir in $rpathdirs; do | |
10901 | acl_save_libdir="$libdir" | |
10902 | libdir="$found_dir" | |
10903 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10904 | libdir="$acl_save_libdir" | |
10905 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" | |
10906 | done | |
10907 | fi | |
10908 | fi | |
10909 | if test "X$ltrpathdirs" != "X"; then | |
10910 | for found_dir in $ltrpathdirs; do | |
10911 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" | |
10912 | done | |
10913 | fi | |
10914 | ||
10915 | ||
10916 | ac_save_CPPFLAGS="$CPPFLAGS" | |
10917 | ||
10918 | for element in $INCMPFR; do | |
10919 | haveit= | |
10920 | for x in $CPPFLAGS; do | |
10921 | ||
10922 | acl_save_prefix="$prefix" | |
10923 | prefix="$acl_final_prefix" | |
10924 | acl_save_exec_prefix="$exec_prefix" | |
10925 | exec_prefix="$acl_final_exec_prefix" | |
10926 | eval x=\"$x\" | |
10927 | exec_prefix="$acl_save_exec_prefix" | |
10928 | prefix="$acl_save_prefix" | |
10929 | ||
10930 | if test "X$x" = "X$element"; then | |
10931 | haveit=yes | |
10932 | break | |
10933 | fi | |
10934 | done | |
10935 | if test -z "$haveit"; then | |
10936 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10937 | fi | |
10938 | done | |
10939 | ||
10940 | ||
10941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 | |
10942 | $as_echo_n "checking for libmpfr... " >&6; } | |
d0ac1c44 | 10943 | if ${ac_cv_libmpfr+:} false; then : |
2400729e UW |
10944 | $as_echo_n "(cached) " >&6 |
10945 | else | |
10946 | ||
10947 | ac_save_LIBS="$LIBS" | |
10948 | LIBS="$LIBS $LIBMPFR" | |
10949 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10950 | /* end confdefs.h. */ | |
10951 | #include <mpfr.h> | |
10952 | int | |
10953 | main () | |
10954 | { | |
10955 | mpfr_exp_t exp; mpfr_t x; | |
10956 | mpfr_frexp (&exp, x, x, MPFR_RNDN); | |
10957 | ; | |
10958 | return 0; | |
10959 | } | |
10960 | _ACEOF | |
10961 | if ac_fn_c_try_link "$LINENO"; then : | |
10962 | ac_cv_libmpfr=yes | |
10963 | else | |
10964 | ac_cv_libmpfr=no | |
10965 | fi | |
10966 | rm -f core conftest.err conftest.$ac_objext \ | |
10967 | conftest$ac_exeext conftest.$ac_ext | |
10968 | LIBS="$ac_save_LIBS" | |
10969 | ||
10970 | fi | |
10971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 | |
10972 | $as_echo "$ac_cv_libmpfr" >&6; } | |
10973 | if test "$ac_cv_libmpfr" = yes; then | |
10974 | HAVE_LIBMPFR=yes | |
10975 | ||
10976 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h | |
10977 | ||
10978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 | |
10979 | $as_echo_n "checking how to link with libmpfr... " >&6; } | |
10980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 | |
10981 | $as_echo "$LIBMPFR" >&6; } | |
10982 | else | |
10983 | HAVE_LIBMPFR=no | |
10984 | CPPFLAGS="$ac_save_CPPFLAGS" | |
10985 | LIBMPFR= | |
10986 | LTLIBMPFR= | |
10987 | fi | |
10988 | ||
10989 | ||
10990 | ||
10991 | ||
10992 | ||
10993 | ||
10994 | if test "$HAVE_LIBMPFR" != yes; then | |
10995 | if test "$with_mpfr" = yes; then | |
d0ac1c44 | 10996 | as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 |
2400729e UW |
10997 | else |
10998 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 | |
10999 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} | |
11000 | fi | |
11001 | fi | |
11002 | fi | |
11003 | ||
d344e670 DE |
11004 | # --------------------- # |
11005 | # Check for libpython. # | |
11006 | # --------------------- # | |
11007 | ||
a9322a30 | 11008 | |
a9322a30 TT |
11009 | |
11010 | ||
ec685c5e | 11011 | |
0c4a4063 | 11012 | |
81ecdfbb RW |
11013 | # Check whether --with-python was given. |
11014 | if test "${with_python+set}" = set; then : | |
11015 | withval=$with_python; | |
bec39cab | 11016 | else |
81ecdfbb | 11017 | with_python=auto |
bec39cab | 11018 | fi |
bec39cab | 11019 | |
81ecdfbb RW |
11020 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
11021 | $as_echo_n "checking whether to use python... " >&6; } | |
11022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
11023 | $as_echo "$with_python" >&6; } | |
9a156167 | 11024 | |
81ecdfbb RW |
11025 | if test "${with_python}" = no; then |
11026 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
11027 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
11028 | have_libpython=no | |
bec39cab | 11029 | else |
81ecdfbb | 11030 | case "${with_python}" in |
8c85a4e2 | 11031 | [\\/]* | ?:[\\/]*) |
0ad6b8ee | 11032 | if test -d "${with_python}"; then |
ec685c5e | 11033 | # Assume the python binary is ${with_python}/bin/python. |
ec685c5e | 11034 | python_prog="${with_python}/bin/python" |
0c4a4063 | 11035 | python_prefix= |
9c4ea6c5 JB |
11036 | # If python does not exit ${with_python}/bin, then try in |
11037 | # ${with_python}. On Windows/MinGW, this is where the Python | |
11038 | # executable is. | |
11039 | if test ! -x "${python_prog}"; then | |
11040 | python_prog="${with_python}/python" | |
11041 | python_prefix= | |
11042 | fi | |
e7a30f46 | 11043 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
11044 | # Fall back to gdb 7.0/7.1 behaviour. |
11045 | python_prog=missing | |
0c4a4063 | 11046 | python_prefix=${with_python} |
ec685c5e | 11047 | fi |
e7a30f46 | 11048 | elif test -x "${with_python}"; then |
ec685c5e DE |
11049 | # While we can't run python compiled for $host (unless host == build), |
11050 | # the user could write a script that provides the needed information, | |
11051 | # so we support that. | |
ec685c5e | 11052 | python_prog=${with_python} |
0c4a4063 | 11053 | python_prefix= |
ec685c5e | 11054 | else |
d0ac1c44 | 11055 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
ec685c5e | 11056 | fi |
81ecdfbb | 11057 | ;; |
ec685c5e DE |
11058 | */*) |
11059 | # Disallow --with-python=foo/bar. | |
d0ac1c44 | 11060 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
81ecdfbb | 11061 | ;; |
ec685c5e DE |
11062 | *) |
11063 | # The user has either specified auto, yes, or the name of the python | |
11064 | # program assumed to be in $PATH. | |
11065 | python_prefix= | |
11066 | case "${with_python}" in | |
11067 | yes | auto) | |
0ad6b8ee | 11068 | if test "${build}" = "${host}"; then |
ec685c5e DE |
11069 | # Extract the first word of "python", so it can be a program name with args. |
11070 | set dummy python; ac_word=$2 | |
11071 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11072 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11073 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
11074 | $as_echo_n "(cached) " >&6 |
11075 | else | |
11076 | case $python_prog_path in | |
11077 | [\\/]* | ?:[\\/]*) | |
11078 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
11079 | ;; | |
11080 | *) | |
11081 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11082 | for as_dir in $PATH | |
11083 | do | |
11084 | IFS=$as_save_IFS | |
11085 | test -z "$as_dir" && as_dir=. | |
11086 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11087 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
11088 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11089 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11090 | break 2 | |
11091 | fi | |
11092 | done | |
11093 | done | |
11094 | IFS=$as_save_IFS | |
11095 | ||
11096 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
11097 | ;; | |
11098 | esac | |
11099 | fi | |
11100 | python_prog_path=$ac_cv_path_python_prog_path | |
11101 | if test -n "$python_prog_path"; then | |
11102 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
11103 | $as_echo "$python_prog_path" >&6; } | |
11104 | else | |
11105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11106 | $as_echo "no" >&6; } | |
11107 | fi | |
11108 | ||
11109 | ||
11110 | if test "${python_prog_path}" = missing; then | |
11111 | python_prog=missing | |
11112 | else | |
11113 | python_prog=${python_prog_path} | |
11114 | fi | |
11115 | else | |
11116 | # Not much we can do except assume the cross-compiler will find the | |
11117 | # right files. | |
11118 | python_prog=missing | |
11119 | fi | |
11120 | ;; | |
11121 | *) | |
11122 | # While we can't run python compiled for $host (unless host == build), | |
11123 | # the user could write a script that provides the needed information, | |
11124 | # so we support that. | |
11125 | python_prog="${with_python}" | |
11126 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
11127 | set dummy ${python_prog}; ac_word=$2 | |
11128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11129 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11130 | if ${ac_cv_path_python_prog_path+:} false; then : |
ec685c5e DE |
11131 | $as_echo_n "(cached) " >&6 |
11132 | else | |
11133 | case $python_prog_path in | |
11134 | [\\/]* | ?:[\\/]*) | |
11135 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
11136 | ;; | |
11137 | *) | |
11138 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11139 | for as_dir in $PATH | |
11140 | do | |
11141 | IFS=$as_save_IFS | |
11142 | test -z "$as_dir" && as_dir=. | |
11143 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11144 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ec685c5e DE |
11145 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11146 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11147 | break 2 | |
11148 | fi | |
11149 | done | |
11150 | done | |
11151 | IFS=$as_save_IFS | |
11152 | ||
11153 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
11154 | ;; | |
11155 | esac | |
11156 | fi | |
11157 | python_prog_path=$ac_cv_path_python_prog_path | |
11158 | if test -n "$python_prog_path"; then | |
11159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
11160 | $as_echo "$python_prog_path" >&6; } | |
11161 | else | |
11162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11163 | $as_echo "no" >&6; } | |
11164 | fi | |
11165 | ||
11166 | ||
11167 | if test "${python_prog_path}" = missing; then | |
5593a99a | 11168 | as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 |
ec685c5e DE |
11169 | fi |
11170 | ;; | |
11171 | esac | |
81ecdfbb RW |
11172 | esac |
11173 | ||
ec685c5e | 11174 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
11175 | # We have a python program to use, but it may be too old. |
11176 | # Don't flag an error for --with-python=auto (the default). | |
11177 | have_python_config=yes | |
ec685c5e DE |
11178 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
11179 | if test $? != 0; then | |
e7a30f46 DE |
11180 | have_python_config=failed |
11181 | if test "${with_python}" != auto; then | |
5593a99a | 11182 | as_fn_error $? "failure running python-config --includes" "$LINENO" 5 |
e7a30f46 | 11183 | fi |
ec685c5e DE |
11184 | fi |
11185 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
11186 | if test $? != 0; then | |
e7a30f46 DE |
11187 | have_python_config=failed |
11188 | if test "${with_python}" != auto; then | |
5593a99a | 11189 | as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 |
e7a30f46 | 11190 | fi |
ec685c5e | 11191 | fi |
0c4a4063 DE |
11192 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
11193 | if test $? != 0; then | |
e7a30f46 DE |
11194 | have_python_config=failed |
11195 | if test "${with_python}" != auto; then | |
5593a99a | 11196 | as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 |
e7a30f46 | 11197 | fi |
0c4a4063 | 11198 | fi |
ec685c5e | 11199 | else |
ac534cba JB |
11200 | # We do not have a python executable we can use to determine where |
11201 | # to find the Python headers and libs. We cannot guess the include | |
11202 | # path from the python_prefix either, because that include path | |
11203 | # depends on the Python version. So, there is nothing much we can | |
11204 | # do except assume that the compiler will be able to find those files. | |
11205 | python_includes= | |
11206 | python_libs= | |
0c4a4063 | 11207 | have_python_config=no |
ec685c5e | 11208 | fi |
bec39cab | 11209 | |
ec685c5e DE |
11210 | # If we have python-config, only try the configuration it provides. |
11211 | # Otherwise fallback on the old way of trying different versions of | |
11212 | # python in turn. | |
81ecdfbb | 11213 | |
ec685c5e DE |
11214 | have_libpython=no |
11215 | if test "${have_python_config}" = yes; then | |
71737c43 | 11216 | |
ec685c5e DE |
11217 | |
11218 | new_CPPFLAGS=${python_includes} | |
11219 | new_LIBS=${python_libs} | |
71737c43 CB |
11220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11221 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e | 11222 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 11223 | save_LIBS=$LIBS |
ec685c5e | 11224 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
bf27f0e2 | 11225 | LIBS="$new_LIBS $LIBS" |
ec685c5e | 11226 | found_usable_python=no |
81ecdfbb | 11227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11228 | /* end confdefs.h. */ |
ac534cba | 11229 | #include "Python.h" |
81ecdfbb RW |
11230 | int |
11231 | main () | |
11232 | { | |
11233 | Py_Initialize (); | |
11234 | ; | |
11235 | return 0; | |
11236 | } | |
bec39cab | 11237 | _ACEOF |
81ecdfbb | 11238 | if ac_fn_c_try_link "$LINENO"; then : |
71737c43 | 11239 | have_libpython=yes |
ec685c5e | 11240 | found_usable_python=yes |
ac534cba JB |
11241 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11242 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 11243 | fi |
81ecdfbb RW |
11244 | rm -f core conftest.err conftest.$ac_objext \ |
11245 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11246 | CPPFLAGS=$save_CPPFLAGS |
11247 | LIBS=$save_LIBS | |
ec685c5e DE |
11248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11249 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 11250 | |
e7a30f46 | 11251 | elif test "${have_python_config}" != failed; then |
ec685c5e | 11252 | if test "${have_libpython}" = no; then |
9a156167 | 11253 | |
420697bb TT |
11254 | |
11255 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 11256 | new_LIBS="-lpython2.7 ${python_libs}" |
71737c43 CB |
11257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11258 | $as_echo_n "checking for python... " >&6; } | |
420697bb TT |
11259 | save_CPPFLAGS=$CPPFLAGS |
11260 | save_LIBS=$LIBS | |
11261 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 11262 | LIBS="$new_LIBS $LIBS" |
420697bb TT |
11263 | found_usable_python=no |
11264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11265 | /* end confdefs.h. */ | |
ac534cba | 11266 | #include "Python.h" |
420697bb TT |
11267 | int |
11268 | main () | |
11269 | { | |
11270 | Py_Initialize (); | |
11271 | ; | |
11272 | return 0; | |
11273 | } | |
11274 | _ACEOF | |
11275 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 11276 | have_libpython=yes |
420697bb | 11277 | found_usable_python=yes |
ac534cba JB |
11278 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11279 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
11280 | fi |
11281 | rm -f core conftest.err conftest.$ac_objext \ | |
11282 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11283 | CPPFLAGS=$save_CPPFLAGS |
11284 | LIBS=$save_LIBS | |
420697bb TT |
11285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11286 | $as_echo "${found_usable_python}" >&6; } | |
11287 | ||
11288 | fi | |
11289 | if test "${have_libpython}" = no; then | |
11290 | ||
ec685c5e DE |
11291 | |
11292 | new_CPPFLAGS=${python_includes} | |
bf27f0e2 | 11293 | new_LIBS="-lpython2.6 ${python_libs}" |
71737c43 CB |
11294 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
11295 | $as_echo_n "checking for python... " >&6; } | |
ec685c5e DE |
11296 | save_CPPFLAGS=$CPPFLAGS |
11297 | save_LIBS=$LIBS | |
11298 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
bf27f0e2 | 11299 | LIBS="$new_LIBS $LIBS" |
ec685c5e DE |
11300 | found_usable_python=no |
11301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11302 | /* end confdefs.h. */ | |
ac534cba | 11303 | #include "Python.h" |
ec685c5e DE |
11304 | int |
11305 | main () | |
11306 | { | |
11307 | Py_Initialize (); | |
11308 | ; | |
11309 | return 0; | |
11310 | } | |
11311 | _ACEOF | |
11312 | if ac_fn_c_try_link "$LINENO"; then : | |
71737c43 | 11313 | have_libpython=yes |
ec685c5e | 11314 | found_usable_python=yes |
ac534cba JB |
11315 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
11316 | PYTHON_LIBS=$new_LIBS | |
ec685c5e | 11317 | fi |
81ecdfbb RW |
11318 | rm -f core conftest.err conftest.$ac_objext \ |
11319 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
11320 | CPPFLAGS=$save_CPPFLAGS |
11321 | LIBS=$save_LIBS | |
ec685c5e DE |
11322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
11323 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 11324 | |
ec685c5e DE |
11325 | fi |
11326 | fi | |
ec685c5e DE |
11327 | |
11328 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
11329 | case "${with_python}" in |
11330 | yes) | |
d0ac1c44 | 11331 | as_fn_error $? "python is missing or unusable" "$LINENO" 5 |
81ecdfbb RW |
11332 | ;; |
11333 | auto) | |
11334 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
11335 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
11336 | ;; | |
11337 | *) | |
d0ac1c44 | 11338 | as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 |
81ecdfbb RW |
11339 | ;; |
11340 | esac | |
0c4a4063 DE |
11341 | else |
11342 | if test -n "${python_prefix}"; then | |
11343 | ||
11344 | cat >>confdefs.h <<_ACEOF | |
11345 | #define WITH_PYTHON_PATH "${python_prefix}" | |
11346 | _ACEOF | |
11347 | ||
11348 | ||
11349 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11350 | if test "x$prefix" = xNONE; then | |
11351 | test_prefix=/usr/local | |
11352 | else | |
11353 | test_prefix=$prefix | |
11354 | fi | |
11355 | else | |
11356 | test_prefix=$exec_prefix | |
11357 | fi | |
11358 | value=0 | |
11359 | case ${python_prefix} in | |
11360 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11361 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11362 | value=1 | |
11363 | ;; | |
11364 | esac | |
11365 | ||
11366 | cat >>confdefs.h <<_ACEOF | |
11367 | #define PYTHON_PATH_RELOCATABLE $value | |
11368 | _ACEOF | |
11369 | ||
11370 | ||
11371 | fi | |
81ecdfbb | 11372 | fi |
436868fb | 11373 | fi |
436868fb | 11374 | |
d13c7322 AB |
11375 | |
11376 | # Check whether --with-python-libdir was given. | |
11377 | if test "${with_python_libdir+set}" = set; then : | |
11378 | withval=$with_python_libdir; | |
11379 | else | |
11380 | ||
11381 | # If no python libdir is specified then select one based on | |
11382 | # python's prefix path. | |
11383 | if test -n "${python_prefix}"; then | |
11384 | with_python_libdir=${python_prefix}/lib | |
11385 | fi | |
11386 | ||
11387 | fi | |
11388 | ||
11389 | ||
ec685c5e | 11390 | if test "${have_libpython}" != no; then |
436868fb | 11391 | |
81ecdfbb | 11392 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 11393 | |
81ecdfbb RW |
11394 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
11395 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
11396 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 11397 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 11398 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 11399 | |
d13c7322 AB |
11400 | if test -n "${with_python_libdir}"; then |
11401 | ||
11402 | cat >>confdefs.h <<_ACEOF | |
11403 | #define WITH_PYTHON_LIBDIR "${with_python_libdir}" | |
11404 | _ACEOF | |
11405 | ||
11406 | ||
11407 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11408 | if test "x$prefix" = xNONE; then | |
11409 | test_prefix=/usr/local | |
11410 | else | |
11411 | test_prefix=$prefix | |
11412 | fi | |
11413 | else | |
11414 | test_prefix=$exec_prefix | |
11415 | fi | |
11416 | value=0 | |
11417 | case ${with_python_libdir} in | |
11418 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11419 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11420 | value=1 | |
11421 | ;; | |
11422 | esac | |
11423 | ||
11424 | cat >>confdefs.h <<_ACEOF | |
11425 | #define PYTHON_LIBDIR_RELOCATABLE $value | |
11426 | _ACEOF | |
11427 | ||
11428 | ||
11429 | fi | |
11430 | ||
81ecdfbb RW |
11431 | # Flags needed to compile Python code (taken from python-config --cflags). |
11432 | # We cannot call python-config directly because it will output whatever was | |
11433 | # used when compiling the Python interpreter itself, including flags which | |
11434 | # would make the python-related objects be compiled differently from the | |
11435 | # rest of GDB (e.g., -O2 and -fPIC). | |
11436 | if test "${GCC}" = yes; then | |
ae292b3a TT |
11437 | tentative_python_cflags="-fno-strict-aliasing -fwrapv" |
11438 | # Python headers recommend -DNDEBUG, but it's unclear if that just | |
11439 | # refers to building Python itself. In release mode, though, it | |
11440 | # doesn't hurt for the Python code in gdb to follow. | |
11441 | $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG" | |
81ecdfbb | 11442 | fi |
436868fb | 11443 | |
81ecdfbb RW |
11444 | if test "x${tentative_python_cflags}" != x; then |
11445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
11446 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
11447 | for flag in ${tentative_python_cflags}; do | |
11448 | # Check that the compiler accepts it | |
11449 | saved_CFLAGS="$CFLAGS" | |
11450 | CFLAGS="$CFLAGS $flag" | |
11451 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 11452 | /* end confdefs.h. */ |
81ecdfbb | 11453 | |
a9322a30 TT |
11454 | int |
11455 | main () | |
11456 | { | |
a9322a30 TT |
11457 | |
11458 | ; | |
11459 | return 0; | |
11460 | } | |
bec39cab | 11461 | _ACEOF |
81ecdfbb RW |
11462 | if ac_fn_c_try_compile "$LINENO"; then : |
11463 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 11464 | fi |
81ecdfbb RW |
11465 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
11466 | CFLAGS="$saved_CFLAGS" | |
11467 | done | |
11468 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
11469 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
11470 | fi | |
043b6510 | 11471 | |
c83393b9 JB |
11472 | # On x64 Windows, Python's include headers, and pyconfig.h in |
11473 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
11474 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
11475 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
11476 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
11477 | # The issue was reported to the Python community, but still isn't | |
11478 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
11479 | ||
043b6510 | 11480 | case "$gdb_host" in |
c83393b9 JB |
11481 | mingw64) |
11482 | if test "${GCC}" = yes; then | |
11483 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
11484 | fi | |
11485 | ;; | |
043b6510 | 11486 | esac |
81ecdfbb | 11487 | else |
6dddc817 DE |
11488 | # Even if Python support is not compiled in, we need to have this file |
11489 | # included so that the "python" command, et.al., still exists. | |
8fd8d003 | 11490 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
6dddc817 | 11491 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
a9322a30 | 11492 | fi |
9a156167 | 11493 | |
a4a1c157 PA |
11494 | # Work around Python http://bugs.python.org/issue10112. See also |
11495 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has | |
11496 | # no effect. Note that the only test after this that uses Python is | |
11497 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be | |
11498 | # run without -export-dynamic too. | |
11499 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` | |
11500 | ||
11501 | ||
ed3ef339 DE |
11502 | |
11503 | ||
4df42755 DE |
11504 | if test "${have_libpython}" != no; then |
11505 | HAVE_PYTHON_TRUE= | |
11506 | HAVE_PYTHON_FALSE='#' | |
11507 | else | |
11508 | HAVE_PYTHON_TRUE='#' | |
11509 | HAVE_PYTHON_FALSE= | |
11510 | fi | |
11511 | ||
ed3ef339 DE |
11512 | |
11513 | # -------------------- # | |
11514 | # Check for libguile. # | |
11515 | # -------------------- # | |
11516 | ||
11517 | ||
e1402065 DE |
11518 | |
11519 | ||
11520 | ||
11521 | ||
11522 | # Check whether --with-guile was given. | |
11523 | if test "${with_guile+set}" = set; then : | |
11524 | withval=$with_guile; | |
11525 | else | |
11526 | with_guile=auto | |
11527 | fi | |
11528 | ||
11529 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 | |
11530 | $as_echo_n "checking whether to use guile... " >&6; } | |
11531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 | |
11532 | $as_echo "$with_guile" >&6; } | |
11533 | ||
ed3ef339 DE |
11534 | # Extract the first word of "pkg-config", so it can be a program name with args. |
11535 | set dummy pkg-config; ac_word=$2 | |
11536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
11537 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 11538 | if ${ac_cv_path_pkg_config_prog_path+:} false; then : |
ed3ef339 DE |
11539 | $as_echo_n "(cached) " >&6 |
11540 | else | |
11541 | case $pkg_config_prog_path in | |
11542 | [\\/]* | ?:[\\/]*) | |
11543 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. | |
11544 | ;; | |
11545 | *) | |
11546 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11547 | for as_dir in $PATH | |
11548 | do | |
11549 | IFS=$as_save_IFS | |
11550 | test -z "$as_dir" && as_dir=. | |
11551 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 11552 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ed3ef339 DE |
11553 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" |
11554 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
11555 | break 2 | |
11556 | fi | |
11557 | done | |
11558 | done | |
11559 | IFS=$as_save_IFS | |
11560 | ||
11561 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" | |
11562 | ;; | |
11563 | esac | |
11564 | fi | |
11565 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path | |
11566 | if test -n "$pkg_config_prog_path"; then | |
11567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 | |
11568 | $as_echo "$pkg_config_prog_path" >&6; } | |
11569 | else | |
11570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11571 | $as_echo "no" >&6; } | |
11572 | fi | |
11573 | ||
11574 | ||
11575 | ||
ae5369e7 | 11576 | try_guile_versions="guile-3.0 guile-2.2 guile-2.0" |
ed3ef339 DE |
11577 | have_libguile=no |
11578 | case "${with_guile}" in | |
11579 | no) | |
11580 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 | |
11581 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} | |
11582 | ;; | |
11583 | auto) | |
e1402065 DE |
11584 | if test "${pkg_config_prog_path}" = "missing"; then |
11585 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 | |
11586 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} | |
11587 | else | |
ed3ef339 DE |
11588 | |
11589 | pkg_config=${pkg_config_prog_path} | |
11590 | guile_version_list=${try_guile_versions} | |
11591 | flag_errors=no | |
11592 | ||
ed3ef339 DE |
11593 | found_usable_guile=checking |
11594 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11595 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11596 | for guile_version in ${guile_version_list}; do | |
11597 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11598 | if test $? != 0; then | |
11599 | continue | |
11600 | fi | |
11601 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11602 | if test $? != 0; then | |
d0ac1c44 | 11603 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11604 | fi |
11605 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11606 | if test $? != 0; then | |
d0ac1c44 | 11607 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11608 | fi |
11609 | found_usable_guile=${guile_version} | |
11610 | break | |
11611 | done | |
11612 | if test "${found_usable_guile}" = "checking"; then | |
11613 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11614 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11615 | else |
11616 | found_usable_guile=no | |
11617 | fi | |
11618 | fi | |
11619 | if test "${found_usable_guile}" != no; then | |
11620 | save_CPPFLAGS=$CPPFLAGS | |
11621 | save_LIBS=$LIBS | |
11622 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11623 | LIBS="$LIBS $new_LIBS" | |
11624 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11625 | /* end confdefs.h. */ | |
11626 | #include "libguile.h" | |
11627 | int | |
11628 | main () | |
11629 | { | |
11630 | scm_init_guile (); | |
11631 | ; | |
11632 | return 0; | |
11633 | } | |
11634 | _ACEOF | |
11635 | if ac_fn_c_try_link "$LINENO"; then : | |
11636 | have_libguile=yes | |
11637 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11638 | GUILE_LIBS=$new_LIBS | |
11639 | else | |
11640 | found_usable_guile=no | |
11641 | fi | |
11642 | rm -f core conftest.err conftest.$ac_objext \ | |
11643 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11644 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11645 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11646 | |
11647 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11648 | ||
11649 | ||
11650 | fi | |
11651 | ||
ed3ef339 DE |
11652 | CPPFLAGS=$save_CPPFLAGS |
11653 | LIBS=$save_LIBS | |
11654 | if test "${found_usable_guile}" = no; then | |
11655 | if test "${flag_errors}" = yes; then | |
11656 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11657 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11658 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11659 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11660 | fi |
11661 | fi | |
11662 | fi | |
11663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11664 | $as_echo "${found_usable_guile}" >&6; } | |
11665 | ||
e1402065 | 11666 | fi |
ed3ef339 DE |
11667 | ;; |
11668 | yes) | |
e1402065 | 11669 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11670 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11671 | fi |
ed3ef339 DE |
11672 | |
11673 | pkg_config=${pkg_config_prog_path} | |
11674 | guile_version_list=${try_guile_versions} | |
11675 | flag_errors=yes | |
11676 | ||
ed3ef339 DE |
11677 | found_usable_guile=checking |
11678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11679 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11680 | for guile_version in ${guile_version_list}; do | |
11681 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11682 | if test $? != 0; then | |
11683 | continue | |
11684 | fi | |
11685 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11686 | if test $? != 0; then | |
d0ac1c44 | 11687 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11688 | fi |
11689 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11690 | if test $? != 0; then | |
d0ac1c44 | 11691 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11692 | fi |
11693 | found_usable_guile=${guile_version} | |
11694 | break | |
11695 | done | |
11696 | if test "${found_usable_guile}" = "checking"; then | |
11697 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11698 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11699 | else |
11700 | found_usable_guile=no | |
11701 | fi | |
11702 | fi | |
11703 | if test "${found_usable_guile}" != no; then | |
11704 | save_CPPFLAGS=$CPPFLAGS | |
11705 | save_LIBS=$LIBS | |
11706 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11707 | LIBS="$LIBS $new_LIBS" | |
11708 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11709 | /* end confdefs.h. */ | |
11710 | #include "libguile.h" | |
11711 | int | |
11712 | main () | |
11713 | { | |
11714 | scm_init_guile (); | |
11715 | ; | |
11716 | return 0; | |
11717 | } | |
11718 | _ACEOF | |
11719 | if ac_fn_c_try_link "$LINENO"; then : | |
11720 | have_libguile=yes | |
11721 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11722 | GUILE_LIBS=$new_LIBS | |
11723 | else | |
11724 | found_usable_guile=no | |
11725 | fi | |
11726 | rm -f core conftest.err conftest.$ac_objext \ | |
11727 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11728 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11729 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11730 | |
11731 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11732 | ||
11733 | ||
11734 | fi | |
11735 | ||
ed3ef339 DE |
11736 | CPPFLAGS=$save_CPPFLAGS |
11737 | LIBS=$save_LIBS | |
11738 | if test "${found_usable_guile}" = no; then | |
11739 | if test "${flag_errors}" = yes; then | |
11740 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11741 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11742 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11743 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11744 | fi |
11745 | fi | |
11746 | fi | |
11747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11748 | $as_echo "${found_usable_guile}" >&6; } | |
11749 | ||
11750 | ;; | |
11751 | [\\/]* | ?:[\\/]*) | |
e1402065 | 11752 | if test -x "${with_guile}"; then |
ed3ef339 DE |
11753 | |
11754 | pkg_config=${with_guile} | |
11755 | guile_version_list=${try_guile_versions} | |
11756 | flag_errors=yes | |
11757 | ||
ed3ef339 DE |
11758 | found_usable_guile=checking |
11759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11760 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11761 | for guile_version in ${guile_version_list}; do | |
11762 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11763 | if test $? != 0; then | |
11764 | continue | |
11765 | fi | |
11766 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11767 | if test $? != 0; then | |
d0ac1c44 | 11768 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11769 | fi |
11770 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11771 | if test $? != 0; then | |
d0ac1c44 | 11772 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11773 | fi |
11774 | found_usable_guile=${guile_version} | |
11775 | break | |
11776 | done | |
11777 | if test "${found_usable_guile}" = "checking"; then | |
11778 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11779 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11780 | else |
11781 | found_usable_guile=no | |
11782 | fi | |
11783 | fi | |
11784 | if test "${found_usable_guile}" != no; then | |
11785 | save_CPPFLAGS=$CPPFLAGS | |
11786 | save_LIBS=$LIBS | |
11787 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11788 | LIBS="$LIBS $new_LIBS" | |
11789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11790 | /* end confdefs.h. */ | |
11791 | #include "libguile.h" | |
11792 | int | |
11793 | main () | |
11794 | { | |
11795 | scm_init_guile (); | |
11796 | ; | |
11797 | return 0; | |
11798 | } | |
11799 | _ACEOF | |
11800 | if ac_fn_c_try_link "$LINENO"; then : | |
11801 | have_libguile=yes | |
11802 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11803 | GUILE_LIBS=$new_LIBS | |
11804 | else | |
11805 | found_usable_guile=no | |
11806 | fi | |
11807 | rm -f core conftest.err conftest.$ac_objext \ | |
11808 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11809 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11810 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11811 | |
11812 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11813 | ||
11814 | ||
11815 | fi | |
11816 | ||
ed3ef339 DE |
11817 | CPPFLAGS=$save_CPPFLAGS |
11818 | LIBS=$save_LIBS | |
11819 | if test "${found_usable_guile}" = no; then | |
11820 | if test "${flag_errors}" = yes; then | |
11821 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11822 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11823 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11824 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11825 | fi |
11826 | fi | |
11827 | fi | |
11828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11829 | $as_echo "${found_usable_guile}" >&6; } | |
11830 | ||
e1402065 | 11831 | else |
d0ac1c44 | 11832 | as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 |
e1402065 | 11833 | fi |
ed3ef339 DE |
11834 | ;; |
11835 | "" | */*) | |
11836 | # Disallow --with=guile="" and --with-guile=foo/bar. | |
d0ac1c44 | 11837 | as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 |
ed3ef339 DE |
11838 | ;; |
11839 | *) | |
11840 | # A space separate list of guile versions to try, in order. | |
e1402065 | 11841 | if test "${pkg_config_prog_path}" = "missing"; then |
d0ac1c44 | 11842 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
e1402065 | 11843 | fi |
ed3ef339 DE |
11844 | |
11845 | pkg_config=${pkg_config_prog_path} | |
11846 | guile_version_list=${with_guile} | |
11847 | flag_errors=yes | |
11848 | ||
ed3ef339 DE |
11849 | found_usable_guile=checking |
11850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 | |
11851 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } | |
11852 | for guile_version in ${guile_version_list}; do | |
11853 | ${pkg_config} --exists ${guile_version} 2>/dev/null | |
11854 | if test $? != 0; then | |
11855 | continue | |
11856 | fi | |
11857 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` | |
11858 | if test $? != 0; then | |
d0ac1c44 | 11859 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11860 | fi |
11861 | new_LIBS=`${pkg_config} --libs ${guile_version}` | |
11862 | if test $? != 0; then | |
d0ac1c44 | 11863 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
ed3ef339 DE |
11864 | fi |
11865 | found_usable_guile=${guile_version} | |
11866 | break | |
11867 | done | |
11868 | if test "${found_usable_guile}" = "checking"; then | |
11869 | if test "${flag_errors}" = "yes"; then | |
d0ac1c44 | 11870 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
ed3ef339 DE |
11871 | else |
11872 | found_usable_guile=no | |
11873 | fi | |
11874 | fi | |
11875 | if test "${found_usable_guile}" != no; then | |
11876 | save_CPPFLAGS=$CPPFLAGS | |
11877 | save_LIBS=$LIBS | |
11878 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
11879 | LIBS="$LIBS $new_LIBS" | |
11880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11881 | /* end confdefs.h. */ | |
11882 | #include "libguile.h" | |
11883 | int | |
11884 | main () | |
11885 | { | |
11886 | scm_init_guile (); | |
11887 | ; | |
11888 | return 0; | |
11889 | } | |
11890 | _ACEOF | |
11891 | if ac_fn_c_try_link "$LINENO"; then : | |
11892 | have_libguile=yes | |
11893 | GUILE_CPPFLAGS=$new_CPPFLAGS | |
11894 | GUILE_LIBS=$new_LIBS | |
11895 | else | |
11896 | found_usable_guile=no | |
11897 | fi | |
11898 | rm -f core conftest.err conftest.$ac_objext \ | |
11899 | conftest$ac_exeext conftest.$ac_ext | |
92fab5a6 | 11900 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
d0ac1c44 | 11901 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
92fab5a6 AW |
11902 | |
11903 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h | |
11904 | ||
11905 | ||
11906 | fi | |
11907 | ||
ed3ef339 DE |
11908 | CPPFLAGS=$save_CPPFLAGS |
11909 | LIBS=$save_LIBS | |
11910 | if test "${found_usable_guile}" = no; then | |
11911 | if test "${flag_errors}" = yes; then | |
11912 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11913 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
d0ac1c44 SM |
11914 | as_fn_error $? "linking guile version ${guile_version} test program failed |
11915 | See \`config.log' for more details" "$LINENO" 5; } | |
ed3ef339 DE |
11916 | fi |
11917 | fi | |
11918 | fi | |
11919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 | |
11920 | $as_echo "${found_usable_guile}" >&6; } | |
11921 | ||
11922 | ;; | |
11923 | esac | |
11924 | ||
e76c5d17 | 11925 | if test "${have_libguile}" != no; then |
d342a0da DE |
11926 | case "${with_guile}" in |
11927 | [\\/]* | ?:[\\/]*) | |
e76c5d17 DE |
11928 | |
11929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11930 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11931 | if ${ac_cv_guild_program_name+:} false; then : |
e76c5d17 DE |
11932 | $as_echo_n "(cached) " >&6 |
11933 | else | |
d342a0da | 11934 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
e76c5d17 DE |
11935 | |
11936 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11937 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11938 | # what the program name is, at the risk of getting it wrong if | |
11939 | # Guile was configured with '--program-suffix' or similar. | |
11940 | if test "x$ac_cv_guild_program_name" = "x"; then | |
d342a0da | 11941 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
e76c5d17 DE |
11942 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
11943 | fi | |
11944 | ||
11945 | fi | |
11946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11947 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11948 | ||
11949 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11950 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
e76c5d17 DE |
11951 | fi |
11952 | ||
11953 | GUILD="$ac_cv_guild_program_name" | |
11954 | ||
11955 | ||
d342a0da DE |
11956 | ;; |
11957 | *) | |
11958 | ||
11959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 | |
11960 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } | |
d0ac1c44 | 11961 | if ${ac_cv_guild_program_name+:} false; then : |
d342a0da DE |
11962 | $as_echo_n "(cached) " >&6 |
11963 | else | |
11964 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" | |
11965 | ||
11966 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define | |
11967 | # the 'guild' and 'bindir' variables. In that case, try to guess | |
11968 | # what the program name is, at the risk of getting it wrong if | |
11969 | # Guile was configured with '--program-suffix' or similar. | |
11970 | if test "x$ac_cv_guild_program_name" = "x"; then | |
11971 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" | |
11972 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" | |
11973 | fi | |
11974 | ||
11975 | fi | |
11976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 | |
11977 | $as_echo "$ac_cv_guild_program_name" >&6; } | |
11978 | ||
11979 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then | |
d0ac1c44 | 11980 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
d342a0da DE |
11981 | fi |
11982 | ||
11983 | GUILD="$ac_cv_guild_program_name" | |
11984 | ||
11985 | ||
11986 | ;; | |
11987 | esac | |
e76c5d17 DE |
11988 | |
11989 | ||
11990 | if test "$cross_compiling" = no; then | |
11991 | GUILD_TARGET_FLAG= | |
11992 | else | |
11993 | GUILD_TARGET_FLAG="--target=$host" | |
11994 | fi | |
11995 | ||
11996 | ||
11997 | ||
11998 | ||
11999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 | |
12000 | $as_echo_n "checking whether guild supports this host... " >&6; } | |
d0ac1c44 | 12001 | if ${ac_cv_guild_ok+:} false; then : |
e76c5d17 DE |
12002 | $as_echo_n "(cached) " >&6 |
12003 | else | |
12004 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 | |
12005 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then | |
12006 | ac_cv_guild_ok=yes | |
12007 | else | |
12008 | ac_cv_guild_ok=no | |
12009 | fi | |
12010 | fi | |
12011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 | |
12012 | $as_echo "$ac_cv_guild_ok" >&6; } | |
12013 | ||
12014 | if test "$ac_cv_guild_ok" = no; then | |
12015 | have_libguile=no | |
12016 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 | |
12017 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} | |
12018 | fi | |
12019 | fi | |
12020 | ||
ed3ef339 DE |
12021 | if test "${have_libguile}" != no; then |
12022 | ||
12023 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h | |
12024 | ||
12025 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" | |
12026 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" | |
12027 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" | |
12028 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" | |
12029 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" | |
16954d5d LC |
12030 | |
12031 | save_LIBS="$LIBS" | |
12032 | save_CPPFLAGS="$CPPFLAGS" | |
12033 | LIBS="$GUILE_LIBS" | |
12034 | CPPFLAGS="$GUILE_CPPFLAGS" | |
12035 | for ac_func in scm_new_smob | |
12036 | do : | |
12037 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" | |
d0ac1c44 | 12038 | if test "x$ac_cv_func_scm_new_smob" = xyes; then : |
16954d5d LC |
12039 | cat >>confdefs.h <<_ACEOF |
12040 | #define HAVE_SCM_NEW_SMOB 1 | |
12041 | _ACEOF | |
12042 | ||
12043 | fi | |
12044 | done | |
12045 | ||
12046 | LIBS="$save_LIBS" | |
12047 | CPPFLAGS="$save_CPPFLAGS" | |
ed3ef339 DE |
12048 | else |
12049 | # Even if Guile support is not compiled in, we need to have these files | |
12050 | # included. | |
bd810fff | 12051 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
ed3ef339 DE |
12052 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
12053 | fi | |
9a156167 | 12054 | |
ac534cba | 12055 | |
4df42755 DE |
12056 | if test "${have_libguile}" != no; then |
12057 | HAVE_GUILE_TRUE= | |
12058 | HAVE_GUILE_FALSE='#' | |
12059 | else | |
12060 | HAVE_GUILE_TRUE='#' | |
12061 | HAVE_GUILE_FALSE= | |
12062 | fi | |
12063 | ||
ac534cba | 12064 | |
62f29fda TT |
12065 | # ---------------------------- # |
12066 | # Check for source highlight. # | |
12067 | # ---------------------------- # | |
12068 | ||
12069 | SRCHIGH_LIBS= | |
12070 | SRCHIGH_CFLAGS= | |
189b8c2e ST |
12071 | |
12072 | # Check whether --enable-source-highlight was given. | |
12073 | if test "${enable_source_highlight+set}" = set; then : | |
12074 | enableval=$enable_source_highlight; case "${enableval}" in | |
12075 | yes) enable_source_highlight=yes ;; | |
12076 | no) enable_source_highlight=no ;; | |
12077 | *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; | |
12078 | esac | |
12079 | else | |
12080 | enable_source_highlight=auto | |
12081 | fi | |
12082 | ||
12083 | ||
12084 | if test "${enable_source_highlight}" != "no"; then | |
12085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 | |
6c28e44a | 12086 | $as_echo_n "checking for the source-highlight library... " >&6; } |
189b8c2e ST |
12087 | if test "${pkg_config_prog_path}" = "missing"; then |
12088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 | |
62f29fda | 12089 | $as_echo "no - pkg-config not found" >&6; } |
189b8c2e ST |
12090 | if test "${enable_source_highlight}" = "yes"; then |
12091 | as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 | |
12092 | fi | |
12093 | else | |
12094 | if ${pkg_config_prog_path} --exists source-highlight; then | |
0455b7d3 BE |
12095 | case "$LDFLAGS" in |
12096 | *static-libstdc*) | |
12097 | as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 | |
12098 | ;; | |
12099 | esac | |
12100 | ||
62f29fda TT |
12101 | SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` |
12102 | SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` | |
12103 | ||
12104 | $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h | |
12105 | ||
12106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
12107 | $as_echo "yes" >&6; } | |
189b8c2e | 12108 | else |
62f29fda TT |
12109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12110 | $as_echo "no" >&6; } | |
189b8c2e ST |
12111 | if test "${enable_source_highlight}" = "yes"; then |
12112 | as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 | |
12113 | fi | |
12114 | fi | |
12115 | fi | |
62f29fda TT |
12116 | fi |
12117 | ||
12118 | ||
12119 | ||
05ea2a05 TT |
12120 | # ------------------------- # |
12121 | # Checks for header files. # | |
12122 | # ------------------------- # | |
58bfce93 | 12123 | |
05ea2a05 TT |
12124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
12125 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
12126 | if ${ac_cv_header_stdc+:} false; then : | |
12127 | $as_echo_n "(cached) " >&6 | |
58bfce93 | 12128 | else |
5599c404 MM |
12129 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12130 | /* end confdefs.h. */ | |
05ea2a05 TT |
12131 | #include <stdlib.h> |
12132 | #include <stdarg.h> | |
12133 | #include <string.h> | |
12134 | #include <float.h> | |
5599c404 | 12135 | |
05ea2a05 TT |
12136 | int |
12137 | main () | |
12138 | { | |
5599c404 | 12139 | |
05ea2a05 TT |
12140 | ; |
12141 | return 0; | |
12142 | } | |
5599c404 | 12143 | _ACEOF |
05ea2a05 TT |
12144 | if ac_fn_c_try_compile "$LINENO"; then : |
12145 | ac_cv_header_stdc=yes | |
5599c404 | 12146 | else |
05ea2a05 | 12147 | ac_cv_header_stdc=no |
5599c404 | 12148 | fi |
05ea2a05 | 12149 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
58bfce93 | 12150 | |
05ea2a05 TT |
12151 | if test $ac_cv_header_stdc = yes; then |
12152 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12154 | /* end confdefs.h. */ | |
12155 | #include <string.h> | |
58bfce93 | 12156 | |
05ea2a05 TT |
12157 | _ACEOF |
12158 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12159 | $EGREP "memchr" >/dev/null 2>&1; then : | |
58bfce93 | 12160 | |
05ea2a05 TT |
12161 | else |
12162 | ac_cv_header_stdc=no | |
12163 | fi | |
12164 | rm -f conftest* | |
58bfce93 | 12165 | |
05ea2a05 | 12166 | fi |
58bfce93 | 12167 | |
05ea2a05 TT |
12168 | if test $ac_cv_header_stdc = yes; then |
12169 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12171 | /* end confdefs.h. */ | |
12172 | #include <stdlib.h> | |
58bfce93 | 12173 | |
05ea2a05 TT |
12174 | _ACEOF |
12175 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12176 | $EGREP "free" >/dev/null 2>&1; then : | |
58bfce93 | 12177 | |
05ea2a05 TT |
12178 | else |
12179 | ac_cv_header_stdc=no | |
12180 | fi | |
12181 | rm -f conftest* | |
58bfce93 | 12182 | |
05ea2a05 | 12183 | fi |
58bfce93 | 12184 | |
05ea2a05 TT |
12185 | if test $ac_cv_header_stdc = yes; then |
12186 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12187 | if test "$cross_compiling" = yes; then : | |
12188 | : | |
12189 | else | |
12190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12191 | /* end confdefs.h. */ | |
12192 | #include <ctype.h> | |
12193 | #include <stdlib.h> | |
12194 | #if ((' ' & 0x0FF) == 0x020) | |
12195 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12196 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12197 | #else | |
12198 | # define ISLOWER(c) \ | |
12199 | (('a' <= (c) && (c) <= 'i') \ | |
12200 | || ('j' <= (c) && (c) <= 'r') \ | |
12201 | || ('s' <= (c) && (c) <= 'z')) | |
12202 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12203 | #endif | |
58bfce93 | 12204 | |
05ea2a05 TT |
12205 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
12206 | int | |
12207 | main () | |
12208 | { | |
12209 | int i; | |
12210 | for (i = 0; i < 256; i++) | |
12211 | if (XOR (islower (i), ISLOWER (i)) | |
12212 | || toupper (i) != TOUPPER (i)) | |
12213 | return 2; | |
12214 | return 0; | |
12215 | } | |
12216 | _ACEOF | |
12217 | if ac_fn_c_try_run "$LINENO"; then : | |
58bfce93 | 12218 | |
05ea2a05 TT |
12219 | else |
12220 | ac_cv_header_stdc=no | |
12221 | fi | |
12222 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12223 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12224 | fi | |
58bfce93 | 12225 | |
05ea2a05 TT |
12226 | fi |
12227 | fi | |
12228 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
12229 | $as_echo "$ac_cv_header_stdc" >&6; } | |
12230 | if test $ac_cv_header_stdc = yes; then | |
58bfce93 | 12231 | |
05ea2a05 | 12232 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
58bfce93 | 12233 | |
05ea2a05 | 12234 | fi |
58bfce93 | 12235 | |
05ea2a05 | 12236 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8ae8e197 | 12237 | for ac_header in nlist.h machine/reg.h \ |
05ea2a05 TT |
12238 | thread_db.h \ |
12239 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
09db4332 | 12240 | sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \ |
8ae8e197 | 12241 | sys/reg.h sys/debugreg.h \ |
05ea2a05 TT |
12242 | termios.h elf_hp.h |
12243 | do : | |
12244 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12245 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12246 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12247 | cat >>confdefs.h <<_ACEOF | |
12248 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12249 | _ACEOF | |
58bfce93 MM |
12250 | |
12251 | fi | |
12252 | ||
05ea2a05 | 12253 | done |
58bfce93 | 12254 | |
05ea2a05 TT |
12255 | for ac_header in sys/user.h |
12256 | do : | |
12257 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
12258 | # include <sys/param.h> | |
12259 | #endif | |
58bfce93 | 12260 | |
05ea2a05 TT |
12261 | " |
12262 | if test "x$ac_cv_header_sys_user_h" = xyes; then : | |
12263 | cat >>confdefs.h <<_ACEOF | |
12264 | #define HAVE_SYS_USER_H 1 | |
12265 | _ACEOF | |
58bfce93 | 12266 | |
05ea2a05 | 12267 | fi |
58bfce93 | 12268 | |
05ea2a05 | 12269 | done |
58bfce93 | 12270 | |
58bfce93 | 12271 | |
05ea2a05 TT |
12272 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
12273 | do : | |
12274 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12275 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
12276 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12277 | cat >>confdefs.h <<_ACEOF | |
12278 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12279 | _ACEOF | |
58bfce93 | 12280 | |
05ea2a05 | 12281 | fi |
58bfce93 | 12282 | |
05ea2a05 | 12283 | done |
58bfce93 | 12284 | |
05ea2a05 TT |
12285 | for ac_header in term.h |
12286 | do : | |
12287 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
12288 | # include <curses.h> | |
12289 | #endif | |
58bfce93 | 12290 | |
05ea2a05 TT |
12291 | " |
12292 | if test "x$ac_cv_header_term_h" = xyes; then : | |
12293 | cat >>confdefs.h <<_ACEOF | |
12294 | #define HAVE_TERM_H 1 | |
12295 | _ACEOF | |
58bfce93 | 12296 | |
05ea2a05 | 12297 | fi |
58bfce93 | 12298 | |
05ea2a05 | 12299 | done |
58bfce93 | 12300 | |
58bfce93 | 12301 | |
95420d30 | 12302 | for ac_header in sys/socket.h |
05a6b8c2 | 12303 | do : |
95420d30 TV |
12304 | ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" |
12305 | if test "x$ac_cv_header_sys_socket_h" = xyes; then : | |
05a6b8c2 | 12306 | cat >>confdefs.h <<_ACEOF |
95420d30 | 12307 | #define HAVE_SYS_SOCKET_H 1 |
05a6b8c2 EZ |
12308 | _ACEOF |
12309 | ||
12310 | fi | |
12311 | ||
12312 | done | |
12313 | ||
12314 | for ac_header in ws2tcpip.h | |
12315 | do : | |
12316 | ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" | |
12317 | if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : | |
12318 | cat >>confdefs.h <<_ACEOF | |
12319 | #define HAVE_WS2TCPIP_H 1 | |
12320 | _ACEOF | |
12321 | ||
12322 | fi | |
12323 | ||
12324 | done | |
12325 | ||
12326 | ||
05ea2a05 TT |
12327 | # ------------------------- # |
12328 | # Checks for declarations. # | |
12329 | # ------------------------- # | |
58bfce93 | 12330 | |
58bfce93 | 12331 | |
05ea2a05 TT |
12332 | # Check for presence and size of long long. |
12333 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
12334 | if test "x$ac_cv_type_long_long" = xyes; then : | |
58bfce93 | 12335 | |
05ea2a05 TT |
12336 | cat >>confdefs.h <<_ACEOF |
12337 | #define HAVE_LONG_LONG 1 | |
12338 | _ACEOF | |
12339 | ||
12340 | # The cast to long int works around a bug in the HP C Compiler | |
12341 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12342 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12343 | # This bug is HP SR number 8606223364. | |
12344 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
12345 | $as_echo_n "checking size of long long... " >&6; } | |
12346 | if ${ac_cv_sizeof_long_long+:} false; then : | |
58bfce93 MM |
12347 | $as_echo_n "(cached) " >&6 |
12348 | else | |
05ea2a05 | 12349 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
58bfce93 | 12350 | |
58bfce93 | 12351 | else |
05ea2a05 TT |
12352 | if test "$ac_cv_type_long_long" = yes; then |
12353 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12354 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12355 | as_fn_error 77 "cannot compute sizeof (long long) | |
12356 | See \`config.log' for more details" "$LINENO" 5; } | |
12357 | else | |
12358 | ac_cv_sizeof_long_long=0 | |
12359 | fi | |
58bfce93 | 12360 | fi |
58bfce93 MM |
12361 | |
12362 | fi | |
05ea2a05 TT |
12363 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
12364 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
58bfce93 | 12365 | |
58bfce93 | 12366 | |
58bfce93 | 12367 | |
05ea2a05 TT |
12368 | cat >>confdefs.h <<_ACEOF |
12369 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
12370 | _ACEOF | |
58bfce93 MM |
12371 | |
12372 | ||
05ea2a05 | 12373 | fi |
58bfce93 MM |
12374 | |
12375 | ||
05ea2a05 TT |
12376 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
12377 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
12378 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
12379 | ac_have_decl=1 | |
12380 | else | |
12381 | ac_have_decl=0 | |
12382 | fi | |
58bfce93 | 12383 | |
05ea2a05 TT |
12384 | cat >>confdefs.h <<_ACEOF |
12385 | #define HAVE_DECL_BASENAME $ac_have_decl | |
c56ccc05 | 12386 | _ACEOF |
05ea2a05 TT |
12387 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
12388 | if test "x$ac_cv_have_decl_ffs" = xyes; then : | |
12389 | ac_have_decl=1 | |
12390 | else | |
12391 | ac_have_decl=0 | |
c56ccc05 | 12392 | fi |
c56ccc05 MM |
12393 | |
12394 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12395 | #define HAVE_DECL_FFS $ac_have_decl |
c56ccc05 | 12396 | _ACEOF |
05ea2a05 TT |
12397 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" |
12398 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : | |
12399 | ac_have_decl=1 | |
12400 | else | |
12401 | ac_have_decl=0 | |
c56ccc05 | 12402 | fi |
c56ccc05 MM |
12403 | |
12404 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12405 | #define HAVE_DECL_ASPRINTF $ac_have_decl |
c56ccc05 | 12406 | _ACEOF |
05ea2a05 TT |
12407 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
12408 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : | |
12409 | ac_have_decl=1 | |
12410 | else | |
12411 | ac_have_decl=0 | |
12412 | fi | |
c56ccc05 | 12413 | |
05ea2a05 TT |
12414 | cat >>confdefs.h <<_ACEOF |
12415 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
12416 | _ACEOF | |
12417 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
12418 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12419 | ac_have_decl=1 | |
12420 | else | |
12421 | ac_have_decl=0 | |
c56ccc05 MM |
12422 | fi |
12423 | ||
05ea2a05 TT |
12424 | cat >>confdefs.h <<_ACEOF |
12425 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12426 | _ACEOF | |
12427 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
12428 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : | |
12429 | ac_have_decl=1 | |
12430 | else | |
12431 | ac_have_decl=0 | |
58bfce93 MM |
12432 | fi |
12433 | ||
05ea2a05 TT |
12434 | cat >>confdefs.h <<_ACEOF |
12435 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
12436 | _ACEOF | |
c890192f | 12437 | |
05ea2a05 TT |
12438 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
12439 | if test "x$ac_cv_have_decl_strtol" = xyes; then : | |
12440 | ac_have_decl=1 | |
bec39cab | 12441 | else |
05ea2a05 TT |
12442 | ac_have_decl=0 |
12443 | fi | |
81ecdfbb | 12444 | |
05ea2a05 TT |
12445 | cat >>confdefs.h <<_ACEOF |
12446 | #define HAVE_DECL_STRTOL $ac_have_decl | |
12447 | _ACEOF | |
12448 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
12449 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : | |
12450 | ac_have_decl=1 | |
12451 | else | |
12452 | ac_have_decl=0 | |
12453 | fi | |
a9322a30 | 12454 | |
05ea2a05 TT |
12455 | cat >>confdefs.h <<_ACEOF |
12456 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
bec39cab | 12457 | _ACEOF |
05ea2a05 TT |
12458 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
12459 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : | |
12460 | ac_have_decl=1 | |
bec39cab | 12461 | else |
05ea2a05 | 12462 | ac_have_decl=0 |
a9322a30 | 12463 | fi |
bec39cab | 12464 | |
05ea2a05 TT |
12465 | cat >>confdefs.h <<_ACEOF |
12466 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
12467 | _ACEOF | |
12468 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
12469 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : | |
12470 | ac_have_decl=1 | |
12471 | else | |
12472 | ac_have_decl=0 | |
12473 | fi | |
bec39cab | 12474 | |
05ea2a05 TT |
12475 | cat >>confdefs.h <<_ACEOF |
12476 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
81ecdfbb | 12477 | _ACEOF |
bec39cab | 12478 | |
05ea2a05 TT |
12479 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" |
12480 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : | |
12481 | ac_have_decl=1 | |
bec39cab | 12482 | else |
05ea2a05 | 12483 | ac_have_decl=0 |
81ecdfbb | 12484 | fi |
81ecdfbb | 12485 | |
05ea2a05 TT |
12486 | cat >>confdefs.h <<_ACEOF |
12487 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
12488 | _ACEOF | |
81ecdfbb | 12489 | |
81ecdfbb | 12490 | |
06825bd1 | 12491 | |
05ea2a05 TT |
12492 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
12493 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : | |
12494 | ac_have_decl=1 | |
81ecdfbb | 12495 | else |
05ea2a05 | 12496 | ac_have_decl=0 |
81ecdfbb | 12497 | fi |
bec39cab | 12498 | |
05ea2a05 TT |
12499 | cat >>confdefs.h <<_ACEOF |
12500 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
12501 | _ACEOF | |
81ecdfbb | 12502 | |
05ea2a05 TT |
12503 | |
12504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 | |
12505 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
12506 | if ${am_cv_val_LC_MESSAGES+:} false; then : | |
12507 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12508 | else |
81ecdfbb | 12509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12510 | /* end confdefs.h. */ |
05ea2a05 | 12511 | #include <locale.h> |
a9322a30 TT |
12512 | int |
12513 | main () | |
12514 | { | |
05ea2a05 TT |
12515 | return LC_MESSAGES |
12516 | ; | |
a9322a30 TT |
12517 | return 0; |
12518 | } | |
bec39cab | 12519 | _ACEOF |
05ea2a05 TT |
12520 | if ac_fn_c_try_link "$LINENO"; then : |
12521 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 12522 | else |
05ea2a05 | 12523 | am_cv_val_LC_MESSAGES=no |
81ecdfbb | 12524 | fi |
05ea2a05 TT |
12525 | rm -f core conftest.err conftest.$ac_objext \ |
12526 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 12527 | fi |
05ea2a05 TT |
12528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
12529 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
12530 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 12531 | |
05ea2a05 | 12532 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
bec39cab | 12533 | |
05ea2a05 | 12534 | fi |
5ee754fc | 12535 | |
bec39cab | 12536 | |
05ea2a05 TT |
12537 | # ------------------ # |
12538 | # Checks for types. # | |
12539 | # ------------------ # | |
12540 | ||
12541 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> | |
05a6b8c2 EZ |
12542 | #if HAVE_SYS_SOCKET_H |
12543 | # include <sys/socket.h> | |
12544 | #elif HAVE_WS2TCPIP_H | |
12545 | # include <ws2tcpip.h> | |
12546 | #endif | |
05ea2a05 TT |
12547 | |
12548 | " | |
12549 | if test "x$ac_cv_type_socklen_t" = xyes; then : | |
12550 | ||
12551 | cat >>confdefs.h <<_ACEOF | |
12552 | #define HAVE_SOCKLEN_T 1 | |
bec39cab | 12553 | _ACEOF |
c906108c | 12554 | |
05ea2a05 | 12555 | |
bec39cab | 12556 | fi |
81ecdfbb | 12557 | |
81ecdfbb | 12558 | |
05ea2a05 TT |
12559 | # ------------------------------------- # |
12560 | # Checks for compiler characteristics. # | |
12561 | # ------------------------------------- # | |
a9322a30 | 12562 | |
05ea2a05 TT |
12563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
12564 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
12565 | if ${ac_cv_c_const+:} false; then : | |
12566 | $as_echo_n "(cached) " >&6 | |
12567 | else | |
12568 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12569 | /* end confdefs.h. */ | |
bec39cab | 12570 | |
05ea2a05 TT |
12571 | int |
12572 | main () | |
12573 | { | |
bec39cab | 12574 | |
05ea2a05 TT |
12575 | #ifndef __cplusplus |
12576 | /* Ultrix mips cc rejects this sort of thing. */ | |
12577 | typedef int charset[2]; | |
12578 | const charset cs = { 0, 0 }; | |
12579 | /* SunOS 4.1.1 cc rejects this. */ | |
12580 | char const *const *pcpcc; | |
12581 | char **ppc; | |
12582 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
12583 | struct point {int x, y;}; | |
12584 | static struct point const zero = {0,0}; | |
12585 | /* AIX XL C 1.02.0.0 rejects this. | |
12586 | It does not let you subtract one const X* pointer from another in | |
12587 | an arm of an if-expression whose if-part is not a constant | |
12588 | expression */ | |
12589 | const char *g = "string"; | |
12590 | pcpcc = &g + (g ? g-g : 0); | |
12591 | /* HPUX 7.0 cc rejects these. */ | |
12592 | ++pcpcc; | |
12593 | ppc = (char**) pcpcc; | |
12594 | pcpcc = (char const *const *) ppc; | |
12595 | { /* SCO 3.2v4 cc rejects this sort of thing. */ | |
12596 | char tx; | |
12597 | char *t = &tx; | |
12598 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5ee754fc | 12599 | |
05ea2a05 TT |
12600 | *t++ = 0; |
12601 | if (s) return 0; | |
12602 | } | |
12603 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
12604 | int x[] = {25, 17}; | |
12605 | const int *foo = &x[0]; | |
12606 | ++foo; | |
12607 | } | |
12608 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
12609 | typedef const int *iptr; | |
12610 | iptr p = 0; | |
12611 | ++p; | |
12612 | } | |
12613 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying | |
12614 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
12615 | struct s { int j; const int *ap[3]; } bx; | |
12616 | struct s *b = &bx; b->j = 5; | |
12617 | } | |
12618 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
12619 | const int foo = 10; | |
12620 | if (!foo) return 0; | |
12621 | } | |
12622 | return !cs[0] && !zero.x; | |
12623 | #endif | |
5ee754fc | 12624 | |
05ea2a05 TT |
12625 | ; |
12626 | return 0; | |
12627 | } | |
bec39cab | 12628 | _ACEOF |
05ea2a05 TT |
12629 | if ac_fn_c_try_compile "$LINENO"; then : |
12630 | ac_cv_c_const=yes | |
12631 | else | |
12632 | ac_cv_c_const=no | |
12633 | fi | |
12634 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ee754fc | 12635 | fi |
05ea2a05 TT |
12636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
12637 | $as_echo "$ac_cv_c_const" >&6; } | |
12638 | if test $ac_cv_c_const = no; then | |
5ee754fc | 12639 | |
05ea2a05 | 12640 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 12641 | |
05ea2a05 TT |
12642 | fi |
12643 | ||
12644 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
12645 | $as_echo_n "checking for inline... " >&6; } | |
12646 | if ${ac_cv_c_inline+:} false; then : | |
12647 | $as_echo_n "(cached) " >&6 | |
12648 | else | |
12649 | ac_cv_c_inline=no | |
12650 | for ac_kw in inline __inline__ __inline; do | |
12651 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12652 | /* end confdefs.h. */ | |
12653 | #ifndef __cplusplus | |
12654 | typedef int foo_t; | |
12655 | static $ac_kw foo_t static_foo () {return 0; } | |
12656 | $ac_kw foo_t foo () {return 0; } | |
81ecdfbb | 12657 | #endif |
bec39cab | 12658 | |
a8111142 | 12659 | _ACEOF |
05ea2a05 TT |
12660 | if ac_fn_c_try_compile "$LINENO"; then : |
12661 | ac_cv_c_inline=$ac_kw | |
a8111142 | 12662 | fi |
05ea2a05 TT |
12663 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12664 | test "$ac_cv_c_inline" != no && break | |
81ecdfbb | 12665 | done |
a8111142 | 12666 | |
05ea2a05 TT |
12667 | fi |
12668 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
12669 | $as_echo "$ac_cv_c_inline" >&6; } | |
a8111142 | 12670 | |
05ea2a05 TT |
12671 | case $ac_cv_c_inline in |
12672 | inline | yes) ;; | |
12673 | *) | |
12674 | case $ac_cv_c_inline in | |
12675 | no) ac_val=;; | |
12676 | *) ac_val=$ac_cv_c_inline;; | |
12677 | esac | |
12678 | cat >>confdefs.h <<_ACEOF | |
12679 | #ifndef __cplusplus | |
12680 | #define inline $ac_val | |
12681 | #endif | |
07697489 | 12682 | _ACEOF |
05ea2a05 TT |
12683 | ;; |
12684 | esac | |
07697489 | 12685 | |
05ea2a05 TT |
12686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
12687 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
12688 | if ${ac_cv_c_bigendian+:} false; then : | |
07697489 PA |
12689 | $as_echo_n "(cached) " >&6 |
12690 | else | |
05ea2a05 TT |
12691 | ac_cv_c_bigendian=unknown |
12692 | # See if we're dealing with a universal compiler. | |
12693 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12694 | /* end confdefs.h. */ | |
12695 | #ifndef __APPLE_CC__ | |
12696 | not a universal capable compiler | |
12697 | #endif | |
12698 | typedef int dummy; | |
07697489 | 12699 | |
05ea2a05 TT |
12700 | _ACEOF |
12701 | if ac_fn_c_try_compile "$LINENO"; then : | |
07697489 | 12702 | |
05ea2a05 TT |
12703 | # Check for potential -arch flags. It is not universal unless |
12704 | # there are at least two -arch flags with different values. | |
12705 | ac_arch= | |
12706 | ac_prev= | |
12707 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
12708 | if test -n "$ac_prev"; then | |
12709 | case $ac_word in | |
12710 | i?86 | x86_64 | ppc | ppc64) | |
12711 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
12712 | ac_arch=$ac_word | |
12713 | else | |
12714 | ac_cv_c_bigendian=universal | |
12715 | break | |
12716 | fi | |
12717 | ;; | |
12718 | esac | |
12719 | ac_prev= | |
12720 | elif test "x$ac_word" = "x-arch"; then | |
12721 | ac_prev=arch | |
12722 | fi | |
12723 | done | |
07697489 | 12724 | fi |
05ea2a05 TT |
12725 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12726 | if test $ac_cv_c_bigendian = unknown; then | |
12727 | # See if sys/param.h defines the BYTE_ORDER macro. | |
12728 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12729 | /* end confdefs.h. */ | |
12730 | #include <sys/types.h> | |
12731 | #include <sys/param.h> | |
07697489 | 12732 | |
05ea2a05 TT |
12733 | int |
12734 | main () | |
12735 | { | |
12736 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
12737 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
12738 | && LITTLE_ENDIAN) | |
12739 | bogus endian macros | |
12740 | #endif | |
07697489 | 12741 | |
05ea2a05 TT |
12742 | ; |
12743 | return 0; | |
12744 | } | |
07697489 | 12745 | _ACEOF |
05ea2a05 TT |
12746 | if ac_fn_c_try_compile "$LINENO"; then : |
12747 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
12748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12749 | /* end confdefs.h. */ | |
12750 | #include <sys/types.h> | |
12751 | #include <sys/param.h> | |
07697489 | 12752 | |
05ea2a05 TT |
12753 | int |
12754 | main () | |
12755 | { | |
12756 | #if BYTE_ORDER != BIG_ENDIAN | |
12757 | not big endian | |
12758 | #endif | |
07697489 | 12759 | |
05ea2a05 TT |
12760 | ; |
12761 | return 0; | |
12762 | } | |
07697489 | 12763 | _ACEOF |
05ea2a05 TT |
12764 | if ac_fn_c_try_compile "$LINENO"; then : |
12765 | ac_cv_c_bigendian=yes | |
07697489 | 12766 | else |
05ea2a05 | 12767 | ac_cv_c_bigendian=no |
07697489 | 12768 | fi |
05ea2a05 | 12769 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12770 | fi |
05ea2a05 TT |
12771 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12772 | fi | |
12773 | if test $ac_cv_c_bigendian = unknown; then | |
12774 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
12775 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12776 | /* end confdefs.h. */ | |
12777 | #include <limits.h> | |
07697489 | 12778 | |
05ea2a05 TT |
12779 | int |
12780 | main () | |
12781 | { | |
12782 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
12783 | bogus endian macros | |
12784 | #endif | |
07697489 | 12785 | |
05ea2a05 TT |
12786 | ; |
12787 | return 0; | |
12788 | } | |
07697489 | 12789 | _ACEOF |
05ea2a05 TT |
12790 | if ac_fn_c_try_compile "$LINENO"; then : |
12791 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
12792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12793 | /* end confdefs.h. */ | |
12794 | #include <limits.h> | |
07697489 | 12795 | |
05ea2a05 TT |
12796 | int |
12797 | main () | |
12798 | { | |
12799 | #ifndef _BIG_ENDIAN | |
12800 | not big endian | |
12801 | #endif | |
07697489 | 12802 | |
05ea2a05 TT |
12803 | ; |
12804 | return 0; | |
12805 | } | |
07697489 | 12806 | _ACEOF |
05ea2a05 TT |
12807 | if ac_fn_c_try_compile "$LINENO"; then : |
12808 | ac_cv_c_bigendian=yes | |
07697489 | 12809 | else |
05ea2a05 | 12810 | ac_cv_c_bigendian=no |
07697489 | 12811 | fi |
05ea2a05 | 12812 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
07697489 | 12813 | fi |
05ea2a05 TT |
12814 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12815 | fi | |
12816 | if test $ac_cv_c_bigendian = unknown; then | |
12817 | # Compile a test program. | |
12818 | if test "$cross_compiling" = yes; then : | |
12819 | # Try to guess by grepping values from an object file. | |
12820 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12821 | /* end confdefs.h. */ | |
12822 | short int ascii_mm[] = | |
12823 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
12824 | short int ascii_ii[] = | |
12825 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
12826 | int use_ascii (int i) { | |
12827 | return ascii_mm[i] + ascii_ii[i]; | |
12828 | } | |
12829 | short int ebcdic_ii[] = | |
12830 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
12831 | short int ebcdic_mm[] = | |
12832 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
12833 | int use_ebcdic (int i) { | |
12834 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
12835 | } | |
12836 | extern int foo; | |
07697489 | 12837 | |
05ea2a05 TT |
12838 | int |
12839 | main () | |
12840 | { | |
12841 | return use_ascii (foo) == use_ebcdic (foo); | |
12842 | ; | |
12843 | return 0; | |
12844 | } | |
07697489 | 12845 | _ACEOF |
05ea2a05 TT |
12846 | if ac_fn_c_try_compile "$LINENO"; then : |
12847 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
12848 | ac_cv_c_bigendian=yes | |
12849 | fi | |
12850 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
12851 | if test "$ac_cv_c_bigendian" = unknown; then | |
12852 | ac_cv_c_bigendian=no | |
12853 | else | |
12854 | # finding both strings is unlikely to happen, but who knows? | |
12855 | ac_cv_c_bigendian=unknown | |
12856 | fi | |
12857 | fi | |
07697489 | 12858 | fi |
05ea2a05 TT |
12859 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12860 | else | |
12861 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12862 | /* end confdefs.h. */ | |
12863 | $ac_includes_default | |
12864 | int | |
12865 | main () | |
12866 | { | |
07697489 | 12867 | |
05ea2a05 TT |
12868 | /* Are we little or big endian? From Harbison&Steele. */ |
12869 | union | |
12870 | { | |
12871 | long int l; | |
12872 | char c[sizeof (long int)]; | |
12873 | } u; | |
12874 | u.l = 1; | |
12875 | return u.c[sizeof (long int) - 1] == 1; | |
12876 | ||
12877 | ; | |
12878 | return 0; | |
12879 | } | |
07697489 | 12880 | _ACEOF |
05ea2a05 TT |
12881 | if ac_fn_c_try_run "$LINENO"; then : |
12882 | ac_cv_c_bigendian=no | |
07697489 | 12883 | else |
05ea2a05 TT |
12884 | ac_cv_c_bigendian=yes |
12885 | fi | |
12886 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12887 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
07697489 PA |
12888 | fi |
12889 | ||
05ea2a05 | 12890 | fi |
07697489 | 12891 | fi |
05ea2a05 TT |
12892 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
12893 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
12894 | case $ac_cv_c_bigendian in #( | |
12895 | yes) | |
12896 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
12897 | ;; #( | |
12898 | no) | |
12899 | ;; #( | |
12900 | universal) | |
07697489 | 12901 | |
05ea2a05 | 12902 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
07697489 | 12903 | |
05ea2a05 TT |
12904 | ;; #( |
12905 | *) | |
12906 | as_fn_error $? "unknown endianness | |
12907 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
12908 | esac | |
07697489 PA |
12909 | |
12910 | ||
05ea2a05 TT |
12911 | # ------------------------------ # |
12912 | # Checks for library functions. # | |
12913 | # ------------------------------ # | |
81ecdfbb | 12914 | |
05ea2a05 | 12915 | for ac_func in getuid getgid \ |
8ae8e197 | 12916 | pipe pread pread64 pwrite resize_term \ |
05ea2a05 TT |
12917 | getpgid setsid \ |
12918 | sigaction sigsetmask socketpair \ | |
12919 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ | |
12920 | setrlimit getrlimit posix_madvise waitpid \ | |
12921 | use_default_colors | |
12922 | do : | |
12923 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
12924 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
12925 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
12926 | cat >>confdefs.h <<_ACEOF | |
12927 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
a9322a30 | 12928 | _ACEOF |
5ee754fc | 12929 | |
05ea2a05 TT |
12930 | fi |
12931 | done | |
5ee754fc | 12932 | |
05ea2a05 TT |
12933 | |
12934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
12935 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
12936 | if ${am_cv_langinfo_codeset+:} false; then : | |
81ecdfbb | 12937 | $as_echo_n "(cached) " >&6 |
bec39cab | 12938 | else |
81ecdfbb | 12939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12940 | /* end confdefs.h. */ |
05ea2a05 | 12941 | #include <langinfo.h> |
a9322a30 TT |
12942 | int |
12943 | main () | |
12944 | { | |
05ea2a05 | 12945 | char* cs = nl_langinfo(CODESET); |
a9322a30 TT |
12946 | ; |
12947 | return 0; | |
12948 | } | |
bec39cab | 12949 | _ACEOF |
81ecdfbb | 12950 | if ac_fn_c_try_link "$LINENO"; then : |
05ea2a05 | 12951 | am_cv_langinfo_codeset=yes |
bec39cab | 12952 | else |
05ea2a05 | 12953 | am_cv_langinfo_codeset=no |
81ecdfbb RW |
12954 | fi |
12955 | rm -f core conftest.err conftest.$ac_objext \ | |
12956 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 12957 | |
81ecdfbb | 12958 | fi |
05ea2a05 TT |
12959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
12960 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
12961 | if test $am_cv_langinfo_codeset = yes; then | |
bec39cab | 12962 | |
05ea2a05 | 12963 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
81ecdfbb RW |
12964 | |
12965 | fi | |
12966 | ||
05ea2a05 TT |
12967 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
12968 | if test "x$ac_cv_type_size_t" = xyes; then : | |
81ecdfbb | 12969 | |
05ea2a05 | 12970 | else |
81ecdfbb RW |
12971 | |
12972 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 12973 | #define size_t unsigned int |
7eb368b3 | 12974 | _ACEOF |
7eb368b3 | 12975 | |
7eb368b3 | 12976 | fi |
7eb368b3 | 12977 | |
7eb368b3 | 12978 | |
a9322a30 | 12979 | |
7eb368b3 | 12980 | |
05ea2a05 TT |
12981 | for ac_header in $ac_header_list |
12982 | do : | |
12983 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12984 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
12985 | " | |
12986 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
12987 | cat >>confdefs.h <<_ACEOF | |
12988 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12989 | _ACEOF | |
7eb368b3 | 12990 | |
05ea2a05 | 12991 | fi |
7eb368b3 | 12992 | |
05ea2a05 | 12993 | done |
a9322a30 | 12994 | |
05ea2a05 TT |
12995 | |
12996 | ||
12997 | ||
12998 | ||
12999 | ||
13000 | ||
13001 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
13002 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
13003 | ||
13004 | else | |
bec39cab | 13005 | |
a9322a30 | 13006 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 13007 | #define pid_t int |
a9322a30 TT |
13008 | _ACEOF |
13009 | ||
05ea2a05 TT |
13010 | fi |
13011 | ||
13012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
13013 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } | |
13014 | if ${ac_cv_path_SED+:} false; then : | |
13015 | $as_echo_n "(cached) " >&6 | |
13016 | else | |
13017 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
13018 | for ac_i in 1 2 3 4 5 6 7; do | |
13019 | ac_script="$ac_script$as_nl$ac_script" | |
13020 | done | |
13021 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
13022 | { ac_script=; unset ac_script;} | |
13023 | if test -z "$SED"; then | |
13024 | ac_path_SED_found=false | |
13025 | # Loop through the user's path and test for each of PROGNAME-LIST | |
13026 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13027 | for as_dir in $PATH | |
13028 | do | |
13029 | IFS=$as_save_IFS | |
13030 | test -z "$as_dir" && as_dir=. | |
13031 | for ac_prog in sed gsed; do | |
13032 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13033 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" | |
13034 | as_fn_executable_p "$ac_path_SED" || continue | |
13035 | # Check for GNU ac_path_SED and select it if it is found. | |
13036 | # Check for GNU $ac_path_SED | |
13037 | case `"$ac_path_SED" --version 2>&1` in | |
13038 | *GNU*) | |
13039 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
13040 | *) | |
13041 | ac_count=0 | |
13042 | $as_echo_n 0123456789 >"conftest.in" | |
13043 | while : | |
13044 | do | |
13045 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
13046 | mv "conftest.tmp" "conftest.in" | |
13047 | cp "conftest.in" "conftest.nl" | |
13048 | $as_echo '' >> "conftest.nl" | |
13049 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
13050 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
13051 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
13052 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
13053 | # Best one so far, save it but keep looking for a better one | |
13054 | ac_cv_path_SED="$ac_path_SED" | |
13055 | ac_path_SED_max=$ac_count | |
13056 | fi | |
13057 | # 10*(2^10) chars as input seems more than enough | |
13058 | test $ac_count -gt 10 && break | |
13059 | done | |
13060 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
13061 | esac | |
a9322a30 | 13062 | |
05ea2a05 TT |
13063 | $ac_path_SED_found && break 3 |
13064 | done | |
13065 | done | |
13066 | done | |
13067 | IFS=$as_save_IFS | |
13068 | if test -z "$ac_cv_path_SED"; then | |
13069 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
13070 | fi | |
13071 | else | |
13072 | ac_cv_path_SED=$SED | |
a9322a30 TT |
13073 | fi |
13074 | ||
05ea2a05 TT |
13075 | fi |
13076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
13077 | $as_echo "$ac_cv_path_SED" >&6; } | |
13078 | SED="$ac_cv_path_SED" | |
13079 | rm -f conftest.sed | |
a9322a30 | 13080 | |
a9322a30 | 13081 | |
db6878ac SM |
13082 | # Set the 'development' global. |
13083 | . $srcdir/../bfd/development.sh | |
13084 | ||
05ea2a05 TT |
13085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
13086 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
13087 | if ${ac_cv_header_stdc+:} false; then : | |
81ecdfbb | 13088 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13089 | else |
81ecdfbb | 13090 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13091 | /* end confdefs.h. */ |
05ea2a05 TT |
13092 | #include <stdlib.h> |
13093 | #include <stdarg.h> | |
13094 | #include <string.h> | |
13095 | #include <float.h> | |
a9322a30 TT |
13096 | |
13097 | int | |
13098 | main () | |
13099 | { | |
d0ac1c44 | 13100 | |
a9322a30 TT |
13101 | ; |
13102 | return 0; | |
13103 | } | |
bec39cab | 13104 | _ACEOF |
81ecdfbb | 13105 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 13106 | ac_cv_header_stdc=yes |
5ee754fc | 13107 | else |
05ea2a05 | 13108 | ac_cv_header_stdc=no |
5ee754fc | 13109 | fi |
81ecdfbb | 13110 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 13111 | |
05ea2a05 TT |
13112 | if test $ac_cv_header_stdc = yes; then |
13113 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
13114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13115 | /* end confdefs.h. */ | |
13116 | #include <string.h> | |
bec39cab | 13117 | |
05ea2a05 TT |
13118 | _ACEOF |
13119 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13120 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 13121 | |
bec39cab | 13122 | else |
05ea2a05 TT |
13123 | ac_cv_header_stdc=no |
13124 | fi | |
13125 | rm -f conftest* | |
13126 | ||
13127 | fi | |
13128 | ||
13129 | if test $ac_cv_header_stdc = yes; then | |
13130 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 13131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13132 | /* end confdefs.h. */ |
05ea2a05 | 13133 | #include <stdlib.h> |
a9322a30 | 13134 | |
bec39cab | 13135 | _ACEOF |
05ea2a05 TT |
13136 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13137 | $EGREP "free" >/dev/null 2>&1; then : | |
bec39cab | 13138 | |
05ea2a05 TT |
13139 | else |
13140 | ac_cv_header_stdc=no | |
5ee754fc | 13141 | fi |
05ea2a05 | 13142 | rm -f conftest* |
5ee754fc | 13143 | |
05ea2a05 | 13144 | fi |
bec39cab | 13145 | |
05ea2a05 TT |
13146 | if test $ac_cv_header_stdc = yes; then |
13147 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
13148 | if test "$cross_compiling" = yes; then : | |
13149 | : | |
bec39cab | 13150 | else |
05ea2a05 | 13151 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
81ecdfbb | 13152 | /* end confdefs.h. */ |
05ea2a05 TT |
13153 | #include <ctype.h> |
13154 | #include <stdlib.h> | |
13155 | #if ((' ' & 0x0FF) == 0x020) | |
13156 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
13157 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
13158 | #else | |
13159 | # define ISLOWER(c) \ | |
13160 | (('a' <= (c) && (c) <= 'i') \ | |
13161 | || ('j' <= (c) && (c) <= 'r') \ | |
13162 | || ('s' <= (c) && (c) <= 'z')) | |
13163 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
13164 | #endif | |
a9322a30 | 13165 | |
05ea2a05 | 13166 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
a9322a30 TT |
13167 | int |
13168 | main () | |
13169 | { | |
05ea2a05 TT |
13170 | int i; |
13171 | for (i = 0; i < 256; i++) | |
13172 | if (XOR (islower (i), ISLOWER (i)) | |
13173 | || toupper (i) != TOUPPER (i)) | |
13174 | return 2; | |
a9322a30 TT |
13175 | return 0; |
13176 | } | |
bec39cab | 13177 | _ACEOF |
05ea2a05 | 13178 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13179 | |
5ee754fc | 13180 | else |
05ea2a05 | 13181 | ac_cv_header_stdc=no |
5ee754fc | 13182 | fi |
05ea2a05 TT |
13183 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13184 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
81ecdfbb | 13185 | fi |
bec39cab | 13186 | |
05ea2a05 TT |
13187 | fi |
13188 | fi | |
13189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
13190 | $as_echo "$ac_cv_header_stdc" >&6; } | |
13191 | if test $ac_cv_header_stdc = yes; then | |
81ecdfbb | 13192 | |
05ea2a05 TT |
13193 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
13194 | ||
13195 | fi | |
81ecdfbb | 13196 | |
05ea2a05 TT |
13197 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
13198 | # for constant arguments. Useless! | |
13199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
13200 | $as_echo_n "checking for working alloca.h... " >&6; } | |
13201 | if ${ac_cv_working_alloca_h+:} false; then : | |
13202 | $as_echo_n "(cached) " >&6 | |
13203 | else | |
13204 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13205 | /* end confdefs.h. */ | |
13206 | #include <alloca.h> | |
7eb368b3 NR |
13207 | int |
13208 | main () | |
13209 | { | |
05ea2a05 TT |
13210 | char *p = (char *) alloca (2 * sizeof (int)); |
13211 | if (p) return 0; | |
7eb368b3 NR |
13212 | ; |
13213 | return 0; | |
13214 | } | |
13215 | _ACEOF | |
05ea2a05 TT |
13216 | if ac_fn_c_try_link "$LINENO"; then : |
13217 | ac_cv_working_alloca_h=yes | |
81ecdfbb | 13218 | else |
05ea2a05 | 13219 | ac_cv_working_alloca_h=no |
a9322a30 | 13220 | fi |
05ea2a05 TT |
13221 | rm -f core conftest.err conftest.$ac_objext \ |
13222 | conftest$ac_exeext conftest.$ac_ext | |
a9322a30 | 13223 | fi |
05ea2a05 TT |
13224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
13225 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
13226 | if test $ac_cv_working_alloca_h = yes; then | |
13227 | ||
13228 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
7eb368b3 | 13229 | |
7eb368b3 | 13230 | fi |
05ea2a05 TT |
13231 | |
13232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
13233 | $as_echo_n "checking for alloca... " >&6; } | |
13234 | if ${ac_cv_func_alloca_works+:} false; then : | |
13235 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13236 | else |
81ecdfbb | 13237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13238 | /* end confdefs.h. */ |
05ea2a05 TT |
13239 | #ifdef __GNUC__ |
13240 | # define alloca __builtin_alloca | |
13241 | #else | |
13242 | # ifdef _MSC_VER | |
13243 | # include <malloc.h> | |
13244 | # define alloca _alloca | |
13245 | # else | |
13246 | # ifdef HAVE_ALLOCA_H | |
13247 | # include <alloca.h> | |
13248 | # else | |
13249 | # ifdef _AIX | |
13250 | #pragma alloca | |
13251 | # else | |
13252 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
13253 | void *alloca (size_t); | |
13254 | # endif | |
13255 | # endif | |
13256 | # endif | |
13257 | # endif | |
13258 | #endif | |
13259 | ||
d3ea6809 MM |
13260 | int |
13261 | main () | |
13262 | { | |
05ea2a05 TT |
13263 | char *p = (char *) alloca (1); |
13264 | if (p) return 0; | |
81ecdfbb RW |
13265 | ; |
13266 | return 0; | |
d3ea6809 MM |
13267 | } |
13268 | _ACEOF | |
05ea2a05 TT |
13269 | if ac_fn_c_try_link "$LINENO"; then : |
13270 | ac_cv_func_alloca_works=yes | |
d3ea6809 | 13271 | else |
05ea2a05 | 13272 | ac_cv_func_alloca_works=no |
a9322a30 | 13273 | fi |
05ea2a05 TT |
13274 | rm -f core conftest.err conftest.$ac_objext \ |
13275 | conftest$ac_exeext conftest.$ac_ext | |
81ecdfbb | 13276 | fi |
05ea2a05 TT |
13277 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
13278 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
81ecdfbb | 13279 | |
05ea2a05 | 13280 | if test $ac_cv_func_alloca_works = yes; then |
d3ea6809 | 13281 | |
05ea2a05 | 13282 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
d3ea6809 | 13283 | |
05ea2a05 TT |
13284 | else |
13285 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13286 | # that cause trouble. Some versions do not even contain alloca or | |
13287 | # contain a buggy version. If you still want to use their alloca, | |
13288 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
d3ea6809 | 13289 | |
05ea2a05 | 13290 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
d0ac1c44 | 13291 | |
05ea2a05 | 13292 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
d0ac1c44 SM |
13293 | |
13294 | ||
05ea2a05 TT |
13295 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
13296 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
13297 | if ${ac_cv_os_cray+:} false; then : | |
13298 | $as_echo_n "(cached) " >&6 | |
13299 | else | |
13300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13301 | /* end confdefs.h. */ | |
13302 | #if defined CRAY && ! defined CRAY2 | |
13303 | webecray | |
13304 | #else | |
13305 | wenotbecray | |
13306 | #endif | |
13307 | ||
13308 | _ACEOF | |
13309 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13310 | $EGREP "webecray" >/dev/null 2>&1; then : | |
13311 | ac_cv_os_cray=yes | |
13312 | else | |
13313 | ac_cv_os_cray=no | |
13314 | fi | |
13315 | rm -f conftest* | |
13316 | ||
13317 | fi | |
13318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
13319 | $as_echo "$ac_cv_os_cray" >&6; } | |
13320 | if test $ac_cv_os_cray = yes; then | |
13321 | for ac_func in _getb67 GETB67 getb67; do | |
13322 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13323 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13324 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
13325 | ||
13326 | cat >>confdefs.h <<_ACEOF | |
13327 | #define CRAY_STACKSEG_END $ac_func | |
13328 | _ACEOF | |
13329 | ||
13330 | break | |
13331 | fi | |
13332 | ||
13333 | done | |
13334 | fi | |
13335 | ||
13336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
13337 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
13338 | if ${ac_cv_c_stack_direction+:} false; then : | |
13339 | $as_echo_n "(cached) " >&6 | |
13340 | else | |
13341 | if test "$cross_compiling" = yes; then : | |
13342 | ac_cv_c_stack_direction=0 | |
13343 | else | |
13344 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13345 | /* end confdefs.h. */ | |
13346 | $ac_includes_default | |
13347 | int | |
13348 | find_stack_direction (int *addr, int depth) | |
13349 | { | |
13350 | int dir, dummy = 0; | |
13351 | if (! addr) | |
13352 | addr = &dummy; | |
13353 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
13354 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
13355 | return dir + dummy; | |
13356 | } | |
13357 | ||
13358 | int | |
13359 | main (int argc, char **argv) | |
13360 | { | |
13361 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
13362 | } | |
13363 | _ACEOF | |
13364 | if ac_fn_c_try_run "$LINENO"; then : | |
13365 | ac_cv_c_stack_direction=1 | |
13366 | else | |
13367 | ac_cv_c_stack_direction=-1 | |
13368 | fi | |
13369 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13370 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13371 | fi | |
13372 | ||
13373 | fi | |
13374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13375 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
13376 | cat >>confdefs.h <<_ACEOF | |
13377 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13378 | _ACEOF | |
13379 | ||
13380 | ||
13381 | fi | |
13382 | ||
13383 | ||
13384 | WIN32APILIBS= | |
13385 | case ${host} in | |
13386 | *mingw32*) | |
13387 | ||
13388 | $as_echo "#define USE_WIN32API 1" >>confdefs.h | |
13389 | ||
13390 | WIN32APILIBS="-lws2_32" | |
13391 | ;; | |
13392 | esac | |
13393 | ||
13394 | ||
13395 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
13396 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
13397 | if ${am_cv_langinfo_codeset+:} false; then : | |
13398 | $as_echo_n "(cached) " >&6 | |
13399 | else | |
13400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13401 | /* end confdefs.h. */ | |
13402 | #include <langinfo.h> | |
13403 | int | |
13404 | main () | |
13405 | { | |
13406 | char* cs = nl_langinfo(CODESET); | |
13407 | ; | |
13408 | return 0; | |
13409 | } | |
13410 | _ACEOF | |
13411 | if ac_fn_c_try_link "$LINENO"; then : | |
13412 | am_cv_langinfo_codeset=yes | |
13413 | else | |
13414 | am_cv_langinfo_codeset=no | |
13415 | fi | |
13416 | rm -f core conftest.err conftest.$ac_objext \ | |
13417 | conftest$ac_exeext conftest.$ac_ext | |
13418 | ||
13419 | fi | |
13420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
13421 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
13422 | if test $am_cv_langinfo_codeset = yes; then | |
13423 | ||
13424 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
13425 | ||
13426 | fi | |
13427 | ||
13428 | ||
c8693053 | 13429 | 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 |
13430 | do : |
13431 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
05ea2a05 | 13432 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
d0ac1c44 | 13433 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
bec39cab | 13434 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13435 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 13436 | _ACEOF |
b757528f | 13437 | |
b757528f | 13438 | fi |
bec39cab | 13439 | |
a9322a30 | 13440 | done |
a3828db0 | 13441 | |
d0ac1c44 SM |
13442 | |
13443 | ||
a9322a30 | 13444 | for ac_func in getpagesize |
81ecdfbb RW |
13445 | do : |
13446 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
d0ac1c44 | 13447 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
bec39cab | 13448 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13449 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 13450 | _ACEOF |
bcb3dc3d | 13451 | |
bcb3dc3d MK |
13452 | fi |
13453 | done | |
13454 | ||
81ecdfbb RW |
13455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
13456 | $as_echo_n "checking for working mmap... " >&6; } | |
d0ac1c44 | 13457 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
81ecdfbb | 13458 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13459 | else |
81ecdfbb | 13460 | if test "$cross_compiling" = yes; then : |
a9322a30 | 13461 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 13462 | else |
81ecdfbb | 13463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13464 | /* end confdefs.h. */ |
a9322a30 TT |
13465 | $ac_includes_default |
13466 | /* malloc might have been renamed as rpl_malloc. */ | |
13467 | #undef malloc | |
bec39cab | 13468 | |
a9322a30 TT |
13469 | /* Thanks to Mike Haertel and Jim Avera for this test. |
13470 | Here is a matrix of mmap possibilities: | |
13471 | mmap private not fixed | |
13472 | mmap private fixed at somewhere currently unmapped | |
13473 | mmap private fixed at somewhere already mapped | |
13474 | mmap shared not fixed | |
13475 | mmap shared fixed at somewhere currently unmapped | |
13476 | mmap shared fixed at somewhere already mapped | |
13477 | For private mappings, we should verify that changes cannot be read() | |
13478 | back from the file, nor mmap's back from the file at a different | |
13479 | address. (There have been systems where private was not correctly | |
13480 | implemented like the infamous i386 svr4.0, and systems where the | |
13481 | VM page cache was not coherent with the file system buffer cache | |
13482 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
13483 | For shared mappings, we should conversely verify that changes get | |
13484 | propagated back to all the places they're supposed to be. | |
bec39cab | 13485 | |
a9322a30 TT |
13486 | Grep wants private fixed already mapped. |
13487 | The main things grep needs to know about mmap are: | |
13488 | * does it exist and is it safe to write into the mmap'd area | |
13489 | * how to use it (BSD variants) */ | |
8b9cf735 | 13490 | |
a9322a30 TT |
13491 | #include <fcntl.h> |
13492 | #include <sys/mman.h> | |
8b9cf735 | 13493 | |
81ecdfbb | 13494 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 13495 | char *malloc (); |
a3828db0 MK |
13496 | #endif |
13497 | ||
a9322a30 | 13498 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 13499 | #ifndef HAVE_GETPAGESIZE |
a9322a30 TT |
13500 | # ifdef _SC_PAGESIZE |
13501 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
13502 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 13503 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
13504 | # include <sys/param.h> |
13505 | # ifdef EXEC_PAGESIZE | |
13506 | # define getpagesize() EXEC_PAGESIZE | |
13507 | # else /* no EXEC_PAGESIZE */ | |
13508 | # ifdef NBPG | |
13509 | # define getpagesize() NBPG * CLSIZE | |
13510 | # ifndef CLSIZE | |
13511 | # define CLSIZE 1 | |
13512 | # endif /* no CLSIZE */ | |
13513 | # else /* no NBPG */ | |
13514 | # ifdef NBPC | |
13515 | # define getpagesize() NBPC | |
13516 | # else /* no NBPC */ | |
13517 | # ifdef PAGESIZE | |
13518 | # define getpagesize() PAGESIZE | |
13519 | # endif /* PAGESIZE */ | |
13520 | # endif /* no NBPC */ | |
13521 | # endif /* no NBPG */ | |
13522 | # endif /* no EXEC_PAGESIZE */ | |
13523 | # else /* no HAVE_SYS_PARAM_H */ | |
13524 | # define getpagesize() 8192 /* punt totally */ | |
13525 | # endif /* no HAVE_SYS_PARAM_H */ | |
13526 | # endif /* no _SC_PAGESIZE */ | |
13527 | ||
13528 | #endif /* no HAVE_GETPAGESIZE */ | |
13529 | ||
bec39cab AC |
13530 | int |
13531 | main () | |
13532 | { | |
a9322a30 | 13533 | char *data, *data2, *data3; |
d0ac1c44 | 13534 | const char *cdata2; |
a9322a30 | 13535 | int i, pagesize; |
d0ac1c44 | 13536 | int fd, fd2; |
a9322a30 TT |
13537 | |
13538 | pagesize = getpagesize (); | |
13539 | ||
13540 | /* First, make a file with some known garbage in it. */ | |
13541 | data = (char *) malloc (pagesize); | |
13542 | if (!data) | |
81ecdfbb | 13543 | return 1; |
a9322a30 TT |
13544 | for (i = 0; i < pagesize; ++i) |
13545 | *(data + i) = rand (); | |
13546 | umask (0); | |
13547 | fd = creat ("conftest.mmap", 0600); | |
13548 | if (fd < 0) | |
d0ac1c44 | 13549 | return 2; |
a9322a30 | 13550 | if (write (fd, data, pagesize) != pagesize) |
d0ac1c44 | 13551 | return 3; |
a9322a30 TT |
13552 | close (fd); |
13553 | ||
d0ac1c44 SM |
13554 | /* Next, check that the tail of a page is zero-filled. File must have |
13555 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
13556 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
13557 | if (fd2 < 0) | |
13558 | return 4; | |
13559 | cdata2 = ""; | |
13560 | if (write (fd2, cdata2, 1) != 1) | |
13561 | return 5; | |
13562 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
13563 | if (data2 == MAP_FAILED) | |
13564 | return 6; | |
13565 | for (i = 0; i < pagesize; ++i) | |
13566 | if (*(data2 + i)) | |
13567 | return 7; | |
13568 | close (fd2); | |
13569 | if (munmap (data2, pagesize)) | |
13570 | return 8; | |
13571 | ||
a9322a30 TT |
13572 | /* Next, try to mmap the file at a fixed address which already has |
13573 | something else allocated at it. If we can, also make sure that | |
13574 | we see the same garbage. */ | |
13575 | fd = open ("conftest.mmap", O_RDWR); | |
13576 | if (fd < 0) | |
d0ac1c44 | 13577 | return 9; |
a9322a30 TT |
13578 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
13579 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
d0ac1c44 | 13580 | return 10; |
a9322a30 TT |
13581 | for (i = 0; i < pagesize; ++i) |
13582 | if (*(data + i) != *(data2 + i)) | |
d0ac1c44 | 13583 | return 11; |
a9322a30 TT |
13584 | |
13585 | /* Finally, make sure that changes to the mapped area do not | |
13586 | percolate back to the file as seen by read(). (This is a bug on | |
13587 | some variants of i386 svr4.0.) */ | |
13588 | for (i = 0; i < pagesize; ++i) | |
13589 | *(data2 + i) = *(data2 + i) + 1; | |
13590 | data3 = (char *) malloc (pagesize); | |
13591 | if (!data3) | |
d0ac1c44 | 13592 | return 12; |
a9322a30 | 13593 | if (read (fd, data3, pagesize) != pagesize) |
d0ac1c44 | 13594 | return 13; |
a9322a30 TT |
13595 | for (i = 0; i < pagesize; ++i) |
13596 | if (*(data + i) != *(data3 + i)) | |
d0ac1c44 | 13597 | return 14; |
a9322a30 | 13598 | close (fd); |
81ecdfbb | 13599 | return 0; |
bec39cab AC |
13600 | } |
13601 | _ACEOF | |
81ecdfbb | 13602 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13603 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 13604 | else |
81ecdfbb | 13605 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 13606 | fi |
81ecdfbb RW |
13607 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13608 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 13609 | fi |
81ecdfbb | 13610 | |
a9322a30 | 13611 | fi |
81ecdfbb RW |
13612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
13613 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
13614 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
13615 | ||
81ecdfbb | 13616 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 13617 | |
086ec9eb | 13618 | fi |
d0ac1c44 | 13619 | rm -f conftest.mmap conftest.txt |
a3828db0 | 13620 | |
05ea2a05 | 13621 | for ac_header in vfork.h |
81ecdfbb RW |
13622 | do : |
13623 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
d0ac1c44 | 13624 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
a3828db0 | 13625 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13626 | #define HAVE_VFORK_H 1 |
bec39cab | 13627 | _ACEOF |
c906108c SS |
13628 | |
13629 | fi | |
a9322a30 | 13630 | |
a3828db0 | 13631 | done |
c906108c | 13632 | |
a9322a30 | 13633 | for ac_func in fork vfork |
81ecdfbb RW |
13634 | do : |
13635 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13636 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13637 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
a3828db0 | 13638 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13639 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 13640 | _ACEOF |
b83266a0 | 13641 | |
97bf5e38 | 13642 | fi |
a3828db0 | 13643 | done |
b83266a0 | 13644 | |
a9322a30 | 13645 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
13646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
13647 | $as_echo_n "checking for working fork... " >&6; } | |
d0ac1c44 | 13648 | if ${ac_cv_func_fork_works+:} false; then : |
81ecdfbb | 13649 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13650 | else |
81ecdfbb | 13651 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13652 | ac_cv_func_fork_works=cross |
13653 | else | |
81ecdfbb RW |
13654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
13655 | /* end confdefs.h. */ | |
13656 | $ac_includes_default | |
13657 | int | |
13658 | main () | |
13659 | { | |
13660 | ||
13661 | /* By Ruediger Kuhlmann. */ | |
13662 | return fork () < 0; | |
13663 | ||
13664 | ; | |
13665 | return 0; | |
13666 | } | |
a9322a30 | 13667 | _ACEOF |
81ecdfbb | 13668 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13669 | ac_cv_func_fork_works=yes |
13670 | else | |
81ecdfbb | 13671 | ac_cv_func_fork_works=no |
a9322a30 | 13672 | fi |
81ecdfbb RW |
13673 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13674 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13675 | fi |
81ecdfbb | 13676 | |
a9322a30 | 13677 | fi |
81ecdfbb RW |
13678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
13679 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
13680 | |
13681 | else | |
13682 | ac_cv_func_fork_works=$ac_cv_func_fork | |
13683 | fi | |
13684 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13685 | case $host in | |
13686 | *-*-amigaos* | *-*-msdosdjgpp*) | |
13687 | # Override, as these systems have only a dummy fork() stub | |
13688 | ac_cv_func_fork_works=no | |
13689 | ;; | |
13690 | *) | |
13691 | ac_cv_func_fork_works=yes | |
13692 | ;; | |
13693 | esac | |
81ecdfbb RW |
13694 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
13695 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13696 | fi |
13697 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
13698 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
13699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
13700 | $as_echo_n "checking for working vfork... " >&6; } | |
d0ac1c44 | 13701 | if ${ac_cv_func_vfork_works+:} false; then : |
81ecdfbb | 13702 | $as_echo_n "(cached) " >&6 |
a9322a30 | 13703 | else |
81ecdfbb | 13704 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
13705 | ac_cv_func_vfork_works=cross |
13706 | else | |
81ecdfbb | 13707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
13708 | /* end confdefs.h. */ |
13709 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 13710 | $ac_includes_default |
a9322a30 | 13711 | #include <sys/wait.h> |
81ecdfbb | 13712 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
13713 | # include <vfork.h> |
13714 | #endif | |
13715 | /* On some sparc systems, changes by the child to local and incoming | |
13716 | argument registers are propagated back to the parent. The compiler | |
13717 | is told about this with #include <vfork.h>, but some compilers | |
13718 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
13719 | static variable whose address is put into a register that is | |
13720 | clobbered by the vfork. */ | |
13721 | static void | |
13722 | #ifdef __cplusplus | |
13723 | sparc_address_test (int arg) | |
13724 | # else | |
13725 | sparc_address_test (arg) int arg; | |
13726 | #endif | |
13727 | { | |
13728 | static pid_t child; | |
13729 | if (!child) { | |
13730 | child = vfork (); | |
13731 | if (child < 0) { | |
13732 | perror ("vfork"); | |
13733 | _exit(2); | |
13734 | } | |
13735 | if (!child) { | |
13736 | arg = getpid(); | |
13737 | write(-1, "", 0); | |
13738 | _exit (arg); | |
13739 | } | |
13740 | } | |
13741 | } | |
13742 | ||
13743 | int | |
13744 | main () | |
13745 | { | |
13746 | pid_t parent = getpid (); | |
13747 | pid_t child; | |
13748 | ||
13749 | sparc_address_test (0); | |
13750 | ||
13751 | child = vfork (); | |
13752 | ||
13753 | if (child == 0) { | |
13754 | /* Here is another test for sparc vfork register problems. This | |
13755 | test uses lots of local variables, at least as many local | |
13756 | variables as main has allocated so far including compiler | |
13757 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
13758 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
13759 | reuse the register of parent for one of the local variables, | |
13760 | since it will think that parent can't possibly be used any more | |
13761 | in this routine. Assigning to the local variable will thus | |
13762 | munge parent in the parent process. */ | |
13763 | pid_t | |
13764 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
13765 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
13766 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
13767 | use the same hardware register for all 8 local variables. */ | |
13768 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
13769 | || p != p5 || p != p6 || p != p7) | |
13770 | _exit(1); | |
13771 | ||
13772 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
13773 | from child file descriptors. If the child closes a descriptor | |
13774 | before it execs or exits, this munges the parent's descriptor | |
13775 | as well. Test for this by closing stdout in the child. */ | |
13776 | _exit(close(fileno(stdout)) != 0); | |
13777 | } else { | |
13778 | int status; | |
13779 | struct stat st; | |
13780 | ||
13781 | while (wait(&status) != child) | |
13782 | ; | |
81ecdfbb | 13783 | return ( |
a9322a30 TT |
13784 | /* Was there some problem with vforking? */ |
13785 | child < 0 | |
13786 | ||
13787 | /* Did the child fail? (This shouldn't happen.) */ | |
13788 | || status | |
13789 | ||
13790 | /* Did the vfork/compiler bug occur? */ | |
13791 | || parent != getpid() | |
13792 | ||
13793 | /* Did the file descriptor bug occur? */ | |
13794 | || fstat(fileno(stdout), &st) != 0 | |
13795 | ); | |
13796 | } | |
13797 | } | |
13798 | _ACEOF | |
81ecdfbb | 13799 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13800 | ac_cv_func_vfork_works=yes |
13801 | else | |
81ecdfbb | 13802 | ac_cv_func_vfork_works=no |
a9322a30 | 13803 | fi |
81ecdfbb RW |
13804 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13805 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13806 | fi |
81ecdfbb | 13807 | |
a9322a30 | 13808 | fi |
81ecdfbb RW |
13809 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
13810 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
13811 | |
13812 | fi; | |
13813 | if test "x$ac_cv_func_fork_works" = xcross; then | |
13814 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
13815 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
13816 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
13817 | fi |
13818 | ||
13819 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
13820 | ||
81ecdfbb | 13821 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
13822 | |
13823 | else | |
13824 | ||
81ecdfbb | 13825 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
13826 | |
13827 | fi | |
13828 | if test "x$ac_cv_func_fork_works" = xyes; then | |
13829 | ||
81ecdfbb | 13830 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
13831 | |
13832 | fi | |
13833 | ||
8ae8e197 | 13834 | for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \ |
05ea2a05 | 13835 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
507af45f | 13836 | setpgid setpgrp getrusage getauxval sigtimedwait |
81ecdfbb RW |
13837 | do : |
13838 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13839 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
d0ac1c44 | 13840 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
6c7a06a3 | 13841 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13842 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
13843 | _ACEOF |
13844 | ||
13845 | fi | |
13846 | done | |
13847 | ||
13848 | ||
df9ebc47 TT |
13849 | # This is needed for RHEL 5 and uclibc-ng < 1.0.39. |
13850 | # These did not define ADDR_NO_RANDOMIZE in sys/personality.h, | |
13851 | # only in linux/personality.h. | |
13852 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> | |
13853 | " | |
13854 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : | |
13855 | ac_have_decl=1 | |
13856 | else | |
13857 | ac_have_decl=0 | |
13858 | fi | |
13859 | ||
13860 | cat >>confdefs.h <<_ACEOF | |
13861 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl | |
13862 | _ACEOF | |
13863 | ||
13864 | ||
05ea2a05 TT |
13865 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
13866 | if test "x$ac_cv_have_decl_strstr" = xyes; then : | |
13867 | ac_have_decl=1 | |
d0ac1c44 | 13868 | else |
05ea2a05 TT |
13869 | ac_have_decl=0 |
13870 | fi | |
d0ac1c44 SM |
13871 | |
13872 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 TT |
13873 | #define HAVE_DECL_STRSTR $ac_have_decl |
13874 | _ACEOF | |
13875 | ||
13876 | ||
13877 | # ----------------------- # | |
13878 | # Checks for structures. # | |
13879 | # ----------------------- # | |
13880 | ||
13881 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
13882 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
13883 | ||
13884 | cat >>confdefs.h <<_ACEOF | |
13885 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
d0ac1c44 SM |
13886 | _ACEOF |
13887 | ||
05ea2a05 | 13888 | |
d0ac1c44 | 13889 | fi |
05ea2a05 TT |
13890 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
13891 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : | |
d0ac1c44 | 13892 | |
05ea2a05 TT |
13893 | cat >>confdefs.h <<_ACEOF |
13894 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
13895 | _ACEOF | |
13896 | ||
13897 | ||
13898 | fi | |
13899 | ||
13900 | ||
e911c666 JB |
13901 | # On FreeBSD we need libutil for the kinfo_get* functions. On |
13902 | # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. | |
13903 | # Figure out which one to use. | |
05ea2a05 TT |
13904 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 |
13905 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } | |
13906 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
5e030278 TT |
13907 | $as_echo_n "(cached) " >&6 |
13908 | else | |
05ea2a05 TT |
13909 | ac_func_search_save_LIBS=$LIBS |
13910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 13911 | /* end confdefs.h. */ |
3266f10b | 13912 | |
05ea2a05 TT |
13913 | /* Override any GCC internal prototype to avoid an error. |
13914 | Use char because int might match the return type of a GCC | |
13915 | builtin and then its argument prototype would still apply. */ | |
13916 | #ifdef __cplusplus | |
13917 | extern "C" | |
13918 | #endif | |
13919 | char kinfo_getfile (); | |
3266f10b TT |
13920 | int |
13921 | main () | |
13922 | { | |
05ea2a05 | 13923 | return kinfo_getfile (); |
3266f10b TT |
13924 | ; |
13925 | return 0; | |
13926 | } | |
13927 | _ACEOF | |
05ea2a05 TT |
13928 | for ac_lib in '' util util-freebsd; do |
13929 | if test -z "$ac_lib"; then | |
13930 | ac_res="none required" | |
13931 | else | |
13932 | ac_res=-l$ac_lib | |
13933 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
13934 | fi | |
13935 | if ac_fn_c_try_link "$LINENO"; then : | |
13936 | ac_cv_search_kinfo_getfile=$ac_res | |
3266f10b | 13937 | fi |
05ea2a05 TT |
13938 | rm -f core conftest.err conftest.$ac_objext \ |
13939 | conftest$ac_exeext | |
13940 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
13941 | break | |
13942 | fi | |
13943 | done | |
13944 | if ${ac_cv_search_kinfo_getfile+:} false; then : | |
3266f10b TT |
13945 | |
13946 | else | |
05ea2a05 | 13947 | ac_cv_search_kinfo_getfile=no |
3266f10b | 13948 | fi |
05ea2a05 TT |
13949 | rm conftest.$ac_ext |
13950 | LIBS=$ac_func_search_save_LIBS | |
13951 | fi | |
13952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 | |
13953 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } | |
13954 | ac_res=$ac_cv_search_kinfo_getfile | |
13955 | if test "$ac_res" != no; then : | |
13956 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
13957 | ||
e911c666 JB |
13958 | fi |
13959 | ||
13960 | ||
13961 | # Define HAVE_KINFO_GETFILE if kinfo_getfile is available. | |
13962 | for ac_func in kinfo_getfile | |
13963 | do : | |
13964 | ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile" | |
13965 | if test "x$ac_cv_func_kinfo_getfile" = xyes; then : | |
13966 | cat >>confdefs.h <<_ACEOF | |
13967 | #define HAVE_KINFO_GETFILE 1 | |
13968 | _ACEOF | |
3266f10b TT |
13969 | |
13970 | fi | |
e911c666 | 13971 | done |
3266f10b | 13972 | |
3266f10b | 13973 | |
05ea2a05 TT |
13974 | # Check for std::thread. This does not work on some platforms, like |
13975 | # mingw and DJGPP. | |
13976 | ac_ext=cpp | |
13977 | ac_cpp='$CXXCPP $CPPFLAGS' | |
13978 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13979 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13980 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
3266f10b | 13981 | |
3266f10b | 13982 | |
3266f10b | 13983 | |
3266f10b | 13984 | |
3266f10b | 13985 | |
05ea2a05 TT |
13986 | ac_ext=c |
13987 | ac_cpp='$CPP $CPPFLAGS' | |
13988 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
13989 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
13990 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3266f10b | 13991 | |
05ea2a05 | 13992 | ax_pthread_ok=no |
3266f10b | 13993 | |
05ea2a05 TT |
13994 | # We used to check for pthread.h first, but this fails if pthread.h |
13995 | # requires special compiler flags (e.g. on Tru64 or Sequent). | |
13996 | # It gets checked for in the link test anyway. | |
3266f10b | 13997 | |
05ea2a05 TT |
13998 | # First of all, check if the user has set any of the PTHREAD_LIBS, |
13999 | # etcetera environment variables, and if threads linking works using | |
14000 | # them: | |
14001 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then | |
14002 | ax_pthread_save_CC="$CC" | |
14003 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14004 | ax_pthread_save_LIBS="$LIBS" | |
14005 | if test "x$PTHREAD_CC" != "x"; then : | |
14006 | CC="$PTHREAD_CC" | |
3266f10b | 14007 | fi |
05ea2a05 TT |
14008 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
14009 | LIBS="$PTHREAD_LIBS $LIBS" | |
14010 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 | |
14011 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } | |
14012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14013 | /* end confdefs.h. */ |
05ea2a05 TT |
14014 | |
14015 | /* Override any GCC internal prototype to avoid an error. | |
14016 | Use char because int might match the return type of a GCC | |
14017 | builtin and then its argument prototype would still apply. */ | |
14018 | #ifdef __cplusplus | |
14019 | extern "C" | |
14020 | #endif | |
14021 | char pthread_join (); | |
3266f10b TT |
14022 | int |
14023 | main () | |
14024 | { | |
05ea2a05 | 14025 | return pthread_join (); |
3266f10b TT |
14026 | ; |
14027 | return 0; | |
14028 | } | |
14029 | _ACEOF | |
14030 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 | 14031 | ax_pthread_ok=yes |
3266f10b TT |
14032 | fi |
14033 | rm -f core conftest.err conftest.$ac_objext \ | |
14034 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 TT |
14035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 |
14036 | $as_echo "$ax_pthread_ok" >&6; } | |
14037 | if test "x$ax_pthread_ok" = "xno"; then | |
14038 | PTHREAD_LIBS="" | |
14039 | PTHREAD_CFLAGS="" | |
14040 | fi | |
14041 | CC="$ax_pthread_save_CC" | |
14042 | CFLAGS="$ax_pthread_save_CFLAGS" | |
14043 | LIBS="$ax_pthread_save_LIBS" | |
3266f10b | 14044 | fi |
3266f10b | 14045 | |
05ea2a05 TT |
14046 | # We must check for the threads library under a number of different |
14047 | # names; the ordering is very important because some systems | |
14048 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the | |
14049 | # libraries is broken (non-POSIX). | |
3266f10b | 14050 | |
05ea2a05 TT |
14051 | # Create a list of thread flags to try. Items starting with a "-" are |
14052 | # C compiler flags, and other items are library names, except for "none" | |
14053 | # which indicates that we try without any flags at all, and "pthread-config" | |
14054 | # which is a program returning the flags for the Pth emulation library. | |
3266f10b | 14055 | |
05ea2a05 | 14056 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
3266f10b | 14057 | |
05ea2a05 TT |
14058 | # The ordering *is* (sometimes) important. Some notes on the |
14059 | # individual items follow: | |
3266f10b | 14060 | |
05ea2a05 TT |
14061 | # pthreads: AIX (must check this before -lpthread) |
14062 | # none: in case threads are in libc; should be tried before -Kthread and | |
14063 | # other compiler flags to prevent continual compiler warnings | |
14064 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) | |
14065 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 | |
14066 | # (Note: HP C rejects this with "bad form for `-t' option") | |
14067 | # -pthreads: Solaris/gcc (Note: HP C also rejects) | |
14068 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it | |
14069 | # doesn't hurt to check since this sometimes defines pthreads and | |
14070 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which | |
14071 | # is present but should not be used directly; and before -mthreads, | |
14072 | # because the compiler interprets this as "-mt" + "-hreads") | |
14073 | # -mthreads: Mingw32/gcc, Lynx/gcc | |
14074 | # pthread: Linux, etcetera | |
14075 | # --thread-safe: KAI C++ | |
14076 | # pthread-config: use pthread-config program (for GNU Pth library) | |
3266f10b | 14077 | |
05ea2a05 | 14078 | case $host_os in |
3266f10b | 14079 | |
05ea2a05 | 14080 | freebsd*) |
3266f10b | 14081 | |
05ea2a05 TT |
14082 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
14083 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) | |
3266f10b | 14084 | |
05ea2a05 TT |
14085 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" |
14086 | ;; | |
3266f10b | 14087 | |
05ea2a05 | 14088 | hpux*) |
3266f10b | 14089 | |
05ea2a05 TT |
14090 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable |
14091 | # multi-threading and also sets -lpthread." | |
14092 | ||
14093 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" | |
14094 | ;; | |
14095 | ||
14096 | openedition*) | |
14097 | ||
14098 | # IBM z/OS requires a feature-test macro to be defined in order to | |
14099 | # enable POSIX threads at all, so give the user a hint if this is | |
14100 | # not set. (We don't define these ourselves, as they can affect | |
14101 | # other portions of the system API in unpredictable ways.) | |
14102 | ||
14103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14104 | /* end confdefs.h. */ |
05ea2a05 TT |
14105 | |
14106 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) | |
14107 | AX_PTHREAD_ZOS_MISSING | |
14108 | # endif | |
3266f10b TT |
14109 | |
14110 | _ACEOF | |
14111 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
05ea2a05 TT |
14112 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : |
14113 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 | |
14114 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} | |
3266f10b TT |
14115 | fi |
14116 | rm -f conftest* | |
14117 | ||
05ea2a05 | 14118 | ;; |
3266f10b | 14119 | |
05ea2a05 | 14120 | solaris*) |
3266f10b | 14121 | |
05ea2a05 TT |
14122 | # On Solaris (at least, for some versions), libc contains stubbed |
14123 | # (non-functional) versions of the pthreads routines, so link-based | |
14124 | # tests will erroneously succeed. (N.B.: The stubs are missing | |
14125 | # pthread_cleanup_push, or rather a function called by this macro, | |
14126 | # so we could check for that, but who knows whether they'll stub | |
14127 | # that too in a future libc.) So we'll check first for the | |
14128 | # standard Solaris way of linking pthreads (-mt -lpthread). | |
14129 | ||
14130 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" | |
14131 | ;; | |
14132 | esac | |
14133 | ||
14134 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) | |
14135 | ||
14136 | if test "x$GCC" = "xyes"; then : | |
14137 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" | |
3266f10b TT |
14138 | fi |
14139 | ||
05ea2a05 TT |
14140 | # The presence of a feature test macro requesting re-entrant function |
14141 | # definitions is, on some systems, a strong hint that pthreads support is | |
14142 | # correctly enabled | |
14143 | ||
14144 | case $host_os in | |
14145 | darwin* | hpux* | linux* | osf* | solaris*) | |
14146 | ax_pthread_check_macro="_REENTRANT" | |
14147 | ;; | |
14148 | ||
14149 | aix*) | |
14150 | ax_pthread_check_macro="_THREAD_SAFE" | |
14151 | ;; | |
14152 | ||
14153 | *) | |
14154 | ax_pthread_check_macro="--" | |
14155 | ;; | |
14156 | esac | |
14157 | if test "x$ax_pthread_check_macro" = "x--"; then : | |
14158 | ax_pthread_check_cond=0 | |
14159 | else | |
14160 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" | |
3266f10b TT |
14161 | fi |
14162 | ||
05ea2a05 TT |
14163 | # Are we compiling with Clang? |
14164 | ||
14165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 | |
14166 | $as_echo_n "checking whether $CC is Clang... " >&6; } | |
14167 | if ${ax_cv_PTHREAD_CLANG+:} false; then : | |
3266f10b TT |
14168 | $as_echo_n "(cached) " >&6 |
14169 | else | |
05ea2a05 TT |
14170 | ax_cv_PTHREAD_CLANG=no |
14171 | # Note that Autoconf sets GCC=yes for Clang as well as GCC | |
14172 | if test "x$GCC" = "xyes"; then | |
14173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3266f10b | 14174 | /* end confdefs.h. */ |
05ea2a05 TT |
14175 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ |
14176 | # if defined(__clang__) && defined(__llvm__) | |
14177 | AX_PTHREAD_CC_IS_CLANG | |
14178 | # endif | |
3266f10b | 14179 | |
3266f10b | 14180 | _ACEOF |
05ea2a05 TT |
14181 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
14182 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : | |
14183 | ax_cv_PTHREAD_CLANG=yes | |
3266f10b | 14184 | fi |
05ea2a05 TT |
14185 | rm -f conftest* |
14186 | ||
14187 | fi | |
3266f10b TT |
14188 | |
14189 | fi | |
05ea2a05 TT |
14190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 |
14191 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } | |
14192 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" | |
3266f10b | 14193 | |
05ea2a05 | 14194 | ax_pthread_clang_warning=no |
3266f10b | 14195 | |
05ea2a05 TT |
14196 | # Clang needs special handling, because older versions handle the -pthread |
14197 | # option in a rather... idiosyncratic way | |
3266f10b | 14198 | |
05ea2a05 | 14199 | if test "x$ax_pthread_clang" = "xyes"; then |
3266f10b | 14200 | |
05ea2a05 | 14201 | # Clang takes -pthread; it has never supported any other flag |
b2ceabe8 | 14202 | |
05ea2a05 TT |
14203 | # (Note 1: This will need to be revisited if a system that Clang |
14204 | # supports has POSIX threads in a separate library. This tends not | |
14205 | # to be the way of modern systems, but it's conceivable.) | |
b2ceabe8 | 14206 | |
05ea2a05 TT |
14207 | # (Note 2: On some systems, notably Darwin, -pthread is not needed |
14208 | # to get POSIX threads support; the API is always present and | |
14209 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But | |
14210 | # -pthread does define _REENTRANT, and while the Darwin headers | |
14211 | # ignore this macro, third-party headers might not.) | |
b2ceabe8 | 14212 | |
05ea2a05 TT |
14213 | PTHREAD_CFLAGS="-pthread" |
14214 | PTHREAD_LIBS= | |
3266f10b | 14215 | |
05ea2a05 TT |
14216 | ax_pthread_ok=yes |
14217 | ||
14218 | # However, older versions of Clang make a point of warning the user | |
14219 | # that, in an invocation where only linking and no compilation is | |
14220 | # taking place, the -pthread option has no effect ("argument unused | |
14221 | # during compilation"). They expect -pthread to be passed in only | |
14222 | # when source code is being compiled. | |
14223 | # | |
14224 | # Problem is, this is at odds with the way Automake and most other | |
14225 | # C build frameworks function, which is that the same flags used in | |
14226 | # compilation (CFLAGS) are also used in linking. Many systems | |
14227 | # supported by AX_PTHREAD require exactly this for POSIX threads | |
14228 | # support, and in fact it is often not straightforward to specify a | |
14229 | # flag that is used only in the compilation phase and not in | |
14230 | # linking. Such a scenario is extremely rare in practice. | |
14231 | # | |
14232 | # Even though use of the -pthread flag in linking would only print | |
14233 | # a warning, this can be a nuisance for well-run software projects | |
14234 | # that build with -Werror. So if the active version of Clang has | |
14235 | # this misfeature, we search for an option to squash it. | |
14236 | ||
14237 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 | |
14238 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } | |
14239 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : | |
14240 | $as_echo_n "(cached) " >&6 | |
14241 | else | |
14242 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown | |
14243 | # Create an alternate version of $ac_link that compiles and | |
14244 | # links in two steps (.c -> .o, .o -> exe) instead of one | |
14245 | # (.c -> exe), because the warning occurs only in the second | |
14246 | # step | |
14247 | ax_pthread_save_ac_link="$ac_link" | |
14248 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' | |
14249 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` | |
14250 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" | |
14251 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14252 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do | |
14253 | if test "x$ax_pthread_try" = "xunknown"; then : | |
14254 | break | |
14255 | fi | |
14256 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" | |
14257 | ac_link="$ax_pthread_save_ac_link" | |
14258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14259 | /* end confdefs.h. */ | |
14260 | int main(void){return 0;} | |
3266f10b TT |
14261 | _ACEOF |
14262 | if ac_fn_c_try_link "$LINENO"; then : | |
05ea2a05 TT |
14263 | ac_link="$ax_pthread_2step_ac_link" |
14264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14265 | /* end confdefs.h. */ | |
14266 | int main(void){return 0;} | |
14267 | _ACEOF | |
14268 | if ac_fn_c_try_link "$LINENO"; then : | |
14269 | break | |
3266f10b TT |
14270 | fi |
14271 | rm -f core conftest.err conftest.$ac_objext \ | |
14272 | conftest$ac_exeext conftest.$ac_ext | |
14273 | ||
14274 | fi | |
05ea2a05 TT |
14275 | rm -f core conftest.err conftest.$ac_objext \ |
14276 | conftest$ac_exeext conftest.$ac_ext | |
14277 | done | |
14278 | ac_link="$ax_pthread_save_ac_link" | |
14279 | CFLAGS="$ax_pthread_save_CFLAGS" | |
14280 | if test "x$ax_pthread_try" = "x"; then : | |
14281 | ax_pthread_try=no | |
14282 | fi | |
14283 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" | |
3266f10b | 14284 | |
05ea2a05 TT |
14285 | fi |
14286 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 | |
14287 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } | |
3266f10b | 14288 | |
05ea2a05 TT |
14289 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in |
14290 | no | unknown) ;; | |
14291 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; | |
14292 | esac | |
3266f10b | 14293 | |
05ea2a05 | 14294 | fi # $ax_pthread_clang = yes |
3266f10b | 14295 | |
05ea2a05 TT |
14296 | if test "x$ax_pthread_ok" = "xno"; then |
14297 | for ax_pthread_try_flag in $ax_pthread_flags; do | |
3266f10b | 14298 | |
05ea2a05 TT |
14299 | case $ax_pthread_try_flag in |
14300 | none) | |
14301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 | |
14302 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } | |
14303 | ;; | |
3266f10b | 14304 | |
05ea2a05 TT |
14305 | -mt,pthread) |
14306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 | |
14307 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } | |
14308 | PTHREAD_CFLAGS="-mt" | |
14309 | PTHREAD_LIBS="-lpthread" | |
14310 | ;; | |
3266f10b | 14311 | |
05ea2a05 TT |
14312 | -*) |
14313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 | |
14314 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } | |
14315 | PTHREAD_CFLAGS="$ax_pthread_try_flag" | |
14316 | ;; | |
3266f10b | 14317 | |
05ea2a05 TT |
14318 | pthread-config) |
14319 | # Extract the first word of "pthread-config", so it can be a program name with args. | |
14320 | set dummy pthread-config; ac_word=$2 | |
14321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14322 | $as_echo_n "checking for $ac_word... " >&6; } | |
14323 | if ${ac_cv_prog_ax_pthread_config+:} false; then : | |
14324 | $as_echo_n "(cached) " >&6 | |
14325 | else | |
14326 | if test -n "$ax_pthread_config"; then | |
14327 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. | |
14328 | else | |
14329 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14330 | for as_dir in $PATH | |
14331 | do | |
14332 | IFS=$as_save_IFS | |
14333 | test -z "$as_dir" && as_dir=. | |
14334 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14335 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14336 | ac_cv_prog_ax_pthread_config="yes" | |
14337 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14338 | break 2 | |
14339 | fi | |
3266f10b | 14340 | done |
05ea2a05 TT |
14341 | done |
14342 | IFS=$as_save_IFS | |
3266f10b | 14343 | |
05ea2a05 TT |
14344 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" |
14345 | fi | |
14346 | fi | |
14347 | ax_pthread_config=$ac_cv_prog_ax_pthread_config | |
14348 | if test -n "$ax_pthread_config"; then | |
14349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 | |
14350 | $as_echo "$ax_pthread_config" >&6; } | |
3266f10b | 14351 | else |
05ea2a05 TT |
14352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14353 | $as_echo "no" >&6; } | |
3266f10b TT |
14354 | fi |
14355 | ||
5e030278 | 14356 | |
05ea2a05 TT |
14357 | if test "x$ax_pthread_config" = "xno"; then : |
14358 | continue | |
14359 | fi | |
14360 | PTHREAD_CFLAGS="`pthread-config --cflags`" | |
14361 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" | |
14362 | ;; | |
5e030278 | 14363 | |
05ea2a05 TT |
14364 | *) |
14365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 | |
14366 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } | |
14367 | PTHREAD_LIBS="-l$ax_pthread_try_flag" | |
14368 | ;; | |
14369 | esac | |
5e030278 | 14370 | |
5e030278 TT |
14371 | ax_pthread_save_CFLAGS="$CFLAGS" |
14372 | ax_pthread_save_LIBS="$LIBS" | |
5e030278 TT |
14373 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
14374 | LIBS="$PTHREAD_LIBS $LIBS" | |
05ea2a05 TT |
14375 | |
14376 | # Check for various functions. We must include pthread.h, | |
14377 | # since some functions may be macros. (On the Sequent, we | |
14378 | # need a special flag -Kthread to make this header compile.) | |
14379 | # We check for pthread_join because it is in -lpthread on IRIX | |
14380 | # while pthread_create is in libc. We check for pthread_attr_init | |
14381 | # due to DEC craziness with -lpthreads. We check for | |
14382 | # pthread_cleanup_push because it is one of the few pthread | |
14383 | # functions on Solaris that doesn't have a non-functional libc stub. | |
14384 | # We try pthread_create on general principles. | |
14385 | ||
5e030278 TT |
14386 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14387 | /* end confdefs.h. */ | |
05ea2a05 TT |
14388 | #include <pthread.h> |
14389 | # if $ax_pthread_check_cond | |
14390 | # error "$ax_pthread_check_macro must be defined" | |
14391 | # endif | |
14392 | static void routine(void *a) { a = 0; } | |
14393 | static void *start_routine(void *a) { return a; } | |
5e030278 TT |
14394 | int |
14395 | main () | |
14396 | { | |
05ea2a05 TT |
14397 | pthread_t th; pthread_attr_t attr; |
14398 | pthread_create(&th, 0, start_routine, 0); | |
14399 | pthread_join(th, 0); | |
14400 | pthread_attr_init(&attr); | |
14401 | pthread_cleanup_push(routine, 0); | |
14402 | pthread_cleanup_pop(0) /* ; */ | |
5e030278 TT |
14403 | ; |
14404 | return 0; | |
14405 | } | |
14406 | _ACEOF | |
14407 | if ac_fn_c_try_link "$LINENO"; then : | |
14408 | ax_pthread_ok=yes | |
14409 | fi | |
14410 | rm -f core conftest.err conftest.$ac_objext \ | |
14411 | conftest$ac_exeext conftest.$ac_ext | |
05ea2a05 | 14412 | |
5e030278 TT |
14413 | CFLAGS="$ax_pthread_save_CFLAGS" |
14414 | LIBS="$ax_pthread_save_LIBS" | |
05ea2a05 TT |
14415 | |
14416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 | |
14417 | $as_echo "$ax_pthread_ok" >&6; } | |
14418 | if test "x$ax_pthread_ok" = "xyes"; then : | |
14419 | break | |
5e030278 TT |
14420 | fi |
14421 | ||
05ea2a05 TT |
14422 | PTHREAD_LIBS="" |
14423 | PTHREAD_CFLAGS="" | |
14424 | done | |
14425 | fi | |
5e030278 | 14426 | |
05ea2a05 TT |
14427 | # Various other checks: |
14428 | if test "x$ax_pthread_ok" = "xyes"; then | |
14429 | ax_pthread_save_CFLAGS="$CFLAGS" | |
14430 | ax_pthread_save_LIBS="$LIBS" | |
14431 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" | |
14432 | LIBS="$PTHREAD_LIBS $LIBS" | |
5e030278 | 14433 | |
05ea2a05 TT |
14434 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
14435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 | |
14436 | $as_echo_n "checking for joinable pthread attribute... " >&6; } | |
14437 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : | |
14438 | $as_echo_n "(cached) " >&6 | |
14439 | else | |
14440 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown | |
14441 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do | |
14442 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14443 | /* end confdefs.h. */ | |
14444 | #include <pthread.h> | |
14445 | int | |
14446 | main () | |
14447 | { | |
14448 | int attr = $ax_pthread_attr; return attr /* ; */ | |
14449 | ; | |
14450 | return 0; | |
14451 | } | |
14452 | _ACEOF | |
14453 | if ac_fn_c_try_link "$LINENO"; then : | |
14454 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break | |
14455 | fi | |
14456 | rm -f core conftest.err conftest.$ac_objext \ | |
14457 | conftest$ac_exeext conftest.$ac_ext | |
14458 | done | |
5e030278 | 14459 | |
05ea2a05 TT |
14460 | fi |
14461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 | |
14462 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } | |
14463 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ | |
14464 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ | |
14465 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : | |
5e030278 | 14466 | |
05ea2a05 TT |
14467 | cat >>confdefs.h <<_ACEOF |
14468 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR | |
14469 | _ACEOF | |
5e030278 | 14470 | |
05ea2a05 | 14471 | ax_pthread_joinable_attr_defined=yes |
5e030278 | 14472 | |
05ea2a05 | 14473 | fi |
5e030278 | 14474 | |
05ea2a05 TT |
14475 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 |
14476 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } | |
14477 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : | |
14478 | $as_echo_n "(cached) " >&6 | |
14479 | else | |
14480 | ax_cv_PTHREAD_SPECIAL_FLAGS=no | |
14481 | case $host_os in | |
14482 | solaris*) | |
14483 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" | |
14484 | ;; | |
14485 | esac | |
5e030278 | 14486 | |
05ea2a05 TT |
14487 | fi |
14488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 | |
14489 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } | |
14490 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ | |
14491 | test "x$ax_pthread_special_flags_added" != "xyes"; then : | |
14492 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" | |
14493 | ax_pthread_special_flags_added=yes | |
14494 | fi | |
5e030278 | 14495 | |
05ea2a05 TT |
14496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 |
14497 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } | |
14498 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : | |
14499 | $as_echo_n "(cached) " >&6 | |
14500 | else | |
14501 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14502 | /* end confdefs.h. */ | |
14503 | #include <pthread.h> | |
14504 | int | |
14505 | main () | |
14506 | { | |
14507 | int i = PTHREAD_PRIO_INHERIT; | |
14508 | ; | |
14509 | return 0; | |
14510 | } | |
14511 | _ACEOF | |
14512 | if ac_fn_c_try_link "$LINENO"; then : | |
14513 | ax_cv_PTHREAD_PRIO_INHERIT=yes | |
14514 | else | |
14515 | ax_cv_PTHREAD_PRIO_INHERIT=no | |
14516 | fi | |
14517 | rm -f core conftest.err conftest.$ac_objext \ | |
14518 | conftest$ac_exeext conftest.$ac_ext | |
5e030278 | 14519 | |
05ea2a05 TT |
14520 | fi |
14521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 | |
14522 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } | |
14523 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ | |
14524 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : | |
5e030278 | 14525 | |
05ea2a05 | 14526 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h |
5e030278 | 14527 | |
05ea2a05 | 14528 | ax_pthread_prio_inherit_defined=yes |
5e030278 | 14529 | |
05ea2a05 | 14530 | fi |
5e030278 | 14531 | |
05ea2a05 TT |
14532 | CFLAGS="$ax_pthread_save_CFLAGS" |
14533 | LIBS="$ax_pthread_save_LIBS" | |
5e030278 | 14534 | |
05ea2a05 TT |
14535 | # More AIX lossage: compile with *_r variant |
14536 | if test "x$GCC" != "xyes"; then | |
14537 | case $host_os in | |
14538 | aix*) | |
14539 | case "x/$CC" in #( | |
14540 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : | |
14541 | #handle absolute path differently from PATH based program lookup | |
14542 | case "x$CC" in #( | |
14543 | x/*) : | |
14544 | if as_fn_executable_p ${CC}_r; then : | |
14545 | PTHREAD_CC="${CC}_r" | |
14546 | fi ;; #( | |
14547 | *) : | |
14548 | for ac_prog in ${CC}_r | |
14549 | do | |
14550 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
14551 | set dummy $ac_prog; ac_word=$2 | |
14552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
14553 | $as_echo_n "checking for $ac_word... " >&6; } | |
14554 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : | |
14555 | $as_echo_n "(cached) " >&6 | |
14556 | else | |
14557 | if test -n "$PTHREAD_CC"; then | |
14558 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. | |
14559 | else | |
14560 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
14561 | for as_dir in $PATH | |
14562 | do | |
14563 | IFS=$as_save_IFS | |
14564 | test -z "$as_dir" && as_dir=. | |
14565 | for ac_exec_ext in '' $ac_executable_extensions; do | |
14566 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
14567 | ac_cv_prog_PTHREAD_CC="$ac_prog" | |
14568 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
14569 | break 2 | |
14570 | fi | |
14571 | done | |
14572 | done | |
14573 | IFS=$as_save_IFS | |
5e030278 | 14574 | |
5e030278 | 14575 | fi |
05ea2a05 TT |
14576 | fi |
14577 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC | |
14578 | if test -n "$PTHREAD_CC"; then | |
14579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 | |
14580 | $as_echo "$PTHREAD_CC" >&6; } | |
14581 | else | |
14582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
14583 | $as_echo "no" >&6; } | |
14584 | fi | |
5e030278 | 14585 | |
5e030278 | 14586 | |
05ea2a05 TT |
14587 | test -n "$PTHREAD_CC" && break |
14588 | done | |
14589 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" | |
14590 | ;; | |
14591 | esac ;; #( | |
14592 | *) : | |
14593 | ;; | |
5e030278 | 14594 | esac |
05ea2a05 TT |
14595 | ;; |
14596 | esac | |
14597 | fi | |
14598 | fi | |
5e030278 | 14599 | |
05ea2a05 | 14600 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
5e030278 | 14601 | |
5e030278 | 14602 | |
5e030278 | 14603 | |
5e030278 | 14604 | |
5e030278 | 14605 | |
05ea2a05 TT |
14606 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
14607 | if test "x$ax_pthread_ok" = "xyes"; then | |
14608 | threads=yes | |
14609 | : | |
5e030278 | 14610 | else |
05ea2a05 TT |
14611 | ax_pthread_ok=no |
14612 | threads=no | |
5e030278 | 14613 | fi |
05ea2a05 TT |
14614 | ac_ext=cpp |
14615 | ac_cpp='$CXXCPP $CPPFLAGS' | |
14616 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14617 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14618 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
5e030278 | 14619 | |
5e030278 | 14620 | |
05ea2a05 TT |
14621 | if test "$threads" = "yes"; then |
14622 | save_LIBS="$LIBS" | |
14623 | LIBS="$PTHREAD_LIBS $LIBS" | |
14624 | save_CXXFLAGS="$CXXFLAGS" | |
14625 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" | |
14626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 | |
14627 | $as_echo_n "checking for std::thread... " >&6; } | |
14628 | if ${gdb_cv_cxx_std_thread+:} false; then : | |
14629 | $as_echo_n "(cached) " >&6 | |
14630 | else | |
14631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14632 | /* end confdefs.h. */ |
05ea2a05 TT |
14633 | #include <thread> |
14634 | void callback() { } | |
14635 | int | |
14636 | main () | |
14637 | { | |
14638 | std::thread t(callback); | |
14639 | ; | |
14640 | return 0; | |
14641 | } | |
5e030278 | 14642 | _ACEOF |
05ea2a05 TT |
14643 | if ac_fn_cxx_try_compile "$LINENO"; then : |
14644 | gdb_cv_cxx_std_thread=yes | |
14645 | else | |
14646 | gdb_cv_cxx_std_thread=no | |
5e030278 | 14647 | fi |
05ea2a05 TT |
14648 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
14649 | fi | |
14650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 | |
14651 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } | |
5e030278 | 14652 | |
05ea2a05 TT |
14653 | # This check must be here, while LIBS includes any necessary |
14654 | # threading library. | |
14655 | for ac_func in pthread_sigmask pthread_setname_np | |
14656 | do : | |
14657 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14658 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14659 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
14660 | cat >>confdefs.h <<_ACEOF | |
14661 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
14662 | _ACEOF | |
5e030278 TT |
14663 | |
14664 | fi | |
05ea2a05 | 14665 | done |
5e030278 | 14666 | |
5e030278 | 14667 | |
05ea2a05 TT |
14668 | LIBS="$save_LIBS" |
14669 | CXXFLAGS="$save_CXXFLAGS" | |
14670 | fi | |
14671 | if test "$gdb_cv_cxx_std_thread" = "yes"; then | |
5e030278 | 14672 | |
05ea2a05 | 14673 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h |
5e030278 | 14674 | |
05ea2a05 TT |
14675 | fi |
14676 | ac_ext=c | |
14677 | ac_cpp='$CPP $CPPFLAGS' | |
14678 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
14679 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
14680 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5e030278 | 14681 | |
5e030278 | 14682 | |
05ea2a05 TT |
14683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
14684 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
14685 | if ${gdb_cv_func_sigsetjmp+:} false; then : | |
14686 | $as_echo_n "(cached) " >&6 | |
14687 | else | |
14688 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14689 | /* end confdefs.h. */ | |
b9442ec1 | 14690 | #include <setjmp.h> |
05ea2a05 TT |
14691 | int |
14692 | main () | |
14693 | { | |
b9442ec1 SM |
14694 | sigjmp_buf env; |
14695 | while (! sigsetjmp (env, 1)) | |
14696 | siglongjmp (env, 1); | |
14697 | ||
05ea2a05 TT |
14698 | ; |
14699 | return 0; | |
14700 | } | |
14701 | _ACEOF | |
14702 | if ac_fn_c_try_compile "$LINENO"; then : | |
14703 | gdb_cv_func_sigsetjmp=yes | |
14704 | else | |
14705 | gdb_cv_func_sigsetjmp=no | |
b9442ec1 | 14706 | |
05ea2a05 TT |
14707 | fi |
14708 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b9442ec1 | 14709 | |
05ea2a05 TT |
14710 | fi |
14711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 | |
14712 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
14713 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then | |
5e030278 | 14714 | |
05ea2a05 | 14715 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
5e030278 | 14716 | |
05ea2a05 TT |
14717 | fi |
14718 | ||
14719 | ||
14720 | # Check whether --with-intel_pt was given. | |
14721 | if test "${with_intel_pt+set}" = set; then : | |
14722 | withval=$with_intel_pt; | |
5e030278 | 14723 | else |
05ea2a05 | 14724 | with_intel_pt=auto |
5e030278 | 14725 | fi |
05ea2a05 TT |
14726 | |
14727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 | |
14728 | $as_echo_n "checking whether to use intel pt... " >&6; } | |
14729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 | |
14730 | $as_echo "$with_intel_pt" >&6; } | |
14731 | ||
14732 | if test "${with_intel_pt}" = no; then | |
14733 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 | |
14734 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} | |
14735 | HAVE_LIBIPT=no | |
14736 | else | |
14737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 14738 | /* end confdefs.h. */ |
5e030278 | 14739 | |
05ea2a05 TT |
14740 | #include <linux/perf_event.h> |
14741 | #ifndef PERF_ATTR_SIZE_VER5 | |
14742 | # error | |
14743 | #endif | |
5e030278 | 14744 | |
05ea2a05 TT |
14745 | _ACEOF |
14746 | if ac_fn_c_try_cpp "$LINENO"; then : | |
14747 | perf_event=yes | |
14748 | else | |
14749 | perf_event=no | |
5e030278 | 14750 | fi |
05ea2a05 TT |
14751 | rm -f conftest.err conftest.i conftest.$ac_ext |
14752 | if test "$perf_event" != yes; then | |
14753 | if test "$with_intel_pt" = yes; then | |
14754 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 | |
14755 | else | |
14756 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 | |
14757 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} | |
14758 | fi | |
14759 | fi | |
5e030278 | 14760 | |
5e030278 | 14761 | |
5e030278 | 14762 | |
5e030278 | 14763 | |
5e030278 | 14764 | |
5e030278 | 14765 | |
5e030278 | 14766 | |
5e030278 | 14767 | |
5e030278 | 14768 | |
05ea2a05 | 14769 | use_additional=yes |
5e030278 | 14770 | |
05ea2a05 TT |
14771 | acl_save_prefix="$prefix" |
14772 | prefix="$acl_final_prefix" | |
14773 | acl_save_exec_prefix="$exec_prefix" | |
14774 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14775 | |
05ea2a05 TT |
14776 | eval additional_includedir=\"$includedir\" |
14777 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14778 | |
05ea2a05 TT |
14779 | exec_prefix="$acl_save_exec_prefix" |
14780 | prefix="$acl_save_prefix" | |
5e030278 | 14781 | |
5e030278 | 14782 | |
05ea2a05 TT |
14783 | # Check whether --with-libipt-prefix was given. |
14784 | if test "${with_libipt_prefix+set}" = set; then : | |
14785 | withval=$with_libipt_prefix; | |
14786 | if test "X$withval" = "Xno"; then | |
14787 | use_additional=no | |
14788 | else | |
14789 | if test "X$withval" = "X"; then | |
5e030278 | 14790 | |
05ea2a05 TT |
14791 | acl_save_prefix="$prefix" |
14792 | prefix="$acl_final_prefix" | |
14793 | acl_save_exec_prefix="$exec_prefix" | |
14794 | exec_prefix="$acl_final_exec_prefix" | |
5e030278 | 14795 | |
05ea2a05 TT |
14796 | eval additional_includedir=\"$includedir\" |
14797 | eval additional_libdir=\"$libdir\" | |
5e030278 | 14798 | |
05ea2a05 TT |
14799 | exec_prefix="$acl_save_exec_prefix" |
14800 | prefix="$acl_save_prefix" | |
5e030278 | 14801 | |
05ea2a05 TT |
14802 | else |
14803 | additional_includedir="$withval/include" | |
14804 | additional_libdir="$withval/lib" | |
14805 | fi | |
14806 | fi | |
5e030278 TT |
14807 | |
14808 | fi | |
5e030278 | 14809 | |
9f1528a1 AB |
14810 | |
14811 | # Check whether --with-libipt-type was given. | |
14812 | if test "${with_libipt_type+set}" = set; then : | |
14813 | withval=$with_libipt_type; with_libipt_type=$withval | |
14814 | else | |
14815 | with_libipt_type=auto | |
14816 | fi | |
14817 | ||
14818 | lib_type=`eval echo \$with_libipt_type` | |
14819 | ||
05ea2a05 TT |
14820 | LIBIPT= |
14821 | LTLIBIPT= | |
14822 | INCIPT= | |
14823 | rpathdirs= | |
14824 | ltrpathdirs= | |
14825 | names_already_handled= | |
14826 | names_next_round='ipt ' | |
14827 | while test -n "$names_next_round"; do | |
14828 | names_this_round="$names_next_round" | |
14829 | names_next_round= | |
14830 | for name in $names_this_round; do | |
14831 | already_handled= | |
14832 | for n in $names_already_handled; do | |
14833 | if test "$n" = "$name"; then | |
14834 | already_handled=yes | |
14835 | break | |
14836 | fi | |
14837 | done | |
14838 | if test -z "$already_handled"; then | |
14839 | names_already_handled="$names_already_handled $name" | |
14840 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14841 | eval value=\"\$HAVE_LIB$uppername\" | |
14842 | if test -n "$value"; then | |
14843 | if test "$value" = yes; then | |
14844 | eval value=\"\$LIB$uppername\" | |
14845 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" | |
14846 | eval value=\"\$LTLIB$uppername\" | |
14847 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" | |
14848 | else | |
14849 | : | |
14850 | fi | |
14851 | else | |
14852 | found_dir= | |
14853 | found_la= | |
14854 | found_so= | |
14855 | found_a= | |
14856 | if test $use_additional = yes; then | |
9f1528a1 | 14857 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14858 | found_dir="$additional_libdir" |
14859 | found_so="$additional_libdir/lib$name.$shlibext" | |
14860 | if test -f "$additional_libdir/lib$name.la"; then | |
14861 | found_la="$additional_libdir/lib$name.la" | |
14862 | fi | |
9f1528a1 | 14863 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14864 | if test -f "$additional_libdir/lib$name.$libext"; then |
14865 | found_dir="$additional_libdir" | |
14866 | found_a="$additional_libdir/lib$name.$libext" | |
14867 | if test -f "$additional_libdir/lib$name.la"; then | |
14868 | found_la="$additional_libdir/lib$name.la" | |
14869 | fi | |
14870 | fi | |
14871 | fi | |
14872 | fi | |
14873 | if test "X$found_dir" = "X"; then | |
14874 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 14875 | |
05ea2a05 TT |
14876 | acl_save_prefix="$prefix" |
14877 | prefix="$acl_final_prefix" | |
14878 | acl_save_exec_prefix="$exec_prefix" | |
14879 | exec_prefix="$acl_final_exec_prefix" | |
14880 | eval x=\"$x\" | |
14881 | exec_prefix="$acl_save_exec_prefix" | |
14882 | prefix="$acl_save_prefix" | |
5e030278 | 14883 | |
05ea2a05 TT |
14884 | case "$x" in |
14885 | -L*) | |
14886 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 14887 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
05ea2a05 TT |
14888 | found_dir="$dir" |
14889 | found_so="$dir/lib$name.$shlibext" | |
14890 | if test -f "$dir/lib$name.la"; then | |
14891 | found_la="$dir/lib$name.la" | |
14892 | fi | |
9f1528a1 | 14893 | elif test x$lib_type != xshared; then |
05ea2a05 TT |
14894 | if test -f "$dir/lib$name.$libext"; then |
14895 | found_dir="$dir" | |
14896 | found_a="$dir/lib$name.$libext" | |
14897 | if test -f "$dir/lib$name.la"; then | |
14898 | found_la="$dir/lib$name.la" | |
14899 | fi | |
14900 | fi | |
14901 | fi | |
14902 | ;; | |
14903 | esac | |
14904 | if test "X$found_dir" != "X"; then | |
14905 | break | |
14906 | fi | |
14907 | done | |
14908 | fi | |
14909 | if test "X$found_dir" != "X"; then | |
14910 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" | |
14911 | if test "X$found_so" != "X"; then | |
14912 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14913 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14914 | else | |
14915 | haveit= | |
14916 | for x in $ltrpathdirs; do | |
14917 | if test "X$x" = "X$found_dir"; then | |
14918 | haveit=yes | |
14919 | break | |
14920 | fi | |
14921 | done | |
14922 | if test -z "$haveit"; then | |
14923 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14924 | fi | |
14925 | if test "$hardcode_direct" = yes; then | |
14926 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14927 | else | |
14928 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14929 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14930 | haveit= | |
14931 | for x in $rpathdirs; do | |
14932 | if test "X$x" = "X$found_dir"; then | |
14933 | haveit=yes | |
14934 | break | |
14935 | fi | |
14936 | done | |
14937 | if test -z "$haveit"; then | |
14938 | rpathdirs="$rpathdirs $found_dir" | |
14939 | fi | |
14940 | else | |
14941 | haveit= | |
14942 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 14943 | |
05ea2a05 TT |
14944 | acl_save_prefix="$prefix" |
14945 | prefix="$acl_final_prefix" | |
14946 | acl_save_exec_prefix="$exec_prefix" | |
14947 | exec_prefix="$acl_final_exec_prefix" | |
14948 | eval x=\"$x\" | |
14949 | exec_prefix="$acl_save_exec_prefix" | |
14950 | prefix="$acl_save_prefix" | |
5e030278 | 14951 | |
05ea2a05 TT |
14952 | if test "X$x" = "X-L$found_dir"; then |
14953 | haveit=yes | |
14954 | break | |
14955 | fi | |
14956 | done | |
14957 | if test -z "$haveit"; then | |
14958 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" | |
14959 | fi | |
14960 | if test "$hardcode_minus_L" != no; then | |
14961 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" | |
14962 | else | |
14963 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
14964 | fi | |
14965 | fi | |
14966 | fi | |
14967 | fi | |
14968 | else | |
14969 | if test "X$found_a" != "X"; then | |
14970 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" | |
14971 | else | |
14972 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" | |
14973 | fi | |
14974 | fi | |
14975 | additional_includedir= | |
14976 | case "$found_dir" in | |
14977 | */lib | */lib/) | |
14978 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14979 | additional_includedir="$basedir/include" | |
14980 | ;; | |
14981 | esac | |
14982 | if test "X$additional_includedir" != "X"; then | |
14983 | if test "X$additional_includedir" != "X/usr/include"; then | |
14984 | haveit= | |
14985 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14986 | if test -n "$GCC"; then | |
14987 | case $host_os in | |
14988 | linux*) haveit=yes;; | |
14989 | esac | |
14990 | fi | |
14991 | fi | |
14992 | if test -z "$haveit"; then | |
14993 | for x in $CPPFLAGS $INCIPT; do | |
5e030278 | 14994 | |
05ea2a05 TT |
14995 | acl_save_prefix="$prefix" |
14996 | prefix="$acl_final_prefix" | |
14997 | acl_save_exec_prefix="$exec_prefix" | |
14998 | exec_prefix="$acl_final_exec_prefix" | |
14999 | eval x=\"$x\" | |
15000 | exec_prefix="$acl_save_exec_prefix" | |
15001 | prefix="$acl_save_prefix" | |
5e030278 | 15002 | |
05ea2a05 TT |
15003 | if test "X$x" = "X-I$additional_includedir"; then |
15004 | haveit=yes | |
15005 | break | |
15006 | fi | |
15007 | done | |
15008 | if test -z "$haveit"; then | |
15009 | if test -d "$additional_includedir"; then | |
15010 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" | |
15011 | fi | |
15012 | fi | |
15013 | fi | |
15014 | fi | |
15015 | fi | |
15016 | if test -n "$found_la"; then | |
15017 | save_libdir="$libdir" | |
15018 | case "$found_la" in | |
15019 | */* | *\\*) . "$found_la" ;; | |
15020 | *) . "./$found_la" ;; | |
15021 | esac | |
15022 | libdir="$save_libdir" | |
15023 | for dep in $dependency_libs; do | |
15024 | case "$dep" in | |
15025 | -L*) | |
15026 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
15027 | if test "X$additional_libdir" != "X/usr/lib"; then | |
15028 | haveit= | |
15029 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
15030 | if test -n "$GCC"; then | |
15031 | case $host_os in | |
15032 | linux*) haveit=yes;; | |
15033 | esac | |
15034 | fi | |
15035 | fi | |
15036 | if test -z "$haveit"; then | |
15037 | haveit= | |
15038 | for x in $LDFLAGS $LIBIPT; do | |
5e030278 | 15039 | |
05ea2a05 TT |
15040 | acl_save_prefix="$prefix" |
15041 | prefix="$acl_final_prefix" | |
15042 | acl_save_exec_prefix="$exec_prefix" | |
15043 | exec_prefix="$acl_final_exec_prefix" | |
15044 | eval x=\"$x\" | |
15045 | exec_prefix="$acl_save_exec_prefix" | |
15046 | prefix="$acl_save_prefix" | |
5e030278 | 15047 | |
05ea2a05 TT |
15048 | if test "X$x" = "X-L$additional_libdir"; then |
15049 | haveit=yes | |
15050 | break | |
15051 | fi | |
15052 | done | |
15053 | if test -z "$haveit"; then | |
15054 | if test -d "$additional_libdir"; then | |
15055 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" | |
15056 | fi | |
15057 | fi | |
15058 | haveit= | |
15059 | for x in $LDFLAGS $LTLIBIPT; do | |
5e030278 | 15060 | |
05ea2a05 TT |
15061 | acl_save_prefix="$prefix" |
15062 | prefix="$acl_final_prefix" | |
15063 | acl_save_exec_prefix="$exec_prefix" | |
15064 | exec_prefix="$acl_final_exec_prefix" | |
15065 | eval x=\"$x\" | |
15066 | exec_prefix="$acl_save_exec_prefix" | |
15067 | prefix="$acl_save_prefix" | |
5e030278 | 15068 | |
05ea2a05 TT |
15069 | if test "X$x" = "X-L$additional_libdir"; then |
15070 | haveit=yes | |
15071 | break | |
15072 | fi | |
15073 | done | |
15074 | if test -z "$haveit"; then | |
15075 | if test -d "$additional_libdir"; then | |
15076 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" | |
15077 | fi | |
15078 | fi | |
15079 | fi | |
15080 | fi | |
15081 | ;; | |
15082 | -R*) | |
15083 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
15084 | if test "$enable_rpath" != no; then | |
15085 | haveit= | |
15086 | for x in $rpathdirs; do | |
15087 | if test "X$x" = "X$dir"; then | |
15088 | haveit=yes | |
15089 | break | |
15090 | fi | |
15091 | done | |
15092 | if test -z "$haveit"; then | |
15093 | rpathdirs="$rpathdirs $dir" | |
15094 | fi | |
15095 | haveit= | |
15096 | for x in $ltrpathdirs; do | |
15097 | if test "X$x" = "X$dir"; then | |
15098 | haveit=yes | |
15099 | break | |
15100 | fi | |
15101 | done | |
15102 | if test -z "$haveit"; then | |
15103 | ltrpathdirs="$ltrpathdirs $dir" | |
15104 | fi | |
15105 | fi | |
15106 | ;; | |
15107 | -l*) | |
15108 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
15109 | ;; | |
15110 | *.la) | |
15111 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
15112 | ;; | |
15113 | *) | |
15114 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" | |
15115 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" | |
15116 | ;; | |
15117 | esac | |
15118 | done | |
15119 | fi | |
15120 | else | |
9f1528a1 AB |
15121 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
15122 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" | |
15123 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" | |
15124 | else | |
15125 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" | |
15126 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" | |
15127 | fi | |
05ea2a05 | 15128 | fi |
5e030278 | 15129 | fi |
05ea2a05 TT |
15130 | fi |
15131 | done | |
15132 | done | |
15133 | if test "X$rpathdirs" != "X"; then | |
15134 | if test -n "$hardcode_libdir_separator"; then | |
15135 | alldirs= | |
15136 | for found_dir in $rpathdirs; do | |
15137 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
15138 | done | |
15139 | acl_save_libdir="$libdir" | |
15140 | libdir="$alldirs" | |
15141 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15142 | libdir="$acl_save_libdir" | |
15143 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
15144 | else | |
15145 | for found_dir in $rpathdirs; do | |
15146 | acl_save_libdir="$libdir" | |
15147 | libdir="$found_dir" | |
15148 | eval flag=\"$hardcode_libdir_flag_spec\" | |
15149 | libdir="$acl_save_libdir" | |
15150 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" | |
15151 | done | |
15152 | fi | |
15153 | fi | |
15154 | if test "X$ltrpathdirs" != "X"; then | |
15155 | for found_dir in $ltrpathdirs; do | |
15156 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" | |
15157 | done | |
15158 | fi | |
5e030278 TT |
15159 | |
15160 | ||
05ea2a05 | 15161 | ac_save_CPPFLAGS="$CPPFLAGS" |
5e030278 | 15162 | |
05ea2a05 TT |
15163 | for element in $INCIPT; do |
15164 | haveit= | |
15165 | for x in $CPPFLAGS; do | |
5e030278 | 15166 | |
05ea2a05 TT |
15167 | acl_save_prefix="$prefix" |
15168 | prefix="$acl_final_prefix" | |
15169 | acl_save_exec_prefix="$exec_prefix" | |
15170 | exec_prefix="$acl_final_exec_prefix" | |
15171 | eval x=\"$x\" | |
15172 | exec_prefix="$acl_save_exec_prefix" | |
15173 | prefix="$acl_save_prefix" | |
5e030278 | 15174 | |
05ea2a05 TT |
15175 | if test "X$x" = "X$element"; then |
15176 | haveit=yes | |
15177 | break | |
15178 | fi | |
15179 | done | |
15180 | if test -z "$haveit"; then | |
15181 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
15182 | fi | |
15183 | done | |
5e030278 TT |
15184 | |
15185 | ||
05ea2a05 TT |
15186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 |
15187 | $as_echo_n "checking for libipt... " >&6; } | |
15188 | if ${ac_cv_libipt+:} false; then : | |
5e030278 TT |
15189 | $as_echo_n "(cached) " >&6 |
15190 | else | |
05ea2a05 TT |
15191 | |
15192 | ac_save_LIBS="$LIBS" | |
15193 | LIBS="$LIBS $LIBIPT" | |
15194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5e030278 | 15195 | /* end confdefs.h. */ |
05ea2a05 | 15196 | #include "intel-pt.h" |
5e030278 TT |
15197 | int |
15198 | main () | |
15199 | { | |
05ea2a05 | 15200 | pt_insn_alloc_decoder (0); |
5e030278 TT |
15201 | ; |
15202 | return 0; | |
15203 | } | |
15204 | _ACEOF | |
05ea2a05 TT |
15205 | if ac_fn_c_try_link "$LINENO"; then : |
15206 | ac_cv_libipt=yes | |
5e030278 | 15207 | else |
05ea2a05 | 15208 | ac_cv_libipt=no |
5e030278 | 15209 | fi |
05ea2a05 TT |
15210 | rm -f core conftest.err conftest.$ac_objext \ |
15211 | conftest$ac_exeext conftest.$ac_ext | |
15212 | LIBS="$ac_save_LIBS" | |
15213 | ||
5e030278 | 15214 | fi |
05ea2a05 TT |
15215 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
15216 | $as_echo "$ac_cv_libipt" >&6; } | |
15217 | if test "$ac_cv_libipt" = yes; then | |
15218 | HAVE_LIBIPT=yes | |
21987b9c | 15219 | |
05ea2a05 TT |
15220 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
15221 | ||
15222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 | |
15223 | $as_echo_n "checking how to link with libipt... " >&6; } | |
15224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 | |
15225 | $as_echo "$LIBIPT" >&6; } | |
15226 | else | |
15227 | HAVE_LIBIPT=no | |
15228 | CPPFLAGS="$ac_save_CPPFLAGS" | |
15229 | LIBIPT= | |
15230 | LTLIBIPT= | |
15231 | fi | |
15232 | ||
15233 | ||
15234 | ||
15235 | ||
15236 | ||
15237 | ||
15238 | if test "$HAVE_LIBIPT" != yes; then | |
15239 | if test "$with_intel_pt" = yes; then | |
15240 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 | |
15241 | else | |
15242 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 | |
15243 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} | |
15244 | fi | |
15245 | else | |
15246 | save_LIBS=$LIBS | |
15247 | LIBS="$LIBS $LIBIPT" | |
15248 | for ac_func in pt_insn_event | |
21987b9c | 15249 | do : |
05ea2a05 TT |
15250 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" |
15251 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : | |
21987b9c | 15252 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 15253 | #define HAVE_PT_INSN_EVENT 1 |
21987b9c TT |
15254 | _ACEOF |
15255 | ||
15256 | fi | |
15257 | done | |
15258 | ||
05ea2a05 TT |
15259 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> |
15260 | " | |
15261 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : | |
21987b9c | 15262 | |
05ea2a05 TT |
15263 | cat >>confdefs.h <<_ACEOF |
15264 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 | |
15265 | _ACEOF | |
5e030278 | 15266 | |
5e030278 | 15267 | |
05ea2a05 TT |
15268 | fi |
15269 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> | |
15270 | " | |
15271 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : | |
15272 | ||
15273 | cat >>confdefs.h <<_ACEOF | |
15274 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 | |
15275 | _ACEOF | |
5e030278 TT |
15276 | |
15277 | ||
05ea2a05 TT |
15278 | fi |
15279 | ||
15280 | LIBS=$save_LIBS | |
15281 | fi | |
15282 | fi | |
15283 | ||
c8693053 RO |
15284 | |
15285 | $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h | |
15286 | ||
15287 | for ac_header in sys/procfs.h | |
15288 | do : | |
15289 | ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default" | |
15290 | if test "x$ac_cv_header_sys_procfs_h" = xyes; then : | |
15291 | cat >>confdefs.h <<_ACEOF | |
15292 | #define HAVE_SYS_PROCFS_H 1 | |
15293 | _ACEOF | |
15294 | ||
15295 | fi | |
15296 | ||
15297 | done | |
15298 | ||
05ea2a05 | 15299 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
c8693053 RO |
15300 | |
15301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15302 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } |
15303 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : | |
e9bcb658 GB |
15304 | $as_echo_n "(cached) " >&6 |
15305 | else | |
15306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15307 | /* end confdefs.h. */ | |
15308 | ||
05ea2a05 | 15309 | #define _SYSCALL32 |
05ea2a05 | 15310 | #include <sys/procfs.h> |
e9bcb658 GB |
15311 | int |
15312 | main () | |
15313 | { | |
05ea2a05 | 15314 | gregset_t avar |
e9bcb658 GB |
15315 | ; |
15316 | return 0; | |
15317 | } | |
15318 | _ACEOF | |
15319 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15320 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
e9bcb658 | 15321 | else |
05ea2a05 | 15322 | bfd_cv_have_sys_procfs_type_gregset_t=no |
54019719 PA |
15323 | |
15324 | fi | |
05ea2a05 | 15325 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
06825bd1 | 15326 | fi |
06825bd1 | 15327 | |
05ea2a05 | 15328 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
a3828db0 | 15329 | |
05ea2a05 | 15330 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
06825bd1 | 15331 | |
05ea2a05 TT |
15332 | fi |
15333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 | |
15334 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
15335 | ||
c8693053 RO |
15336 | |
15337 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15338 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } |
15339 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : | |
81ecdfbb | 15340 | $as_echo_n "(cached) " >&6 |
bec39cab | 15341 | else |
81ecdfbb | 15342 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15343 | /* end confdefs.h. */ |
05ea2a05 TT |
15344 | |
15345 | #define _SYSCALL32 | |
05ea2a05 | 15346 | #include <sys/procfs.h> |
bec39cab AC |
15347 | int |
15348 | main () | |
15349 | { | |
05ea2a05 | 15350 | fpregset_t avar |
064ef605 DJ |
15351 | ; |
15352 | return 0; | |
15353 | } | |
15354 | _ACEOF | |
9b30624b | 15355 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15356 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
15357 | else | |
15358 | bfd_cv_have_sys_procfs_type_fpregset_t=no | |
15359 | ||
15360 | fi | |
15361 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15362 | fi | |
15363 | ||
15364 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then | |
15365 | ||
15366 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h | |
15367 | ||
15368 | fi | |
15369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 | |
15370 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
15371 | ||
c8693053 RO |
15372 | |
15373 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15374 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } |
15375 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : | |
15376 | $as_echo_n "(cached) " >&6 | |
064ef605 | 15377 | else |
81ecdfbb | 15378 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15379 | /* end confdefs.h. */ |
05ea2a05 TT |
15380 | |
15381 | #define _SYSCALL32 | |
05ea2a05 | 15382 | #include <sys/procfs.h> |
064ef605 DJ |
15383 | int |
15384 | main () | |
15385 | { | |
05ea2a05 | 15386 | prgregset_t avar |
bec39cab AC |
15387 | ; |
15388 | return 0; | |
15389 | } | |
15390 | _ACEOF | |
9b30624b | 15391 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15392 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
70f9f479 | 15393 | else |
05ea2a05 TT |
15394 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
15395 | ||
70f9f479 | 15396 | fi |
81ecdfbb | 15397 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 15398 | fi |
bec39cab | 15399 | |
05ea2a05 | 15400 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
70f9f479 | 15401 | |
05ea2a05 TT |
15402 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
15403 | ||
15404 | fi | |
15405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 | |
15406 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
15407 | ||
c8693053 RO |
15408 | |
15409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15410 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } |
15411 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : | |
81ecdfbb | 15412 | $as_echo_n "(cached) " >&6 |
bec39cab | 15413 | else |
81ecdfbb | 15414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 | 15415 | /* end confdefs.h. */ |
05ea2a05 TT |
15416 | |
15417 | #define _SYSCALL32 | |
05ea2a05 | 15418 | #include <sys/procfs.h> |
064ef605 DJ |
15419 | int |
15420 | main () | |
15421 | { | |
05ea2a05 | 15422 | prfpregset_t avar |
064ef605 DJ |
15423 | ; |
15424 | return 0; | |
15425 | } | |
15426 | _ACEOF | |
9b30624b | 15427 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15428 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
064ef605 | 15429 | else |
05ea2a05 | 15430 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
064ef605 | 15431 | |
5c7f2947 | 15432 | fi |
81ecdfbb | 15433 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
05ea2a05 TT |
15434 | fi |
15435 | ||
15436 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then | |
15437 | ||
15438 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h | |
15439 | ||
15440 | fi | |
15441 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 | |
15442 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
15443 | ||
c8693053 RO |
15444 | |
15445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15446 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } |
15447 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : | |
15448 | $as_echo_n "(cached) " >&6 | |
15449 | else | |
15450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 15451 | /* end confdefs.h. */ |
05ea2a05 TT |
15452 | |
15453 | #define _SYSCALL32 | |
05ea2a05 | 15454 | #include <sys/procfs.h> |
bec39cab AC |
15455 | int |
15456 | main () | |
15457 | { | |
05ea2a05 | 15458 | prgregset32_t avar |
bec39cab AC |
15459 | ; |
15460 | return 0; | |
15461 | } | |
15462 | _ACEOF | |
9b30624b | 15463 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 TT |
15464 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
15465 | else | |
15466 | bfd_cv_have_sys_procfs_type_prgregset32_t=no | |
a3828db0 | 15467 | |
064ef605 | 15468 | fi |
81ecdfbb | 15469 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 15470 | fi |
96d7229d | 15471 | |
05ea2a05 | 15472 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
78434e59 | 15473 | |
05ea2a05 | 15474 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
78434e59 | 15475 | |
05ea2a05 TT |
15476 | fi |
15477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 | |
15478 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
54019719 | 15479 | |
c8693053 RO |
15480 | |
15481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15482 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } |
15483 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : | |
81ecdfbb | 15484 | $as_echo_n "(cached) " >&6 |
bec39cab | 15485 | else |
81ecdfbb | 15486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15487 | /* end confdefs.h. */ |
05ea2a05 TT |
15488 | |
15489 | #define _SYSCALL32 | |
05ea2a05 | 15490 | #include <sys/procfs.h> |
bec39cab AC |
15491 | int |
15492 | main () | |
15493 | { | |
05ea2a05 | 15494 | lwpid_t avar |
bec39cab AC |
15495 | ; |
15496 | return 0; | |
15497 | } | |
15498 | _ACEOF | |
05ea2a05 TT |
15499 | if ac_fn_c_try_compile "$LINENO"; then : |
15500 | bfd_cv_have_sys_procfs_type_lwpid_t=yes | |
c906108c | 15501 | else |
05ea2a05 TT |
15502 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
15503 | ||
c906108c | 15504 | fi |
05ea2a05 | 15505 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15506 | fi |
81ecdfbb | 15507 | |
05ea2a05 | 15508 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
a3828db0 | 15509 | |
05ea2a05 | 15510 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
97bf5e38 | 15511 | |
05ea2a05 TT |
15512 | fi |
15513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 | |
15514 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
a3828db0 | 15515 | |
c8693053 RO |
15516 | |
15517 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15518 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } |
15519 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : | |
81ecdfbb | 15520 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 15521 | else |
81ecdfbb | 15522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15523 | /* end confdefs.h. */ |
a3828db0 | 15524 | |
05ea2a05 | 15525 | #define _SYSCALL32 |
05ea2a05 | 15526 | #include <sys/procfs.h> |
bec39cab AC |
15527 | int |
15528 | main () | |
15529 | { | |
05ea2a05 | 15530 | psaddr_t avar |
bec39cab AC |
15531 | ; |
15532 | return 0; | |
15533 | } | |
15534 | _ACEOF | |
81ecdfbb | 15535 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15536 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 15537 | else |
05ea2a05 TT |
15538 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
15539 | ||
c906108c | 15540 | fi |
81ecdfbb | 15541 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 15542 | fi |
c3f6f71d | 15543 | |
05ea2a05 | 15544 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
c906108c | 15545 | |
05ea2a05 | 15546 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
db1ff28b | 15547 | |
05ea2a05 TT |
15548 | fi |
15549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 | |
15550 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
15551 | ||
c8693053 RO |
15552 | |
15553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 | |
05ea2a05 TT |
15554 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } |
15555 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : | |
db1ff28b JK |
15556 | $as_echo_n "(cached) " >&6 |
15557 | else | |
15558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
15559 | /* end confdefs.h. */ | |
05ea2a05 TT |
15560 | |
15561 | #define _SYSCALL32 | |
05ea2a05 | 15562 | #include <sys/procfs.h> |
db1ff28b JK |
15563 | int |
15564 | main () | |
15565 | { | |
05ea2a05 | 15566 | elf_fpregset_t avar |
db1ff28b JK |
15567 | ; |
15568 | return 0; | |
15569 | } | |
15570 | _ACEOF | |
15571 | if ac_fn_c_try_compile "$LINENO"; then : | |
05ea2a05 | 15572 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
db1ff28b | 15573 | else |
05ea2a05 TT |
15574 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
15575 | ||
db1ff28b JK |
15576 | fi |
15577 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
15578 | fi | |
db1ff28b | 15579 | |
05ea2a05 | 15580 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
db1ff28b | 15581 | |
05ea2a05 | 15582 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
db1ff28b | 15583 | |
05ea2a05 TT |
15584 | fi |
15585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 | |
15586 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } | |
db1ff28b | 15587 | |
05ea2a05 TT |
15588 | fi |
15589 | ||
15590 | ||
15591 | # Check the return and argument types of ptrace. | |
15592 | ||
15593 | ||
15594 | for ac_header in sys/ptrace.h ptrace.h | |
15595 | do : | |
15596 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
15597 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
15598 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
15599 | cat >>confdefs.h <<_ACEOF | |
15600 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
15601 | _ACEOF | |
db1ff28b JK |
15602 | |
15603 | fi | |
15604 | ||
05ea2a05 TT |
15605 | done |
15606 | ||
81ecdfbb | 15607 | |
05ea2a05 TT |
15608 | gdb_ptrace_headers=' |
15609 | #include <sys/types.h> | |
15610 | #if HAVE_SYS_PTRACE_H | |
15611 | # include <sys/ptrace.h> | |
15612 | #endif | |
15613 | #if HAVE_UNISTD_H | |
15614 | # include <unistd.h> | |
15615 | #endif | |
15616 | ' | |
5c45e068 | 15617 | |
05ea2a05 TT |
15618 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
15619 | # empty argument list, so check for that explicitly. | |
15620 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 | |
15621 | $as_echo_n "checking return type of ptrace... " >&6; } | |
15622 | if ${gdb_cv_func_ptrace_ret+:} false; then : | |
81ecdfbb | 15623 | $as_echo_n "(cached) " >&6 |
bec39cab | 15624 | else |
81ecdfbb | 15625 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15626 | /* end confdefs.h. */ |
5164c117 | 15627 | Â $gdb_ptrace_headers |
bec39cab AC |
15628 | int |
15629 | main () | |
15630 | { | |
05ea2a05 | 15631 | extern long ptrace (enum __ptrace_request, ...); |
5164c117 | 15632 | |
bec39cab AC |
15633 | ; |
15634 | return 0; | |
15635 | } | |
15636 | _ACEOF | |
81ecdfbb | 15637 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15638 | gdb_cv_func_ptrace_ret='long' |
bec39cab | 15639 | else |
81ecdfbb | 15640 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15641 | /* end confdefs.h. */ |
05ea2a05 | 15642 | $gdb_ptrace_headers |
bec39cab AC |
15643 | int |
15644 | main () | |
15645 | { | |
05ea2a05 | 15646 | extern int ptrace (); |
5164c117 | 15647 | |
bec39cab AC |
15648 | ; |
15649 | return 0; | |
15650 | } | |
15651 | _ACEOF | |
81ecdfbb | 15652 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15653 | gdb_cv_func_ptrace_ret='int' |
27ca5dad | 15654 | else |
05ea2a05 | 15655 | gdb_cv_func_ptrace_ret='long' |
b6fb30ed | 15656 | |
27ca5dad | 15657 | fi |
81ecdfbb | 15658 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15659 | |
27ca5dad | 15660 | fi |
05ea2a05 | 15661 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15662 | |
27ca5dad | 15663 | fi |
05ea2a05 TT |
15664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
15665 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
5c45e068 | 15666 | |
b6fb30ed | 15667 | |
5c45e068 | 15668 | cat >>confdefs.h <<_ACEOF |
05ea2a05 | 15669 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret |
bec39cab | 15670 | _ACEOF |
3862412b | 15671 | |
b6fb30ed | 15672 | |
05ea2a05 TT |
15673 | # Check argument types. |
15674 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 | |
15675 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
15676 | if ${gdb_cv_func_ptrace_args+:} false; then : | |
15677 | $as_echo_n "(cached) " >&6 | |
15678 | else | |
05ea2a05 TT |
15679 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
15680 | /* end confdefs.h. */ | |
15681 | $gdb_ptrace_headers | |
15682 | int | |
15683 | main () | |
15684 | { | |
15685 | extern long ptrace (enum __ptrace_request, ...); | |
5164c117 | 15686 | |
05ea2a05 TT |
15687 | ; |
15688 | return 0; | |
15689 | } | |
bec39cab | 15690 | _ACEOF |
05ea2a05 TT |
15691 | if ac_fn_c_try_compile "$LINENO"; then : |
15692 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' | |
15693 | else | |
b6fb30ed SM |
15694 | for gdb_arg1 in 'int' 'long'; do |
15695 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
15696 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do | |
15697 | for gdb_arg4 in 'int' 'long' 'void *'; do | |
15698 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
15699 | /* end confdefs.h. */ |
15700 | $gdb_ptrace_headers | |
15701 | int | |
15702 | main () | |
15703 | { | |
b6fb30ed | 15704 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); |
5164c117 | 15705 | |
05ea2a05 TT |
15706 | ; |
15707 | return 0; | |
15708 | } | |
15709 | _ACEOF | |
15710 | if ac_fn_c_try_compile "$LINENO"; then : | |
15711 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; | |
b6fb30ed SM |
15712 | break 4; |
15713 | ||
97bf5e38 | 15714 | fi |
05ea2a05 | 15715 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed SM |
15716 | |
15717 | for gdb_arg5 in 'int *' 'int' 'long'; do | |
15718 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
05ea2a05 TT |
15719 | /* end confdefs.h. */ |
15720 | $gdb_ptrace_headers | |
15721 | int | |
15722 | main () | |
15723 | { | |
b6fb30ed | 15724 | extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); |
5164c117 | 15725 | |
05ea2a05 TT |
15726 | ; |
15727 | return 0; | |
15728 | } | |
6fea9e18 | 15729 | _ACEOF |
05ea2a05 | 15730 | if ac_fn_c_try_compile "$LINENO"; then : |
b6fb30ed SM |
15731 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
15732 | break 5; | |
6fea9e18 | 15733 | |
05ea2a05 TT |
15734 | fi |
15735 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
b6fb30ed SM |
15736 | done |
15737 | done | |
15738 | done | |
15739 | done | |
15740 | done | |
15741 | # Provide a safe default value. | |
15742 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
6fea9e18 L |
15743 | |
15744 | fi | |
05ea2a05 | 15745 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b6fb30ed | 15746 | |
05ea2a05 TT |
15747 | fi |
15748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 | |
15749 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
b6fb30ed | 15750 | |
05ea2a05 TT |
15751 | ac_save_IFS=$IFS; IFS=',' |
15752 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
15753 | IFS=$ac_save_IFS | |
15754 | shift | |
6fea9e18 L |
15755 | |
15756 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15757 | #define PTRACE_TYPE_ARG1 $1 |
6fea9e18 L |
15758 | _ACEOF |
15759 | ||
15760 | ||
05ea2a05 TT |
15761 | cat >>confdefs.h <<_ACEOF |
15762 | #define PTRACE_TYPE_ARG3 $3 | |
bec39cab | 15763 | _ACEOF |
451928c5 | 15764 | |
60ca704f | 15765 | |
05ea2a05 TT |
15766 | cat >>confdefs.h <<_ACEOF |
15767 | #define PTRACE_TYPE_ARG4 $4 | |
15768 | _ACEOF | |
15769 | ||
15770 | if test -n "$5"; then | |
15771 | ||
15772 | cat >>confdefs.h <<_ACEOF | |
15773 | #define PTRACE_TYPE_ARG5 $5 | |
15774 | _ACEOF | |
451928c5 | 15775 | |
97bf5e38 | 15776 | fi |
451928c5 | 15777 | |
05ea2a05 TT |
15778 | |
15779 | if test "$cross_compiling" = no; then | |
15780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15781 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15782 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15783 | $as_echo_n "(cached) " >&6 |
05ea2a05 TT |
15784 | else |
15785 | if test "$cross_compiling" = yes; then : | |
15786 | as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
451928c5 | 15787 | else |
81ecdfbb | 15788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15789 | /* end confdefs.h. */ |
05ea2a05 | 15790 | $ac_includes_default |
bec39cab AC |
15791 | int |
15792 | main () | |
15793 | { | |
05ea2a05 TT |
15794 | /* If this system has a BSD-style setpgrp which takes arguments, |
15795 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
15796 | exit successfully. */ | |
15797 | return setpgrp (1,1) != -1; | |
bec39cab AC |
15798 | ; |
15799 | return 0; | |
15800 | } | |
15801 | _ACEOF | |
05ea2a05 TT |
15802 | if ac_fn_c_try_run "$LINENO"; then : |
15803 | ac_cv_func_setpgrp_void=no | |
451928c5 | 15804 | else |
05ea2a05 | 15805 | ac_cv_func_setpgrp_void=yes |
451928c5 | 15806 | fi |
05ea2a05 TT |
15807 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15808 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
451928c5 AC |
15809 | fi |
15810 | ||
05ea2a05 TT |
15811 | fi |
15812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 | |
15813 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15814 | if test $ac_cv_func_setpgrp_void = yes; then | |
60ca704f | 15815 | |
05ea2a05 | 15816 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
451928c5 | 15817 | |
97bf5e38 | 15818 | fi |
451928c5 | 15819 | |
05ea2a05 TT |
15820 | else |
15821 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 | |
15822 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
15823 | if ${ac_cv_func_setpgrp_void+:} false; then : | |
81ecdfbb | 15824 | $as_echo_n "(cached) " >&6 |
3862412b | 15825 | else |
81ecdfbb | 15826 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15827 | /* end confdefs.h. */ |
05ea2a05 | 15828 | #include <unistd.h> |
bec39cab AC |
15829 | int |
15830 | main () | |
15831 | { | |
5593a99a SM |
15832 | if (setpgrp(1,1) == -1) |
15833 | exit (0); | |
15834 | else | |
15835 | exit (1); | |
05ea2a05 | 15836 | |
bec39cab AC |
15837 | ; |
15838 | return 0; | |
15839 | } | |
15840 | _ACEOF | |
81ecdfbb | 15841 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15842 | ac_cv_func_setpgrp_void=no |
3862412b | 15843 | else |
05ea2a05 | 15844 | ac_cv_func_setpgrp_void=yes |
5593a99a | 15845 | |
3862412b | 15846 | fi |
81ecdfbb | 15847 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15848 | |
3862412b | 15849 | fi |
05ea2a05 TT |
15850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
15851 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
15852 | if test "$ac_cv_func_setpgrp_void" = yes; then | |
15853 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h | |
3862412b | 15854 | |
05ea2a05 | 15855 | fi |
97bf5e38 | 15856 | fi |
3862412b | 15857 | |
05ea2a05 TT |
15858 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
15859 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
15860 | #include <sys/proc.h> | |
6e9567fe | 15861 | |
e6cdd38e | 15862 | " |
05ea2a05 | 15863 | if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : |
e6cdd38e JB |
15864 | |
15865 | cat >>confdefs.h <<_ACEOF | |
05ea2a05 | 15866 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
e6cdd38e JB |
15867 | _ACEOF |
15868 | ||
15869 | ||
15870 | fi | |
15871 | ||
6e9567fe | 15872 | |
05ea2a05 TT |
15873 | # See if <sys/lwp.h> defines `struct lwp`. |
15874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 | |
15875 | $as_echo_n "checking for struct lwp... " >&6; } | |
15876 | if ${gdb_cv_struct_lwp+:} false; then : | |
81ecdfbb | 15877 | $as_echo_n "(cached) " >&6 |
596c9d4b | 15878 | else |
81ecdfbb | 15879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15880 | /* end confdefs.h. */ |
05ea2a05 | 15881 | #include <sys/param.h> |
5593a99a SM |
15882 | #define _KMEMUSER |
15883 | #include <sys/lwp.h> | |
bec39cab AC |
15884 | int |
15885 | main () | |
15886 | { | |
05ea2a05 | 15887 | struct lwp l; |
5593a99a | 15888 | |
bec39cab AC |
15889 | ; |
15890 | return 0; | |
15891 | } | |
15892 | _ACEOF | |
81ecdfbb | 15893 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15894 | gdb_cv_struct_lwp=yes |
596c9d4b | 15895 | else |
05ea2a05 | 15896 | gdb_cv_struct_lwp=no |
5593a99a | 15897 | |
596c9d4b | 15898 | fi |
81ecdfbb | 15899 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15900 | |
596c9d4b | 15901 | fi |
05ea2a05 TT |
15902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
15903 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
15904 | if test "$gdb_cv_struct_lwp" = yes; then | |
596c9d4b | 15905 | |
05ea2a05 | 15906 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
596c9d4b | 15907 | |
05ea2a05 | 15908 | fi |
451928c5 | 15909 | |
05ea2a05 TT |
15910 | # See if <machine/reg.h> degines `struct reg'. |
15911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 | |
15912 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
15913 | if ${gdb_cv_struct_reg+:} false; then : | |
81ecdfbb | 15914 | $as_echo_n "(cached) " >&6 |
d84dd0c5 | 15915 | else |
81ecdfbb | 15916 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15917 | /* end confdefs.h. */ |
05ea2a05 | 15918 | #include <sys/types.h> |
5593a99a | 15919 | #include <machine/reg.h> |
bec39cab AC |
15920 | int |
15921 | main () | |
15922 | { | |
05ea2a05 | 15923 | struct reg r; |
5593a99a | 15924 | |
bec39cab AC |
15925 | ; |
15926 | return 0; | |
15927 | } | |
15928 | _ACEOF | |
81ecdfbb | 15929 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15930 | gdb_cv_struct_reg=yes |
d84dd0c5 | 15931 | else |
05ea2a05 | 15932 | gdb_cv_struct_reg=no |
5593a99a | 15933 | |
d84dd0c5 | 15934 | fi |
81ecdfbb | 15935 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15936 | |
d84dd0c5 | 15937 | fi |
05ea2a05 TT |
15938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
15939 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
15940 | if test "$gdb_cv_struct_reg" = yes; then | |
d84dd0c5 | 15941 | |
05ea2a05 | 15942 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
bec39cab | 15943 | |
05ea2a05 | 15944 | fi |
d84dd0c5 | 15945 | |
05ea2a05 TT |
15946 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
15947 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
15948 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> | |
15949 | #include <machine/reg.h> | |
15950 | " | |
15951 | if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : | |
d84dd0c5 | 15952 | |
05ea2a05 TT |
15953 | cat >>confdefs.h <<_ACEOF |
15954 | #define HAVE_STRUCT_REG_R_FS 1 | |
15955 | _ACEOF | |
15956 | ||
15957 | ||
15958 | fi | |
15959 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> | |
15960 | #include <machine/reg.h> | |
15961 | " | |
15962 | if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : | |
15963 | ||
15964 | cat >>confdefs.h <<_ACEOF | |
15965 | #define HAVE_STRUCT_REG_R_GS 1 | |
15966 | _ACEOF | |
15967 | ||
15968 | ||
15969 | fi | |
15970 | ||
15971 | ||
05ea2a05 TT |
15972 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
15973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 | |
15974 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
15975 | if ${gdb_cv_have_ptrace_getregs+:} false; then : | |
81ecdfbb | 15976 | $as_echo_n "(cached) " >&6 |
d45fe813 | 15977 | else |
81ecdfbb | 15978 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15979 | /* end confdefs.h. */ |
05ea2a05 | 15980 | #include <sys/ptrace.h> |
bec39cab AC |
15981 | int |
15982 | main () | |
15983 | { | |
05ea2a05 | 15984 | PTRACE_GETREGS; |
bec39cab AC |
15985 | ; |
15986 | return 0; | |
15987 | } | |
15988 | _ACEOF | |
81ecdfbb | 15989 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 15990 | gdb_cv_have_ptrace_getregs=yes |
d45fe813 | 15991 | else |
05ea2a05 | 15992 | gdb_cv_have_ptrace_getregs=no |
5593a99a | 15993 | |
d45fe813 | 15994 | fi |
81ecdfbb | 15995 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 15996 | |
d45fe813 KB |
15997 | fi |
15998 | ||
05ea2a05 TT |
15999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
16000 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
16001 | if test "$gdb_cv_have_ptrace_getregs" = yes; then | |
bec39cab | 16002 | |
05ea2a05 | 16003 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
d45fe813 | 16004 | |
05ea2a05 | 16005 | fi |
d45fe813 | 16006 | |
05ea2a05 TT |
16007 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
16008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 | |
16009 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
16010 | if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : | |
81ecdfbb | 16011 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16012 | else |
81ecdfbb | 16013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16014 | /* end confdefs.h. */ |
05ea2a05 | 16015 | #include <sys/ptrace.h> |
bec39cab AC |
16016 | int |
16017 | main () | |
16018 | { | |
05ea2a05 | 16019 | PTRACE_GETFPXREGS; |
bec39cab AC |
16020 | ; |
16021 | return 0; | |
16022 | } | |
16023 | _ACEOF | |
81ecdfbb | 16024 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16025 | gdb_cv_have_ptrace_getfpxregs=yes |
d45fe813 | 16026 | else |
05ea2a05 | 16027 | gdb_cv_have_ptrace_getfpxregs=no |
5593a99a | 16028 | |
d45fe813 | 16029 | fi |
81ecdfbb | 16030 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16031 | |
d45fe813 KB |
16032 | fi |
16033 | ||
05ea2a05 TT |
16034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
16035 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
16036 | if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then | |
bec39cab | 16037 | |
05ea2a05 | 16038 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
d45fe813 | 16039 | |
05ea2a05 | 16040 | fi |
d45fe813 | 16041 | |
05ea2a05 TT |
16042 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
16043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 | |
16044 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
16045 | if ${gdb_cv_have_pt_getdbregs+:} false; then : | |
81ecdfbb | 16046 | $as_echo_n "(cached) " >&6 |
d45fe813 | 16047 | else |
81ecdfbb | 16048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16049 | /* end confdefs.h. */ |
05ea2a05 | 16050 | #include <sys/types.h> |
5593a99a | 16051 | #include <sys/ptrace.h> |
bec39cab AC |
16052 | int |
16053 | main () | |
16054 | { | |
05ea2a05 | 16055 | PT_GETDBREGS; |
5593a99a | 16056 | |
bec39cab AC |
16057 | ; |
16058 | return 0; | |
16059 | } | |
16060 | _ACEOF | |
81ecdfbb | 16061 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16062 | gdb_cv_have_pt_getdbregs=yes |
d45fe813 | 16063 | else |
05ea2a05 | 16064 | gdb_cv_have_pt_getdbregs=no |
5593a99a | 16065 | |
d45fe813 | 16066 | fi |
81ecdfbb | 16067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16068 | |
d45fe813 KB |
16069 | fi |
16070 | ||
05ea2a05 TT |
16071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
16072 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
16073 | if test "$gdb_cv_have_pt_getdbregs" = yes; then | |
bec39cab | 16074 | |
05ea2a05 | 16075 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
d45fe813 | 16076 | |
05ea2a05 | 16077 | fi |
c906108c | 16078 | |
05ea2a05 TT |
16079 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
16080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 | |
16081 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
16082 | if ${gdb_cv_have_pt_getxmmregs+:} false; then : | |
81ecdfbb | 16083 | $as_echo_n "(cached) " >&6 |
c906108c | 16084 | else |
81ecdfbb | 16085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16086 | /* end confdefs.h. */ |
05ea2a05 | 16087 | #include <sys/types.h> |
5593a99a | 16088 | #include <sys/ptrace.h> |
bec39cab AC |
16089 | int |
16090 | main () | |
16091 | { | |
05ea2a05 | 16092 | PT_GETXMMREGS; |
5593a99a | 16093 | |
bec39cab AC |
16094 | ; |
16095 | return 0; | |
16096 | } | |
16097 | _ACEOF | |
81ecdfbb | 16098 | if ac_fn_c_try_compile "$LINENO"; then : |
05ea2a05 | 16099 | gdb_cv_have_pt_getxmmregs=yes |
c906108c | 16100 | else |
05ea2a05 | 16101 | gdb_cv_have_pt_getxmmregs=no |
5593a99a | 16102 | |
c906108c | 16103 | fi |
81ecdfbb | 16104 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16105 | |
c906108c SS |
16106 | fi |
16107 | ||
05ea2a05 TT |
16108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
16109 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
16110 | if test "$gdb_cv_have_pt_getxmmregs" = yes; then | |
bec39cab | 16111 | |
05ea2a05 | 16112 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
c906108c | 16113 | |
05ea2a05 | 16114 | fi |
c906108c | 16115 | |
05ea2a05 TT |
16116 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
16117 | # Older FreeBSD versions don't have the pl_tdname member of | |
16118 | # `struct ptrace_lwpinfo'. | |
16119 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> | |
16120 | " | |
16121 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : | |
43b7e92b | 16122 | |
05ea2a05 TT |
16123 | cat >>confdefs.h <<_ACEOF |
16124 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 | |
43b7e92b | 16125 | _ACEOF |
43b7e92b | 16126 | |
05ea2a05 | 16127 | |
43b7e92b GB |
16128 | fi |
16129 | ||
43b7e92b | 16130 | |
05ea2a05 TT |
16131 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
16132 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in | |
16133 | # FreeBSD 10.3. | |
16134 | 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> | |
16135 | " | |
16136 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : | |
16137 | ||
16138 | cat >>confdefs.h <<_ACEOF | |
16139 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 | |
16140 | _ACEOF | |
43b7e92b | 16141 | |
43b7e92b | 16142 | |
c906108c | 16143 | fi |
c906108c | 16144 | |
05ea2a05 | 16145 | |
bc8bcb4b | 16146 | # Check if the compiler supports the `long long' type. |
c906108c | 16147 | |
81ecdfbb RW |
16148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
16149 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
d0ac1c44 | 16150 | if ${gdb_cv_c_long_long+:} false; then : |
81ecdfbb | 16151 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16152 | else |
81ecdfbb | 16153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16154 | /* end confdefs.h. */ |
bc8bcb4b | 16155 | extern long long foo; |
bec39cab AC |
16156 | int |
16157 | main () | |
16158 | { | |
bc8bcb4b | 16159 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
16160 | ; |
16161 | return 0; | |
16162 | } | |
16163 | _ACEOF | |
81ecdfbb | 16164 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
16165 | gdb_cv_c_long_long=yes |
16166 | else | |
81ecdfbb | 16167 | gdb_cv_c_long_long=no |
97bf5e38 | 16168 | fi |
81ecdfbb | 16169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16170 | fi |
81ecdfbb RW |
16171 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
16172 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
0ad6b8ee | 16173 | if test "$gdb_cv_c_long_long" != yes; then |
74a0d9f6 | 16174 | # libdecnumber requires long long. |
d0ac1c44 | 16175 | as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 |
97bf5e38 MK |
16176 | fi |
16177 | ||
bc8bcb4b | 16178 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 16179 | |
81ecdfbb RW |
16180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
16181 | $as_echo_n "checking for long long support in printf... " >&6; } | |
d0ac1c44 | 16182 | if ${gdb_cv_printf_has_long_long+:} false; then : |
81ecdfbb | 16183 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16184 | else |
81ecdfbb | 16185 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16186 | gdb_cv_printf_has_long_long=no |
16187 | else | |
81ecdfbb | 16188 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16189 | /* end confdefs.h. */ |
bc8bcb4b MK |
16190 | $ac_includes_default |
16191 | int | |
16192 | main () | |
16193 | { | |
16194 | char buf[32]; | |
97bf5e38 MK |
16195 | long long l = 0; |
16196 | l = (l << 16) + 0x0123; | |
16197 | l = (l << 16) + 0x4567; | |
16198 | l = (l << 16) + 0x89ab; | |
16199 | l = (l << 16) + 0xcdef; | |
16200 | sprintf (buf, "0x%016llx", l); | |
16201 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
16202 | ; |
16203 | return 0; | |
c906108c | 16204 | } |
bec39cab | 16205 | _ACEOF |
81ecdfbb | 16206 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
16207 | gdb_cv_printf_has_long_long=yes |
16208 | else | |
81ecdfbb | 16209 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 16210 | fi |
81ecdfbb RW |
16211 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16212 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 16213 | fi |
81ecdfbb | 16214 | |
97bf5e38 | 16215 | fi |
81ecdfbb RW |
16216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
16217 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
0ad6b8ee | 16218 | if test "$gdb_cv_printf_has_long_long" = yes; then |
bc8bcb4b | 16219 | |
81ecdfbb | 16220 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
16221 | |
16222 | fi | |
97bf5e38 | 16223 | |
1a619819 LM |
16224 | # Check if the compiler and runtime support printing decfloats. |
16225 | ||
81ecdfbb RW |
16226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
16227 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
d0ac1c44 | 16228 | if ${gdb_cv_printf_has_decfloat+:} false; then : |
81ecdfbb | 16229 | $as_echo_n "(cached) " >&6 |
1a619819 | 16230 | else |
81ecdfbb | 16231 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
16232 | gdb_cv_printf_has_decfloat=no |
16233 | else | |
81ecdfbb | 16234 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
16235 | /* end confdefs.h. */ |
16236 | $ac_includes_default | |
16237 | int | |
16238 | main () | |
16239 | { | |
16240 | char buf[64]; | |
16241 | _Decimal32 d32 = 1.2345df; | |
16242 | _Decimal64 d64 = 1.2345dd; | |
16243 | _Decimal128 d128 = 1.2345dl; | |
16244 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
16245 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
16246 | ; | |
16247 | return 0; | |
16248 | } | |
16249 | _ACEOF | |
81ecdfbb | 16250 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
16251 | gdb_cv_printf_has_decfloat=yes |
16252 | else | |
81ecdfbb | 16253 | gdb_cv_printf_has_decfloat=no |
1a619819 | 16254 | fi |
81ecdfbb RW |
16255 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16256 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 16257 | fi |
81ecdfbb | 16258 | |
1a619819 | 16259 | fi |
81ecdfbb RW |
16260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
16261 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
0ad6b8ee | 16262 | if test "$gdb_cv_printf_has_decfloat" = yes; then |
1a619819 | 16263 | |
81ecdfbb | 16264 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
16265 | |
16266 | fi | |
16267 | ||
bc8bcb4b MK |
16268 | # Check if the compiler supports the `long double' type. We can't use |
16269 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
16270 | # constants defined in <float.h> that fail on some systems, | |
16271 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 16272 | |
81ecdfbb RW |
16273 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
16274 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
d0ac1c44 | 16275 | if ${gdb_cv_c_long_double+:} false; then : |
81ecdfbb | 16276 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16277 | else |
81ecdfbb | 16278 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16279 | /* end confdefs.h. */ |
97bf5e38 | 16280 | long double foo; |
bec39cab | 16281 | _ACEOF |
81ecdfbb | 16282 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 16283 | gdb_cv_c_long_double=yes |
97bf5e38 | 16284 | else |
81ecdfbb | 16285 | gdb_cv_c_long_double=no |
97bf5e38 | 16286 | fi |
81ecdfbb | 16287 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16288 | fi |
81ecdfbb RW |
16289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
16290 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
0ad6b8ee | 16291 | if test "$gdb_cv_c_long_double" = yes; then |
c906108c | 16292 | |
81ecdfbb | 16293 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16294 | |
16295 | fi | |
16296 | ||
bc8bcb4b | 16297 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 16298 | |
81ecdfbb RW |
16299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
16300 | $as_echo_n "checking for long double support in printf... " >&6; } | |
d0ac1c44 | 16301 | if ${gdb_cv_printf_has_long_double+:} false; then : |
81ecdfbb | 16302 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16303 | else |
81ecdfbb | 16304 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16305 | gdb_cv_printf_has_long_double=no |
16306 | else | |
81ecdfbb | 16307 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16308 | /* end confdefs.h. */ |
bc8bcb4b MK |
16309 | $ac_includes_default |
16310 | int | |
16311 | main () | |
16312 | { | |
16313 | char buf[16]; | |
97bf5e38 MK |
16314 | long double f = 3.141592653; |
16315 | sprintf (buf, "%Lg", f); | |
16316 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
16317 | ; |
16318 | return 0; | |
97bf5e38 | 16319 | } |
bec39cab | 16320 | _ACEOF |
81ecdfbb | 16321 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 16322 | gdb_cv_printf_has_long_double=yes |
c906108c | 16323 | else |
81ecdfbb | 16324 | gdb_cv_printf_has_long_double=no |
c906108c | 16325 | fi |
81ecdfbb RW |
16326 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16327 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 16328 | fi |
81ecdfbb | 16329 | |
c906108c | 16330 | fi |
81ecdfbb RW |
16331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
16332 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
0ad6b8ee | 16333 | if test "$gdb_cv_printf_has_long_double" = yes; then |
bc8bcb4b | 16334 | |
81ecdfbb | 16335 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16336 | |
16337 | fi | |
97bf5e38 | 16338 | |
bc8bcb4b | 16339 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 16340 | |
81ecdfbb RW |
16341 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
16342 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
d0ac1c44 | 16343 | if ${gdb_cv_scanf_has_long_double+:} false; then : |
81ecdfbb | 16344 | $as_echo_n "(cached) " >&6 |
97bf5e38 | 16345 | else |
81ecdfbb | 16346 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
16347 | gdb_cv_scanf_has_long_double=no |
16348 | else | |
81ecdfbb | 16349 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16350 | /* end confdefs.h. */ |
bc8bcb4b MK |
16351 | #include <stdio.h> |
16352 | int | |
16353 | main () | |
16354 | { | |
16355 | char *buf = "3.141592653"; | |
97bf5e38 MK |
16356 | long double f = 0; |
16357 | sscanf (buf, "%Lg", &f); | |
16358 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
16359 | ; |
16360 | return 0; | |
97bf5e38 | 16361 | } |
bec39cab | 16362 | _ACEOF |
81ecdfbb | 16363 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
16364 | gdb_cv_scanf_has_long_double=yes |
16365 | else | |
81ecdfbb | 16366 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 16367 | fi |
81ecdfbb RW |
16368 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16369 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 16370 | fi |
81ecdfbb | 16371 | |
c906108c | 16372 | fi |
81ecdfbb RW |
16373 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
16374 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
0ad6b8ee | 16375 | if test "$gdb_cv_scanf_has_long_double" = yes; then |
bc8bcb4b | 16376 | |
81ecdfbb | 16377 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
16378 | |
16379 | fi | |
c906108c | 16380 | |
438013df AO |
16381 | case ${host_os} in |
16382 | aix*) | |
81ecdfbb RW |
16383 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
16384 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
d0ac1c44 | 16385 | if ${gdb_cv_bigtoc+:} false; then : |
81ecdfbb | 16386 | $as_echo_n "(cached) " >&6 |
438013df | 16387 | else |
5593a99a | 16388 | SAVE_LDFLAGS=$LDFLAGS |
bec39cab | 16389 | |
5593a99a SM |
16390 | case $GCC in |
16391 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
16392 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
16393 | esac | |
438013df | 16394 | |
5593a99a SM |
16395 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
16396 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16397 | /* end confdefs.h. */ |
438013df | 16398 | |
bec39cab AC |
16399 | int |
16400 | main () | |
16401 | { | |
438013df | 16402 | int i; |
bec39cab AC |
16403 | ; |
16404 | return 0; | |
16405 | } | |
16406 | _ACEOF | |
81ecdfbb | 16407 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 16408 | |
81ecdfbb RW |
16409 | else |
16410 | gdb_cv_bigtoc= | |
5593a99a | 16411 | |
438013df | 16412 | fi |
81ecdfbb RW |
16413 | rm -f core conftest.err conftest.$ac_objext \ |
16414 | conftest$ac_exeext conftest.$ac_ext | |
5593a99a | 16415 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 16416 | |
bec39cab | 16417 | fi |
81ecdfbb RW |
16418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
16419 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
16420 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
16421 | ;; | |
16422 | esac | |
16423 | ||
38f6b338 | 16424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 16425 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
16426 | dynamic_list=false |
16427 | if test "${gdb_native}" = yes; then | |
16428 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
16429 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
16430 | # may not be supported there. | |
16431 | old_LDFLAGS="$LDFLAGS" | |
16432 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
16433 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
16434 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
16435 | if test "${have_libpython}" = no; then | |
16436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
16437 | /* end confdefs.h. */ |
16438 | ||
16439 | int | |
16440 | main () | |
16441 | { | |
16442 | ||
16443 | ; | |
16444 | return 0; | |
16445 | } | |
16446 | _ACEOF | |
16447 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
16448 | dynamic_list=true |
16449 | fi | |
16450 | rm -f core conftest.err conftest.$ac_objext \ | |
16451 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
16452 | else |
16453 | # Workaround http://bugs.python.org/issue4434 where static | |
16454 | # libpythonX.Y.a would get its symbols required for | |
16455 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
16456 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
a4a1c157 PA |
16457 | |
16458 | # Note the workaround for Python | |
16459 | # http://bugs.python.org/issue10112 earlier has removed | |
16460 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want | |
16461 | # here too, as otherwise it'd make this -Wl,--dynamic-list test | |
16462 | # always pass. | |
38f6b338 JK |
16463 | old_CFLAGS="$CFLAGS" |
16464 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
16465 | old_LIBS="$LIBS" |
16466 | LIBS="$LIBS $PYTHON_LIBS" | |
1b4f615e PA |
16467 | old_CPPFLAGS="$CPPFLAGS" |
16468 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" | |
38f6b338 | 16469 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 16470 | true |
f6528abd | 16471 | else |
3bebe2f2 JK |
16472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16473 | /* end confdefs.h. */ | |
1b4f615e | 16474 | #include "Python.h" |
3bebe2f2 JK |
16475 | int |
16476 | main () | |
16477 | { | |
16478 | int err; | |
38f6b338 | 16479 | Py_Initialize (); |
3fed4c0b | 16480 | err = PyRun_SimpleString ("import ctypes\n"); |
38f6b338 JK |
16481 | Py_Finalize (); |
16482 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
16483 | ; |
16484 | return 0; | |
16485 | } | |
16486 | _ACEOF | |
16487 | if ac_fn_c_try_run "$LINENO"; then : | |
16488 | dynamic_list=true | |
16489 | fi | |
16490 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16491 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16492 | fi | |
16493 | ||
8c1fb155 | 16494 | LIBS="$old_LIBS" |
38f6b338 | 16495 | CFLAGS="$old_CFLAGS" |
1b4f615e | 16496 | CPPFLAGS="$old_CPPFLAGS" |
38f6b338 JK |
16497 | fi |
16498 | LDFLAGS="$old_LDFLAGS" | |
16499 | fi | |
16500 | if $dynamic_list; then | |
16501 | found="-Wl,--dynamic-list" | |
16502 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 16503 | else |
38f6b338 JK |
16504 | found="-rdynamic" |
16505 | RDYNAMIC="-rdynamic" | |
f6528abd | 16506 | fi |
f6528abd | 16507 | |
38f6b338 | 16508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 16509 | $as_echo "$found" >&6; } |
0407b3f1 | 16510 | |
f6528abd | 16511 | |
0ad6b8ee | 16512 | if test "${build}" = "${host}" -a "${host}" = "${target}" ; then |
c906108c | 16513 | case ${host_os} in |
d92419e5 | 16514 | aix*) |
81ecdfbb RW |
16515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
16516 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
d0ac1c44 | 16517 | if ${gdb_cv_have_aix_thread_debug+:} false; then : |
81ecdfbb | 16518 | $as_echo_n "(cached) " >&6 |
bec39cab | 16519 | else |
81ecdfbb | 16520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16521 | /* end confdefs.h. */ |
d92419e5 | 16522 | #include <sys/pthdebug.h> |
bec39cab AC |
16523 | int |
16524 | main () | |
16525 | { | |
d92419e5 | 16526 | #ifndef PTHDB_VERSION_3 |
5593a99a SM |
16527 | #error |
16528 | #endif | |
16529 | ||
bec39cab AC |
16530 | ; |
16531 | return 0; | |
16532 | } | |
16533 | _ACEOF | |
81ecdfbb | 16534 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
16535 | gdb_cv_have_aix_thread_debug=yes |
16536 | else | |
81ecdfbb | 16537 | gdb_cv_have_aix_thread_debug=no |
5593a99a | 16538 | |
d92419e5 | 16539 | fi |
81ecdfbb | 16540 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5593a99a | 16541 | |
d92419e5 JB |
16542 | fi |
16543 | ||
81ecdfbb RW |
16544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
16545 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
0ad6b8ee | 16546 | if test "$gdb_cv_have_aix_thread_debug" = yes; then |
d92419e5 | 16547 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" |
3483b318 | 16548 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 16549 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
16550 | |
16551 | # Older versions of AIX do not provide the declaration for | |
16552 | # the getthrds function (it appears that it was introduced | |
16553 | # with AIX 6.x). | |
16554 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
16555 | " | |
d0ac1c44 | 16556 | if test "x$ac_cv_have_decl_getthrds" = xyes; then : |
d645e32e JB |
16557 | ac_have_decl=1 |
16558 | else | |
16559 | ac_have_decl=0 | |
16560 | fi | |
16561 | ||
16562 | cat >>confdefs.h <<_ACEOF | |
16563 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
16564 | _ACEOF | |
16565 | ||
d92419e5 JB |
16566 | fi |
16567 | ;; | |
c906108c | 16568 | esac |
bec39cab | 16569 | |
c906108c SS |
16570 | fi |
16571 | ||
3f47be5c | 16572 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
5593a99a | 16573 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
81ecdfbb | 16574 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } |
d0ac1c44 | 16575 | if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : |
81ecdfbb | 16576 | $as_echo_n "(cached) " >&6 |
bec39cab | 16577 | else |
81ecdfbb | 16578 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16579 | /* end confdefs.h. */ |
3f47be5c | 16580 | #include <thread_db.h> |
bec39cab AC |
16581 | int |
16582 | main () | |
16583 | { | |
3f47be5c | 16584 | int i = TD_NOTALLOC; |
5593a99a | 16585 | |
bec39cab AC |
16586 | ; |
16587 | return 0; | |
16588 | } | |
16589 | _ACEOF | |
81ecdfbb | 16590 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
16591 | gdb_cv_thread_db_h_has_td_notalloc=yes |
16592 | else | |
81ecdfbb | 16593 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 16594 | |
3f47be5c | 16595 | fi |
81ecdfbb | 16596 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 16597 | |
bec39cab | 16598 | fi |
81ecdfbb RW |
16599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
16600 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
5593a99a SM |
16601 | |
16602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
81ecdfbb | 16603 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } |
d0ac1c44 | 16604 | if ${gdb_cv_thread_db_h_has_td_version+:} false; then : |
81ecdfbb | 16605 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16606 | else |
81ecdfbb | 16607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16608 | /* end confdefs.h. */ |
16609 | #include <thread_db.h> | |
16610 | int | |
16611 | main () | |
16612 | { | |
16613 | int i = TD_VERSION; | |
5593a99a | 16614 | |
59f80f10 DJ |
16615 | ; |
16616 | return 0; | |
16617 | } | |
16618 | _ACEOF | |
81ecdfbb | 16619 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16620 | gdb_cv_thread_db_h_has_td_version=yes |
16621 | else | |
81ecdfbb | 16622 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
16623 | |
16624 | fi | |
81ecdfbb | 16625 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16626 | |
16627 | fi | |
81ecdfbb RW |
16628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
16629 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
5593a99a SM |
16630 | |
16631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
81ecdfbb | 16632 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } |
d0ac1c44 | 16633 | if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : |
81ecdfbb | 16634 | $as_echo_n "(cached) " >&6 |
59f80f10 | 16635 | else |
81ecdfbb | 16636 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16637 | /* end confdefs.h. */ |
16638 | #include <thread_db.h> | |
16639 | int | |
16640 | main () | |
16641 | { | |
16642 | int i = TD_NOTLS; | |
5593a99a | 16643 | |
59f80f10 DJ |
16644 | ; |
16645 | return 0; | |
16646 | } | |
16647 | _ACEOF | |
81ecdfbb | 16648 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16649 | gdb_cv_thread_db_h_has_td_notls=yes |
16650 | else | |
81ecdfbb | 16651 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
16652 | |
16653 | fi | |
81ecdfbb | 16654 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16655 | |
16656 | fi | |
81ecdfbb RW |
16657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
16658 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
16659 | fi |
16660 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 16661 | |
81ecdfbb | 16662 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 16663 | |
59f80f10 DJ |
16664 | fi |
16665 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
16666 | ||
81ecdfbb | 16667 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
16668 | |
16669 | fi | |
16670 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
16671 | ||
81ecdfbb | 16672 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 16673 | |
3f47be5c EZ |
16674 | fi |
16675 | ||
e655c1a2 PA |
16676 | case $host_os in |
16677 | go32* | *djgpp*) | |
16678 | gdbinit=gdb.ini | |
16679 | ;; | |
16680 | *) | |
16681 | gdbinit=.gdbinit | |
16682 | ;; | |
16683 | esac | |
16684 | ||
16685 | cat >>confdefs.h <<_ACEOF | |
16686 | #define GDBINIT "$gdbinit" | |
16687 | _ACEOF | |
16688 | ||
16689 | ||
fb40c209 | 16690 | |
92e4e97a AB |
16691 | cat >>confdefs.h <<_ACEOF |
16692 | #define GDBEARLYINIT ".gdbearlyinit" | |
16693 | _ACEOF | |
16694 | ||
16695 | ||
16696 | ||
f83d8a90 DE |
16697 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
16698 | # except that the argument to --with-sysroot is optional. | |
16699 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
16700 | if test "x$with_sysroot" = xyes; then | |
16701 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
16702 | fi | |
bec39cab | 16703 | |
81ecdfbb RW |
16704 | # Check whether --with-sysroot was given. |
16705 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
16706 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
16707 | else | |
16708 | TARGET_SYSTEM_ROOT= | |
16709 | fi | |
030292b7 | 16710 | |
030292b7 | 16711 | |
f83d8a90 DE |
16712 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
16713 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16714 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
16715 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 16716 | |
f83d8a90 DE |
16717 | cat >>confdefs.h <<_ACEOF |
16718 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
16719 | _ACEOF | |
bec39cab | 16720 | |
030292b7 | 16721 | |
b14b1491 | 16722 | |
f83d8a90 DE |
16723 | |
16724 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16725 | if test "x$prefix" = xNONE; then | |
16726 | test_prefix=/usr/local | |
16727 | else | |
16728 | test_prefix=$prefix | |
16729 | fi | |
16730 | else | |
16731 | test_prefix=$exec_prefix | |
16732 | fi | |
16733 | value=0 | |
16734 | case ${ac_define_dir} in | |
16735 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16736 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16737 | value=1 | |
16738 | ;; | |
16739 | esac | |
16740 | ||
16741 | cat >>confdefs.h <<_ACEOF | |
16742 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
16743 | _ACEOF | |
030292b7 DJ |
16744 | |
16745 | ||
16746 | ||
16e7150e | 16747 | |
16e7150e | 16748 | |
81ecdfbb RW |
16749 | # Check whether --with-system-gdbinit was given. |
16750 | if test "${with_system_gdbinit+set}" = set; then : | |
16751 | withval=$with_system_gdbinit; | |
b14b1491 TT |
16752 | SYSTEM_GDBINIT=$withval |
16753 | else | |
16754 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
16755 | fi |
16756 | ||
16e7150e JG |
16757 | |
16758 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16759 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 16760 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
16761 | ac_define_dir=`eval echo $ac_define_dir` |
16762 | ||
16763 | cat >>confdefs.h <<_ACEOF | |
16764 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
16765 | _ACEOF | |
16766 | ||
16767 | ||
16768 | ||
0c4a4063 | 16769 | |
b14b1491 TT |
16770 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
16771 | if test "x$prefix" = xNONE; then | |
16772 | test_prefix=/usr/local | |
16773 | else | |
16774 | test_prefix=$prefix | |
16775 | fi | |
16776 | else | |
16777 | test_prefix=$exec_prefix | |
16778 | fi | |
16779 | value=0 | |
16780 | case ${ac_define_dir} in | |
16781 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16782 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16783 | value=1 | |
16784 | ;; | |
16785 | esac | |
16e7150e | 16786 | |
b14b1491 TT |
16787 | cat >>confdefs.h <<_ACEOF |
16788 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
16789 | _ACEOF |
16790 | ||
b14b1491 | 16791 | |
16e7150e | 16792 | |
0c4a4063 | 16793 | |
b835bb52 | 16794 | |
ed2a2229 CB |
16795 | # Check whether --with-system-gdbinit-dir was given. |
16796 | if test "${with_system_gdbinit_dir+set}" = set; then : | |
16797 | withval=$with_system_gdbinit_dir; | |
16798 | SYSTEM_GDBINIT_DIR=$withval | |
16799 | else | |
16800 | SYSTEM_GDBINIT_DIR= | |
16801 | fi | |
16802 | ||
16803 | ||
16804 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16805 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16806 | ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR` | |
16807 | ac_define_dir=`eval echo $ac_define_dir` | |
16808 | ||
16809 | cat >>confdefs.h <<_ACEOF | |
16810 | #define SYSTEM_GDBINIT_DIR "$ac_define_dir" | |
16811 | _ACEOF | |
16812 | ||
16813 | ||
16814 | ||
16815 | ||
16816 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16817 | if test "x$prefix" = xNONE; then | |
16818 | test_prefix=/usr/local | |
16819 | else | |
16820 | test_prefix=$prefix | |
16821 | fi | |
16822 | else | |
16823 | test_prefix=$exec_prefix | |
16824 | fi | |
16825 | value=0 | |
16826 | case ${ac_define_dir} in | |
16827 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16828 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16829 | value=1 | |
16830 | ;; | |
16831 | esac | |
16832 | ||
16833 | cat >>confdefs.h <<_ACEOF | |
16834 | #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value | |
16835 | _ACEOF | |
16836 | ||
16837 | ||
16838 | ||
16839 | ||
16840 | ||
81ecdfbb RW |
16841 | # Check whether --enable-werror was given. |
16842 | if test "${enable_werror+set}" = set; then : | |
16843 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
16844 | yes | y) ERROR_ON_WARNING="yes" ;; |
16845 | no | n) ERROR_ON_WARNING="no" ;; | |
d0ac1c44 | 16846 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 16847 | esac |
81ecdfbb RW |
16848 | fi |
16849 | ||
094a342e | 16850 | |
9a084706 PA |
16851 | # Enable -Werror by default when using gcc. Turn it off for releases. |
16852 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
16853 | ERROR_ON_WARNING=yes |
16854 | fi | |
16855 | ||
16856 | WERROR_CFLAGS="" | |
16857 | if test "${ERROR_ON_WARNING}" = yes ; then | |
16858 | WERROR_CFLAGS="-Werror" | |
16859 | fi | |
16860 | ||
cf6de44d | 16861 | # The options we'll try to enable. |
aac331e4 | 16862 | build_warnings="-Wall -Wpointer-arith \ |
a0de763e | 16863 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
aac331e4 | 16864 | -Wno-switch -Wno-char-subscripts \ |
cf6de44d | 16865 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
d3d8724a | 16866 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
7f8a5d38 | 16867 | -Wno-mismatched-tags \ |
632e107b | 16868 | -Wno-error=deprecated-register \ |
85e26832 | 16869 | -Wsuggest-override \ |
1a34f210 | 16870 | -Wimplicit-fallthrough=3 \ |
96643e35 | 16871 | -Wduplicated-cond \ |
33a6bc35 TT |
16872 | -Wshadow=local \ |
16873 | -Wdeprecated-copy \ | |
16874 | -Wdeprecated-copy-dtor \ | |
bb564c58 | 16875 | -Wredundant-move \ |
8ddd8e0e | 16876 | -Wmissing-declarations \ |
a0761e34 | 16877 | -Wmissing-prototypes \ |
898e7f60 SM |
16878 | -Wstrict-null-sentinel \ |
16879 | " | |
3bc3d82a | 16880 | |
3526781e | 16881 | case "${host}" in |
4fa7574e RO |
16882 | *-*-mingw32*) |
16883 | # Enable -Wno-format by default when using gcc on mingw since many | |
16884 | # GCC versions complain about %I64. | |
16885 | build_warnings="$build_warnings -Wno-format" ;; | |
16886 | *-*-solaris*) | |
16887 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC | |
16888 | # doesn't understand. | |
16889 | build_warnings="$build_warnings -Wno-unknown-pragmas" | |
16890 | # Solaris 11 <unistd.h> marks vfork deprecated. | |
16891 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; | |
f1628857 TT |
16892 | *) |
16893 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, | |
16894 | # but there's a special case for this below. | |
16895 | build_warnings="$build_warnings -Wformat-nonliteral" ;; | |
3526781e DJ |
16896 | esac |
16897 | ||
81ecdfbb RW |
16898 | # Check whether --enable-build-warnings was given. |
16899 | if test "${enable_build_warnings+set}" = set; then : | |
16900 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
16901 | yes) ;; |
16902 | no) build_warnings="-w";; | |
16903 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16904 | build_warnings="${build_warnings} ${t}";; | |
16905 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16906 | build_warnings="${t} ${build_warnings}";; | |
16907 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16908 | esac | |
d4f3574e | 16909 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 16910 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 16911 | fi |
81ecdfbb RW |
16912 | fi |
16913 | # Check whether --enable-gdb-build-warnings was given. | |
16914 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
16915 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
16916 | yes) ;; |
16917 | no) build_warnings="-w";; | |
16918 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16919 | build_warnings="${build_warnings} ${t}";; | |
16920 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16921 | build_warnings="${t} ${build_warnings}";; | |
16922 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16923 | esac | |
16924 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
16925 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
16926 | fi | |
81ecdfbb | 16927 | fi |
3bc3d82a PA |
16928 | |
16929 | # The set of warnings supported by a C++ compiler is not the same as | |
16930 | # of the C compiler. | |
cf6de44d | 16931 | ac_ext=cpp |
3bc3d82a PA |
16932 | ac_cpp='$CXXCPP $CPPFLAGS' |
16933 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
16934 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
16935 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
16936 | ||
3bc3d82a | 16937 | |
81ecdfbb | 16938 | WARN_CFLAGS="" |
c906108c SS |
16939 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
16940 | then | |
81ecdfbb RW |
16941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
16942 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
16943 | # Separate out the -Werror flag as some files just cannot be |
16944 | # compiled with it enabled. | |
16945 | for w in ${build_warnings}; do | |
7544db95 PA |
16946 | # GCC does not complain about -Wno-unknown-warning. Invert |
16947 | # and test -Wunknown-warning instead. | |
16948 | case $w in | |
16949 | -Wno-*) | |
16950 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; | |
f1628857 TT |
16951 | -Wformat-nonliteral) |
16952 | # gcc requires -Wformat before -Wformat-nonliteral | |
16953 | # will work, so stick them together. | |
16954 | w="-Wformat $w" | |
16955 | wtest="$w" | |
16956 | ;; | |
7544db95 PA |
16957 | *) |
16958 | wtest=$w ;; | |
16959 | esac | |
16960 | ||
746a987d AC |
16961 | case $w in |
16962 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
3bc3d82a PA |
16963 | *) |
16964 | # Check whether GCC accepts it. | |
4536bbc6 | 16965 | saved_CFLAGS="$CFLAGS" |
3e019bdc | 16966 | CFLAGS="$CFLAGS -Werror $wtest" |
3bc3d82a | 16967 | saved_CXXFLAGS="$CXXFLAGS" |
3e019bdc | 16968 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
a0de763e TT |
16969 | if test "x$w" = "x-Wunused-variable"; then |
16970 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, | |
16971 | # fixed in GCC 4.9. This test is derived from the gdb | |
16972 | # source code that triggered this bug in GCC. | |
16973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
16974 | /* end confdefs.h. */ | |
16975 | struct scoped_restore_base {}; | |
864ca435 SM |
16976 | struct scoped_restore_tmpl : public scoped_restore_base { |
16977 | ~scoped_restore_tmpl() {} | |
16978 | }; | |
a0de763e TT |
16979 | int |
16980 | main () | |
16981 | { | |
16982 | const scoped_restore_base &b = scoped_restore_tmpl(); | |
864ca435 | 16983 | |
a0de763e TT |
16984 | ; |
16985 | return 0; | |
16986 | } | |
16987 | _ACEOF | |
16988 | if ac_fn_cxx_try_compile "$LINENO"; then : | |
16989 | WARN_CFLAGS="${WARN_CFLAGS} $w" | |
16990 | fi | |
16991 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
16992 | else | |
16993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 16994 | /* end confdefs.h. */ |
4536bbc6 | 16995 | |
bec39cab AC |
16996 | int |
16997 | main () | |
16998 | { | |
4536bbc6 | 16999 | |
bec39cab AC |
17000 | ; |
17001 | return 0; | |
17002 | } | |
17003 | _ACEOF | |
3bc3d82a | 17004 | if ac_fn_cxx_try_compile "$LINENO"; then : |
4536bbc6 | 17005 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 17006 | fi |
81ecdfbb | 17007 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a0de763e | 17008 | fi |
4536bbc6 | 17009 | CFLAGS="$saved_CFLAGS" |
3bc3d82a | 17010 | CXXFLAGS="$saved_CXXFLAGS" |
746a987d AC |
17011 | esac |
17012 | done | |
81ecdfbb RW |
17013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
17014 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
17015 | fi |
17016 | ||
17017 | ||
104c1213 | 17018 | |
cf6de44d | 17019 | ac_ext=c |
3bc3d82a PA |
17020 | ac_cpp='$CPP $CPPFLAGS' |
17021 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17022 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17023 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17024 | ||
3bc3d82a | 17025 | |
b835bb52 | 17026 | |
f35d5ade TT |
17027 | # Check whether --enable-ubsan was given. |
17028 | if test "${enable_ubsan+set}" = set; then : | |
17029 | enableval=$enable_ubsan; | |
17030 | else | |
eff98030 | 17031 | enable_ubsan=no |
f35d5ade TT |
17032 | fi |
17033 | ||
17034 | if test "x$enable_ubsan" = xauto; then | |
17035 | if $development; then | |
17036 | enable_ubsan=yes | |
17037 | fi | |
17038 | fi | |
17039 | ac_ext=cpp | |
17040 | ac_cpp='$CXXCPP $CPPFLAGS' | |
17041 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17042 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17043 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
17044 | ||
17045 | if test "x$enable_ubsan" = xyes; then | |
17046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5 | |
17047 | $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; } | |
17048 | saved_CXXFLAGS="$CXXFLAGS" | |
17049 | CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
17050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17051 | /* end confdefs.h. */ | |
17052 | ||
17053 | int | |
17054 | main () | |
17055 | { | |
17056 | ||
17057 | ; | |
17058 | return 0; | |
17059 | } | |
17060 | _ACEOF | |
17061 | if ac_fn_cxx_try_link "$LINENO"; then : | |
17062 | enable_ubsan=yes | |
17063 | else | |
17064 | enable_ubsan=no | |
ad6dba1c | 17065 | |
f35d5ade TT |
17066 | fi |
17067 | rm -f core conftest.err conftest.$ac_objext \ | |
17068 | conftest$ac_exeext conftest.$ac_ext | |
17069 | CXXFLAGS="$saved_CXXFLAGS" | |
17070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 | |
17071 | $as_echo "$enable_ubsan" >&6; } | |
17072 | if test "x$enable_ubsan" = xyes; then | |
17073 | WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" | |
17074 | CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined" | |
17075 | fi | |
17076 | fi | |
17077 | ac_ext=c | |
17078 | ac_cpp='$CPP $CPPFLAGS' | |
17079 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
17080 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
17081 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
17082 | ||
17083 | ||
17084 | ||
7a292a7a | 17085 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
17086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
17087 | $as_echo_n "checking for cygwin... " >&6; } | |
d0ac1c44 | 17088 | if ${gdb_cv_os_cygwin+:} false; then : |
81ecdfbb | 17089 | $as_echo_n "(cached) " >&6 |
bec39cab | 17090 | else |
81ecdfbb | 17091 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 17092 | /* end confdefs.h. */ |
7a292a7a SS |
17093 | |
17094 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
17095 | lose | |
17096 | #endif | |
bec39cab | 17097 | _ACEOF |
7a292a7a | 17098 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
92a021de | 17099 | $EGREP "^lose$" >/dev/null 2>&1; then : |
7a292a7a SS |
17100 | gdb_cv_os_cygwin=yes |
17101 | else | |
7a292a7a SS |
17102 | gdb_cv_os_cygwin=no |
17103 | fi | |
17104 | rm -f conftest* | |
17105 | ||
17106 | fi | |
81ecdfbb RW |
17107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
17108 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 17109 | |
aff38e61 | 17110 | |
3eb25fda | 17111 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 17112 | case ${host} in |
95cbc983 AC |
17113 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
17114 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 17115 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
c1168a2f | 17116 | *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;; |
aff38e61 AC |
17117 | esac |
17118 | ||
17119 | ||
cd0fc7c3 SS |
17120 | # libreadline needs libuser32.a in a cygwin environment |
17121 | WIN32LIBS= | |
0ad6b8ee | 17122 | if test x"$gdb_cv_os_cygwin" = xyes; then |
c5394b80 JM |
17123 | WIN32LIBS="-luser32" |
17124 | case "${target}" in | |
17125 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
17126 | ;; | |
17127 | esac | |
cd0fc7c3 | 17128 | fi |
c906108c | 17129 | |
b4505029 | 17130 | # The ser-tcp.c module requires sockets. |
b2ceabe8 TT |
17131 | # Note that WIN32APILIBS is set by GDB_AC_COMMON. |
17132 | WIN32LIBS="$WIN32LIBS $WIN32APILIBS" | |
7a292a7a | 17133 | |
31d99776 | 17134 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
17135 | |
17136 | OLD_CFLAGS=$CFLAGS | |
17137 | OLD_LDFLAGS=$LDFLAGS | |
17138 | OLD_LIBS=$LIBS | |
17139 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
17140 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
17141 | # always want our bfd. | |
17142 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
17143 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
17144 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
def63ff0 | 17145 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 17146 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
def63ff0 | 17147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
81ecdfbb | 17148 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
d0ac1c44 | 17149 | if ${gdb_cv_var_elf+:} false; then : |
81ecdfbb | 17150 | $as_echo_n "(cached) " >&6 |
31d99776 | 17151 | else |
81ecdfbb | 17152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
17153 | /* end confdefs.h. */ |
17154 | #include <stdlib.h> | |
b4132322 | 17155 | #include <string.h> |
294f2697 SM |
17156 | #include "bfd.h" |
17157 | #include "elf-bfd.h" | |
31d99776 DJ |
17158 | int |
17159 | main () | |
17160 | { | |
def63ff0 | 17161 | return bfd_get_elf_phdr_upper_bound (NULL); |
294f2697 | 17162 | |
31d99776 DJ |
17163 | ; |
17164 | return 0; | |
17165 | } | |
17166 | _ACEOF | |
81ecdfbb | 17167 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
17168 | gdb_cv_var_elf=yes |
17169 | else | |
81ecdfbb | 17170 | gdb_cv_var_elf=no |
294f2697 | 17171 | |
31d99776 | 17172 | fi |
81ecdfbb RW |
17173 | rm -f core conftest.err conftest.$ac_objext \ |
17174 | conftest$ac_exeext conftest.$ac_ext | |
294f2697 | 17175 | |
31d99776 | 17176 | fi |
81ecdfbb RW |
17177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
17178 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
17179 | CFLAGS=$OLD_CFLAGS |
17180 | LDFLAGS=$OLD_LDFLAGS | |
17181 | LIBS=$OLD_LIBS | |
0ad6b8ee | 17182 | if test "$gdb_cv_var_elf" = yes; then |
fb8f3fc0 AB |
17183 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \ |
17184 | gcore-elf.o elf-none-tdep.o" | |
31d99776 | 17185 | |
81ecdfbb | 17186 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 17187 | |
075ff26d JK |
17188 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
17189 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
17190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
17191 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
d0ac1c44 | 17192 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17193 | $as_echo_n "(cached) " >&6 |
17194 | else | |
17195 | ac_func_search_save_LIBS=$LIBS | |
17196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17197 | /* end confdefs.h. */ | |
17198 | ||
17199 | /* Override any GCC internal prototype to avoid an error. | |
17200 | Use char because int might match the return type of a GCC | |
17201 | builtin and then its argument prototype would still apply. */ | |
17202 | #ifdef __cplusplus | |
17203 | extern "C" | |
17204 | #endif | |
17205 | char dlopen (); | |
17206 | int | |
17207 | main () | |
17208 | { | |
17209 | return dlopen (); | |
17210 | ; | |
17211 | return 0; | |
17212 | } | |
17213 | _ACEOF | |
17214 | for ac_lib in '' dl; do | |
17215 | if test -z "$ac_lib"; then | |
17216 | ac_res="none required" | |
17217 | else | |
17218 | ac_res=-l$ac_lib | |
17219 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
17220 | fi | |
17221 | if ac_fn_c_try_link "$LINENO"; then : | |
17222 | ac_cv_search_dlopen=$ac_res | |
17223 | fi | |
17224 | rm -f core conftest.err conftest.$ac_objext \ | |
17225 | conftest$ac_exeext | |
d0ac1c44 | 17226 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17227 | break |
17228 | fi | |
17229 | done | |
d0ac1c44 | 17230 | if ${ac_cv_search_dlopen+:} false; then : |
a48b32c0 L |
17231 | |
17232 | else | |
17233 | ac_cv_search_dlopen=no | |
17234 | fi | |
17235 | rm conftest.$ac_ext | |
17236 | LIBS=$ac_func_search_save_LIBS | |
17237 | fi | |
17238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
17239 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
17240 | ac_res=$ac_cv_search_dlopen | |
17241 | if test "$ac_res" != no; then : | |
17242 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
17243 | ||
17244 | fi | |
17245 | ||
075ff26d | 17246 | fi |
31d99776 | 17247 | fi |
31d99776 | 17248 | |
4f05add4 TT |
17249 | # Add macho support to GDB, but only if BFD includes it. |
17250 | ||
17251 | OLD_CFLAGS=$CFLAGS | |
17252 | OLD_LDFLAGS=$LDFLAGS | |
17253 | OLD_LIBS=$LIBS | |
17254 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
17255 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
17256 | # always want our bfd. | |
17257 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5a2d4533 L |
17258 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
17259 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" | |
4f05add4 | 17260 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
711a72d3 | 17261 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
4f05add4 TT |
17262 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
17263 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
d0ac1c44 | 17264 | if ${gdb_cv_var_macho+:} false; then : |
4f05add4 TT |
17265 | $as_echo_n "(cached) " >&6 |
17266 | else | |
17267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17268 | /* end confdefs.h. */ | |
17269 | #include <stdlib.h> | |
b4132322 | 17270 | #include <string.h> |
294f2697 SM |
17271 | #include "bfd.h" |
17272 | #include "mach-o.h" | |
4f05add4 TT |
17273 | int |
17274 | main () | |
17275 | { | |
17276 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
294f2697 | 17277 | |
4f05add4 TT |
17278 | ; |
17279 | return 0; | |
17280 | } | |
17281 | _ACEOF | |
17282 | if ac_fn_c_try_link "$LINENO"; then : | |
17283 | gdb_cv_var_macho=yes | |
17284 | else | |
17285 | gdb_cv_var_macho=no | |
294f2697 | 17286 | |
4f05add4 TT |
17287 | fi |
17288 | rm -f core conftest.err conftest.$ac_objext \ | |
17289 | conftest$ac_exeext conftest.$ac_ext | |
294f2697 | 17290 | |
4f05add4 TT |
17291 | fi |
17292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
17293 | $as_echo "$gdb_cv_var_macho" >&6; } | |
17294 | CFLAGS=$OLD_CFLAGS | |
17295 | LDFLAGS=$OLD_LDFLAGS | |
17296 | LIBS=$OLD_LIBS | |
0ad6b8ee | 17297 | if test "$gdb_cv_var_macho" = yes; then |
4f05add4 TT |
17298 | CONFIG_OBS="$CONFIG_OBS machoread.o" |
17299 | fi | |
17300 | ||
121ce6e5 DJ |
17301 | # Add any host-specific objects to GDB. |
17302 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
17303 | ||
608e2dbb | 17304 | # If building on ELF, look for lzma support for embedded compressed debug info. |
0ad6b8ee | 17305 | if test "$gdb_cv_var_elf" = yes; then |
608e2dbb TT |
17306 | |
17307 | # Check whether --with-lzma was given. | |
17308 | if test "${with_lzma+set}" = set; then : | |
17309 | withval=$with_lzma; | |
17310 | else | |
17311 | with_lzma=auto | |
17312 | fi | |
17313 | ||
17314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
17315 | $as_echo_n "checking whether to use lzma... " >&6; } | |
17316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
17317 | $as_echo "$with_lzma" >&6; } | |
17318 | ||
17319 | if test "${with_lzma}" != no; then | |
17320 | ||
17321 | ||
17322 | ||
17323 | ||
17324 | ||
17325 | ||
17326 | ||
17327 | ||
17328 | use_additional=yes | |
17329 | ||
17330 | acl_save_prefix="$prefix" | |
17331 | prefix="$acl_final_prefix" | |
17332 | acl_save_exec_prefix="$exec_prefix" | |
17333 | exec_prefix="$acl_final_exec_prefix" | |
17334 | ||
17335 | eval additional_includedir=\"$includedir\" | |
17336 | eval additional_libdir=\"$libdir\" | |
17337 | ||
17338 | exec_prefix="$acl_save_exec_prefix" | |
17339 | prefix="$acl_save_prefix" | |
17340 | ||
17341 | ||
17342 | # Check whether --with-liblzma-prefix was given. | |
17343 | if test "${with_liblzma_prefix+set}" = set; then : | |
17344 | withval=$with_liblzma_prefix; | |
17345 | if test "X$withval" = "Xno"; then | |
17346 | use_additional=no | |
17347 | else | |
17348 | if test "X$withval" = "X"; then | |
17349 | ||
17350 | acl_save_prefix="$prefix" | |
17351 | prefix="$acl_final_prefix" | |
17352 | acl_save_exec_prefix="$exec_prefix" | |
17353 | exec_prefix="$acl_final_exec_prefix" | |
17354 | ||
17355 | eval additional_includedir=\"$includedir\" | |
17356 | eval additional_libdir=\"$libdir\" | |
17357 | ||
17358 | exec_prefix="$acl_save_exec_prefix" | |
17359 | prefix="$acl_save_prefix" | |
17360 | ||
17361 | else | |
17362 | additional_includedir="$withval/include" | |
17363 | additional_libdir="$withval/lib" | |
17364 | fi | |
17365 | fi | |
17366 | ||
17367 | fi | |
17368 | ||
9f1528a1 AB |
17369 | |
17370 | # Check whether --with-liblzma-type was given. | |
17371 | if test "${with_liblzma_type+set}" = set; then : | |
17372 | withval=$with_liblzma_type; with_liblzma_type=$withval | |
17373 | else | |
17374 | with_liblzma_type=auto | |
17375 | fi | |
17376 | ||
17377 | lib_type=`eval echo \$with_liblzma_type` | |
17378 | ||
608e2dbb TT |
17379 | LIBLZMA= |
17380 | LTLIBLZMA= | |
17381 | INCLZMA= | |
17382 | rpathdirs= | |
17383 | ltrpathdirs= | |
17384 | names_already_handled= | |
17385 | names_next_round='lzma ' | |
17386 | while test -n "$names_next_round"; do | |
17387 | names_this_round="$names_next_round" | |
17388 | names_next_round= | |
17389 | for name in $names_this_round; do | |
17390 | already_handled= | |
17391 | for n in $names_already_handled; do | |
17392 | if test "$n" = "$name"; then | |
17393 | already_handled=yes | |
17394 | break | |
17395 | fi | |
17396 | done | |
17397 | if test -z "$already_handled"; then | |
17398 | names_already_handled="$names_already_handled $name" | |
17399 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
17400 | eval value=\"\$HAVE_LIB$uppername\" | |
17401 | if test -n "$value"; then | |
17402 | if test "$value" = yes; then | |
17403 | eval value=\"\$LIB$uppername\" | |
17404 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
17405 | eval value=\"\$LTLIB$uppername\" | |
17406 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
17407 | else | |
17408 | : | |
17409 | fi | |
17410 | else | |
17411 | found_dir= | |
17412 | found_la= | |
17413 | found_so= | |
17414 | found_a= | |
17415 | if test $use_additional = yes; then | |
9f1528a1 | 17416 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17417 | found_dir="$additional_libdir" |
17418 | found_so="$additional_libdir/lib$name.$shlibext" | |
17419 | if test -f "$additional_libdir/lib$name.la"; then | |
17420 | found_la="$additional_libdir/lib$name.la" | |
17421 | fi | |
9f1528a1 | 17422 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17423 | if test -f "$additional_libdir/lib$name.$libext"; then |
17424 | found_dir="$additional_libdir" | |
17425 | found_a="$additional_libdir/lib$name.$libext" | |
17426 | if test -f "$additional_libdir/lib$name.la"; then | |
17427 | found_la="$additional_libdir/lib$name.la" | |
17428 | fi | |
17429 | fi | |
17430 | fi | |
17431 | fi | |
17432 | if test "X$found_dir" = "X"; then | |
17433 | for x in $LDFLAGS $LTLIBLZMA; do | |
17434 | ||
17435 | acl_save_prefix="$prefix" | |
17436 | prefix="$acl_final_prefix" | |
17437 | acl_save_exec_prefix="$exec_prefix" | |
17438 | exec_prefix="$acl_final_exec_prefix" | |
17439 | eval x=\"$x\" | |
17440 | exec_prefix="$acl_save_exec_prefix" | |
17441 | prefix="$acl_save_prefix" | |
17442 | ||
17443 | case "$x" in | |
17444 | -L*) | |
17445 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 17446 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
608e2dbb TT |
17447 | found_dir="$dir" |
17448 | found_so="$dir/lib$name.$shlibext" | |
17449 | if test -f "$dir/lib$name.la"; then | |
17450 | found_la="$dir/lib$name.la" | |
17451 | fi | |
9f1528a1 | 17452 | elif test x$lib_type != xshared; then |
608e2dbb TT |
17453 | if test -f "$dir/lib$name.$libext"; then |
17454 | found_dir="$dir" | |
17455 | found_a="$dir/lib$name.$libext" | |
17456 | if test -f "$dir/lib$name.la"; then | |
17457 | found_la="$dir/lib$name.la" | |
17458 | fi | |
17459 | fi | |
17460 | fi | |
17461 | ;; | |
17462 | esac | |
17463 | if test "X$found_dir" != "X"; then | |
17464 | break | |
17465 | fi | |
17466 | done | |
17467 | fi | |
17468 | if test "X$found_dir" != "X"; then | |
17469 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
17470 | if test "X$found_so" != "X"; then | |
17471 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
17472 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17473 | else | |
17474 | haveit= | |
17475 | for x in $ltrpathdirs; do | |
17476 | if test "X$x" = "X$found_dir"; then | |
17477 | haveit=yes | |
17478 | break | |
17479 | fi | |
17480 | done | |
17481 | if test -z "$haveit"; then | |
17482 | ltrpathdirs="$ltrpathdirs $found_dir" | |
17483 | fi | |
17484 | if test "$hardcode_direct" = yes; then | |
17485 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17486 | else | |
17487 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
17488 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17489 | haveit= | |
17490 | for x in $rpathdirs; do | |
17491 | if test "X$x" = "X$found_dir"; then | |
17492 | haveit=yes | |
17493 | break | |
17494 | fi | |
17495 | done | |
17496 | if test -z "$haveit"; then | |
17497 | rpathdirs="$rpathdirs $found_dir" | |
17498 | fi | |
17499 | else | |
17500 | haveit= | |
17501 | for x in $LDFLAGS $LIBLZMA; do | |
17502 | ||
17503 | acl_save_prefix="$prefix" | |
17504 | prefix="$acl_final_prefix" | |
17505 | acl_save_exec_prefix="$exec_prefix" | |
17506 | exec_prefix="$acl_final_exec_prefix" | |
17507 | eval x=\"$x\" | |
17508 | exec_prefix="$acl_save_exec_prefix" | |
17509 | prefix="$acl_save_prefix" | |
17510 | ||
17511 | if test "X$x" = "X-L$found_dir"; then | |
17512 | haveit=yes | |
17513 | break | |
17514 | fi | |
17515 | done | |
17516 | if test -z "$haveit"; then | |
17517 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
17518 | fi | |
17519 | if test "$hardcode_minus_L" != no; then | |
17520 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
17521 | else | |
17522 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17523 | fi | |
17524 | fi | |
17525 | fi | |
17526 | fi | |
17527 | else | |
17528 | if test "X$found_a" != "X"; then | |
17529 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
17530 | else | |
17531 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
17532 | fi | |
17533 | fi | |
17534 | additional_includedir= | |
17535 | case "$found_dir" in | |
17536 | */lib | */lib/) | |
17537 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
17538 | additional_includedir="$basedir/include" | |
17539 | ;; | |
17540 | esac | |
17541 | if test "X$additional_includedir" != "X"; then | |
17542 | if test "X$additional_includedir" != "X/usr/include"; then | |
17543 | haveit= | |
17544 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
17545 | if test -n "$GCC"; then | |
17546 | case $host_os in | |
17547 | linux*) haveit=yes;; | |
17548 | esac | |
17549 | fi | |
17550 | fi | |
17551 | if test -z "$haveit"; then | |
17552 | for x in $CPPFLAGS $INCLZMA; do | |
17553 | ||
17554 | acl_save_prefix="$prefix" | |
17555 | prefix="$acl_final_prefix" | |
17556 | acl_save_exec_prefix="$exec_prefix" | |
17557 | exec_prefix="$acl_final_exec_prefix" | |
17558 | eval x=\"$x\" | |
17559 | exec_prefix="$acl_save_exec_prefix" | |
17560 | prefix="$acl_save_prefix" | |
17561 | ||
17562 | if test "X$x" = "X-I$additional_includedir"; then | |
17563 | haveit=yes | |
17564 | break | |
17565 | fi | |
17566 | done | |
17567 | if test -z "$haveit"; then | |
17568 | if test -d "$additional_includedir"; then | |
17569 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
17570 | fi | |
17571 | fi | |
17572 | fi | |
17573 | fi | |
17574 | fi | |
17575 | if test -n "$found_la"; then | |
17576 | save_libdir="$libdir" | |
17577 | case "$found_la" in | |
17578 | */* | *\\*) . "$found_la" ;; | |
17579 | *) . "./$found_la" ;; | |
17580 | esac | |
17581 | libdir="$save_libdir" | |
17582 | for dep in $dependency_libs; do | |
17583 | case "$dep" in | |
17584 | -L*) | |
17585 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
17586 | if test "X$additional_libdir" != "X/usr/lib"; then | |
17587 | haveit= | |
17588 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
17589 | if test -n "$GCC"; then | |
17590 | case $host_os in | |
17591 | linux*) haveit=yes;; | |
17592 | esac | |
17593 | fi | |
17594 | fi | |
17595 | if test -z "$haveit"; then | |
17596 | haveit= | |
17597 | for x in $LDFLAGS $LIBLZMA; do | |
17598 | ||
17599 | acl_save_prefix="$prefix" | |
17600 | prefix="$acl_final_prefix" | |
17601 | acl_save_exec_prefix="$exec_prefix" | |
17602 | exec_prefix="$acl_final_exec_prefix" | |
17603 | eval x=\"$x\" | |
17604 | exec_prefix="$acl_save_exec_prefix" | |
17605 | prefix="$acl_save_prefix" | |
17606 | ||
17607 | if test "X$x" = "X-L$additional_libdir"; then | |
17608 | haveit=yes | |
17609 | break | |
17610 | fi | |
17611 | done | |
17612 | if test -z "$haveit"; then | |
17613 | if test -d "$additional_libdir"; then | |
17614 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
17615 | fi | |
17616 | fi | |
17617 | haveit= | |
17618 | for x in $LDFLAGS $LTLIBLZMA; do | |
17619 | ||
17620 | acl_save_prefix="$prefix" | |
17621 | prefix="$acl_final_prefix" | |
17622 | acl_save_exec_prefix="$exec_prefix" | |
17623 | exec_prefix="$acl_final_exec_prefix" | |
17624 | eval x=\"$x\" | |
17625 | exec_prefix="$acl_save_exec_prefix" | |
17626 | prefix="$acl_save_prefix" | |
17627 | ||
17628 | if test "X$x" = "X-L$additional_libdir"; then | |
17629 | haveit=yes | |
17630 | break | |
17631 | fi | |
17632 | done | |
17633 | if test -z "$haveit"; then | |
17634 | if test -d "$additional_libdir"; then | |
17635 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
17636 | fi | |
17637 | fi | |
17638 | fi | |
17639 | fi | |
17640 | ;; | |
17641 | -R*) | |
17642 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
17643 | if test "$enable_rpath" != no; then | |
17644 | haveit= | |
17645 | for x in $rpathdirs; do | |
17646 | if test "X$x" = "X$dir"; then | |
17647 | haveit=yes | |
17648 | break | |
17649 | fi | |
17650 | done | |
17651 | if test -z "$haveit"; then | |
17652 | rpathdirs="$rpathdirs $dir" | |
17653 | fi | |
17654 | haveit= | |
17655 | for x in $ltrpathdirs; do | |
17656 | if test "X$x" = "X$dir"; then | |
17657 | haveit=yes | |
17658 | break | |
17659 | fi | |
17660 | done | |
17661 | if test -z "$haveit"; then | |
17662 | ltrpathdirs="$ltrpathdirs $dir" | |
17663 | fi | |
17664 | fi | |
17665 | ;; | |
17666 | -l*) | |
17667 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
17668 | ;; | |
17669 | *.la) | |
17670 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
17671 | ;; | |
17672 | *) | |
17673 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
17674 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
17675 | ;; | |
17676 | esac | |
17677 | done | |
17678 | fi | |
17679 | else | |
9f1528a1 AB |
17680 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
17681 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
17682 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
17683 | else | |
17684 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext" | |
17685 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext" | |
17686 | fi | |
608e2dbb TT |
17687 | fi |
17688 | fi | |
17689 | fi | |
17690 | done | |
17691 | done | |
17692 | if test "X$rpathdirs" != "X"; then | |
17693 | if test -n "$hardcode_libdir_separator"; then | |
17694 | alldirs= | |
17695 | for found_dir in $rpathdirs; do | |
17696 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
17697 | done | |
17698 | acl_save_libdir="$libdir" | |
17699 | libdir="$alldirs" | |
17700 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17701 | libdir="$acl_save_libdir" | |
17702 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17703 | else | |
17704 | for found_dir in $rpathdirs; do | |
17705 | acl_save_libdir="$libdir" | |
17706 | libdir="$found_dir" | |
17707 | eval flag=\"$hardcode_libdir_flag_spec\" | |
17708 | libdir="$acl_save_libdir" | |
17709 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
17710 | done | |
17711 | fi | |
17712 | fi | |
17713 | if test "X$ltrpathdirs" != "X"; then | |
17714 | for found_dir in $ltrpathdirs; do | |
17715 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
17716 | done | |
17717 | fi | |
17718 | ||
17719 | ||
17720 | ac_save_CPPFLAGS="$CPPFLAGS" | |
17721 | ||
17722 | for element in $INCLZMA; do | |
17723 | haveit= | |
17724 | for x in $CPPFLAGS; do | |
17725 | ||
17726 | acl_save_prefix="$prefix" | |
17727 | prefix="$acl_final_prefix" | |
17728 | acl_save_exec_prefix="$exec_prefix" | |
17729 | exec_prefix="$acl_final_exec_prefix" | |
17730 | eval x=\"$x\" | |
17731 | exec_prefix="$acl_save_exec_prefix" | |
17732 | prefix="$acl_save_prefix" | |
17733 | ||
17734 | if test "X$x" = "X$element"; then | |
17735 | haveit=yes | |
17736 | break | |
17737 | fi | |
17738 | done | |
17739 | if test -z "$haveit"; then | |
17740 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
17741 | fi | |
17742 | done | |
17743 | ||
17744 | ||
17745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
17746 | $as_echo_n "checking for liblzma... " >&6; } | |
d0ac1c44 | 17747 | if ${ac_cv_liblzma+:} false; then : |
608e2dbb TT |
17748 | $as_echo_n "(cached) " >&6 |
17749 | else | |
17750 | ||
17751 | ac_save_LIBS="$LIBS" | |
17752 | LIBS="$LIBS $LIBLZMA" | |
17753 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
17754 | /* end confdefs.h. */ | |
17755 | #include "lzma.h" | |
17756 | int | |
17757 | main () | |
17758 | { | |
17759 | lzma_index_iter iter; | |
17760 | lzma_index_iter_init (&iter, 0); | |
17761 | lzma_mf_is_supported (LZMA_MF_HC3); | |
17762 | ; | |
17763 | return 0; | |
17764 | } | |
17765 | _ACEOF | |
17766 | if ac_fn_c_try_link "$LINENO"; then : | |
17767 | ac_cv_liblzma=yes | |
17768 | else | |
17769 | ac_cv_liblzma=no | |
17770 | fi | |
17771 | rm -f core conftest.err conftest.$ac_objext \ | |
17772 | conftest$ac_exeext conftest.$ac_ext | |
17773 | LIBS="$ac_save_LIBS" | |
17774 | ||
17775 | fi | |
17776 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
17777 | $as_echo "$ac_cv_liblzma" >&6; } | |
17778 | if test "$ac_cv_liblzma" = yes; then | |
17779 | HAVE_LIBLZMA=yes | |
17780 | ||
17781 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
17782 | ||
17783 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
17784 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
17785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
17786 | $as_echo "$LIBLZMA" >&6; } | |
17787 | else | |
17788 | HAVE_LIBLZMA=no | |
17789 | CPPFLAGS="$ac_save_CPPFLAGS" | |
17790 | LIBLZMA= | |
17791 | LTLIBLZMA= | |
17792 | fi | |
17793 | ||
17794 | ||
17795 | ||
17796 | ||
17797 | ||
17798 | ||
17799 | if test "$HAVE_LIBLZMA" != yes; then | |
17800 | if test "$with_lzma" = yes; then | |
d0ac1c44 | 17801 | as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 |
608e2dbb TT |
17802 | fi |
17803 | fi | |
17804 | fi | |
17805 | fi | |
17806 | ||
3fc11d3e JM |
17807 | LIBGUI="../libgui/src/libgui.a" |
17808 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
17809 | ||
17810 | ||
7a292a7a | 17811 | |
3fc11d3e JM |
17812 | WIN32LDAPP= |
17813 | ||
17814 | ||
17815 | ||
d91670b9 | 17816 | case "${host}" in |
686a5eed | 17817 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
17818 | configdir="win" |
17819 | ;; | |
17820 | *) | |
17821 | configdir="unix" | |
17822 | ;; | |
17823 | esac | |
3fc11d3e JM |
17824 | |
17825 | GDBTKLIBS= | |
17826 | if test "${enable_gdbtk}" = "yes"; then | |
17827 | ||
d1c3b63a KS |
17828 | # Gdbtk must have an absolute path to srcdir in order to run |
17829 | # properly when not installed. | |
17830 | here=`pwd` | |
17831 | cd ${srcdir} | |
17832 | GDBTK_SRC_DIR=`pwd` | |
17833 | cd $here | |
17834 | ||
bec39cab | 17835 | |
5062cc19 KS |
17836 | # |
17837 | # Ok, lets find the tcl configuration | |
17838 | # First, look for one uninstalled. | |
17839 | # the alternative search directory is invoked by --with-tcl | |
17840 | # | |
3fc11d3e | 17841 | |
5062cc19 KS |
17842 | if test x"${no_tcl}" = x ; then |
17843 | # we reset no_tcl in case something fails here | |
17844 | no_tcl=true | |
bec39cab | 17845 | |
81ecdfbb RW |
17846 | # Check whether --with-tcl was given. |
17847 | if test "${with_tcl+set}" = set; then : | |
17848 | withval=$with_tcl; with_tclconfig=${withval} | |
17849 | fi | |
17850 | ||
17851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
17852 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
d0ac1c44 | 17853 | if ${ac_cv_c_tclconfig+:} false; then : |
81ecdfbb | 17854 | $as_echo_n "(cached) " >&6 |
3fc11d3e | 17855 | else |
bec39cab | 17856 | |
3fc11d3e | 17857 | |
5062cc19 KS |
17858 | # First check to see if --with-tcl was specified. |
17859 | case "${host}" in | |
17860 | *-*-cygwin*) platDir="win" ;; | |
17861 | *) platDir="unix" ;; | |
17862 | esac | |
17863 | if test x"${with_tclconfig}" != x ; then | |
17864 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
17865 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
17866 | else | |
d0ac1c44 | 17867 | as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17868 | fi |
17869 | fi | |
17870 | ||
17871 | # then check for a private Tcl installation | |
17872 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17873 | for i in \ | |
17874 | ../tcl \ | |
17875 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17876 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
17877 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17878 | ../../tcl \ | |
17879 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17880 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17881 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
17882 | ../../../tcl \ | |
17883 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17884 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
17885 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17886 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17887 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17888 | break | |
17889 | fi | |
17890 | done | |
17891 | fi | |
17892 | ||
17893 | # on Darwin, check in Framework installation locations | |
17894 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
17895 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
17896 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
17897 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
17898 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
17899 | ; do | |
17900 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
17901 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
17902 | break | |
17903 | fi | |
17904 | done | |
17905 | fi | |
17906 | ||
17907 | # check in a few common install locations | |
17908 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17909 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
17910 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
17911 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
17912 | `ls -d /usr/local/lib 2>/dev/null` \ | |
17913 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
17914 | `ls -d /usr/lib 2>/dev/null` \ | |
17915 | ; do | |
17916 | if test -f "$i/tclConfig.sh" ; then | |
17917 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
17918 | break | |
17919 | fi | |
17920 | done | |
17921 | fi | |
3fc11d3e | 17922 | |
5062cc19 KS |
17923 | # check in a few other private locations |
17924 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17925 | for i in \ | |
17926 | ${srcdir}/../tcl \ | |
17927 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17928 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
17929 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
17930 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
17931 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
17932 | break | |
17933 | fi | |
17934 | done | |
17935 | fi | |
bec39cab | 17936 | |
3fc11d3e JM |
17937 | fi |
17938 | ||
5062cc19 KS |
17939 | |
17940 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
17941 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
17942 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
17943 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
17944 | else |
17945 | no_tcl= | |
17946 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
17947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17948 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
17949 | fi |
17950 | fi | |
3fc11d3e | 17951 | |
bec39cab | 17952 | |
85541719 DE |
17953 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
17954 | # point to doing Tcl. | |
bec39cab | 17955 | |
5062cc19 KS |
17956 | # |
17957 | # Ok, lets find the tk configuration | |
17958 | # First, look for one uninstalled. | |
17959 | # the alternative search directory is invoked by --with-tk | |
17960 | # | |
3fc11d3e | 17961 | |
5062cc19 KS |
17962 | if test x"${no_tk}" = x ; then |
17963 | # we reset no_tk in case something fails here | |
17964 | no_tk=true | |
bec39cab | 17965 | |
81ecdfbb RW |
17966 | # Check whether --with-tk was given. |
17967 | if test "${with_tk+set}" = set; then : | |
17968 | withval=$with_tk; with_tkconfig=${withval} | |
17969 | fi | |
17970 | ||
17971 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
17972 | $as_echo_n "checking for Tk configuration... " >&6; } | |
d0ac1c44 | 17973 | if ${ac_cv_c_tkconfig+:} false; then : |
81ecdfbb | 17974 | $as_echo_n "(cached) " >&6 |
bec39cab | 17975 | else |
3fc11d3e JM |
17976 | |
17977 | ||
5062cc19 KS |
17978 | # First check to see if --with-tkconfig was specified. |
17979 | if test x"${with_tkconfig}" != x ; then | |
17980 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
17981 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
17982 | else | |
d0ac1c44 | 17983 | as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
17984 | fi |
17985 | fi | |
3fc11d3e | 17986 | |
5062cc19 KS |
17987 | # then check for a private Tk library |
17988 | case "${host}" in | |
17989 | *-*-cygwin*) platDir="win" ;; | |
17990 | *) platDir="unix" ;; | |
17991 | esac | |
17992 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17993 | for i in \ | |
17994 | ../tk \ | |
17995 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17996 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
17997 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
17998 | ../../tk \ | |
17999 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18000 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
18001 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
18002 | ../../../tk \ | |
18003 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18004 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
18005 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
18006 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
18007 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
18008 | break | |
18009 | fi | |
18010 | done | |
18011 | fi | |
18012 | ||
18013 | # on Darwin, check in Framework installation locations | |
18014 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
18015 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
18016 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
18017 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
18018 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
18019 | ; do | |
18020 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
18021 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
18022 | break | |
18023 | fi | |
18024 | done | |
18025 | fi | |
18026 | ||
18027 | # check in a few common install locations | |
18028 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18029 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
18030 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
18031 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
18032 | `ls -d /usr/local/lib 2>/dev/null` \ | |
18033 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
18034 | `ls -d /usr/lib 2>/dev/null` \ | |
18035 | ; do | |
18036 | if test -f "$i/tkConfig.sh" ; then | |
18037 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
18038 | break | |
18039 | fi | |
18040 | done | |
18041 | fi | |
18042 | # check in a few other private locations | |
18043 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
18044 | for i in \ | |
18045 | ${srcdir}/../tk \ | |
18046 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
18047 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
18048 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
18049 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
18050 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
18051 | break | |
18052 | fi | |
18053 | done | |
18054 | fi | |
3fc11d3e | 18055 | |
3fc11d3e JM |
18056 | fi |
18057 | ||
18058 | ||
5062cc19 KS |
18059 | if test x"${ac_cv_c_tkconfig}" = x ; then |
18060 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
18061 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
18062 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
18063 | else |
18064 | no_tk= | |
18065 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
18066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18067 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 18068 | fi |
3fc11d3e | 18069 | fi |
dd2504ab | 18070 | |
dd2504ab | 18071 | |
85541719 DE |
18072 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
18073 | ||
81ecdfbb RW |
18074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18075 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
18076 | |
18077 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
18078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
18079 | $as_echo "loading" >&6; } | |
85541719 DE |
18080 | . ${TCL_BIN_DIR}/tclConfig.sh |
18081 | else | |
81ecdfbb RW |
18082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
18083 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
18084 | fi |
18085 | ||
18086 | # eval is required to do the TCL_DBGX substitution | |
18087 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
18088 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
18089 | ||
18090 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
18091 | # then set the common variable name to the value of the build variables. | |
18092 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
18093 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
18094 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
18095 | # installed and uninstalled version of Tcl. | |
18096 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
18097 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
18098 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
18099 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
18100 | elif test "`uname -s`" = "Darwin"; then | |
18101 | # If Tcl was built as a framework, attempt to use the libraries | |
18102 | # from the framework at the given location so that linking works | |
a68ffae9 | 18103 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
18104 | case ${TCL_DEFS} in |
18105 | *TCL_FRAMEWORK*) | |
18106 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
18107 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
18108 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
18109 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
18110 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
18111 | break | |
18112 | fi | |
18113 | done | |
18114 | fi | |
18115 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
18116 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
18117 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
18118 | fi | |
18119 | ;; | |
18120 | esac | |
18121 | fi | |
18122 | ||
18123 | # eval is required to do the TCL_DBGX substitution | |
18124 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
18125 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
18126 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
18127 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
18128 | ||
18129 | ||
18130 | ||
18131 | ||
18132 | ||
18133 | ||
18134 | ||
18135 | ||
18136 | ||
18137 | ||
18138 | ||
18139 | ||
18140 | ||
18141 | ||
18142 | ||
18143 | # Check for in-tree tcl | |
18144 | here=`pwd` | |
18145 | cd ${srcdir}/.. | |
18146 | topdir=`pwd` | |
18147 | cd ${here} | |
18148 | ||
18149 | intree="no" | |
18150 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
18151 | intree="yes" | |
18152 | fi | |
18153 | ||
18154 | # Find Tcl private headers | |
18155 | if test x"${intree}" = xno; then | |
18156 | ||
81ecdfbb RW |
18157 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
18158 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
18159 | private_dir="" |
18160 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
18161 | if test -f ${dir}/tclInt.h ; then | |
18162 | private_dir=${dir} | |
18163 | fi | |
18164 | ||
18165 | if test x"${private_dir}" = x; then | |
d0ac1c44 | 18166 | as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
18167 | else |
18168 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
18169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
18170 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
18171 | fi |
18172 | ||
18173 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
18174 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
18175 | TCL_DEPS="" | |
18176 | else | |
18177 | # If building tcl in the same src tree, private headers | |
18178 | # are not needed, but we need to be sure to use the right | |
18179 | # headers library | |
18180 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
18181 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
18182 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
18183 | fi | |
18184 | ||
18185 | ||
18186 | ||
18187 | ||
18188 | ||
81ecdfbb RW |
18189 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18190 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 18191 | |
5062cc19 | 18192 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
18193 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
18194 | $as_echo "loading" >&6; } | |
5062cc19 | 18195 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 18196 | else |
81ecdfbb RW |
18197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
18198 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 18199 | fi |
bec39cab | 18200 | |
5062cc19 KS |
18201 | # eval is required to do the TK_DBGX substitution |
18202 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
18203 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
18204 | ||
18205 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
18206 | # then set the common variable name to the value of the build variables. | |
18207 | # For example, the variable TK_LIB_SPEC will be set to the value | |
18208 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
18209 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
18210 | # installed and uninstalled version of Tcl. | |
85541719 | 18211 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
18212 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
18213 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
18214 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
18215 | elif test "`uname -s`" = "Darwin"; then | |
18216 | # If Tk was built as a framework, attempt to use the libraries | |
18217 | # from the framework at the given location so that linking works | |
a68ffae9 | 18218 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
18219 | case ${TK_DEFS} in |
18220 | *TK_FRAMEWORK*) | |
85541719 | 18221 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
18222 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
18223 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
18224 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
18225 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
18226 | break | |
18227 | fi | |
18228 | done | |
18229 | fi | |
85541719 | 18230 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
18231 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
18232 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
18233 | fi | |
18234 | ;; | |
18235 | esac | |
3fc11d3e JM |
18236 | fi |
18237 | ||
5062cc19 KS |
18238 | # eval is required to do the TK_DBGX substitution |
18239 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
18240 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
18241 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
18242 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 18243 | |
3fc11d3e JM |
18244 | |
18245 | ||
bec39cab AC |
18246 | |
18247 | ||
18248 | ||
18249 | ||
18250 | ||
18251 | ||
18252 | ||
3fc11d3e | 18253 | |
3fc11d3e | 18254 | |
bec39cab | 18255 | |
bec39cab | 18256 | |
85541719 DE |
18257 | # Check for in-tree Tk |
18258 | intree="no" | |
18259 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
18260 | intree="yes" | |
18261 | fi | |
3fc11d3e | 18262 | |
85541719 DE |
18263 | # Find Tk private headers |
18264 | if test x"${intree}" = xno; then | |
3fc11d3e | 18265 | |
81ecdfbb RW |
18266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
18267 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
18268 | private_dir="" |
18269 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
18270 | if test -f ${dir}/tkInt.h; then | |
18271 | private_dir=${dir} | |
3fc11d3e | 18272 | fi |
bec39cab | 18273 | |
5062cc19 | 18274 | if test x"${private_dir}" = x; then |
d0ac1c44 | 18275 | as_fn_error $? "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 18276 | else |
5062cc19 | 18277 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
18278 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
18279 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 18280 | fi |
3fc11d3e | 18281 | |
85541719 DE |
18282 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
18283 | TK_LIBRARY=${TK_LIB_SPEC} | |
18284 | TK_DEPS="" | |
18285 | else | |
18286 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
18287 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
18288 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
18289 | fi | |
3fc11d3e JM |
18290 | |
18291 | ||
3fc11d3e JM |
18292 | |
18293 | ||
3fc11d3e | 18294 | |
85541719 | 18295 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 18296 | |
85541719 DE |
18297 | # Include some libraries that Tcl and Tk want. |
18298 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
18299 | # Yes, the ordering seems wrong here. But it isn't. | |
18300 | # TK_LIBS is the list of libraries that need to be linked | |
18301 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
18302 | # were in LIBS then any link tests after this point would | |
18303 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
18304 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 18305 | |
85541719 DE |
18306 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
18307 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
18308 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
18309 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
18310 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
18311 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
18312 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 18313 | |
0ad6b8ee | 18314 | if test x"$gdb_cv_os_cygwin" = xyes; then |
85541719 DE |
18315 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" |
18316 | WIN32LDAPP="-Wl,--subsystem,console" | |
18317 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 18318 | fi |
ffc6a242 | 18319 | |
8043d65b | 18320 | subdirs="$subdirs gdbtk" |
3ace7edb | 18321 | |
85541719 | 18322 | fi |
3fc11d3e JM |
18323 | fi |
18324 | ||
18325 | ||
18326 | ||
18327 | ||
18328 | ||
18329 | ||
18330 | ||
18331 | ||
81ecdfbb RW |
18332 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
18333 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 18334 | |
c906108c | 18335 | |
81ecdfbb RW |
18336 | # Check whether --with-x was given. |
18337 | if test "${with_x+set}" = set; then : | |
18338 | withval=$with_x; | |
18339 | fi | |
c906108c SS |
18340 | |
18341 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
18342 | if test "x$with_x" = xno; then | |
18343 | # The user explicitly disabled X. | |
18344 | have_x=disabled | |
18345 | else | |
81ecdfbb | 18346 | case $x_includes,$x_libraries in #( |
d0ac1c44 SM |
18347 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
18348 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
81ecdfbb | 18349 | $as_echo_n "(cached) " >&6 |
c906108c SS |
18350 | else |
18351 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 18352 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 18353 | rm -f -r conftest.dir |
bec39cab AC |
18354 | if mkdir conftest.dir; then |
18355 | cd conftest.dir | |
bec39cab | 18356 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
18357 | incroot: |
18358 | @echo incroot='${INCROOT}' | |
18359 | usrlibdir: | |
18360 | @echo usrlibdir='${USRLIBDIR}' | |
18361 | libdir: | |
18362 | @echo libdir='${LIBDIR}' | |
18363 | _ACEOF | |
18364 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
d0ac1c44 | 18365 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
81ecdfbb RW |
18366 | for ac_var in incroot usrlibdir libdir; do |
18367 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
18368 | done | |
c906108c | 18369 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
18370 | for ac_extension in a so sl dylib la dll; do |
18371 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
18372 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 18373 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
18374 | fi |
18375 | done | |
18376 | # Screen out bogus values from the imake configuration. They are | |
18377 | # bogus both because they are the default anyway, and because | |
18378 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 18379 | case $ac_im_incroot in |
81ecdfbb | 18380 | /usr/include) ac_x_includes= ;; |
bec39cab | 18381 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 18382 | esac |
bec39cab | 18383 | case $ac_im_usrlibdir in |
81ecdfbb | 18384 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 18385 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
18386 | esac |
18387 | fi | |
18388 | cd .. | |
81ecdfbb | 18389 | rm -f -r conftest.dir |
c906108c SS |
18390 | fi |
18391 | ||
bec39cab AC |
18392 | # Standard set of common directories for X headers. |
18393 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
18394 | ac_x_header_dirs=' | |
18395 | /usr/X11/include | |
81ecdfbb | 18396 | /usr/X11R7/include |
bec39cab AC |
18397 | /usr/X11R6/include |
18398 | /usr/X11R5/include | |
18399 | /usr/X11R4/include | |
18400 | ||
18401 | /usr/include/X11 | |
81ecdfbb | 18402 | /usr/include/X11R7 |
bec39cab AC |
18403 | /usr/include/X11R6 |
18404 | /usr/include/X11R5 | |
18405 | /usr/include/X11R4 | |
18406 | ||
18407 | /usr/local/X11/include | |
81ecdfbb | 18408 | /usr/local/X11R7/include |
bec39cab AC |
18409 | /usr/local/X11R6/include |
18410 | /usr/local/X11R5/include | |
18411 | /usr/local/X11R4/include | |
18412 | ||
18413 | /usr/local/include/X11 | |
81ecdfbb | 18414 | /usr/local/include/X11R7 |
bec39cab AC |
18415 | /usr/local/include/X11R6 |
18416 | /usr/local/include/X11R5 | |
18417 | /usr/local/include/X11R4 | |
18418 | ||
18419 | /usr/X386/include | |
18420 | /usr/x386/include | |
18421 | /usr/XFree86/include/X11 | |
18422 | ||
18423 | /usr/include | |
18424 | /usr/local/include | |
18425 | /usr/unsupported/include | |
18426 | /usr/athena/include | |
18427 | /usr/local/x11r5/include | |
18428 | /usr/lpp/Xamples/include | |
18429 | ||
18430 | /usr/openwin/include | |
18431 | /usr/openwin/share/include' | |
18432 | ||
18433 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 18434 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 18435 | # First, try using that file with no special directory specified. |
81ecdfbb | 18436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 18437 | /* end confdefs.h. */ |
81ecdfbb | 18438 | #include <X11/Xlib.h> |
bec39cab | 18439 | _ACEOF |
81ecdfbb | 18440 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
18441 | # We can compile using X headers with no special include directory. |
18442 | ac_x_includes= | |
18443 | else | |
bec39cab | 18444 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 18445 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
18446 | ac_x_includes=$ac_dir |
18447 | break | |
18448 | fi | |
18449 | done | |
c906108c | 18450 | fi |
d0ac1c44 | 18451 | rm -f conftest.err conftest.i conftest.$ac_ext |
bec39cab | 18452 | fi # $ac_x_includes = no |
c906108c | 18453 | |
bec39cab | 18454 | if test "$ac_x_libraries" = no; then |
c906108c | 18455 | # Check for the libraries. |
c906108c SS |
18456 | # See if we find them without any special options. |
18457 | # Don't add to $LIBS permanently. | |
bec39cab | 18458 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
18459 | LIBS="-lX11 $LIBS" |
18460 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 18461 | /* end confdefs.h. */ |
81ecdfbb | 18462 | #include <X11/Xlib.h> |
bec39cab AC |
18463 | int |
18464 | main () | |
18465 | { | |
81ecdfbb | 18466 | XrmInitialize () |
bec39cab AC |
18467 | ; |
18468 | return 0; | |
18469 | } | |
18470 | _ACEOF | |
81ecdfbb | 18471 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 18472 | LIBS=$ac_save_LIBS |
c906108c SS |
18473 | # We can link X programs with no special library path. |
18474 | ac_x_libraries= | |
18475 | else | |
81ecdfbb RW |
18476 | LIBS=$ac_save_LIBS |
18477 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 18478 | do |
bec39cab | 18479 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
18480 | for ac_extension in a so sl dylib la dll; do |
18481 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
18482 | ac_x_libraries=$ac_dir |
18483 | break 2 | |
18484 | fi | |
18485 | done | |
18486 | done | |
18487 | fi | |
81ecdfbb RW |
18488 | rm -f core conftest.err conftest.$ac_objext \ |
18489 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 18490 | fi # $ac_x_libraries = no |
c906108c | 18491 | |
81ecdfbb RW |
18492 | case $ac_x_includes,$ac_x_libraries in #( |
18493 | no,* | *,no | *\'*) | |
18494 | # Didn't find X, or a directory has "'" in its name. | |
18495 | ac_cv_have_x="have_x=no";; #( | |
18496 | *) | |
18497 | # Record where we found X for the cache. | |
18498 | ac_cv_have_x="have_x=yes\ | |
18499 | ac_x_includes='$ac_x_includes'\ | |
18500 | ac_x_libraries='$ac_x_libraries'" | |
18501 | esac | |
c906108c | 18502 | fi |
81ecdfbb RW |
18503 | ;; #( |
18504 | *) have_x=yes;; | |
18505 | esac | |
c906108c SS |
18506 | eval "$ac_cv_have_x" |
18507 | fi # $with_x != no | |
18508 | ||
18509 | if test "$have_x" != yes; then | |
81ecdfbb RW |
18510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
18511 | $as_echo "$have_x" >&6; } | |
c906108c SS |
18512 | no_x=yes |
18513 | else | |
18514 | # If each of the values was on the command line, it overrides each guess. | |
18515 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
18516 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
18517 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
18518 | ac_cv_have_x="have_x=yes\ |
18519 | ac_x_includes='$x_includes'\ | |
18520 | ac_x_libraries='$x_libraries'" | |
18521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
18522 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
18523 | fi |
18524 | ||
18525 | ||
bec39cab | 18526 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 18527 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
18528 | # This code just checks for a few cases where we'd like to ignore those |
18529 | # definitions, even when they're present in the '.mt' file. These cases | |
18530 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 18531 | # not part of the source tree. |
7a292a7a | 18532 | # |
81ecdfbb RW |
18533 | # Check whether --enable-sim was given. |
18534 | if test "${enable_sim+set}" = set; then : | |
18535 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
18536 | echo "enableval = ${enableval}"; |
18537 | case "${enableval}" in | |
18538 | yes) ignore_sim=false ;; | |
18539 | no) ignore_sim=true ;; | |
18540 | *) ignore_sim=false ;; | |
18541 | esac | |
18542 | else | |
18543 | ignore_sim=false | |
81ecdfbb RW |
18544 | fi |
18545 | ||
7a292a7a SS |
18546 | |
18547 | if test ! -d "${srcdir}/../sim"; then | |
18548 | ignore_sim=true | |
18549 | fi | |
18550 | ||
9b624dbe UW |
18551 | SIM= |
18552 | SIM_OBS= | |
18553 | if test "${ignore_sim}" = "false"; then | |
18554 | if test x"${gdb_sim}" != x ; then | |
18555 | SIM="${gdb_sim}" | |
18556 | SIM_OBS="remote-sim.o" | |
60ca704f | 18557 | |
81ecdfbb | 18558 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 18559 | |
976102cd PA |
18560 | |
18561 | # Some tdep code should only be compiled in when the ppc sim is | |
18562 | # built. PR sim/13418. | |
18563 | case $target in | |
18564 | powerpc*-*-*) | |
18565 | ||
18566 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h | |
18567 | ||
18568 | ;; | |
18569 | esac | |
9b624dbe | 18570 | fi |
7a292a7a SS |
18571 | fi |
18572 | ||
18573 | ||
18574 | ||
c906108c SS |
18575 | |
18576 | ||
18577 | ||
18578 | ||
18579 | ||
18580 | ||
dfcd3bfb | 18581 | |
e56ac5c3 AC |
18582 | |
18583 | ||
b3a90332 AC |
18584 | |
18585 | ||
c35f4ffc | 18586 | # List of host floatformats. |
bec39cab AC |
18587 | |
18588 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18589 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 18590 | _ACEOF |
c35f4ffc | 18591 | |
bec39cab AC |
18592 | |
18593 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 18594 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
18595 | _ACEOF |
18596 | ||
c35f4ffc | 18597 | |
bec39cab | 18598 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 18599 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 18600 | _ACEOF |
c35f4ffc AC |
18601 | |
18602 | ||
c906108c SS |
18603 | # target_subdir is used by the testsuite to find the target libraries. |
18604 | target_subdir= | |
18605 | if test "${host}" != "${target}"; then | |
18606 | target_subdir="${target_alias}/" | |
18607 | fi | |
18608 | ||
18609 | ||
21ea5acd | 18610 | # Import nat definitions. |
2b351b19 | 18611 | nat_makefile_frag=/dev/null |
771b4502 | 18612 | if test "${gdb_native}" = "yes"; then |
21ea5acd SDJ |
18613 | . ${srcdir}/configure.nat |
18614 | nativefile=$NAT_FILE | |
c906108c | 18615 | fi |
c906108c | 18616 | |
c906108c SS |
18617 | |
18618 | ||
18619 | ||
21ea5acd SDJ |
18620 | |
18621 | ||
18622 | ||
18623 | ||
18624 | ||
c906108c SS |
18625 | |
18626 | ||
b00a8037 | 18627 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
18628 | |
18629 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 18630 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 18631 | _ACEOF |
b00a8037 DJ |
18632 | |
18633 | fi | |
18634 | ||
393fd4c3 YQ |
18635 | # Check for babeltrace and babeltrace-ctf |
18636 | ||
18637 | # Check whether --with-babeltrace was given. | |
18638 | if test "${with_babeltrace+set}" = set; then : | |
18639 | withval=$with_babeltrace; | |
18640 | else | |
18641 | with_babeltrace=auto | |
18642 | fi | |
18643 | ||
18644 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
18645 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
18646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
18647 | $as_echo "$with_babeltrace" >&6; } | |
18648 | ||
18649 | if test "x$with_babeltrace" = "xno"; then | |
18650 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
18651 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
18652 | else | |
18653 | # Append -Werror to CFLAGS so that configure can catch the warning | |
18654 | # "assignment from incompatible pointer type", which is related to | |
18655 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
18656 | # in GDB, while babeltrace 1.0.3 is broken. | |
18657 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
18658 | # safe to save and restore CFLAGS here. | |
18659 | saved_CFLAGS=$CFLAGS | |
18660 | CFLAGS="$CFLAGS -Werror" | |
18661 | ||
18662 | ||
18663 | ||
18664 | ||
18665 | ||
18666 | ||
18667 | ||
18668 | ||
18669 | use_additional=yes | |
18670 | ||
18671 | acl_save_prefix="$prefix" | |
18672 | prefix="$acl_final_prefix" | |
18673 | acl_save_exec_prefix="$exec_prefix" | |
18674 | exec_prefix="$acl_final_exec_prefix" | |
18675 | ||
18676 | eval additional_includedir=\"$includedir\" | |
18677 | eval additional_libdir=\"$libdir\" | |
18678 | ||
18679 | exec_prefix="$acl_save_exec_prefix" | |
18680 | prefix="$acl_save_prefix" | |
18681 | ||
18682 | ||
18683 | # Check whether --with-libbabeltrace-prefix was given. | |
18684 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
18685 | withval=$with_libbabeltrace_prefix; | |
18686 | if test "X$withval" = "Xno"; then | |
18687 | use_additional=no | |
18688 | else | |
18689 | if test "X$withval" = "X"; then | |
18690 | ||
18691 | acl_save_prefix="$prefix" | |
18692 | prefix="$acl_final_prefix" | |
18693 | acl_save_exec_prefix="$exec_prefix" | |
18694 | exec_prefix="$acl_final_exec_prefix" | |
18695 | ||
18696 | eval additional_includedir=\"$includedir\" | |
18697 | eval additional_libdir=\"$libdir\" | |
18698 | ||
18699 | exec_prefix="$acl_save_exec_prefix" | |
18700 | prefix="$acl_save_prefix" | |
18701 | ||
18702 | else | |
18703 | additional_includedir="$withval/include" | |
18704 | additional_libdir="$withval/lib" | |
18705 | fi | |
18706 | fi | |
18707 | ||
18708 | fi | |
18709 | ||
9f1528a1 AB |
18710 | |
18711 | # Check whether --with-libbabeltrace-type was given. | |
18712 | if test "${with_libbabeltrace_type+set}" = set; then : | |
18713 | withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval | |
18714 | else | |
18715 | with_libbabeltrace_type=auto | |
18716 | fi | |
18717 | ||
18718 | lib_type=`eval echo \$with_libbabeltrace_type` | |
18719 | ||
393fd4c3 YQ |
18720 | LIBBABELTRACE= |
18721 | LTLIBBABELTRACE= | |
18722 | INCBABELTRACE= | |
18723 | rpathdirs= | |
18724 | ltrpathdirs= | |
18725 | names_already_handled= | |
18726 | names_next_round='babeltrace babeltrace-ctf' | |
18727 | while test -n "$names_next_round"; do | |
18728 | names_this_round="$names_next_round" | |
18729 | names_next_round= | |
18730 | for name in $names_this_round; do | |
18731 | already_handled= | |
18732 | for n in $names_already_handled; do | |
18733 | if test "$n" = "$name"; then | |
18734 | already_handled=yes | |
18735 | break | |
18736 | fi | |
18737 | done | |
18738 | if test -z "$already_handled"; then | |
18739 | names_already_handled="$names_already_handled $name" | |
18740 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
18741 | eval value=\"\$HAVE_LIB$uppername\" | |
18742 | if test -n "$value"; then | |
18743 | if test "$value" = yes; then | |
18744 | eval value=\"\$LIB$uppername\" | |
18745 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
18746 | eval value=\"\$LTLIB$uppername\" | |
18747 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
18748 | else | |
18749 | : | |
18750 | fi | |
18751 | else | |
18752 | found_dir= | |
18753 | found_la= | |
18754 | found_so= | |
18755 | found_a= | |
18756 | if test $use_additional = yes; then | |
9f1528a1 | 18757 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18758 | found_dir="$additional_libdir" |
18759 | found_so="$additional_libdir/lib$name.$shlibext" | |
18760 | if test -f "$additional_libdir/lib$name.la"; then | |
18761 | found_la="$additional_libdir/lib$name.la" | |
18762 | fi | |
9f1528a1 | 18763 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18764 | if test -f "$additional_libdir/lib$name.$libext"; then |
18765 | found_dir="$additional_libdir" | |
18766 | found_a="$additional_libdir/lib$name.$libext" | |
18767 | if test -f "$additional_libdir/lib$name.la"; then | |
18768 | found_la="$additional_libdir/lib$name.la" | |
18769 | fi | |
18770 | fi | |
18771 | fi | |
18772 | fi | |
18773 | if test "X$found_dir" = "X"; then | |
18774 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18775 | ||
18776 | acl_save_prefix="$prefix" | |
18777 | prefix="$acl_final_prefix" | |
18778 | acl_save_exec_prefix="$exec_prefix" | |
18779 | exec_prefix="$acl_final_exec_prefix" | |
18780 | eval x=\"$x\" | |
18781 | exec_prefix="$acl_save_exec_prefix" | |
18782 | prefix="$acl_save_prefix" | |
18783 | ||
18784 | case "$x" in | |
18785 | -L*) | |
18786 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 18787 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
393fd4c3 YQ |
18788 | found_dir="$dir" |
18789 | found_so="$dir/lib$name.$shlibext" | |
18790 | if test -f "$dir/lib$name.la"; then | |
18791 | found_la="$dir/lib$name.la" | |
18792 | fi | |
9f1528a1 | 18793 | elif test x$lib_type != xshared; then |
393fd4c3 YQ |
18794 | if test -f "$dir/lib$name.$libext"; then |
18795 | found_dir="$dir" | |
18796 | found_a="$dir/lib$name.$libext" | |
18797 | if test -f "$dir/lib$name.la"; then | |
18798 | found_la="$dir/lib$name.la" | |
18799 | fi | |
18800 | fi | |
18801 | fi | |
18802 | ;; | |
18803 | esac | |
18804 | if test "X$found_dir" != "X"; then | |
18805 | break | |
18806 | fi | |
18807 | done | |
18808 | fi | |
18809 | if test "X$found_dir" != "X"; then | |
18810 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
18811 | if test "X$found_so" != "X"; then | |
18812 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
18813 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18814 | else | |
18815 | haveit= | |
18816 | for x in $ltrpathdirs; do | |
18817 | if test "X$x" = "X$found_dir"; then | |
18818 | haveit=yes | |
18819 | break | |
18820 | fi | |
18821 | done | |
18822 | if test -z "$haveit"; then | |
18823 | ltrpathdirs="$ltrpathdirs $found_dir" | |
18824 | fi | |
18825 | if test "$hardcode_direct" = yes; then | |
18826 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18827 | else | |
18828 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
18829 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18830 | haveit= | |
18831 | for x in $rpathdirs; do | |
18832 | if test "X$x" = "X$found_dir"; then | |
18833 | haveit=yes | |
18834 | break | |
18835 | fi | |
18836 | done | |
18837 | if test -z "$haveit"; then | |
18838 | rpathdirs="$rpathdirs $found_dir" | |
18839 | fi | |
18840 | else | |
18841 | haveit= | |
18842 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18843 | ||
18844 | acl_save_prefix="$prefix" | |
18845 | prefix="$acl_final_prefix" | |
18846 | acl_save_exec_prefix="$exec_prefix" | |
18847 | exec_prefix="$acl_final_exec_prefix" | |
18848 | eval x=\"$x\" | |
18849 | exec_prefix="$acl_save_exec_prefix" | |
18850 | prefix="$acl_save_prefix" | |
18851 | ||
18852 | if test "X$x" = "X-L$found_dir"; then | |
18853 | haveit=yes | |
18854 | break | |
18855 | fi | |
18856 | done | |
18857 | if test -z "$haveit"; then | |
18858 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
18859 | fi | |
18860 | if test "$hardcode_minus_L" != no; then | |
18861 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
18862 | else | |
18863 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
18864 | fi | |
18865 | fi | |
18866 | fi | |
18867 | fi | |
18868 | else | |
18869 | if test "X$found_a" != "X"; then | |
18870 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
18871 | else | |
18872 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
18873 | fi | |
18874 | fi | |
18875 | additional_includedir= | |
18876 | case "$found_dir" in | |
18877 | */lib | */lib/) | |
18878 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
18879 | additional_includedir="$basedir/include" | |
18880 | ;; | |
18881 | esac | |
18882 | if test "X$additional_includedir" != "X"; then | |
18883 | if test "X$additional_includedir" != "X/usr/include"; then | |
18884 | haveit= | |
18885 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
18886 | if test -n "$GCC"; then | |
18887 | case $host_os in | |
18888 | linux*) haveit=yes;; | |
18889 | esac | |
18890 | fi | |
18891 | fi | |
18892 | if test -z "$haveit"; then | |
18893 | for x in $CPPFLAGS $INCBABELTRACE; do | |
18894 | ||
18895 | acl_save_prefix="$prefix" | |
18896 | prefix="$acl_final_prefix" | |
18897 | acl_save_exec_prefix="$exec_prefix" | |
18898 | exec_prefix="$acl_final_exec_prefix" | |
18899 | eval x=\"$x\" | |
18900 | exec_prefix="$acl_save_exec_prefix" | |
18901 | prefix="$acl_save_prefix" | |
18902 | ||
18903 | if test "X$x" = "X-I$additional_includedir"; then | |
18904 | haveit=yes | |
18905 | break | |
18906 | fi | |
18907 | done | |
18908 | if test -z "$haveit"; then | |
18909 | if test -d "$additional_includedir"; then | |
18910 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
18911 | fi | |
18912 | fi | |
18913 | fi | |
18914 | fi | |
18915 | fi | |
18916 | if test -n "$found_la"; then | |
18917 | save_libdir="$libdir" | |
18918 | case "$found_la" in | |
18919 | */* | *\\*) . "$found_la" ;; | |
18920 | *) . "./$found_la" ;; | |
18921 | esac | |
18922 | libdir="$save_libdir" | |
18923 | for dep in $dependency_libs; do | |
18924 | case "$dep" in | |
18925 | -L*) | |
18926 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
18927 | if test "X$additional_libdir" != "X/usr/lib"; then | |
18928 | haveit= | |
18929 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
18930 | if test -n "$GCC"; then | |
18931 | case $host_os in | |
18932 | linux*) haveit=yes;; | |
18933 | esac | |
18934 | fi | |
18935 | fi | |
18936 | if test -z "$haveit"; then | |
18937 | haveit= | |
18938 | for x in $LDFLAGS $LIBBABELTRACE; do | |
18939 | ||
18940 | acl_save_prefix="$prefix" | |
18941 | prefix="$acl_final_prefix" | |
18942 | acl_save_exec_prefix="$exec_prefix" | |
18943 | exec_prefix="$acl_final_exec_prefix" | |
18944 | eval x=\"$x\" | |
18945 | exec_prefix="$acl_save_exec_prefix" | |
18946 | prefix="$acl_save_prefix" | |
18947 | ||
18948 | if test "X$x" = "X-L$additional_libdir"; then | |
18949 | haveit=yes | |
18950 | break | |
18951 | fi | |
18952 | done | |
18953 | if test -z "$haveit"; then | |
18954 | if test -d "$additional_libdir"; then | |
18955 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
18956 | fi | |
18957 | fi | |
18958 | haveit= | |
18959 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
18960 | ||
18961 | acl_save_prefix="$prefix" | |
18962 | prefix="$acl_final_prefix" | |
18963 | acl_save_exec_prefix="$exec_prefix" | |
18964 | exec_prefix="$acl_final_exec_prefix" | |
18965 | eval x=\"$x\" | |
18966 | exec_prefix="$acl_save_exec_prefix" | |
18967 | prefix="$acl_save_prefix" | |
18968 | ||
18969 | if test "X$x" = "X-L$additional_libdir"; then | |
18970 | haveit=yes | |
18971 | break | |
18972 | fi | |
18973 | done | |
18974 | if test -z "$haveit"; then | |
18975 | if test -d "$additional_libdir"; then | |
18976 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
18977 | fi | |
18978 | fi | |
18979 | fi | |
18980 | fi | |
18981 | ;; | |
18982 | -R*) | |
18983 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
18984 | if test "$enable_rpath" != no; then | |
18985 | haveit= | |
18986 | for x in $rpathdirs; 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 | rpathdirs="$rpathdirs $dir" | |
18994 | fi | |
18995 | haveit= | |
18996 | for x in $ltrpathdirs; do | |
18997 | if test "X$x" = "X$dir"; then | |
18998 | haveit=yes | |
18999 | break | |
19000 | fi | |
19001 | done | |
19002 | if test -z "$haveit"; then | |
19003 | ltrpathdirs="$ltrpathdirs $dir" | |
19004 | fi | |
19005 | fi | |
19006 | ;; | |
19007 | -l*) | |
19008 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
19009 | ;; | |
19010 | *.la) | |
19011 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19012 | ;; | |
19013 | *) | |
19014 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
19015 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
19016 | ;; | |
19017 | esac | |
19018 | done | |
19019 | fi | |
19020 | else | |
9f1528a1 AB |
19021 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19022 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
19023 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
19024 | else | |
19025 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext" | |
19026 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext" | |
19027 | fi | |
393fd4c3 YQ |
19028 | fi |
19029 | fi | |
19030 | fi | |
19031 | done | |
19032 | done | |
19033 | if test "X$rpathdirs" != "X"; then | |
19034 | if test -n "$hardcode_libdir_separator"; then | |
19035 | alldirs= | |
19036 | for found_dir in $rpathdirs; do | |
19037 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19038 | done | |
19039 | acl_save_libdir="$libdir" | |
19040 | libdir="$alldirs" | |
19041 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19042 | libdir="$acl_save_libdir" | |
19043 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
19044 | else | |
19045 | for found_dir in $rpathdirs; do | |
19046 | acl_save_libdir="$libdir" | |
19047 | libdir="$found_dir" | |
19048 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19049 | libdir="$acl_save_libdir" | |
19050 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
19051 | done | |
19052 | fi | |
19053 | fi | |
19054 | if test "X$ltrpathdirs" != "X"; then | |
19055 | for found_dir in $ltrpathdirs; do | |
19056 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
19057 | done | |
19058 | fi | |
19059 | ||
19060 | ||
19061 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19062 | ||
19063 | for element in $INCBABELTRACE; do | |
19064 | haveit= | |
19065 | for x in $CPPFLAGS; do | |
19066 | ||
19067 | acl_save_prefix="$prefix" | |
19068 | prefix="$acl_final_prefix" | |
19069 | acl_save_exec_prefix="$exec_prefix" | |
19070 | exec_prefix="$acl_final_exec_prefix" | |
19071 | eval x=\"$x\" | |
19072 | exec_prefix="$acl_save_exec_prefix" | |
19073 | prefix="$acl_save_prefix" | |
19074 | ||
19075 | if test "X$x" = "X$element"; then | |
19076 | haveit=yes | |
19077 | break | |
19078 | fi | |
19079 | done | |
19080 | if test -z "$haveit"; then | |
19081 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19082 | fi | |
19083 | done | |
19084 | ||
19085 | ||
19086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
19087 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
d0ac1c44 | 19088 | if ${ac_cv_libbabeltrace+:} false; then : |
393fd4c3 YQ |
19089 | $as_echo_n "(cached) " >&6 |
19090 | else | |
19091 | ||
19092 | ac_save_LIBS="$LIBS" | |
19093 | LIBS="$LIBS $LIBBABELTRACE" | |
19094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19095 | /* end confdefs.h. */ | |
19096 | #include <babeltrace/babeltrace.h> | |
19097 | #include <babeltrace/ctf/events.h> | |
19098 | #include <babeltrace/ctf/iterator.h> | |
19099 | int | |
19100 | main () | |
19101 | { | |
19102 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
19103 | struct bt_ctf_event *event = NULL; | |
19104 | const struct bt_definition *scope; | |
19105 | ||
13cdc2af | 19106 | pos->type = BT_SEEK_BEGIN; |
65c749e7 | 19107 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
393fd4c3 YQ |
19108 | scope = bt_ctf_get_top_level_scope (event, |
19109 | BT_STREAM_EVENT_HEADER); | |
19110 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
19111 | ||
19112 | ; | |
19113 | return 0; | |
19114 | } | |
19115 | _ACEOF | |
19116 | if ac_fn_c_try_link "$LINENO"; then : | |
19117 | ac_cv_libbabeltrace=yes | |
19118 | else | |
19119 | ac_cv_libbabeltrace=no | |
19120 | fi | |
19121 | rm -f core conftest.err conftest.$ac_objext \ | |
19122 | conftest$ac_exeext conftest.$ac_ext | |
19123 | LIBS="$ac_save_LIBS" | |
19124 | ||
19125 | fi | |
19126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
19127 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
19128 | if test "$ac_cv_libbabeltrace" = yes; then | |
19129 | HAVE_LIBBABELTRACE=yes | |
19130 | ||
19131 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
19132 | ||
19133 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
19134 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
19135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
19136 | $as_echo "$LIBBABELTRACE" >&6; } | |
19137 | else | |
19138 | HAVE_LIBBABELTRACE=no | |
19139 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19140 | LIBBABELTRACE= | |
19141 | LTLIBBABELTRACE= | |
19142 | fi | |
19143 | ||
19144 | ||
19145 | ||
19146 | ||
19147 | ||
19148 | ||
19149 | CFLAGS=$saved_CFLAGS | |
19150 | ||
19151 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
19152 | if test "$with_babeltrace" = yes; then | |
d0ac1c44 | 19153 | as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 |
393fd4c3 YQ |
19154 | else |
19155 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
19156 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
19157 | fi | |
19158 | fi | |
19159 | fi | |
19160 | ||
ccb1ba62 CB |
19161 | # Check for xxhash |
19162 | ||
19163 | # Check whether --with-xxhash was given. | |
19164 | if test "${with_xxhash+set}" = set; then : | |
19165 | withval=$with_xxhash; | |
19166 | else | |
19167 | with_xxhash=auto | |
19168 | fi | |
19169 | ||
19170 | ||
1776e3e5 NA |
19171 | # Check whether --enable-libctf was given. |
19172 | if test "${enable_libctf+set}" = set; then : | |
19173 | enableval=$enable_libctf; | |
19174 | case "$enableval" in | |
19175 | yes|no) ;; | |
19176 | *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;; | |
19177 | esac | |
19178 | ||
19179 | else | |
19180 | enable_libctf=yes | |
19181 | fi | |
19182 | ||
19183 | ||
19184 | if test x${enable_static} = xno; then | |
19185 | LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so" | |
19186 | CTF_DEPS="../libctf/.libs/libctf.so" | |
19187 | else | |
19188 | LIBCTF="../libctf/.libs/libctf.a" | |
19189 | CTF_DEPS="$LIBCTF" | |
19190 | fi | |
19191 | if test "${enable_libctf}" = yes; then | |
19192 | ||
19193 | $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h | |
19194 | ||
19195 | else | |
19196 | LIBCTF= | |
19197 | CTF_DEPS= | |
19198 | fi | |
19199 | ||
19200 | ||
19201 | ||
1776e3e5 NA |
19202 | # If nativefile (NAT_FILE) is not set in configure.nat, we link to an |
19203 | # empty version. | |
19204 | ||
ccb1ba62 CB |
19205 | if test "x$with_xxhash" != "xno"; then |
19206 | ||
19207 | ||
19208 | ||
19209 | ||
19210 | ||
19211 | ||
19212 | ||
19213 | ||
19214 | use_additional=yes | |
19215 | ||
19216 | acl_save_prefix="$prefix" | |
19217 | prefix="$acl_final_prefix" | |
19218 | acl_save_exec_prefix="$exec_prefix" | |
19219 | exec_prefix="$acl_final_exec_prefix" | |
19220 | ||
19221 | eval additional_includedir=\"$includedir\" | |
19222 | eval additional_libdir=\"$libdir\" | |
19223 | ||
19224 | exec_prefix="$acl_save_exec_prefix" | |
19225 | prefix="$acl_save_prefix" | |
19226 | ||
19227 | ||
19228 | # Check whether --with-libxxhash-prefix was given. | |
19229 | if test "${with_libxxhash_prefix+set}" = set; then : | |
19230 | withval=$with_libxxhash_prefix; | |
19231 | if test "X$withval" = "Xno"; then | |
19232 | use_additional=no | |
19233 | else | |
19234 | if test "X$withval" = "X"; then | |
19235 | ||
19236 | acl_save_prefix="$prefix" | |
19237 | prefix="$acl_final_prefix" | |
19238 | acl_save_exec_prefix="$exec_prefix" | |
19239 | exec_prefix="$acl_final_exec_prefix" | |
19240 | ||
19241 | eval additional_includedir=\"$includedir\" | |
19242 | eval additional_libdir=\"$libdir\" | |
19243 | ||
19244 | exec_prefix="$acl_save_exec_prefix" | |
19245 | prefix="$acl_save_prefix" | |
19246 | ||
19247 | else | |
19248 | additional_includedir="$withval/include" | |
19249 | additional_libdir="$withval/lib" | |
19250 | fi | |
19251 | fi | |
19252 | ||
19253 | fi | |
19254 | ||
9f1528a1 AB |
19255 | |
19256 | # Check whether --with-libxxhash-type was given. | |
19257 | if test "${with_libxxhash_type+set}" = set; then : | |
19258 | withval=$with_libxxhash_type; with_libxxhash_type=$withval | |
19259 | else | |
19260 | with_libxxhash_type=auto | |
19261 | fi | |
19262 | ||
19263 | lib_type=`eval echo \$with_libxxhash_type` | |
19264 | ||
ccb1ba62 CB |
19265 | LIBXXHASH= |
19266 | LTLIBXXHASH= | |
19267 | INCXXHASH= | |
19268 | rpathdirs= | |
19269 | ltrpathdirs= | |
19270 | names_already_handled= | |
19271 | names_next_round='xxhash ' | |
19272 | while test -n "$names_next_round"; do | |
19273 | names_this_round="$names_next_round" | |
19274 | names_next_round= | |
19275 | for name in $names_this_round; do | |
19276 | already_handled= | |
19277 | for n in $names_already_handled; do | |
19278 | if test "$n" = "$name"; then | |
19279 | already_handled=yes | |
19280 | break | |
19281 | fi | |
19282 | done | |
19283 | if test -z "$already_handled"; then | |
19284 | names_already_handled="$names_already_handled $name" | |
19285 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
19286 | eval value=\"\$HAVE_LIB$uppername\" | |
19287 | if test -n "$value"; then | |
19288 | if test "$value" = yes; then | |
19289 | eval value=\"\$LIB$uppername\" | |
19290 | test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" | |
19291 | eval value=\"\$LTLIB$uppername\" | |
19292 | test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" | |
19293 | else | |
19294 | : | |
19295 | fi | |
19296 | else | |
19297 | found_dir= | |
19298 | found_la= | |
19299 | found_so= | |
19300 | found_a= | |
19301 | if test $use_additional = yes; then | |
9f1528a1 | 19302 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
19303 | found_dir="$additional_libdir" |
19304 | found_so="$additional_libdir/lib$name.$shlibext" | |
19305 | if test -f "$additional_libdir/lib$name.la"; then | |
19306 | found_la="$additional_libdir/lib$name.la" | |
19307 | fi | |
9f1528a1 | 19308 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
19309 | if test -f "$additional_libdir/lib$name.$libext"; then |
19310 | found_dir="$additional_libdir" | |
19311 | found_a="$additional_libdir/lib$name.$libext" | |
19312 | if test -f "$additional_libdir/lib$name.la"; then | |
19313 | found_la="$additional_libdir/lib$name.la" | |
19314 | fi | |
19315 | fi | |
19316 | fi | |
19317 | fi | |
19318 | if test "X$found_dir" = "X"; then | |
19319 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19320 | ||
19321 | acl_save_prefix="$prefix" | |
19322 | prefix="$acl_final_prefix" | |
19323 | acl_save_exec_prefix="$exec_prefix" | |
19324 | exec_prefix="$acl_final_exec_prefix" | |
19325 | eval x=\"$x\" | |
19326 | exec_prefix="$acl_save_exec_prefix" | |
19327 | prefix="$acl_save_prefix" | |
19328 | ||
19329 | case "$x" in | |
19330 | -L*) | |
19331 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
9f1528a1 | 19332 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
ccb1ba62 CB |
19333 | found_dir="$dir" |
19334 | found_so="$dir/lib$name.$shlibext" | |
19335 | if test -f "$dir/lib$name.la"; then | |
19336 | found_la="$dir/lib$name.la" | |
19337 | fi | |
9f1528a1 | 19338 | elif test x$lib_type != xshared; then |
ccb1ba62 CB |
19339 | if test -f "$dir/lib$name.$libext"; then |
19340 | found_dir="$dir" | |
19341 | found_a="$dir/lib$name.$libext" | |
19342 | if test -f "$dir/lib$name.la"; then | |
19343 | found_la="$dir/lib$name.la" | |
19344 | fi | |
19345 | fi | |
19346 | fi | |
19347 | ;; | |
19348 | esac | |
19349 | if test "X$found_dir" != "X"; then | |
19350 | break | |
19351 | fi | |
19352 | done | |
19353 | fi | |
19354 | if test "X$found_dir" != "X"; then | |
19355 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name" | |
19356 | if test "X$found_so" != "X"; then | |
19357 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
19358 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19359 | else | |
19360 | haveit= | |
19361 | for x in $ltrpathdirs; do | |
19362 | if test "X$x" = "X$found_dir"; then | |
19363 | haveit=yes | |
19364 | break | |
19365 | fi | |
19366 | done | |
19367 | if test -z "$haveit"; then | |
19368 | ltrpathdirs="$ltrpathdirs $found_dir" | |
19369 | fi | |
19370 | if test "$hardcode_direct" = yes; then | |
19371 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19372 | else | |
19373 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
19374 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19375 | haveit= | |
19376 | for x in $rpathdirs; do | |
19377 | if test "X$x" = "X$found_dir"; then | |
19378 | haveit=yes | |
19379 | break | |
19380 | fi | |
19381 | done | |
19382 | if test -z "$haveit"; then | |
19383 | rpathdirs="$rpathdirs $found_dir" | |
19384 | fi | |
19385 | else | |
19386 | haveit= | |
19387 | for x in $LDFLAGS $LIBXXHASH; do | |
19388 | ||
19389 | acl_save_prefix="$prefix" | |
19390 | prefix="$acl_final_prefix" | |
19391 | acl_save_exec_prefix="$exec_prefix" | |
19392 | exec_prefix="$acl_final_exec_prefix" | |
19393 | eval x=\"$x\" | |
19394 | exec_prefix="$acl_save_exec_prefix" | |
19395 | prefix="$acl_save_prefix" | |
19396 | ||
19397 | if test "X$x" = "X-L$found_dir"; then | |
19398 | haveit=yes | |
19399 | break | |
19400 | fi | |
19401 | done | |
19402 | if test -z "$haveit"; then | |
19403 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" | |
19404 | fi | |
19405 | if test "$hardcode_minus_L" != no; then | |
19406 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" | |
19407 | else | |
19408 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19409 | fi | |
19410 | fi | |
19411 | fi | |
19412 | fi | |
19413 | else | |
19414 | if test "X$found_a" != "X"; then | |
19415 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" | |
19416 | else | |
19417 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" | |
19418 | fi | |
19419 | fi | |
19420 | additional_includedir= | |
19421 | case "$found_dir" in | |
19422 | */lib | */lib/) | |
19423 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
19424 | additional_includedir="$basedir/include" | |
19425 | ;; | |
19426 | esac | |
19427 | if test "X$additional_includedir" != "X"; then | |
19428 | if test "X$additional_includedir" != "X/usr/include"; then | |
19429 | haveit= | |
19430 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
19431 | if test -n "$GCC"; then | |
19432 | case $host_os in | |
19433 | linux*) haveit=yes;; | |
19434 | esac | |
19435 | fi | |
19436 | fi | |
19437 | if test -z "$haveit"; then | |
19438 | for x in $CPPFLAGS $INCXXHASH; do | |
19439 | ||
19440 | acl_save_prefix="$prefix" | |
19441 | prefix="$acl_final_prefix" | |
19442 | acl_save_exec_prefix="$exec_prefix" | |
19443 | exec_prefix="$acl_final_exec_prefix" | |
19444 | eval x=\"$x\" | |
19445 | exec_prefix="$acl_save_exec_prefix" | |
19446 | prefix="$acl_save_prefix" | |
19447 | ||
19448 | if test "X$x" = "X-I$additional_includedir"; then | |
19449 | haveit=yes | |
19450 | break | |
19451 | fi | |
19452 | done | |
19453 | if test -z "$haveit"; then | |
19454 | if test -d "$additional_includedir"; then | |
19455 | INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" | |
19456 | fi | |
19457 | fi | |
19458 | fi | |
19459 | fi | |
19460 | fi | |
19461 | if test -n "$found_la"; then | |
19462 | save_libdir="$libdir" | |
19463 | case "$found_la" in | |
19464 | */* | *\\*) . "$found_la" ;; | |
19465 | *) . "./$found_la" ;; | |
19466 | esac | |
19467 | libdir="$save_libdir" | |
19468 | for dep in $dependency_libs; do | |
19469 | case "$dep" in | |
19470 | -L*) | |
19471 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
19472 | if test "X$additional_libdir" != "X/usr/lib"; then | |
19473 | haveit= | |
19474 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
19475 | if test -n "$GCC"; then | |
19476 | case $host_os in | |
19477 | linux*) haveit=yes;; | |
19478 | esac | |
19479 | fi | |
19480 | fi | |
19481 | if test -z "$haveit"; then | |
19482 | haveit= | |
19483 | for x in $LDFLAGS $LIBXXHASH; do | |
19484 | ||
19485 | acl_save_prefix="$prefix" | |
19486 | prefix="$acl_final_prefix" | |
19487 | acl_save_exec_prefix="$exec_prefix" | |
19488 | exec_prefix="$acl_final_exec_prefix" | |
19489 | eval x=\"$x\" | |
19490 | exec_prefix="$acl_save_exec_prefix" | |
19491 | prefix="$acl_save_prefix" | |
19492 | ||
19493 | if test "X$x" = "X-L$additional_libdir"; then | |
19494 | haveit=yes | |
19495 | break | |
19496 | fi | |
19497 | done | |
19498 | if test -z "$haveit"; then | |
19499 | if test -d "$additional_libdir"; then | |
19500 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" | |
19501 | fi | |
19502 | fi | |
19503 | haveit= | |
19504 | for x in $LDFLAGS $LTLIBXXHASH; do | |
19505 | ||
19506 | acl_save_prefix="$prefix" | |
19507 | prefix="$acl_final_prefix" | |
19508 | acl_save_exec_prefix="$exec_prefix" | |
19509 | exec_prefix="$acl_final_exec_prefix" | |
19510 | eval x=\"$x\" | |
19511 | exec_prefix="$acl_save_exec_prefix" | |
19512 | prefix="$acl_save_prefix" | |
19513 | ||
19514 | if test "X$x" = "X-L$additional_libdir"; then | |
19515 | haveit=yes | |
19516 | break | |
19517 | fi | |
19518 | done | |
19519 | if test -z "$haveit"; then | |
19520 | if test -d "$additional_libdir"; then | |
19521 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" | |
19522 | fi | |
19523 | fi | |
19524 | fi | |
19525 | fi | |
19526 | ;; | |
19527 | -R*) | |
19528 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
19529 | if test "$enable_rpath" != no; then | |
19530 | haveit= | |
19531 | for x in $rpathdirs; do | |
19532 | if test "X$x" = "X$dir"; then | |
19533 | haveit=yes | |
19534 | break | |
19535 | fi | |
19536 | done | |
19537 | if test -z "$haveit"; then | |
19538 | rpathdirs="$rpathdirs $dir" | |
19539 | fi | |
19540 | haveit= | |
19541 | for x in $ltrpathdirs; do | |
19542 | if test "X$x" = "X$dir"; then | |
19543 | haveit=yes | |
19544 | break | |
19545 | fi | |
19546 | done | |
19547 | if test -z "$haveit"; then | |
19548 | ltrpathdirs="$ltrpathdirs $dir" | |
19549 | fi | |
19550 | fi | |
19551 | ;; | |
19552 | -l*) | |
19553 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
19554 | ;; | |
19555 | *.la) | |
19556 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
19557 | ;; | |
19558 | *) | |
19559 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" | |
19560 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" | |
19561 | ;; | |
19562 | esac | |
19563 | done | |
19564 | fi | |
19565 | else | |
9f1528a1 AB |
19566 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
19567 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" | |
19568 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" | |
19569 | else | |
19570 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext" | |
19571 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext" | |
19572 | fi | |
ccb1ba62 CB |
19573 | fi |
19574 | fi | |
19575 | fi | |
19576 | done | |
19577 | done | |
19578 | if test "X$rpathdirs" != "X"; then | |
19579 | if test -n "$hardcode_libdir_separator"; then | |
19580 | alldirs= | |
19581 | for found_dir in $rpathdirs; do | |
19582 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
19583 | done | |
19584 | acl_save_libdir="$libdir" | |
19585 | libdir="$alldirs" | |
19586 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19587 | libdir="$acl_save_libdir" | |
19588 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19589 | else | |
19590 | for found_dir in $rpathdirs; do | |
19591 | acl_save_libdir="$libdir" | |
19592 | libdir="$found_dir" | |
19593 | eval flag=\"$hardcode_libdir_flag_spec\" | |
19594 | libdir="$acl_save_libdir" | |
19595 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" | |
19596 | done | |
19597 | fi | |
19598 | fi | |
19599 | if test "X$ltrpathdirs" != "X"; then | |
19600 | for found_dir in $ltrpathdirs; do | |
19601 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" | |
19602 | done | |
19603 | fi | |
19604 | ||
19605 | ||
19606 | ac_save_CPPFLAGS="$CPPFLAGS" | |
19607 | ||
19608 | for element in $INCXXHASH; do | |
19609 | haveit= | |
19610 | for x in $CPPFLAGS; do | |
19611 | ||
19612 | acl_save_prefix="$prefix" | |
19613 | prefix="$acl_final_prefix" | |
19614 | acl_save_exec_prefix="$exec_prefix" | |
19615 | exec_prefix="$acl_final_exec_prefix" | |
19616 | eval x=\"$x\" | |
19617 | exec_prefix="$acl_save_exec_prefix" | |
19618 | prefix="$acl_save_prefix" | |
19619 | ||
19620 | if test "X$x" = "X$element"; then | |
19621 | haveit=yes | |
19622 | break | |
19623 | fi | |
19624 | done | |
19625 | if test -z "$haveit"; then | |
19626 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
19627 | fi | |
19628 | done | |
19629 | ||
19630 | ||
19631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 | |
19632 | $as_echo_n "checking for libxxhash... " >&6; } | |
19633 | if ${ac_cv_libxxhash+:} false; then : | |
19634 | $as_echo_n "(cached) " >&6 | |
19635 | else | |
19636 | ||
19637 | ac_save_LIBS="$LIBS" | |
19638 | LIBS="$LIBS $LIBXXHASH" | |
19639 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
19640 | /* end confdefs.h. */ | |
19641 | #include <xxhash.h> | |
19642 | int | |
19643 | main () | |
19644 | { | |
19645 | XXH32("foo", 3, 0); | |
19646 | ||
19647 | ; | |
19648 | return 0; | |
19649 | } | |
19650 | _ACEOF | |
19651 | if ac_fn_c_try_link "$LINENO"; then : | |
19652 | ac_cv_libxxhash=yes | |
19653 | else | |
19654 | ac_cv_libxxhash=no | |
19655 | fi | |
19656 | rm -f core conftest.err conftest.$ac_objext \ | |
19657 | conftest$ac_exeext conftest.$ac_ext | |
19658 | LIBS="$ac_save_LIBS" | |
19659 | ||
19660 | fi | |
19661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 | |
19662 | $as_echo "$ac_cv_libxxhash" >&6; } | |
19663 | if test "$ac_cv_libxxhash" = yes; then | |
19664 | HAVE_LIBXXHASH=yes | |
19665 | ||
19666 | $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h | |
19667 | ||
19668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 | |
19669 | $as_echo_n "checking how to link with libxxhash... " >&6; } | |
19670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 | |
19671 | $as_echo "$LIBXXHASH" >&6; } | |
19672 | else | |
19673 | HAVE_LIBXXHASH=no | |
19674 | CPPFLAGS="$ac_save_CPPFLAGS" | |
19675 | LIBXXHASH= | |
19676 | LTLIBXXHASH= | |
19677 | fi | |
19678 | ||
19679 | ||
19680 | ||
19681 | ||
19682 | ||
19683 | ||
19684 | if test "$HAVE_LIBXXHASH" != yes; then | |
19685 | if test "$with_xxhash" = yes; then | |
19686 | as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 | |
19687 | fi | |
19688 | fi | |
19689 | if test "x$with_xxhash" = "xauto"; then | |
19690 | with_xxhash="$HAVE_LIBXXHASH" | |
19691 | fi | |
19692 | fi | |
19693 | ||
19694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 | |
19695 | $as_echo_n "checking whether to use xxhash... " >&6; } | |
19696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 | |
19697 | $as_echo "$with_xxhash" >&6; } | |
19698 | ||
a0a461e5 | 19699 | NM_H= |
c906108c SS |
19700 | rm -f nm.h |
19701 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
19702 | case "${nativefile}" in |
19703 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
19704 | * ) GDB_NM_FILE="${nativefile}" | |
19705 | esac | |
a0a461e5 TT |
19706 | ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE" |
19707 | ||
60ca704f SE |
19708 | |
19709 | cat >>confdefs.h <<_ACEOF | |
b78960be | 19710 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 19711 | _ACEOF |
5a2402b8 | 19712 | |
a0a461e5 | 19713 | NM_H=nm.h |
c906108c | 19714 | fi |
5a2402b8 AC |
19715 | |
19716 | ||
a0a461e5 | 19717 | |
e3487908 GKB |
19718 | for ac_prog in xsltproc |
19719 | do | |
19720 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
19721 | set dummy $ac_prog; ac_word=$2 | |
19722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
19723 | $as_echo_n "checking for $ac_word... " >&6; } | |
d0ac1c44 | 19724 | if ${ac_cv_path_XSLTPROC+:} false; then : |
e3487908 GKB |
19725 | $as_echo_n "(cached) " >&6 |
19726 | else | |
19727 | case $XSLTPROC in | |
19728 | [\\/]* | ?:[\\/]*) | |
19729 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. | |
19730 | ;; | |
19731 | *) | |
19732 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
19733 | for as_dir in $PATH | |
19734 | do | |
19735 | IFS=$as_save_IFS | |
19736 | test -z "$as_dir" && as_dir=. | |
19737 | for ac_exec_ext in '' $ac_executable_extensions; do | |
d0ac1c44 | 19738 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e3487908 GKB |
19739 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" |
19740 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
19741 | break 2 | |
19742 | fi | |
19743 | done | |
19744 | done | |
19745 | IFS=$as_save_IFS | |
19746 | ||
19747 | ;; | |
19748 | esac | |
19749 | fi | |
19750 | XSLTPROC=$ac_cv_path_XSLTPROC | |
19751 | if test -n "$XSLTPROC"; then | |
19752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | |
19753 | $as_echo "$XSLTPROC" >&6; } | |
19754 | else | |
19755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
19756 | $as_echo "no" >&6; } | |
19757 | fi | |
19758 | ||
19759 | ||
19760 | test -n "$XSLTPROC" && break | |
19761 | done | |
19762 | test -n "$XSLTPROC" || XSLTPROC="missing" | |
19763 | ||
19764 | if test "x$USE_MAINTAINER_MODE" = xyes; then | |
19765 | if test "${XSLTPROC}" = missing; then | |
d0ac1c44 | 19766 | as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 |
e3487908 GKB |
19767 | fi |
19768 | fi | |
19769 | ||
19770 | ||
c906108c SS |
19771 | |
19772 | ||
c906108c | 19773 | |
81ecdfbb | 19774 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 19775 | |
bec39cab | 19776 | |
8ecfd7bd SDJ |
19777 | |
19778 | # Check whether we will enable the inclusion of unit tests when | |
19779 | # compiling GDB. | |
19780 | # | |
19781 | # The default value of this option changes depending whether we're on | |
19782 | # development mode (in which case it's "true") or not (in which case | |
db6878ac SM |
19783 | # it's "false"). The $development variable is set by the GDB_AC_COMMON |
19784 | # macro, which must therefore be used before GDB_AC_SELFTEST. | |
4d696a5c SM |
19785 | |
19786 | if test "x$development" != xtrue && test "x$development" != xfalse; then : | |
19787 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 | |
19788 | fi | |
19789 | ||
8ecfd7bd SDJ |
19790 | # Check whether --enable-unit-tests was given. |
19791 | if test "${enable_unit_tests+set}" = set; then : | |
19792 | enableval=$enable_unit_tests; case "${enableval}" in | |
19793 | yes) enable_unittests=true ;; | |
19794 | no) enable_unittests=false ;; | |
19795 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; | |
19796 | esac | |
19797 | else | |
19798 | enable_unittests=$development | |
19799 | fi | |
19800 | ||
19801 | ||
19802 | if $enable_unittests; then | |
dcd1f979 TT |
19803 | |
19804 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h | |
19805 | ||
8ecfd7bd | 19806 | |
74cd3f9d SM |
19807 | CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)" |
19808 | CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)" | |
8ecfd7bd | 19809 | |
dcd1f979 TT |
19810 | fi |
19811 | ||
b292c783 | 19812 | |
8ecfd7bd | 19813 | |
f6a88844 JM |
19814 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
19815 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` | |
19816 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
19817 | GDB_TRANSFORM_NAME=gdb | |
19818 | fi | |
19819 | ||
19820 | ||
19821 | ||
19822 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
19823 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` | |
19824 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
19825 | GCORE_TRANSFORM_NAME=gcore | |
19826 | fi | |
19827 | ||
b292c783 JK |
19828 | |
19829 | ac_config_files="$ac_config_files gcore" | |
19830 | ||
141ec9f6 | 19831 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" |
81ecdfbb | 19832 | |
89a34d1b | 19833 | |
bec39cab AC |
19834 | cat >confcache <<\_ACEOF |
19835 | # This file is a shell script that caches the results of configure | |
19836 | # tests run on this system so they can be shared between configure | |
19837 | # scripts and configure runs, see configure's option --config-cache. | |
19838 | # It is not useful on other systems. If it contains results you don't | |
19839 | # want to keep, you may remove or edit it. | |
19840 | # | |
19841 | # config.status only pays attention to the cache file if you give it | |
19842 | # the --recheck option to rerun configure. | |
19843 | # | |
19844 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
19845 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
19846 | # following values. | |
19847 | ||
19848 | _ACEOF | |
19849 | ||
19850 | # The following way of writing the cache mishandles newlines in values, | |
19851 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 19852 | # So, we kill variables containing newlines. |
bec39cab AC |
19853 | # Ultrix sh set writes to stderr and can't be redirected directly, |
19854 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
19855 | ( |
19856 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
19857 | eval ac_val=\$$ac_var | |
19858 | case $ac_val in #( | |
19859 | *${as_nl}*) | |
19860 | case $ac_var in #( | |
19861 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
19862 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
19863 | esac | |
19864 | case $ac_var in #( | |
19865 | _ | IFS | as_nl) ;; #( | |
19866 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
19867 | *) { eval $ac_var=; unset $ac_var;} ;; | |
19868 | esac ;; | |
19869 | esac | |
19870 | done | |
19871 | ||
bec39cab | 19872 | (set) 2>&1 | |
81ecdfbb RW |
19873 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
19874 | *${as_nl}ac_space=\ *) | |
19875 | # `set' does not quote correctly, so add quotes: double-quote | |
19876 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
19877 | sed -n \ |
19878 | "s/'/'\\\\''/g; | |
19879 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 19880 | ;; #( |
bec39cab AC |
19881 | *) |
19882 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 19883 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 19884 | ;; |
81ecdfbb RW |
19885 | esac | |
19886 | sort | |
19887 | ) | | |
bec39cab | 19888 | sed ' |
81ecdfbb | 19889 | /^ac_cv_env_/b end |
bec39cab | 19890 | t clear |
81ecdfbb | 19891 | :clear |
bec39cab AC |
19892 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
19893 | t end | |
81ecdfbb RW |
19894 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
19895 | :end' >>confcache | |
19896 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
19897 | if test -w "$cache_file"; then | |
d0ac1c44 | 19898 | if test "x$cache_file" != "x/dev/null"; then |
81ecdfbb RW |
19899 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
19900 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
d0ac1c44 SM |
19901 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
19902 | cat confcache >"$cache_file" | |
19903 | else | |
19904 | case $cache_file in #( | |
19905 | */* | ?:*) | |
19906 | mv -f confcache "$cache_file"$$ && | |
19907 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
19908 | *) | |
19909 | mv -f confcache "$cache_file" ;; | |
19910 | esac | |
19911 | fi | |
19912 | fi | |
bec39cab | 19913 | else |
81ecdfbb RW |
19914 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
19915 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
19916 | fi |
19917 | fi | |
19918 | rm -f confcache | |
19919 | ||
19920 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
19921 | # Let make expand exec_prefix. | |
19922 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
19923 | ||
bec39cab AC |
19924 | DEFS=-DHAVE_CONFIG_H |
19925 | ||
19926 | ac_libobjs= | |
19927 | ac_ltlibobjs= | |
d0ac1c44 | 19928 | U= |
bec39cab AC |
19929 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
19930 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
19931 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
19932 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
19933 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
19934 | # will be set to the directory where LIBOBJS objects are built. | |
19935 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
19936 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
19937 | done |
19938 | LIBOBJS=$ac_libobjs | |
19939 | ||
19940 | LTLIBOBJS=$ac_ltlibobjs | |
19941 | ||
19942 | ||
85981d60 | 19943 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
d0ac1c44 | 19944 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
81ecdfbb | 19945 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
85981d60 | 19946 | fi |
4df42755 | 19947 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
d0ac1c44 | 19948 | as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. |
4df42755 DE |
19949 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19950 | fi | |
19951 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then | |
d0ac1c44 | 19952 | as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. |
4df42755 DE |
19953 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
19954 | fi | |
81ecdfbb RW |
19955 | |
19956 | ||
d0ac1c44 | 19957 | : "${CONFIG_STATUS=./config.status}" |
81ecdfbb | 19958 | ac_write_fail=0 |
bec39cab AC |
19959 | ac_clean_files_save=$ac_clean_files |
19960 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
19961 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
19962 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
19963 | as_write_fail=0 | |
19964 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
19965 | #! $SHELL |
19966 | # Generated by $as_me. | |
19967 | # Run this file to recreate the current configuration. | |
19968 | # Compiler output produced by configure, useful for debugging | |
19969 | # configure, is in config.log if it exists. | |
19970 | ||
19971 | debug=false | |
19972 | ac_cs_recheck=false | |
19973 | ac_cs_silent=false | |
bec39cab | 19974 | |
81ecdfbb RW |
19975 | SHELL=\${CONFIG_SHELL-$SHELL} |
19976 | export SHELL | |
19977 | _ASEOF | |
19978 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
19979 | ## -------------------- ## | |
19980 | ## M4sh Initialization. ## | |
19981 | ## -------------------- ## | |
19982 | ||
19983 | # Be more Bourne compatible | |
19984 | DUALCASE=1; export DUALCASE # for MKS sh | |
19985 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
19986 | emulate sh |
19987 | NULLCMD=: | |
81ecdfbb | 19988 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
19989 | # is contrary to our usage. Disable this feature. |
19990 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
19991 | setopt NO_GLOB_SUBST |
19992 | else | |
19993 | case `(set -o) 2>/dev/null` in #( | |
19994 | *posix*) : | |
19995 | set -o posix ;; #( | |
19996 | *) : | |
19997 | ;; | |
19998 | esac | |
bec39cab | 19999 | fi |
bec39cab | 20000 | |
81ecdfbb RW |
20001 | |
20002 | as_nl=' | |
20003 | ' | |
20004 | export as_nl | |
20005 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
20006 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
20007 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
20008 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
20009 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
20010 | # but without wasting forks for bash or zsh. | |
20011 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
20012 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
20013 | as_echo='print -r --' | |
20014 | as_echo_n='print -rn --' | |
20015 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
20016 | as_echo='printf %s\n' | |
20017 | as_echo_n='printf %s' | |
20018 | else | |
20019 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
20020 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
20021 | as_echo_n='/usr/ucb/echo -n' | |
20022 | else | |
20023 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
20024 | as_echo_n_body='eval | |
20025 | arg=$1; | |
20026 | case $arg in #( | |
20027 | *"$as_nl"*) | |
20028 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
20029 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
20030 | esac; | |
20031 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
20032 | ' | |
20033 | export as_echo_n_body | |
20034 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
20035 | fi | |
20036 | export as_echo_body | |
20037 | as_echo='sh -c $as_echo_body as_echo' | |
20038 | fi | |
20039 | ||
20040 | # The user is always right. | |
20041 | if test "${PATH_SEPARATOR+set}" != set; then | |
20042 | PATH_SEPARATOR=: | |
20043 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
20044 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
20045 | PATH_SEPARATOR=';' | |
20046 | } | |
bec39cab AC |
20047 | fi |
20048 | ||
20049 | ||
81ecdfbb RW |
20050 | # IFS |
20051 | # We need space, tab and new line, in precisely that order. Quoting is | |
20052 | # there to prevent editors from complaining about space-tab. | |
20053 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
20054 | # splitting by setting IFS to empty value.) | |
20055 | IFS=" "" $as_nl" | |
20056 | ||
20057 | # Find who we are. Look in the path if we contain no directory separator. | |
d0ac1c44 | 20058 | as_myself= |
81ecdfbb RW |
20059 | case $0 in #(( |
20060 | *[\\/]* ) as_myself=$0 ;; | |
20061 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
20062 | for as_dir in $PATH | |
20063 | do | |
20064 | IFS=$as_save_IFS | |
20065 | test -z "$as_dir" && as_dir=. | |
20066 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
20067 | done | |
20068 | IFS=$as_save_IFS | |
20069 | ||
20070 | ;; | |
20071 | esac | |
20072 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
20073 | # in which case we are not to be found in the path. | |
20074 | if test "x$as_myself" = x; then | |
20075 | as_myself=$0 | |
20076 | fi | |
20077 | if test ! -f "$as_myself"; then | |
20078 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
20079 | exit 1 | |
20080 | fi | |
20081 | ||
20082 | # Unset variables that we do not need and which cause bugs (e.g. in | |
20083 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
20084 | # suppresses any "Segmentation fault" message there. '((' could | |
20085 | # trigger a bug in pdksh 5.2.14. | |
20086 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
20087 | do eval test x\${$as_var+set} = xset \ | |
20088 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
20089 | done | |
bec39cab AC |
20090 | PS1='$ ' |
20091 | PS2='> ' | |
20092 | PS4='+ ' | |
20093 | ||
20094 | # NLS nuisances. | |
81ecdfbb RW |
20095 | LC_ALL=C |
20096 | export LC_ALL | |
20097 | LANGUAGE=C | |
20098 | export LANGUAGE | |
20099 | ||
20100 | # CDPATH. | |
20101 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
20102 | ||
20103 | ||
d0ac1c44 SM |
20104 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
20105 | # ---------------------------------------- | |
81ecdfbb RW |
20106 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
20107 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
d0ac1c44 | 20108 | # script with STATUS, using 1 if that was 0. |
81ecdfbb RW |
20109 | as_fn_error () |
20110 | { | |
d0ac1c44 SM |
20111 | as_status=$1; test $as_status -eq 0 && as_status=1 |
20112 | if test "$4"; then | |
20113 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
20114 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
81ecdfbb | 20115 | fi |
d0ac1c44 | 20116 | $as_echo "$as_me: error: $2" >&2 |
81ecdfbb RW |
20117 | as_fn_exit $as_status |
20118 | } # as_fn_error | |
20119 | ||
20120 | ||
20121 | # as_fn_set_status STATUS | |
20122 | # ----------------------- | |
20123 | # Set $? to STATUS, without forking. | |
20124 | as_fn_set_status () | |
20125 | { | |
20126 | return $1 | |
20127 | } # as_fn_set_status | |
20128 | ||
20129 | # as_fn_exit STATUS | |
20130 | # ----------------- | |
20131 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
20132 | as_fn_exit () | |
20133 | { | |
20134 | set +e | |
20135 | as_fn_set_status $1 | |
20136 | exit $1 | |
20137 | } # as_fn_exit | |
20138 | ||
20139 | # as_fn_unset VAR | |
20140 | # --------------- | |
20141 | # Portably unset VAR. | |
20142 | as_fn_unset () | |
20143 | { | |
20144 | { eval $1=; unset $1;} | |
20145 | } | |
20146 | as_unset=as_fn_unset | |
20147 | # as_fn_append VAR VALUE | |
20148 | # ---------------------- | |
20149 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
20150 | # advantage of any shell optimizations that allow amortized linear growth over | |
20151 | # repeated appends, instead of the typical quadratic growth present in naive | |
20152 | # implementations. | |
20153 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
20154 | eval 'as_fn_append () | |
20155 | { | |
20156 | eval $1+=\$2 | |
20157 | }' | |
20158 | else | |
20159 | as_fn_append () | |
20160 | { | |
20161 | eval $1=\$$1\$2 | |
20162 | } | |
20163 | fi # as_fn_append | |
20164 | ||
20165 | # as_fn_arith ARG... | |
20166 | # ------------------ | |
20167 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
20168 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
20169 | # must be portable across $(()) and expr. | |
20170 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
20171 | eval 'as_fn_arith () | |
20172 | { | |
20173 | as_val=$(( $* )) | |
20174 | }' | |
20175 | else | |
20176 | as_fn_arith () | |
20177 | { | |
20178 | as_val=`expr "$@" || test $? -eq 1` | |
20179 | } | |
20180 | fi # as_fn_arith | |
bec39cab | 20181 | |
81ecdfbb RW |
20182 | |
20183 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
20184 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
20185 | as_expr=expr |
20186 | else | |
20187 | as_expr=false | |
20188 | fi | |
20189 | ||
81ecdfbb | 20190 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
20191 | as_basename=basename |
20192 | else | |
20193 | as_basename=false | |
20194 | fi | |
20195 | ||
81ecdfbb RW |
20196 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
20197 | as_dirname=dirname | |
20198 | else | |
20199 | as_dirname=false | |
20200 | fi | |
bec39cab | 20201 | |
81ecdfbb | 20202 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
20203 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
20204 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
20205 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
20206 | $as_echo X/"$0" | | |
20207 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
20208 | s//\1/ | |
20209 | q | |
20210 | } | |
20211 | /^X\/\(\/\/\)$/{ | |
20212 | s//\1/ | |
20213 | q | |
20214 | } | |
20215 | /^X\/\(\/\).*/{ | |
20216 | s//\1/ | |
20217 | q | |
20218 | } | |
20219 | s/.*/./; q'` | |
b4e70030 | 20220 | |
b4e70030 JB |
20221 | # Avoid depending upon Character Ranges. |
20222 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
20223 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
20224 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
20225 | as_cr_digits='0123456789' | |
20226 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
20227 | ||
81ecdfbb RW |
20228 | ECHO_C= ECHO_N= ECHO_T= |
20229 | case `echo -n x` in #((((( | |
20230 | -n*) | |
20231 | case `echo 'xy\c'` in | |
20232 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
20233 | xy) ECHO_C='\c';; | |
20234 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
20235 | ECHO_T=' ';; | |
20236 | esac;; | |
20237 | *) | |
20238 | ECHO_N='-n';; | |
bec39cab AC |
20239 | esac |
20240 | ||
81ecdfbb RW |
20241 | rm -f conf$$ conf$$.exe conf$$.file |
20242 | if test -d conf$$.dir; then | |
20243 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 20244 | else |
81ecdfbb RW |
20245 | rm -f conf$$.dir |
20246 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 20247 | fi |
81ecdfbb RW |
20248 | if (echo >conf$$.file) 2>/dev/null; then |
20249 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 20250 | as_ln_s='ln -s' |
81ecdfbb RW |
20251 | # ... but there are two gotchas: |
20252 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
20253 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
d0ac1c44 | 20254 | # In both cases, we have to default to `cp -pR'. |
81ecdfbb | 20255 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
d0ac1c44 | 20256 | as_ln_s='cp -pR' |
81ecdfbb RW |
20257 | elif ln conf$$.file conf$$ 2>/dev/null; then |
20258 | as_ln_s=ln | |
20259 | else | |
d0ac1c44 | 20260 | as_ln_s='cp -pR' |
b4e70030 | 20261 | fi |
bec39cab | 20262 | else |
d0ac1c44 | 20263 | as_ln_s='cp -pR' |
bec39cab | 20264 | fi |
81ecdfbb RW |
20265 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
20266 | rmdir conf$$.dir 2>/dev/null | |
20267 | ||
20268 | ||
20269 | # as_fn_mkdir_p | |
20270 | # ------------- | |
20271 | # Create "$as_dir" as a directory, including parents if necessary. | |
20272 | as_fn_mkdir_p () | |
20273 | { | |
20274 | ||
20275 | case $as_dir in #( | |
20276 | -*) as_dir=./$as_dir;; | |
20277 | esac | |
20278 | test -d "$as_dir" || eval $as_mkdir_p || { | |
20279 | as_dirs= | |
20280 | while :; do | |
20281 | case $as_dir in #( | |
20282 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
20283 | *) as_qdir=$as_dir;; | |
20284 | esac | |
20285 | as_dirs="'$as_qdir' $as_dirs" | |
20286 | as_dir=`$as_dirname -- "$as_dir" || | |
20287 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
20288 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
20289 | X"$as_dir" : 'X\(//\)$' \| \ | |
20290 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
20291 | $as_echo X"$as_dir" | | |
20292 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
20293 | s//\1/ | |
20294 | q | |
20295 | } | |
20296 | /^X\(\/\/\)[^/].*/{ | |
20297 | s//\1/ | |
20298 | q | |
20299 | } | |
20300 | /^X\(\/\/\)$/{ | |
20301 | s//\1/ | |
20302 | q | |
20303 | } | |
20304 | /^X\(\/\).*/{ | |
20305 | s//\1/ | |
20306 | q | |
20307 | } | |
20308 | s/.*/./; q'` | |
20309 | test -d "$as_dir" && break | |
20310 | done | |
20311 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
d0ac1c44 | 20312 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
81ecdfbb | 20313 | |
bec39cab | 20314 | |
81ecdfbb | 20315 | } # as_fn_mkdir_p |
bec39cab | 20316 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 20317 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
20318 | else |
20319 | test -d ./-p && rmdir ./-p | |
20320 | as_mkdir_p=false | |
20321 | fi | |
20322 | ||
d0ac1c44 SM |
20323 | |
20324 | # as_fn_executable_p FILE | |
20325 | # ----------------------- | |
20326 | # Test if FILE is an executable regular file. | |
20327 | as_fn_executable_p () | |
20328 | { | |
20329 | test -f "$1" && test -x "$1" | |
20330 | } # as_fn_executable_p | |
20331 | as_test_x='test -x' | |
20332 | as_executable_p=as_fn_executable_p | |
bec39cab AC |
20333 | |
20334 | # Sed expression to map a string onto a valid CPP name. | |
20335 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
20336 | ||
20337 | # Sed expression to map a string onto a valid variable name. | |
20338 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
20339 | ||
20340 | ||
bec39cab | 20341 | exec 6>&1 |
81ecdfbb RW |
20342 | ## ----------------------------------- ## |
20343 | ## Main body of $CONFIG_STATUS script. ## | |
20344 | ## ----------------------------------- ## | |
20345 | _ASEOF | |
20346 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
20347 | ||
20348 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20349 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 20350 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
20351 | # values after options handling. |
20352 | ac_log=" | |
bec39cab | 20353 | This file was extended by $as_me, which was |
d0ac1c44 | 20354 | generated by GNU Autoconf 2.69. Invocation command line was |
bec39cab AC |
20355 | |
20356 | CONFIG_FILES = $CONFIG_FILES | |
20357 | CONFIG_HEADERS = $CONFIG_HEADERS | |
20358 | CONFIG_LINKS = $CONFIG_LINKS | |
20359 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
20360 | $ $0 $@ | |
20361 | ||
81ecdfbb RW |
20362 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
20363 | " | |
20364 | ||
bec39cab AC |
20365 | _ACEOF |
20366 | ||
81ecdfbb RW |
20367 | case $ac_config_files in *" |
20368 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
20369 | esac | |
234b45d4 | 20370 | |
81ecdfbb RW |
20371 | case $ac_config_headers in *" |
20372 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
20373 | esac | |
b4e70030 | 20374 | |
b4e70030 | 20375 | |
81ecdfbb RW |
20376 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
20377 | # Files that config.status was made for. | |
20378 | config_files="$ac_config_files" | |
20379 | config_headers="$ac_config_headers" | |
20380 | config_links="$ac_config_links" | |
20381 | config_commands="$ac_config_commands" | |
234b45d4 | 20382 | |
81ecdfbb | 20383 | _ACEOF |
b4e70030 | 20384 | |
81ecdfbb | 20385 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 20386 | ac_cs_usage="\ |
81ecdfbb RW |
20387 | \`$as_me' instantiates files and other configuration actions |
20388 | from templates according to the current configuration. Unless the files | |
20389 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 20390 | |
81ecdfbb | 20391 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 20392 | |
bec39cab | 20393 | -h, --help print this help, then exit |
81ecdfbb | 20394 | -V, --version print version number and configuration settings, then exit |
d0ac1c44 | 20395 | --config print configuration, then exit |
81ecdfbb RW |
20396 | -q, --quiet, --silent |
20397 | do not print progress messages | |
bec39cab AC |
20398 | -d, --debug don't remove temporary files |
20399 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
20400 | --file=FILE[:TEMPLATE] |
20401 | instantiate the configuration file FILE | |
20402 | --header=FILE[:TEMPLATE] | |
20403 | instantiate the configuration header FILE | |
234b45d4 | 20404 | |
bec39cab AC |
20405 | Configuration files: |
20406 | $config_files | |
234b45d4 | 20407 | |
bec39cab AC |
20408 | Configuration headers: |
20409 | $config_headers | |
234b45d4 | 20410 | |
bec39cab AC |
20411 | Configuration links: |
20412 | $config_links | |
234b45d4 | 20413 | |
bec39cab AC |
20414 | Configuration commands: |
20415 | $config_commands | |
20416 | ||
81ecdfbb | 20417 | Report bugs to the package provider." |
b4e70030 | 20418 | |
81ecdfbb RW |
20419 | _ACEOF |
20420 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20421 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
bec39cab AC |
20422 | ac_cs_version="\\ |
20423 | config.status | |
d0ac1c44 SM |
20424 | configured by $0, generated by GNU Autoconf 2.69, |
20425 | with options \\"\$ac_cs_config\\" | |
bec39cab | 20426 | |
d0ac1c44 | 20427 | Copyright (C) 2012 Free Software Foundation, Inc. |
bec39cab AC |
20428 | This config.status script is free software; the Free Software Foundation |
20429 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
20430 | |
20431 | ac_pwd='$ac_pwd' | |
20432 | srcdir='$srcdir' | |
20433 | INSTALL='$INSTALL' | |
81ecdfbb RW |
20434 | AWK='$AWK' |
20435 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
20436 | _ACEOF |
20437 | ||
81ecdfbb RW |
20438 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20439 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
20440 | ac_need_defaults=: |
20441 | while test $# != 0 | |
20442 | do | |
20443 | case $1 in | |
d0ac1c44 | 20444 | --*=?*) |
81ecdfbb RW |
20445 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
20446 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 20447 | ac_shift=: |
c906108c | 20448 | ;; |
d0ac1c44 SM |
20449 | --*=) |
20450 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
20451 | ac_optarg= | |
20452 | ac_shift=: | |
20453 | ;; | |
81ecdfbb | 20454 | *) |
bec39cab AC |
20455 | ac_option=$1 |
20456 | ac_optarg=$2 | |
20457 | ac_shift=shift | |
c906108c | 20458 | ;; |
bec39cab | 20459 | esac |
c906108c | 20460 | |
bec39cab AC |
20461 | case $ac_option in |
20462 | # Handling of the options. | |
bec39cab AC |
20463 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
20464 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
20465 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
20466 | $as_echo "$ac_cs_version"; exit ;; | |
d0ac1c44 SM |
20467 | --config | --confi | --conf | --con | --co | --c ) |
20468 | $as_echo "$ac_cs_config"; exit ;; | |
81ecdfbb | 20469 | --debug | --debu | --deb | --de | --d | -d ) |
bec39cab AC |
20470 | debug=: ;; |
20471 | --file | --fil | --fi | --f ) | |
20472 | $ac_shift | |
81ecdfbb RW |
20473 | case $ac_optarg in |
20474 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
d0ac1c44 | 20475 | '') as_fn_error $? "missing file argument" ;; |
81ecdfbb RW |
20476 | esac |
20477 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
20478 | ac_need_defaults=false;; |
20479 | --header | --heade | --head | --hea ) | |
20480 | $ac_shift | |
81ecdfbb RW |
20481 | case $ac_optarg in |
20482 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
20483 | esac | |
20484 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 20485 | ac_need_defaults=false;; |
81ecdfbb RW |
20486 | --he | --h) |
20487 | # Conflict between --help and --header | |
d0ac1c44 | 20488 | as_fn_error $? "ambiguous option: \`$1' |
81ecdfbb RW |
20489 | Try \`$0 --help' for more information.";; |
20490 | --help | --hel | -h ) | |
20491 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
20492 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
20493 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
20494 | ac_cs_silent=: ;; | |
c906108c | 20495 | |
bec39cab | 20496 | # This is an error. |
d0ac1c44 | 20497 | -*) as_fn_error $? "unrecognized option: \`$1' |
81ecdfbb | 20498 | Try \`$0 --help' for more information." ;; |
c906108c | 20499 | |
81ecdfbb RW |
20500 | *) as_fn_append ac_config_targets " $1" |
20501 | ac_need_defaults=false ;; | |
c906108c | 20502 | |
bec39cab AC |
20503 | esac |
20504 | shift | |
20505 | done | |
c906108c | 20506 | |
bec39cab | 20507 | ac_configure_extra_args= |
c906108c | 20508 | |
bec39cab AC |
20509 | if $ac_cs_silent; then |
20510 | exec 6>/dev/null | |
20511 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
20512 | fi | |
c906108c | 20513 | |
bec39cab | 20514 | _ACEOF |
81ecdfbb | 20515 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 20516 | if \$ac_cs_recheck; then |
d0ac1c44 | 20517 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
81ecdfbb RW |
20518 | shift |
20519 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
20520 | CONFIG_SHELL='$SHELL' | |
20521 | export CONFIG_SHELL | |
20522 | exec "\$@" | |
bec39cab AC |
20523 | fi |
20524 | ||
20525 | _ACEOF | |
81ecdfbb RW |
20526 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
20527 | exec 5>>config.log | |
20528 | { | |
20529 | echo | |
20530 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
20531 | ## Running $as_me. ## | |
20532 | _ASBOX | |
20533 | $as_echo "$ac_log" | |
20534 | } >&5 | |
bec39cab | 20535 | |
81ecdfbb RW |
20536 | _ACEOF |
20537 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 20538 | # |
81ecdfbb | 20539 | # INIT-COMMANDS |
c906108c | 20540 | # |
a417dc56 | 20541 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
a0a461e5 | 20542 | GDB_NM_FILE=$GDB_NM_FILE |
b4e70030 | 20543 | |
bec39cab AC |
20544 | _ACEOF |
20545 | ||
81ecdfbb | 20546 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 20547 | |
81ecdfbb | 20548 | # Handling of arguments. |
bec39cab | 20549 | for ac_config_target in $ac_config_targets |
c906108c | 20550 | do |
81ecdfbb RW |
20551 | case $ac_config_target in |
20552 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
20553 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 20554 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
a0a461e5 | 20555 | "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;; |
b292c783 | 20556 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 20557 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 20558 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
141ec9f6 | 20559 | "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; |
5ae98d25 | 20560 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 20561 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb | 20562 | |
d0ac1c44 | 20563 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
c906108c SS |
20564 | esac |
20565 | done | |
20566 | ||
81ecdfbb | 20567 | |
bec39cab AC |
20568 | # If the user did not use the arguments to specify the items to instantiate, |
20569 | # then the envvar interface is used. Set only those that are not. | |
20570 | # We use the long form for the default assignment because of an extremely | |
20571 | # bizarre bug on SunOS 4.1.3. | |
20572 | if $ac_need_defaults; then | |
20573 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
20574 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
20575 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
20576 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
20577 | fi | |
20578 | ||
b4e70030 | 20579 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 20580 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 20581 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
20582 | # Hook for its removal unless debugging. |
20583 | # Note that there is a small window in which the directory will not be cleaned: | |
20584 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
20585 | $debug || |
20586 | { | |
d0ac1c44 | 20587 | tmp= ac_tmp= |
81ecdfbb | 20588 | trap 'exit_status=$? |
d0ac1c44 SM |
20589 | : "${ac_tmp:=$tmp}" |
20590 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
81ecdfbb RW |
20591 | ' 0 |
20592 | trap 'as_fn_exit 1' 1 2 13 15 | |
20593 | } | |
20594 | # Create a (secure) tmp directory for tmp files. | |
20595 | ||
20596 | { | |
20597 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
d0ac1c44 | 20598 | test -d "$tmp" |
81ecdfbb RW |
20599 | } || |
20600 | { | |
20601 | tmp=./conf$$-$RANDOM | |
20602 | (umask 077 && mkdir "$tmp") | |
d0ac1c44 SM |
20603 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
20604 | ac_tmp=$tmp | |
81ecdfbb RW |
20605 | |
20606 | # Set up the scripts for CONFIG_FILES section. | |
20607 | # No need to generate them if there are no CONFIG_FILES. | |
20608 | # This happens for instance with `./config.status config.h'. | |
20609 | if test -n "$CONFIG_FILES"; then | |
20610 | ||
20611 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
20612 | ac_cs_awk_getline=: | |
20613 | ac_cs_awk_pipe_init= | |
20614 | ac_cs_awk_read_file=' | |
20615 | while ((getline aline < (F[key])) > 0) | |
20616 | print(aline) | |
20617 | close(F[key])' | |
20618 | ac_cs_awk_pipe_fini= | |
20619 | else | |
20620 | ac_cs_awk_getline=false | |
20621 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
20622 | ac_cs_awk_read_file=' | |
20623 | print "|#_!!_#|" | |
20624 | print "cat " F[key] " &&" | |
20625 | '$ac_cs_awk_pipe_init | |
20626 | # The final `:' finishes the AND list. | |
20627 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
20628 | fi | |
20629 | ac_cr=`echo X | tr X '\015'` | |
20630 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
20631 | # But we know of no other shell where ac_cr would be empty at this | |
20632 | # point, so we can use a bashism as a fallback. | |
20633 | if test "x$ac_cr" = x; then | |
20634 | eval ac_cr=\$\'\\r\' | |
20635 | fi | |
20636 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
20637 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
d0ac1c44 | 20638 | ac_cs_awk_cr='\\r' |
81ecdfbb RW |
20639 | else |
20640 | ac_cs_awk_cr=$ac_cr | |
20641 | fi | |
20642 | ||
d0ac1c44 | 20643 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
81ecdfbb RW |
20644 | _ACEOF |
20645 | ||
20646 | # Create commands to substitute file output variables. | |
20647 | { | |
20648 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
d0ac1c44 | 20649 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
81ecdfbb RW |
20650 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
20651 | echo "_ACAWK" && | |
20652 | echo "_ACEOF" | |
20653 | } >conf$$files.sh && | |
20654 | . ./conf$$files.sh || | |
d0ac1c44 | 20655 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20656 | rm -f conf$$files.sh |
20657 | ||
20658 | { | |
20659 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
20660 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
20661 | echo "_ACEOF" | |
20662 | } >conf$$subs.sh || | |
d0ac1c44 SM |
20663 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
20664 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
81ecdfbb RW |
20665 | ac_delim='%!_!# ' |
20666 | for ac_last_try in false false false false false :; do | |
20667 | . ./conf$$subs.sh || | |
d0ac1c44 | 20668 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20669 | |
20670 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
20671 | if test $ac_delim_n = $ac_delim_num; then | |
20672 | break | |
20673 | elif $ac_last_try; then | |
d0ac1c44 | 20674 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb RW |
20675 | else |
20676 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20677 | fi | |
20678 | done | |
20679 | rm -f conf$$subs.sh | |
20680 | ||
20681 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
d0ac1c44 | 20682 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
81ecdfbb RW |
20683 | _ACEOF |
20684 | sed -n ' | |
20685 | h | |
20686 | s/^/S["/; s/!.*/"]=/ | |
20687 | p | |
20688 | g | |
20689 | s/^[^!]*!// | |
20690 | :repl | |
20691 | t repl | |
20692 | s/'"$ac_delim"'$// | |
20693 | t delim | |
20694 | :nl | |
20695 | h | |
d0ac1c44 | 20696 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20697 | t more1 |
20698 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
20699 | p | |
20700 | n | |
20701 | b repl | |
20702 | :more1 | |
20703 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20704 | p | |
20705 | g | |
20706 | s/.\{148\}// | |
20707 | t nl | |
20708 | :delim | |
20709 | h | |
d0ac1c44 | 20710 | s/\(.\{148\}\)..*/\1/ |
81ecdfbb RW |
20711 | t more2 |
20712 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
20713 | p | |
20714 | b | |
20715 | :more2 | |
20716 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
20717 | p | |
20718 | g | |
20719 | s/.\{148\}// | |
20720 | t delim | |
20721 | ' <conf$$subs.awk | sed ' | |
20722 | /^[^""]/{ | |
20723 | N | |
20724 | s/\n// | |
20725 | } | |
20726 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
20727 | rm -f conf$$subs.awk | |
20728 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20729 | _ACAWK | |
d0ac1c44 | 20730 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
81ecdfbb RW |
20731 | for (key in S) S_is_set[key] = 1 |
20732 | FS = "\a" | |
20733 | \$ac_cs_awk_pipe_init | |
20734 | } | |
20735 | { | |
20736 | line = $ 0 | |
20737 | nfields = split(line, field, "@") | |
20738 | substed = 0 | |
20739 | len = length(field[1]) | |
20740 | for (i = 2; i < nfields; i++) { | |
20741 | key = field[i] | |
20742 | keylen = length(key) | |
20743 | if (S_is_set[key]) { | |
20744 | value = S[key] | |
20745 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
20746 | len += length(value) + length(field[++i]) | |
20747 | substed = 1 | |
20748 | } else | |
20749 | len += 1 + keylen | |
20750 | } | |
20751 | if (nfields == 3 && !substed) { | |
20752 | key = field[2] | |
20753 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
20754 | \$ac_cs_awk_read_file | |
20755 | next | |
20756 | } | |
20757 | } | |
20758 | print line | |
b4e70030 | 20759 | } |
81ecdfbb RW |
20760 | \$ac_cs_awk_pipe_fini |
20761 | _ACAWK | |
20762 | _ACEOF | |
20763 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20764 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
20765 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
20766 | else | |
20767 | cat | |
d0ac1c44 SM |
20768 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
20769 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
81ecdfbb RW |
20770 | _ACEOF |
20771 | ||
d0ac1c44 SM |
20772 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
20773 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
81ecdfbb RW |
20774 | # trailing colons and then remove the whole line if VPATH becomes empty |
20775 | # (actually we leave an empty line to preserve line numbers). | |
20776 | if test "x$srcdir" = x.; then | |
d0ac1c44 SM |
20777 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
20778 | h | |
20779 | s/// | |
20780 | s/^/:/ | |
20781 | s/[ ]*$/:/ | |
20782 | s/:\$(srcdir):/:/g | |
20783 | s/:\${srcdir}:/:/g | |
20784 | s/:@srcdir@:/:/g | |
20785 | s/^:*// | |
81ecdfbb | 20786 | s/:*$// |
d0ac1c44 SM |
20787 | x |
20788 | s/\(=[ ]*\).*/\1/ | |
20789 | G | |
20790 | s/\n// | |
81ecdfbb RW |
20791 | s/^[^=]*=[ ]*$// |
20792 | }' | |
20793 | fi | |
20794 | ||
20795 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
20796 | fi # test -n "$CONFIG_FILES" | |
20797 | ||
20798 | # Set up the scripts for CONFIG_HEADERS section. | |
20799 | # No need to generate them if there are no CONFIG_HEADERS. | |
20800 | # This happens for instance with `./config.status Makefile'. | |
20801 | if test -n "$CONFIG_HEADERS"; then | |
d0ac1c44 | 20802 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
81ecdfbb RW |
20803 | BEGIN { |
20804 | _ACEOF | |
20805 | ||
20806 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
20807 | # here-document in config.status, that substitutes the proper values into | |
20808 | # config.h.in to produce config.h. | |
4e8d927d | 20809 | |
81ecdfbb RW |
20810 | # Create a delimiter string that does not exist in confdefs.h, to ease |
20811 | # handling of long lines. | |
20812 | ac_delim='%!_!# ' | |
20813 | for ac_last_try in false false :; do | |
d0ac1c44 SM |
20814 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
20815 | if test -z "$ac_tt"; then | |
81ecdfbb RW |
20816 | break |
20817 | elif $ac_last_try; then | |
d0ac1c44 | 20818 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
81ecdfbb RW |
20819 | else |
20820 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
20821 | fi | |
20822 | done | |
4e8d927d | 20823 | |
81ecdfbb RW |
20824 | # For the awk script, D is an array of macro values keyed by name, |
20825 | # likewise P contains macro parameters if any. Preserve backslash | |
20826 | # newline sequences. | |
20827 | ||
20828 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
20829 | sed -n ' | |
20830 | s/.\{148\}/&'"$ac_delim"'/g | |
20831 | t rset | |
20832 | :rset | |
20833 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
20834 | t def | |
20835 | d | |
20836 | :def | |
20837 | s/\\$// | |
20838 | t bsnl | |
20839 | s/["\\]/\\&/g | |
20840 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
20841 | D["\1"]=" \3"/p | |
20842 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
20843 | d | |
20844 | :bsnl | |
20845 | s/["\\]/\\&/g | |
20846 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
20847 | D["\1"]=" \3\\\\\\n"\\/p | |
20848 | t cont | |
20849 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
20850 | t cont | |
20851 | d | |
20852 | :cont | |
20853 | n | |
20854 | s/.\{148\}/&'"$ac_delim"'/g | |
20855 | t clear | |
20856 | :clear | |
20857 | s/\\$// | |
20858 | t bsnlc | |
20859 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
20860 | d | |
20861 | :bsnlc | |
20862 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
20863 | b cont | |
20864 | ' <confdefs.h | sed ' | |
20865 | s/'"$ac_delim"'/"\\\ | |
20866 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
20867 | ||
20868 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
20869 | for (key in D) D_is_set[key] = 1 | |
20870 | FS = "\a" | |
20871 | } | |
20872 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
20873 | line = \$ 0 | |
20874 | split(line, arg, " ") | |
20875 | if (arg[1] == "#") { | |
20876 | defundef = arg[2] | |
20877 | mac1 = arg[3] | |
20878 | } else { | |
20879 | defundef = substr(arg[1], 2) | |
20880 | mac1 = arg[2] | |
20881 | } | |
20882 | split(mac1, mac2, "(") #) | |
20883 | macro = mac2[1] | |
20884 | prefix = substr(line, 1, index(line, defundef) - 1) | |
20885 | if (D_is_set[macro]) { | |
20886 | # Preserve the white space surrounding the "#". | |
20887 | print prefix "define", macro P[macro] D[macro] | |
20888 | next | |
20889 | } else { | |
20890 | # Replace #undef with comments. This is necessary, for example, | |
20891 | # in the case of _POSIX_SOURCE, which is predefined and required | |
20892 | # on some systems where configure will not decide to define it. | |
20893 | if (defundef == "undef") { | |
20894 | print "/*", prefix defundef, macro, "*/" | |
20895 | next | |
20896 | } | |
20897 | } | |
b4e70030 | 20898 | } |
81ecdfbb RW |
20899 | { print } |
20900 | _ACAWK | |
b4e70030 | 20901 | _ACEOF |
81ecdfbb | 20902 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
d0ac1c44 | 20903 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
81ecdfbb | 20904 | fi # test -n "$CONFIG_HEADERS" |
4e8d927d | 20905 | |
4e8d927d | 20906 | |
81ecdfbb RW |
20907 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
20908 | shift | |
20909 | for ac_tag | |
20910 | do | |
20911 | case $ac_tag in | |
20912 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
20913 | esac | |
20914 | case $ac_mode$ac_tag in | |
20915 | :[FHL]*:*);; | |
d0ac1c44 | 20916 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
81ecdfbb RW |
20917 | :[FH]-) ac_tag=-:-;; |
20918 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
20919 | esac | |
20920 | ac_save_IFS=$IFS | |
20921 | IFS=: | |
20922 | set x $ac_tag | |
20923 | IFS=$ac_save_IFS | |
20924 | shift | |
20925 | ac_file=$1 | |
20926 | shift | |
4e8d927d | 20927 | |
81ecdfbb RW |
20928 | case $ac_mode in |
20929 | :L) ac_source=$1;; | |
20930 | :[FH]) | |
20931 | ac_file_inputs= | |
20932 | for ac_f | |
20933 | do | |
20934 | case $ac_f in | |
d0ac1c44 | 20935 | -) ac_f="$ac_tmp/stdin";; |
81ecdfbb RW |
20936 | *) # Look for the file first in the build tree, then in the source tree |
20937 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
20938 | # because $ac_f cannot contain `:'. | |
20939 | test -f "$ac_f" || | |
20940 | case $ac_f in | |
20941 | [\\/$]*) false;; | |
20942 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
20943 | esac || | |
d0ac1c44 | 20944 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
81ecdfbb RW |
20945 | esac |
20946 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
20947 | as_fn_append ac_file_inputs " '$ac_f'" | |
20948 | done | |
20949 | ||
20950 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
20951 | # use $as_me), people would be surprised to read: | |
20952 | # /* config.h. Generated by config.status. */ | |
20953 | configure_input='Generated from '` | |
20954 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
20955 | `' by configure.' | |
20956 | if test x"$ac_file" != x-; then | |
20957 | configure_input="$ac_file. $configure_input" | |
20958 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
20959 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 20960 | fi |
81ecdfbb RW |
20961 | # Neutralize special characters interpreted by sed in replacement strings. |
20962 | case $configure_input in #( | |
20963 | *\&* | *\|* | *\\* ) | |
20964 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
20965 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
20966 | *) ac_sed_conf_input=$configure_input;; | |
20967 | esac | |
4e8d927d | 20968 | |
81ecdfbb | 20969 | case $ac_tag in |
d0ac1c44 SM |
20970 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
20971 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
81ecdfbb RW |
20972 | esac |
20973 | ;; | |
c906108c SS |
20974 | esac |
20975 | ||
81ecdfbb | 20976 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
20977 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
20978 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
20979 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
20980 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
20981 | $as_echo X"$ac_file" | | |
20982 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
20983 | s//\1/ | |
20984 | q | |
20985 | } | |
20986 | /^X\(\/\/\)[^/].*/{ | |
20987 | s//\1/ | |
20988 | q | |
20989 | } | |
20990 | /^X\(\/\/\)$/{ | |
20991 | s//\1/ | |
20992 | q | |
20993 | } | |
20994 | /^X\(\/\).*/{ | |
20995 | s//\1/ | |
20996 | q | |
20997 | } | |
20998 | s/.*/./; q'` | |
20999 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
21000 | ac_builddir=. |
21001 | ||
81ecdfbb RW |
21002 | case "$ac_dir" in |
21003 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21004 | *) | |
21005 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
21006 | # A ".." for each directory in $ac_dir_suffix. | |
21007 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
21008 | case $ac_top_builddir_sub in | |
21009 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21010 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
21011 | esac ;; | |
21012 | esac | |
21013 | ac_abs_top_builddir=$ac_pwd | |
21014 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
21015 | # for backward compatibility: | |
21016 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
21017 | |
21018 | case $srcdir in | |
81ecdfbb | 21019 | .) # We are building in place. |
bec39cab | 21020 | ac_srcdir=. |
81ecdfbb RW |
21021 | ac_top_srcdir=$ac_top_builddir_sub |
21022 | ac_abs_top_srcdir=$ac_pwd ;; | |
21023 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 21024 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
21025 | ac_top_srcdir=$srcdir |
21026 | ac_abs_top_srcdir=$srcdir ;; | |
21027 | *) # Relative name. | |
21028 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
21029 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
21030 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 21031 | esac |
81ecdfbb | 21032 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 21033 | |
c906108c | 21034 | |
81ecdfbb RW |
21035 | case $ac_mode in |
21036 | :F) | |
21037 | # | |
21038 | # CONFIG_FILE | |
21039 | # | |
c906108c | 21040 | |
bec39cab AC |
21041 | case $INSTALL in |
21042 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 21043 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 21044 | esac |
81ecdfbb | 21045 | _ACEOF |
121ce6e5 | 21046 | |
81ecdfbb RW |
21047 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
21048 | # If the template does not know about datarootdir, expand it. | |
21049 | # FIXME: This hack should be removed a few years after 2.60. | |
21050 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
21051 | ac_sed_dataroot=' | |
21052 | /datarootdir/ { | |
21053 | p | |
21054 | q | |
21055 | } | |
21056 | /@datadir@/p | |
21057 | /@docdir@/p | |
21058 | /@infodir@/p | |
21059 | /@localedir@/p | |
21060 | /@mandir@/p' | |
21061 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
21062 | *datarootdir*) ac_datarootdir_seen=yes;; | |
21063 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
21064 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
21065 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
21066 | _ACEOF | |
21067 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21068 | ac_datarootdir_hack=' | |
21069 | s&@datadir@&$datadir&g | |
21070 | s&@docdir@&$docdir&g | |
21071 | s&@infodir@&$infodir&g | |
21072 | s&@localedir@&$localedir&g | |
21073 | s&@mandir@&$mandir&g | |
21074 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
21075 | esac | |
4e8d927d | 21076 | _ACEOF |
81ecdfbb RW |
21077 | |
21078 | # Neutralize VPATH when `$srcdir' = `.'. | |
21079 | # Shell code in configure.ac might set extrasub. | |
21080 | # FIXME: do we really want to maintain this feature? | |
21081 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
21082 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
21083 | $extrasub |
21084 | _ACEOF | |
81ecdfbb | 21085 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
21086 | :t |
21087 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
21088 | s|@configure_input@|$ac_sed_conf_input|;t t |
21089 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
21090 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
21091 | s&@srcdir@&$ac_srcdir&;t t | |
21092 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
21093 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
21094 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
21095 | s&@builddir@&$ac_builddir&;t t | |
21096 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
21097 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
21098 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
21099 | $ac_datarootdir_hack |
21100 | " | |
21101 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
21102 | if $ac_cs_awk_getline; then | |
d0ac1c44 | 21103 | $AWK -f "$ac_tmp/subs.awk" |
81ecdfbb | 21104 | else |
d0ac1c44 SM |
21105 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
21106 | fi \ | |
21107 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
81ecdfbb RW |
21108 | |
21109 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
d0ac1c44 SM |
21110 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
21111 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
21112 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
81ecdfbb | 21113 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 21114 | which seems to be undefined. Please make sure it is defined" >&5 |
81ecdfbb | 21115 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
d0ac1c44 | 21116 | which seems to be undefined. Please make sure it is defined" >&2;} |
81ecdfbb | 21117 | |
d0ac1c44 | 21118 | rm -f "$ac_tmp/stdin" |
bec39cab | 21119 | case $ac_file in |
d0ac1c44 SM |
21120 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
21121 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
81ecdfbb | 21122 | esac \ |
d0ac1c44 | 21123 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
81ecdfbb RW |
21124 | ;; |
21125 | :H) | |
21126 | # | |
21127 | # CONFIG_HEADER | |
21128 | # | |
bec39cab | 21129 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
21130 | { |
21131 | $as_echo "/* $configure_input */" \ | |
d0ac1c44 SM |
21132 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
21133 | } >"$ac_tmp/config.h" \ | |
21134 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
21135 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
81ecdfbb RW |
21136 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
21137 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 21138 | else |
81ecdfbb | 21139 | rm -f "$ac_file" |
d0ac1c44 SM |
21140 | mv "$ac_tmp/config.h" "$ac_file" \ |
21141 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
21142 | fi |
21143 | else | |
81ecdfbb | 21144 | $as_echo "/* $configure_input */" \ |
d0ac1c44 SM |
21145 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
21146 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
bec39cab | 21147 | fi |
81ecdfbb RW |
21148 | ;; |
21149 | :L) | |
21150 | # | |
21151 | # CONFIG_LINK | |
21152 | # | |
c906108c | 21153 | |
81ecdfbb RW |
21154 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
21155 | : | |
b4e70030 | 21156 | else |
81ecdfbb RW |
21157 | # Prefer the file from the source tree if names are identical. |
21158 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
21159 | ac_source=$srcdir/$ac_source | |
21160 | fi | |
b4e70030 | 21161 | |
81ecdfbb RW |
21162 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
21163 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 21164 | |
81ecdfbb | 21165 | if test ! -r "$ac_source"; then |
d0ac1c44 | 21166 | as_fn_error $? "$ac_source: file not found" "$LINENO" 5 |
81ecdfbb RW |
21167 | fi |
21168 | rm -f "$ac_file" | |
bec39cab | 21169 | |
81ecdfbb | 21170 | # Try a relative symlink, then a hard link, then a copy. |
d0ac1c44 | 21171 | case $ac_source in |
81ecdfbb RW |
21172 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; |
21173 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
21174 | esac | |
21175 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
21176 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
21177 | cp -p "$ac_source" "$ac_file" || | |
d0ac1c44 | 21178 | as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 |
81ecdfbb RW |
21179 | fi |
21180 | ;; | |
21181 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
21182 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
21183 | ;; | |
c906108c | 21184 | esac |
b4e70030 | 21185 | |
bec39cab | 21186 | |
81ecdfbb | 21187 | case $ac_file$ac_mode in |
c5adaa19 | 21188 | "config.h":H) echo > stamp-h ;; |
81ecdfbb | 21189 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
a0a461e5 | 21190 | "nm.h":L) echo > stamp-nmh ;; |
b292c783 | 21191 | "gcore":F) chmod +x gcore ;; |
81ecdfbb | 21192 | |
bec39cab | 21193 | esac |
81ecdfbb | 21194 | done # for ac_tag |
c906108c | 21195 | |
bec39cab | 21196 | |
81ecdfbb | 21197 | as_fn_exit 0 |
bec39cab | 21198 | _ACEOF |
bec39cab AC |
21199 | ac_clean_files=$ac_clean_files_save |
21200 | ||
81ecdfbb | 21201 | test $ac_write_fail = 0 || |
d0ac1c44 | 21202 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
81ecdfbb | 21203 | |
bec39cab AC |
21204 | |
21205 | # configure is writing to config.log, and then calls config.status. | |
21206 | # config.status does its own redirection, appending to config.log. | |
21207 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
21208 | # by configure, so config.status won't be able to write to it; its | |
21209 | # output is simply discarded. So we exec the FD to /dev/null, | |
21210 | # effectively closing config.log, so it can be properly (re)opened and | |
21211 | # appended to by config.status. When coming back to configure, we | |
21212 | # need to make the FD available again. | |
21213 | if test "$no_create" != yes; then | |
21214 | ac_cs_success=: | |
21215 | ac_config_status_args= | |
21216 | test "$silent" = yes && | |
21217 | ac_config_status_args="$ac_config_status_args --quiet" | |
21218 | exec 5>/dev/null | |
21219 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
21220 | exec 5>>config.log | |
21221 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
21222 | # would make configure fail if this is the last instruction. | |
d0ac1c44 | 21223 | $ac_cs_success || as_fn_exit 1 |
bec39cab | 21224 | fi |
c906108c | 21225 | |
bec39cab | 21226 | # |
81ecdfbb | 21227 | # CONFIG_SUBDIRS section. |
bec39cab | 21228 | # |
c906108c SS |
21229 | if test "$no_recursion" != yes; then |
21230 | ||
81ecdfbb RW |
21231 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
21232 | # so they do not pile up. | |
c906108c SS |
21233 | ac_sub_configure_args= |
21234 | ac_prev= | |
fdc59709 PB |
21235 | eval "set x $ac_configure_args" |
21236 | shift | |
21237 | for ac_arg | |
21238 | do | |
c906108c SS |
21239 | if test -n "$ac_prev"; then |
21240 | ac_prev= | |
21241 | continue | |
21242 | fi | |
bec39cab | 21243 | case $ac_arg in |
c906108c SS |
21244 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
21245 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
21246 | ac_prev=cache_file ;; | |
21247 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
21248 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
21249 | | --c=*) | |
21250 | ;; | |
21251 | --config-cache | -C) | |
c906108c SS |
21252 | ;; |
21253 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
21254 | ac_prev=srcdir ;; | |
21255 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
21256 | ;; | |
bec39cab AC |
21257 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
21258 | ac_prev=prefix ;; | |
21259 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
21260 | ;; | |
81ecdfbb RW |
21261 | --disable-option-checking) |
21262 | ;; | |
fdc59709 PB |
21263 | *) |
21264 | case $ac_arg in | |
81ecdfbb | 21265 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 21266 | esac |
81ecdfbb | 21267 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
21268 | esac |
21269 | done | |
21270 | ||
bec39cab AC |
21271 | # Always prepend --prefix to ensure using the same prefix |
21272 | # in subdir configurations. | |
fdc59709 PB |
21273 | ac_arg="--prefix=$prefix" |
21274 | case $ac_arg in | |
81ecdfbb | 21275 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 21276 | esac |
81ecdfbb RW |
21277 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
21278 | ||
21279 | # Pass --silent | |
21280 | if test "$silent" = yes; then | |
21281 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
21282 | fi | |
21283 | ||
21284 | # Always prepend --disable-option-checking to silence warnings, since | |
21285 | # different subdirs can have different --enable and --with options. | |
21286 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 21287 | |
b4e70030 | 21288 | ac_popdir=`pwd` |
bec39cab | 21289 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
21290 | |
21291 | # Do not complain, so a configure script can configure whichever | |
21292 | # parts of a large source tree are present. | |
fdc59709 | 21293 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 21294 | |
81ecdfbb RW |
21295 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
21296 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
21297 | $as_echo "$ac_msg" >&6 | |
21298 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
21299 | ac_builddir=. |
21300 | ||
81ecdfbb RW |
21301 | case "$ac_dir" in |
21302 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21303 | *) | |
21304 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
21305 | # A ".." for each directory in $ac_dir_suffix. | |
21306 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
21307 | case $ac_top_builddir_sub in | |
21308 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
21309 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
21310 | esac ;; | |
21311 | esac | |
21312 | ac_abs_top_builddir=$ac_pwd | |
21313 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
21314 | # for backward compatibility: | |
21315 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
21316 | |
21317 | case $srcdir in | |
81ecdfbb | 21318 | .) # We are building in place. |
bec39cab | 21319 | ac_srcdir=. |
81ecdfbb RW |
21320 | ac_top_srcdir=$ac_top_builddir_sub |
21321 | ac_abs_top_srcdir=$ac_pwd ;; | |
21322 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 21323 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
21324 | ac_top_srcdir=$srcdir |
21325 | ac_abs_top_srcdir=$srcdir ;; | |
21326 | *) # Relative name. | |
21327 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
21328 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
21329 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 21330 | esac |
81ecdfbb | 21331 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 21332 | |
c906108c | 21333 | |
fdc59709 | 21334 | cd "$ac_dir" |
c906108c SS |
21335 | |
21336 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
21337 | if test -f "$ac_srcdir/configure.gnu"; then |
21338 | ac_sub_configure=$ac_srcdir/configure.gnu | |
21339 | elif test -f "$ac_srcdir/configure"; then | |
21340 | ac_sub_configure=$ac_srcdir/configure | |
21341 | elif test -f "$ac_srcdir/configure.in"; then | |
21342 | # This should be Cygnus configure. | |
21343 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 21344 | else |
81ecdfbb RW |
21345 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
21346 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
21347 | ac_sub_configure= |
21348 | fi | |
21349 | ||
21350 | # The recursion is here. | |
21351 | if test -n "$ac_sub_configure"; then | |
c906108c | 21352 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
21353 | case $cache_file in |
21354 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
21355 | *) # Relative name. |
21356 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 21357 | esac |
c906108c | 21358 | |
81ecdfbb RW |
21359 | { $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 |
21360 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 21361 | # The eval makes quoting arguments work. |
fdc59709 PB |
21362 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
21363 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
d0ac1c44 | 21364 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
21365 | fi |
21366 | ||
fdc59709 | 21367 | cd "$ac_popdir" |
c906108c SS |
21368 | done |
21369 | fi | |
81ecdfbb RW |
21370 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
21371 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
21372 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
21373 | fi | |
c906108c | 21374 |